generated from DeFiFoFum/hardhat-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoutput1.json
130 lines (130 loc) · 222 KB
/
output1.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
{
"language": "Solidity",
"sources": {
"./contracts/PriceGetterExtended.sol": {
"content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity 0.8.16;\n\nimport \"./IPriceGetterV1.sol\";\nimport \"./PriceGetterV2.sol\";\n\n/**\nDISCLAIMER:\nThis smart contract is provided for user interface purposes only and is not intended to be used for smart contract logic. \nAny attempt to rely on this code for the execution of a smart contract may result in unexpected behavior, \nerrors, or other issues that could lead to financial loss or other damages. \nThe user assumes all responsibility and risk for proper usage. \nThe developer and associated parties make no warranties and are not liable for any damages incurred.\n*/\n\ncontract PriceGetterExtended is IPriceGetterV1, PriceGetterV2 {\n function DECIMALS() external pure returns (uint256) {\n return 18;\n }\n\n function FACTORY() external pure returns (address) {\n return address(0);\n }\n\n function INITCODEHASH() external pure returns (bytes32) {\n return \"\";\n }\n\n /**\n * @dev Returns the price of a specified liquidity pool token.\n * @param token The address of the liquidity pool token.\n * @param _decimals UNUSED, kept for backwards compatibility.\n * @return The price of the liquidity pool token.\n */\n function getLPPrice(address token, uint256 _decimals) external view returns (uint256) {\n return getLPPriceV2(token);\n }\n\n /**\n * @dev Returns the prices of specified liquidity pool tokens.\n * @param tokens Array of liquidity pool token addresses.\n * @param _decimals UNUSED, kept for backwards compatibility.\n * @return prices Array of liquidity pool token prices.\n */\n function getLPPrices(address[] calldata tokens, uint256 _decimals) external view returns (uint256[] memory prices) {\n return getLPPricesV2(tokens);\n }\n\n function getNativePrice() external view override returns (uint256) {\n return getNativePrice(Protocol.Both);\n }\n\n function getETHPrice(uint32 secondsAgo) external view returns (uint256) {\n return getNativePrice(Protocol.Both);\n }\n\n function getETHPrice() external view returns (uint256) {\n return getNativePrice(Protocol.Both);\n }\n\n /**\n * @dev Returns the price of the specified token.\n * @param token The address of the token.\n * @param _decimals UNUSED, kept for backwards compatibility.\n * @return The price of the token.\n */\n function getPrice(address token, uint256 _decimals) external view override returns (uint256) {\n return getPrice(token, Protocol.Both);\n }\n\n function getPrice(address token, uint32 secondsAgo) external view returns (uint256) {\n return getPrice(token, Protocol.Both);\n }\n\n function getPrices(address[] calldata tokens, uint256 _decimals) external view returns (uint256[] memory prices) {\n return getPrices(tokens, Protocol.Both);\n }\n\n function getPrices(address[] calldata tokens, uint32 secondsAgo) external view returns (uint256[] memory prices) {\n return getPrices(tokens, Protocol.Both);\n }\n\n function getRawPrice(address token) external view returns (uint256) {\n return getPrice(token, Protocol.V2);\n }\n\n /**\n * @dev {see getPrices} Left for backwards compatibility.\n */\n function getRawPrices(address[] calldata tokens) external view returns (uint256[] memory prices) {\n return getPrices(tokens, Protocol.V2);\n }\n}\n"
},
"./contracts/IPriceGetterV1.sol": {
"content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity 0.8.16;\n\n/**\n * @title IPriceGetterV1\n * @dev This is the original interface for the PriceGetter contract for backward compatibility.\n */\ninterface IPriceGetterV1 {\n function DECIMALS() external view returns (uint256);\n\n function FACTORY() external view returns (address);\n\n function INITCODEHASH() external view returns (bytes32);\n\n function getLPPrice(address token, uint256 _decimals) external view returns (uint256);\n\n function getLPPrices(address[] calldata tokens, uint256 _decimals) external view returns (uint256[] memory prices);\n\n function getNativePrice() external view returns (uint256);\n\n function getPrice(address token, uint256 _decimals) external view returns (uint256);\n\n function getPrices(address[] calldata tokens, uint256 _decimals) external view returns (uint256[] memory prices);\n\n function getRawPrice(address token) external view returns (uint256);\n\n function getRawPrices(address[] calldata tokens) external view returns (uint256[] memory prices);\n}\n"
},
"./contracts/PriceGetterV2.sol": {
"content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity 0.8.16;\n\nimport \"./token-lib/IERC20.sol\";\nimport \"./swap-v2-lib/IApePair.sol\";\nimport \"./swap-v2-lib/IApeFactory.sol\";\nimport \"./swap-v2-lib/ISolidlyFactory.sol\";\nimport \"./chainlink/ChainlinkOracle.sol\";\nimport \"./IPriceGetterV2.sol\";\nimport \"./interfaces/IUniswapV3PoolStateSlot0.sol\";\nimport \"./interfaces/IAlgebraPool.sol\";\n\nimport \"@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol\";\nimport \"@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol\";\nimport \"@uniswap/v3-core/contracts/libraries/TickMath.sol\";\nimport \"@uniswap/v3-core/contracts/libraries/FixedPoint96.sol\";\nimport \"@uniswap/v3-core/contracts/libraries/FullMath.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\nimport \"hardhat/console.sol\";\n\n/**\nDISCLAIMER: \nThis smart contract is provided for user interface purposes only and is not intended to be used for smart contract logic. \nAny attempt to rely on this code for the execution of a smart contract may result in unexpected behavior, \nerrors, or other issues that could lead to financial loss or other damages. \nThe user assumes all responsibility and risk for proper usage. \nThe developer and associated parties make no warranties and are not liable for any damages incurred.\n*/\n\ncontract PriceGetterV2 is IPriceGetterV2, ChainlinkOracle, Initializable, OwnableUpgradeable {\n enum OracleType {\n NONE,\n CHAIN_LINK\n }\n\n struct OracleInfo {\n OracleType oracleType;\n address oracleAddress;\n uint8 oracleDecimals;\n }\n\n struct LocalVarsV2Price {\n uint256 usdStableTotal;\n uint256 wNativeReserve;\n uint256 wNativeTotal;\n uint256 tokenReserve;\n uint256 stableUsdReserve;\n }\n\n mapping(address => OracleInfo) public tokenOracles;\n address public wNative;\n uint8 wNativeDecimals;\n address[] public stableUsdTokens;\n mapping(address => uint8) public stableUsdTokenDecimals;\n IApeFactory public defaultFactoryV2;\n IUniswapV3Factory public defaultFactoryV3;\n IAlgebraFactory public defaultFactoryAlgebra;\n ISolidlyFactory public defaultFactorySolidly;\n uint24 public secondsAgo;\n\n /**\n * @dev This contract constructor takes in several parameters which includes the wrapped native token address,\n * an array of addresses for stable USD tokens, an array of addresses for oracle tokens, and an array of addresses\n * for oracles.\n *\n * @param _wNative Address of the wrapped native token\n * @param _defaultFactoryV2 Address of factoryV2\n * @param _defaultFactoryV3 Address of factoryV3\n * @param _stableUsdTokens Array of stable USD token addresses\n * @param _oracleTokens Array of oracle token addresses\n * @param _oracles Array of oracle addresses\n */\n function initialize(\n address _wNative,\n IApeFactory _defaultFactoryV2,\n IUniswapV3Factory _defaultFactoryV3,\n IAlgebraFactory _defaultFactoryAlgebra,\n ISolidlyFactory _defaultFactorySolidly,\n address[] memory _stableUsdTokens,\n address[] memory _oracleTokens,\n address[] memory _oracles\n ) public initializer {\n __Ownable_init();\n secondsAgo = 0;\n // Check if the lengths of the oracleTokens and oracles arrays match\n require(_oracleTokens.length == _oracles.length, \"Oracles length mismatch\");\n\n // Loop through the oracleTokens array and set the oracle address for each oracle token using the _setTokenOracle() internal helper function\n for (uint256 i = 0; i < _oracleTokens.length; i++) {\n /// @dev Assumes OracleType.CHAIN_LINK\n _setTokenOracle(_oracleTokens[i], _oracles[i], OracleType.CHAIN_LINK);\n }\n\n // Add the stable USD tokens to the stableCoins array using the _addStableUsdTokens() internal helper function\n _addStableUsdTokens(_stableUsdTokens);\n\n // Set the wrapped native token (wNative) address\n wNative = _wNative;\n wNativeDecimals = _getTokenDecimals(wNative);\n\n // Set the factory addresses\n defaultFactoryV2 = _defaultFactoryV2;\n defaultFactoryV3 = _defaultFactoryV3;\n defaultFactoryAlgebra = _defaultFactoryAlgebra;\n defaultFactorySolidly = _defaultFactorySolidly;\n }\n\n /** SETTERS */\n\n /**\n * @dev Adds new stable USD tokens to the list of supported stable USD tokens.\n * @param newStableUsdTokens An array of addresses representing the new stable USD tokens to add.\n */\n function _addStableUsdTokens(address[] memory newStableUsdTokens) internal {\n for (uint256 i = 0; i < newStableUsdTokens.length; i++) {\n address stableUsdToken = newStableUsdTokens[i];\n stableUsdTokens.push(newStableUsdTokens[i]);\n require(stableUsdTokenDecimals[stableUsdToken] == 0, \"PriceGetter: Stable token already added\");\n stableUsdTokenDecimals[stableUsdToken] = _getTokenDecimals(stableUsdToken);\n }\n }\n\n /**\n * @dev Sets the oracle address and type for a specified token.\n * @param token The address of the token to set the oracle for.\n * @param oracleAddress The address of the oracle contract.\n * @param oracleType The type of the oracle (e.g. Chainlink, Uniswap).\n */\n function setTokenOracle(address token, address oracleAddress, OracleType oracleType) public onlyOwner {\n _setTokenOracle(token, oracleAddress, oracleType);\n }\n\n /**\n * @dev Removes the oracle address for a specified token.\n * @param token The address of the token to set the oracle for.\n */\n function removeTokenOracle(address token) public onlyOwner {\n delete tokenOracles[token];\n }\n\n /**\n * @dev Sets the oracle address and type for a specified token.\n * @param token The address of the token to set the oracle for.\n * @param oracleAddress The address of the oracle contract.\n * @param oracleType The type of the oracle (e.g. Chainlink, Uniswap).\n */\n function _setTokenOracle(address token, address oracleAddress, OracleType oracleType) internal {\n uint8 oracleDecimals = 18;\n try IERC20(oracleAddress).decimals() returns (uint8 dec) {\n oracleDecimals = dec;\n } catch {}\n\n tokenOracles[token] = OracleInfo({\n oracleType: oracleType,\n oracleAddress: oracleAddress,\n oracleDecimals: oracleDecimals\n });\n }\n\n /** GETTERS */\n\n // ===== Get LP Prices =====\n\n /**\n * @dev Returns the price of a liquidity pool\n * @param lp The address of the LP token contract.\n * @return price The current price of the LP token.\n */\n function getLPPriceV2(address lp) public view override returns (uint256 price) {\n return getLPPriceV2FromFactory(defaultFactoryV2, lp);\n }\n\n function getLPPriceV2FromFactory(IApeFactory factoryV2, address lp) public view override returns (uint256 price) {\n //if not a LP, handle as a standard token\n try IApePair(lp).getReserves() returns (uint112 reserve0, uint112 reserve1, uint32) {\n address token0 = IApePair(lp).token0();\n address token1 = IApePair(lp).token1();\n uint256 totalSupply = IApePair(lp).totalSupply();\n\n //price0*reserve0+price1*reserve1\n (uint256 token0Price, ) = _getPriceV2(factoryV2, token0);\n (uint256 token1Price, ) = _getPriceV2(factoryV2, token1);\n reserve0 = _normalizeToken112(reserve0, token0);\n reserve1 = _normalizeToken112(reserve1, token1);\n uint256 totalValue = (token0Price * uint256(reserve0)) + (token1Price * uint256(reserve1));\n\n return totalValue / totalSupply;\n } catch {\n /// @dev If the pair is not a valid LP, return the price of the token\n (uint256 lpPrice, ) = _getPriceV2(factoryV2, lp);\n return lpPrice;\n }\n }\n\n /**\n * @dev Returns the price of a liquidity pool\n * @param lp The address of the LP token contract.\n * @return price The current price of the LP token.\n */\n function getLPPriceSolidly(address lp) public view returns (uint256 price) {\n return getLPPriceSolidlyFromFactory(defaultFactorySolidly, lp);\n }\n\n function getLPPriceSolidlyFromFactory(\n ISolidlyFactory factorySolidly,\n address lp\n ) public view returns (uint256 price) {\n //if not a LP, handle as a standard token\n try IApePair(lp).getReserves() returns (uint112 reserve0, uint112 reserve1, uint32) {\n address token0 = IApePair(lp).token0();\n address token1 = IApePair(lp).token1();\n uint256 totalSupply = IApePair(lp).totalSupply();\n\n //price0*reserve0+price1*reserve1\n (uint256 token0Price, ) = _getPriceSolidly(factorySolidly, token0);\n (uint256 token1Price, ) = _getPriceSolidly(factorySolidly, token1);\n reserve0 = _normalizeToken112(reserve0, token0);\n reserve1 = _normalizeToken112(reserve1, token1);\n uint256 totalValue = (token0Price * uint256(reserve0)) + (token1Price * uint256(reserve1));\n\n return totalValue / totalSupply;\n } catch {\n /// @dev If the pair is not a valid LP, return the price of the token\n (uint256 lpPrice, ) = _getPriceSolidly(factorySolidly, lp);\n return lpPrice;\n }\n }\n\n /**\n * @dev Returns the prices of multiple LP tokens using the getLPPriceV2 function.\n * @param tokens An array of LP token addresses to get the prices for.\n * @return prices An array of prices for the specified LP tokens.\n */\n function getLPPricesV2(address[] calldata tokens) public view override returns (uint256[] memory prices) {\n return getLPPricesV2FromFactory(defaultFactoryV2, tokens);\n }\n\n /**\n * @dev This function takes in an instance of the ApeSwap factory contract and an array of token addresses,\n * and returns an array of prices for each corresponding liquidity pool. It iterates through each token address,\n * and calls the `getLPPriceV2` function to retrieve the price of the corresponding liquidity pool. The prices\n * are stored in an array and returned.\n *\n * @param factoryV2 An instance of the ApeSwap factory contract\n * @param tokens An array of token addresses\n * @return prices An array of prices for each corresponding liquidity pool\n */\n function getLPPricesV2FromFactory(\n IApeFactory factoryV2,\n address[] calldata tokens\n ) public view returns (uint256[] memory prices) {\n prices = new uint256[](tokens.length);\n for (uint256 i; i < prices.length; i++) {\n address token = tokens[i];\n prices[i] = getLPPriceV2FromFactory(factoryV2, token);\n }\n }\n\n /**\n * @dev Returns the prices of multiple LP tokens using the getLPPriceV2 function.\n * @param tokens An array of LP token addresses to get the prices for.\n * @return prices An array of prices for the specified LP tokens.\n */\n function getLPPricesSolidly(address[] calldata tokens) public view returns (uint256[] memory prices) {\n return getLPPricesSolidlyFromFactory(defaultFactorySolidly, tokens);\n }\n\n /**\n * @dev This function takes in an instance of the ApeSwap factory contract and an array of token addresses,\n * and returns an array of prices for each corresponding liquidity pool. It iterates through each token address,\n * and calls the `getLPPriceV2` function to retrieve the price of the corresponding liquidity pool. The prices\n * are stored in an array and returned.\n *\n * @param factorySolidly An instance of the ApeSwap factory contract\n * @param tokens An array of token addresses\n * @return prices An array of prices for each corresponding liquidity pool\n */\n function getLPPricesSolidlyFromFactory(\n ISolidlyFactory factorySolidly,\n address[] calldata tokens\n ) public view returns (uint256[] memory prices) {\n prices = new uint256[](tokens.length);\n for (uint256 i; i < prices.length; i++) {\n address token = tokens[i];\n prices[i] = getLPPriceSolidlyFromFactory(factorySolidly, token);\n }\n }\n\n /**\n * @dev Returns the price of an LP token.\n * @param token0 The address of the first token in the LP pair.\n * @param token1 The address of the second token in the LP pair.\n * @param fee The Uniswap V3 pool fee.\n * @return price The price of the LP token.\n */\n function getLPPriceV3(address token0, address token1, uint24 fee) public view override returns (uint256 price) {\n return getLPPriceV3FromFactory(address(defaultFactoryV3), token0, token1, fee);\n }\n\n /**\n * @dev Returns the price of an LP token.\n * @param token0 The address of the first token in the LP pair.\n * @param token1 The address of the second token in the LP pair.\n * @return price The price of the LP token.\n */\n function getLPPriceAlgebra(address token0, address token1) public view override returns (uint256 price) {\n return getLPPriceAlgebraFromFactory(defaultFactoryAlgebra, token0, token1);\n }\n\n /**\n * @dev Returns the price of a gamma LP token.\n * @param lp The address of the gamma LP pair.\n * @return price The price of the gamma LP token.\n */\n function getLPPriceGamma(Hypervisor lp) public view override returns (uint256 price) {\n (uint256 priceToken0, ) = _getPriceAlgebra(defaultFactoryAlgebra, address(lp.token0()));\n if (priceToken0 == 0) {\n (priceToken0, ) = _getPriceV2(defaultFactoryV2, address(lp.token0()));\n }\n (uint256 priceToken1, ) = _getPriceAlgebra(defaultFactoryAlgebra, address(lp.token1()));\n if (priceToken1 == 0) {\n (priceToken1, ) = _getPriceV2(defaultFactoryV2, address(lp.token0()));\n }\n (uint256 total0, uint256 total1) = lp.getTotalAmounts();\n price =\n (priceToken0 *\n _normalizeToken(total0, address(lp.token0())) +\n priceToken1 *\n _normalizeToken(total1, address(lp.token1()))) /\n lp.totalSupply();\n }\n\n function getLPPriceGammaFromFactory(\n IAlgebraFactory factory,\n IApeFactory factoryV2,\n Hypervisor lp\n ) public view override returns (uint256 price) {\n if (address(factoryV2) == address(0)) {\n factoryV2 = defaultFactoryV2;\n }\n (uint256 priceToken0, ) = _getPriceAlgebra(factory, address(lp.token0()));\n if (priceToken0 == 0) {\n (priceToken0, ) = _getPriceV2(factoryV2, address(lp.token0()));\n }\n (uint256 priceToken1, ) = _getPriceAlgebra(factory, address(lp.token1()));\n if (priceToken1 == 0) {\n (priceToken1, ) = _getPriceV2(factoryV2, address(lp.token0()));\n }\n (uint256 total0, uint256 total1) = lp.getTotalAmounts();\n price =\n (priceToken0 *\n _normalizeToken(total0, address(lp.token0())) +\n priceToken1 *\n _normalizeToken(total1, address(lp.token1()))) /\n lp.totalSupply();\n }\n\n /**\n * @dev Returns the price of a steer LP token.\n * @param factoryV3 The address of the V3 factory\n * @param factoryV2 The address of the V2 factory\n * @param lp The address of the steer LP pair.\n * @return price The price of the steer LP token.\n */\n function getLPPriceSteerFromFactory(\n IUniswapV3Factory factoryV3,\n IApeFactory factoryV2,\n ISteerVault lp\n ) public view override returns (uint256 price) {\n if (address(factoryV2) == address(0)) {\n factoryV2 = defaultFactoryV2;\n }\n (uint256 priceToken0, ) = _getPriceV3(factoryV3, address(lp.token0()));\n if (priceToken0 == 0) {\n (priceToken0, ) = _getPriceV2(factoryV2, address(lp.token0()));\n }\n (uint256 priceToken1, ) = _getPriceV3(factoryV3, address(lp.token1()));\n if (priceToken1 == 0) {\n (priceToken1, ) = _getPriceV2(factoryV2, address(lp.token0()));\n }\n (uint256 total0, uint256 total1) = lp.getTotalAmounts();\n price =\n (priceToken0 *\n _normalizeToken(total0, address(lp.token0())) +\n priceToken1 *\n _normalizeToken(total1, address(lp.token1()))) /\n lp.totalSupply();\n }\n\n /**\n * @dev Returns the price of an LP token.\n * @param token0 The address of the first token in the LP pair.\n * @param token1 The address of the second token in the LP pair.\n * @return price The price of the LP token.\n */\n function getLPPriceAlgebraFromFactory(\n IAlgebraFactory factoryAlgebra,\n address token0,\n address token1\n ) public view override returns (uint256 price) {\n return getLPPriceV3FromFactory(address(factoryAlgebra), token0, token1, 0);\n }\n\n /**\n * @dev This function takes in an instance of the Uniswap V3 factory contract, token addresses and fee amount,\n * and returns the price of the corresponding liquidity pool. It first retrieves the address of the liquidity pool\n * using the `getPool` function of the Uniswap V3 factory contract. If the pair doesn't exist, it returns 0.\n * Otherwise, it retrieves the current sqrt price of the pool from the slot0 data of the pool. It then calculates\n * the decimal correction factor to adjust for different decimals between the two tokens. Finally, it calculates\n * and returns the price of the pool.\n *\n * @param factoryV3 An instance of the Uniswap V3 factory contract\n * @param token0 The address of one token in the liquidity pool\n * @param token1 The address of the other token in the liquidity pool\n * @param fee The fee amount of the liquidity pool\n * @dev If fee set to 0 it gets price from algebra\n * @return price The price of the liquidity pool\n */\n function getLPPriceV3FromFactory(\n address factoryV3,\n address token0,\n address token1,\n uint24 fee\n ) public view override returns (uint256 price) {\n address tokenPegPair;\n if (fee == 0) {\n tokenPegPair = IAlgebraFactory(factoryV3).poolByPair(token0, token1);\n } else {\n tokenPegPair = IUniswapV3Factory(factoryV3).getPool(token0, token1, fee);\n }\n\n // if the address has no contract deployed, the pair doesn't exist\n uint256 size;\n\n assembly {\n size := extcodesize(tokenPegPair)\n }\n\n if (size == 0) return 0;\n\n uint256 sqrtPriceX96;\n if (secondsAgo == 0) {\n // return the current price if secondsAgo == 0\n if (fee == 0) {\n (sqrtPriceX96, , , , , , ) = IAlgebraPool(tokenPegPair).globalState();\n } else {\n (sqrtPriceX96, , , , , , ) = IUniswapV3PoolStateSlot0(tokenPegPair).slot0();\n }\n } else {\n uint32[] memory secondsAgos = new uint32[](2);\n secondsAgos[0] = secondsAgo; // from (before)\n secondsAgos[1] = 0; // to (now)\n\n (int56[] memory tickCumulatives, ) = IUniswapV3Pool(tokenPegPair).observe(secondsAgos);\n\n // tick(imprecise as it's an integer) to price\n sqrtPriceX96 = TickMath.getSqrtRatioAtTick(\n int24((tickCumulatives[1] - tickCumulatives[0]) / int56(int24(secondsAgo)))\n );\n }\n\n uint256 token0Decimals;\n try IERC20(token0).decimals() returns (uint8 dec) {\n token0Decimals = dec;\n } catch {\n token0Decimals = 18;\n }\n\n uint256 token1Decimals;\n try IERC20(token1).decimals() returns (uint8 dec) {\n token1Decimals = dec;\n } catch {\n token1Decimals = 18;\n }\n\n //Makes sure it doesn't overflow\n uint256 decimalCorrection = 0;\n if (sqrtPriceX96 >= 340282366920938463463374607431768211455) {\n sqrtPriceX96 = sqrtPriceX96 / 1e3;\n decimalCorrection = 6;\n }\n if (sqrtPriceX96 >= 340282366920938463463374607431768211455) {\n return 0;\n }\n\n if (token1 < token0) {\n price =\n (2 ** 192) /\n ((sqrtPriceX96) ** 2 / uint256(10 ** (token0Decimals + 18 - token1Decimals - decimalCorrection)));\n } else {\n price =\n ((sqrtPriceX96) ** 2) /\n ((2 ** 192) / uint256(10 ** (token0Decimals + 18 - token1Decimals - decimalCorrection)));\n }\n }\n\n /**\n * @dev Returns the prices of multiple LP tokens using the getLPPriceV3 function.\n * @param tokens0 An array of addresses representing the first tokens in the LP pairs to get the prices for.\n * @param tokens1 An array of addresses representing the second tokens in the LP pairs to get the prices for.\n * @param fees An array of Uniswap V3 pool fees for each LP pair.\n * @return prices An array of prices for the specified LP tokens.\n */\n function getLPPricesV3(\n address[] calldata tokens0,\n address[] calldata tokens1,\n uint24[] calldata fees\n ) public view override returns (uint256[] memory prices) {\n return getLPPricesV3FromFactory(defaultFactoryV3, tokens0, tokens1, fees);\n }\n\n /**\n * @dev This function takes in an instance of the Uniswap V3 factory contract, arrays of token addresses and fees,\n * and returns an array of prices for each pair of tokens. It loops through each pair of tokens and calls the\n * `getLPPriceV3` function to get the price of the corresponding liquidity pool. The resulting prices are stored\n * in an array and returned.\n *\n * @param factoryV3 An instance of the Uniswap V3 factory contract\n * @param tokens0 An array of addresses representing the first tokens in the LP pairs to get the prices for.\n * @param tokens1 An array of addresses representing the second tokens in the LP pairs to get the prices for.\n * @param fees An array of Uniswap V3 pool fees for each LP pair.\n * @return prices An array of prices for the specified LP tokens.\n */\n function getLPPricesV3FromFactory(\n IUniswapV3Factory factoryV3,\n address[] calldata tokens0,\n address[] calldata tokens1,\n uint24[] calldata fees\n ) public view override returns (uint256[] memory prices) {\n require(\n tokens0.length == tokens1.length && tokens0.length == fees.length,\n \"getLPPricesV3FromFactory: LENGTH_MISMATCH\"\n );\n uint256 tokensLength = tokens0.length;\n prices = new uint256[](tokensLength);\n for (uint256 i; i < tokensLength; i++) {\n address token0 = tokens0[i];\n address token1 = tokens1[i];\n uint24 fee = fees[i];\n prices[i] = getLPPriceV3FromFactory(address(factoryV3), token0, token1, fee);\n }\n }\n\n /**\n * @dev Returns the prices of LP token from a specic protocol an factory.\n * @param protocol The protocol version to use\n * @param factoryV2 The address of the V2 factory\n * @param factoryV3 The address of the V3 factory\n * @param factoryAlgebra The address of the Algebra factory\n * @return price The current price of LP.\n * @dev Protocol V3 and Algebra not yet supported in here because functions token 2 tokens instead of 1 and for V3 also a fee.\n * Use the dedicated functions for these protocols\n */\n function getLPPriceFromFactory(\n address token,\n Protocol protocol,\n IApeFactory factoryV2,\n IUniswapV3Factory factoryV3,\n IAlgebraFactory factoryAlgebra,\n ISolidlyFactory factorySolidly\n ) public view override returns (uint256 price) {\n if (protocol == Protocol.Both) {\n revert(\"LP can't be both\");\n } else if (protocol == Protocol.V2) {\n uint256 lpV2Price = getLPPriceV2FromFactory(factoryV2, token);\n return lpV2Price;\n } else if (protocol == Protocol.V3) {\n revert(\"No support for V3 yet on this function\");\n } else if (protocol == Protocol.Algebra) {\n revert(\"No support for Algebra yet on this function\");\n } else if (protocol == Protocol.Gamma) {\n uint256 lpAlgebraPrice = getLPPriceGammaFromFactory(factoryAlgebra, factoryV2, Hypervisor(token));\n return lpAlgebraPrice;\n } else if (protocol == Protocol.Steer) {\n uint256 lpSteerPrice = getLPPriceSteerFromFactory(factoryV3, factoryV2, ISteerVault(token));\n return lpSteerPrice;\n } else if (protocol == Protocol.Solidly) {\n uint256 lpSolidlyPrice = getLPPriceSolidlyFromFactory(factorySolidly, token);\n return lpSolidlyPrice;\n } else {\n revert(\"Invalid protocol\");\n }\n }\n\n // ===== Get Native Prices =====\n\n /**\n * @dev Returns the current price of wNative in USD based on the given protocol and time delta.\n * @param protocol The protocol version to use\n * @return nativePrice The current price of wNative in USD.\n */\n function getNativePrice(Protocol protocol) public view override returns (uint256 nativePrice) {\n return getNativePriceFromFactory(protocol, defaultFactoryV2, defaultFactoryV3, defaultFactorySolidly);\n }\n\n function getNativePriceFromFactory(\n Protocol protocol,\n IApeFactory factoryV2,\n IUniswapV3Factory factoryV3,\n ISolidlyFactory factorySolidly\n ) public view override returns (uint256 nativePrice) {\n /// @dev Short circuit if oracle price is found\n uint256 oraclePrice = _getOraclePriceNormalized(wNative);\n if (oraclePrice > 0) {\n return oraclePrice;\n }\n\n if (protocol == Protocol.Both) {\n (uint256 nativeV3Price, uint256 totalNativeV3) = _getNativePriceV3(factoryV3);\n (uint256 nativeV2Price, uint256 totalNativeV2) = _getNativePriceV2(factoryV2);\n if (totalNativeV3 + totalNativeV2 == 0) return 0;\n return (nativeV3Price * totalNativeV3 + nativeV2Price * totalNativeV2) / (totalNativeV3 + totalNativeV2);\n } else if (protocol == Protocol.V2) {\n (uint256 nativeV2Price, ) = _getNativePriceV2(factoryV2);\n return nativeV2Price;\n } else if (protocol == Protocol.V3) {\n (uint256 nativeV3Price, ) = _getNativePriceV3(factoryV3);\n return nativeV3Price;\n } else if (protocol == Protocol.Algebra) {\n (uint256 nativeAlgebraPrice, ) = _getNativePriceAlgebra(defaultFactoryAlgebra);\n return nativeAlgebraPrice;\n } else if (protocol == Protocol.Solidly) {\n (uint256 nativeAlgebraPrice, ) = _getNativePriceSolidly(factorySolidly);\n return nativeAlgebraPrice;\n } else {\n revert(\"Invalid protocol\");\n }\n }\n\n /**\n * @dev Calculates the price of wNative using V2 pricing.\n * Compares multiple stable pools and weights by their oracle price.\n * @param factoryV2 The address of the V2 factory\n * @return price price of wNative in USD\n * @return wNativeTotal The total amount of wNative in the pools.\n */\n function _getNativePriceV2(IApeFactory factoryV2) internal view returns (uint256 price, uint256 wNativeTotal) {\n /// @dev This method calculates the price of wNative by comparing multiple stable pools and weighting by their oracle price\n uint256 usdStableTotal = 0;\n for (uint256 i = 0; i < stableUsdTokens.length; i++) {\n address stableUsdToken = stableUsdTokens[i];\n (uint256 wNativeReserve, uint256 stableUsdReserve) = _getNormalizedReservesFromFactoryV2_Decimals(\n factoryV2,\n wNative,\n stableUsdToken,\n wNativeDecimals,\n stableUsdTokenDecimals[stableUsdToken]\n );\n uint256 stableUsdPrice = _getOraclePriceNormalized(stableUsdToken);\n if (stableUsdPrice > 0) {\n /// @dev Weighting the USD side of the pair by the price of the USD stable token if it exists.\n usdStableTotal += (stableUsdReserve * stableUsdPrice) / 1e18;\n } else {\n usdStableTotal += stableUsdReserve;\n }\n wNativeTotal += wNativeReserve;\n }\n\n price = (usdStableTotal * 1e18) / wNativeTotal;\n }\n\n /**\n * @dev Calculates the price of wNative using V2 pricing.\n * Compares multiple stable pools and weights by their oracle price.\n * @param factorySolidly The address of the V2 factory\n * @return price price of wNative in USD\n * @return wNativeTotal The total amount of wNative in the pools.\n */\n function _getNativePriceSolidly(\n ISolidlyFactory factorySolidly\n ) internal view returns (uint256 price, uint256 wNativeTotal) {\n /// @dev This method calculates the price of wNative by comparing multiple stable pools and weighting by their oracle price\n uint256 usdStableTotal = 0;\n for (uint256 i = 0; i < stableUsdTokens.length; i++) {\n address stableUsdToken = stableUsdTokens[i];\n (uint256 wNativeReserve, uint256 stableUsdReserve) = _getNormalizedReservesFromFactorySolidly_Decimals(\n factorySolidly,\n wNative,\n stableUsdToken,\n wNativeDecimals,\n stableUsdTokenDecimals[stableUsdToken]\n );\n uint256 stableUsdPrice = _getOraclePriceNormalized(stableUsdToken);\n if (stableUsdPrice > 0) {\n /// @dev Weighting the USD side of the pair by the price of the USD stable token if it exists.\n usdStableTotal += (stableUsdReserve * stableUsdPrice) / 1e18;\n } else {\n usdStableTotal += stableUsdReserve;\n }\n wNativeTotal += wNativeReserve;\n }\n\n price = (usdStableTotal * 1e18) / wNativeTotal;\n }\n\n /**\n * @dev Calculates the price of wNative using V3 pricing.\n * Uses Uniswap V3 pools with various fees and stable tokens.\n * @param factoryV3 The address of the V3 factory\n * @return price The price of wNative in USD\n * @return wNativeTotal The total amount of wNative in the pools.\n */\n function _getNativePriceV3(\n IUniswapV3Factory factoryV3\n ) internal view returns (uint256 price, uint256 wNativeTotal) {\n uint256 totalPrice;\n\n uint24[] memory fees = new uint24[](4);\n fees[0] = 100;\n fees[1] = 500;\n fees[2] = 3000;\n fees[3] = 10000;\n // Loop through each feeIndex\n for (uint24 feeIndex = 0; feeIndex < 4; feeIndex++) {\n uint24 fee = fees[feeIndex];\n // Loop through each stable usd token\n for (uint256 i = 0; i < stableUsdTokens.length; i++) {\n address stableUsdToken = stableUsdTokens[i];\n price = getLPPriceV3FromFactory(address(factoryV3), wNative, stableUsdToken, fee);\n uint256 stableUsdPrice = _getOraclePriceNormalized(stableUsdToken);\n if (stableUsdPrice > 0) {\n price = (price * stableUsdPrice) / 1e18;\n }\n if (price > 0) {\n address pair = factoryV3.getPool(wNative, stableUsdToken, fee);\n uint256 balance = IERC20(wNative).balanceOf(pair);\n totalPrice += price * balance;\n wNativeTotal += balance;\n }\n }\n }\n\n if (wNativeTotal == 0) {\n return (0, wNativeTotal);\n }\n price = totalPrice / wNativeTotal;\n }\n\n /**\n * @dev Calculates the price of wNative using V3 pricing.\n * Uses Uniswap V3 pools with various fees and stable tokens.\n * @param factoryAlgebra The address of the V3 factory\n * @return price The price of wNative in USD\n * @return wNativeTotal The total amount of wNative in the pools.\n */\n function _getNativePriceAlgebra(\n IAlgebraFactory factoryAlgebra\n ) internal view returns (uint256 price, uint256 wNativeTotal) {\n uint256 totalPrice;\n\n // Loop through each stable usd token\n for (uint256 i = 0; i < stableUsdTokens.length; i++) {\n address stableUsdToken = stableUsdTokens[i];\n price = getLPPriceV3FromFactory(address(factoryAlgebra), wNative, stableUsdToken, 0);\n uint256 stableUsdPrice = _getOraclePriceNormalized(stableUsdToken);\n if (stableUsdPrice > 0) {\n price = (price * stableUsdPrice) / 1e18;\n }\n if (price > 0) {\n address pair = factoryAlgebra.poolByPair(wNative, stableUsdToken);\n uint256 balance = IERC20(wNative).balanceOf(pair);\n totalPrice += price * balance;\n wNativeTotal += balance;\n }\n }\n\n if (wNativeTotal == 0) {\n return (0, wNativeTotal);\n }\n price = totalPrice / wNativeTotal;\n }\n\n // ===== Get Token Prices =====\n\n /**\n * @dev Returns the current price of the given token based on the specified protocol and time interval.\n * If protocol is set to 'Both', the price is calculated as a weighted average of the V2 and V3 prices,\n * where the weights are the respective liquidity pools. If protocol is set to 'V2' or 'V3', the price\n * is calculated based on the respective liquidity pool.\n * @param token Address of the token for which the price is requested.\n * @param protocol The liquidity protocol used to calculate the price.\n * @return price The price of the token in USD.\n */\n function getPrice(address token, Protocol protocol) public view override returns (uint256 price) {\n return\n getPriceFromFactory(\n token,\n protocol,\n defaultFactoryV2,\n defaultFactoryV3,\n defaultFactoryAlgebra,\n defaultFactorySolidly\n );\n }\n\n function getPriceFromFactory(\n address token,\n Protocol protocol,\n IApeFactory factoryV2,\n IUniswapV3Factory factoryV3,\n IAlgebraFactory factoryAlgebra,\n ISolidlyFactory factorySolidly\n ) public view override returns (uint256 price) {\n if (token == wNative) {\n return getNativePriceFromFactory(protocol, factoryV2, factoryV3, defaultFactorySolidly);\n }\n\n if (protocol == Protocol.Both) {\n (uint256 tokenV3Price, uint256 totalTokenV3) = _getPriceV3(factoryV3, token);\n (uint256 tokenV2Price, uint256 totalTokenV2) = _getPriceV2(factoryV2, token);\n if (totalTokenV3 + totalTokenV2 == 0) {\n return 0;\n }\n return (tokenV3Price * totalTokenV3 + tokenV2Price * totalTokenV2) / (totalTokenV3 + totalTokenV2);\n } else if (protocol == Protocol.V2) {\n (uint256 tokenV2Price, ) = _getPriceV2(factoryV2, token);\n return tokenV2Price;\n } else if (protocol == Protocol.V3) {\n (uint256 tokenV3Price, ) = _getPriceV3(factoryV3, token);\n return tokenV3Price;\n } else if (protocol == Protocol.Algebra) {\n (uint256 tokenAlgebraPrice, ) = _getPriceAlgebra(factoryAlgebra, token);\n return tokenAlgebraPrice;\n } else if (protocol == Protocol.Solidly) {\n (uint256 tokenAlgebraPrice, ) = _getPriceSolidly(factorySolidly, token);\n return tokenAlgebraPrice;\n } else {\n revert(\"Invalid protocol\");\n }\n }\n\n /**\n * @dev Returns an array of prices for the given array of tokens based on the specified protocol and time interval.\n * @param tokens An array of token addresses for which prices are requested.\n * @param protocol The liquidity protocol used to calculate the prices.\n * @return prices An array of prices for the given tokens in USD.\n */\n function getPrices(\n address[] calldata tokens,\n Protocol protocol\n ) public view override returns (uint256[] memory prices) {\n prices = getPricesFromFactory(\n tokens,\n protocol,\n defaultFactoryV2,\n defaultFactoryV3,\n defaultFactoryAlgebra,\n defaultFactorySolidly\n );\n }\n\n function getPricesFromFactory(\n address[] calldata tokens,\n Protocol protocol,\n IApeFactory factoryV2,\n IUniswapV3Factory factoryV3,\n IAlgebraFactory factoryAlgebra,\n ISolidlyFactory factorySolidly\n ) public view override returns (uint256[] memory prices) {\n uint256 tokenLength = tokens.length;\n prices = new uint256[](tokenLength);\n\n for (uint256 i; i < tokenLength; i++) {\n address token = tokens[i];\n prices[i] = getPriceFromFactory(token, protocol, factoryV2, factoryV3, factoryAlgebra, factorySolidly);\n }\n }\n\n function getPriceV2(address token) public view override returns (uint256 price) {\n (price, ) = _getPriceV2(defaultFactoryV2, token);\n }\n\n function getPriceV2FromFactory(IApeFactory factoryV2, address token) public view override returns (uint256 price) {\n (price, ) = _getPriceV2(factoryV2, token);\n }\n\n /**\n * @dev Returns the price and total balance of the given token based on the V2 liquidity pool.\n * @param token Address of the token for which the price and total balance are requested.\n * @return price The price of the token based on the V2 liquidity pool.\n * @return tokenTotal Total balance of the token based on the V2 liquidity pool.\n */\n function _getPriceV2(\n IApeFactory factoryV2,\n address token\n ) internal view returns (uint256 price, uint256 tokenTotal) {\n uint256 nativePrice = getNativePriceFromFactory(\n Protocol.V2,\n defaultFactoryV2,\n IUniswapV3Factory(address(0)),\n defaultFactorySolidly\n );\n if (token == wNative) {\n /// @dev Returning high total balance for wNative to heavily weight value.\n return (nativePrice, 1e36);\n }\n\n LocalVarsV2Price memory vars;\n\n (vars.tokenReserve, vars.wNativeReserve) = _getNormalizedReservesFromFactoryV2_Decimals(\n factoryV2,\n token,\n wNative,\n _getTokenDecimals(token),\n wNativeDecimals\n );\n vars.wNativeTotal = (vars.wNativeReserve * nativePrice) / 1e18;\n tokenTotal += vars.tokenReserve;\n\n for (uint256 i = 0; i < stableUsdTokens.length; i++) {\n address stableUsdToken = stableUsdTokens[i];\n (vars.tokenReserve, vars.stableUsdReserve) = _getNormalizedReservesFromFactoryV2_Decimals(\n factoryV2,\n token,\n stableUsdToken,\n _getTokenDecimals(token),\n stableUsdTokenDecimals[stableUsdToken]\n );\n uint256 stableUsdPrice = _getOraclePriceNormalized(stableUsdToken);\n if (stableUsdPrice > 0) {\n /// @dev Weighting the USD side of the pair by the price of the USD stable token if it exists.\n vars.usdStableTotal += (vars.stableUsdReserve * stableUsdPrice) / 1e18;\n } else {\n vars.usdStableTotal += vars.stableUsdReserve;\n }\n tokenTotal += vars.tokenReserve;\n }\n\n if (tokenTotal == 0) {\n return (0, 0);\n }\n price = ((vars.usdStableTotal + vars.wNativeTotal) * 1e18) / tokenTotal;\n }\n\n /**\n * @dev Returns the price and total balance of the given token based on the V2 liquidity pool.\n * @param token Address of the token for which the price and total balance are requested.\n * @return price The price of the token based on the V2 liquidity pool.\n * @return tokenTotal Total balance of the token based on the V2 liquidity pool.\n */\n function _getPriceSolidly(\n ISolidlyFactory factorySolidly,\n address token\n ) internal view returns (uint256 price, uint256 tokenTotal) {\n uint256 nativePrice = getNativePriceFromFactory(\n Protocol.Solidly,\n defaultFactoryV2,\n IUniswapV3Factory(address(0)),\n defaultFactorySolidly\n );\n if (token == wNative) {\n /// @dev Returning high total balance for wNative to heavily weight value.\n return (nativePrice, 1e36);\n }\n\n LocalVarsV2Price memory vars;\n\n (vars.tokenReserve, vars.wNativeReserve) = _getNormalizedReservesFromFactorySolidly_Decimals(\n factorySolidly,\n token,\n wNative,\n _getTokenDecimals(token),\n wNativeDecimals\n );\n vars.wNativeTotal = (vars.wNativeReserve * nativePrice) / 1e18;\n tokenTotal += vars.tokenReserve;\n\n for (uint256 i = 0; i < stableUsdTokens.length; i++) {\n address stableUsdToken = stableUsdTokens[i];\n (vars.tokenReserve, vars.stableUsdReserve) = _getNormalizedReservesFromFactorySolidly_Decimals(\n factorySolidly,\n token,\n stableUsdToken,\n _getTokenDecimals(token),\n stableUsdTokenDecimals[stableUsdToken]\n );\n uint256 stableUsdPrice = _getOraclePriceNormalized(stableUsdToken);\n if (stableUsdPrice > 0) {\n /// @dev Weighting the USD side of the pair by the price of the USD stable token if it exists.\n vars.usdStableTotal += (vars.stableUsdReserve * stableUsdPrice) / 1e18;\n } else {\n vars.usdStableTotal += vars.stableUsdReserve;\n }\n tokenTotal += vars.tokenReserve;\n }\n\n if (tokenTotal == 0) {\n return (0, 0);\n }\n price = ((vars.usdStableTotal + vars.wNativeTotal) * 1e18) / tokenTotal;\n }\n\n function getPriceV3(address token) public view override returns (uint256 price) {\n (price, ) = _getPriceV3(defaultFactoryV3, token);\n }\n\n function getPriceV3FromFactory(\n IUniswapV3Factory factoryV3,\n address token\n ) public view override returns (uint256 price) {\n (price, ) = _getPriceV3(factoryV3, token);\n }\n\n /**\n * @dev Returns the price and total balance of the given token based on the V3 liquidity pool.\n * @param token Address of the token for which the price and total balance are requested.\n * @return price The price of the token based on the V3 liquidity pool.\n */\n function _getPriceV3(\n IUniswapV3Factory factoryV3,\n address token\n ) internal view returns (uint256 price, uint256 totalBalance) {\n uint256 nativePrice = getNativePriceFromFactory(\n Protocol.V3,\n IApeFactory(address(0)),\n factoryV3,\n defaultFactorySolidly\n );\n if (token == wNative) {\n /// @dev Returning high total balance for wNative to heavily weight value.\n return (nativePrice, 1e36);\n }\n\n uint256 tempPrice;\n uint256 totalPrice;\n uint24[] memory fees = new uint24[](4);\n fees[0] = 100;\n fees[1] = 500;\n fees[2] = 3000;\n fees[3] = 10000;\n for (uint24 feeIndex = 0; feeIndex < 4; feeIndex++) {\n uint24 fee = fees[feeIndex];\n tempPrice = getLPPriceV3FromFactory(address(factoryV3), token, wNative, fee);\n if (tempPrice > 0) {\n address pair = factoryV3.getPool(token, wNative, fee);\n uint256 balance = IERC20(token).balanceOf(pair);\n totalPrice += ((tempPrice * nativePrice) / 1e18) * balance;\n totalBalance += balance;\n }\n\n for (uint256 i = 0; i < stableUsdTokens.length; i++) {\n address stableUsdToken = stableUsdTokens[i];\n tempPrice = getLPPriceV3FromFactory(address(factoryV3), token, stableUsdToken, fee);\n if (tempPrice > 0) {\n address pair = factoryV3.getPool(token, stableUsdToken, fee);\n uint256 balance = IERC20(token).balanceOf(pair);\n uint256 balanceStable = IERC20(stableUsdToken).balanceOf(pair);\n if (balanceStable > 10 * (10 ** IERC20(stableUsdToken).decimals())) {\n uint256 stableUsdPrice = _getOraclePriceNormalized(stableUsdToken);\n if (stableUsdPrice > 0) {\n tempPrice = (tempPrice * stableUsdPrice) / 1e18;\n }\n\n totalPrice += tempPrice * balance;\n totalBalance += balance;\n }\n }\n }\n }\n\n if (totalBalance == 0) {\n return (0, 0);\n }\n price = totalPrice / totalBalance;\n }\n\n function getPriceAlgebra(address token) public view override returns (uint256 price) {\n (price, ) = _getPriceAlgebra(defaultFactoryAlgebra, token);\n }\n\n function getPriceAlgebraFromFactory(\n IAlgebraFactory factoryAlgebra,\n address token\n ) public view override returns (uint256 price) {\n (price, ) = _getPriceAlgebra(factoryAlgebra, token);\n }\n\n function _getPriceAlgebra(\n IAlgebraFactory factoryAlgebra,\n address token\n ) internal view returns (uint256 price, uint256 totalBalance) {\n uint256 nativePrice = getNativePriceFromFactory(\n Protocol.Algebra,\n IApeFactory(address(0)),\n IUniswapV3Factory(address(0)),\n defaultFactorySolidly\n );\n if (token == wNative) {\n /// @dev Returning high total balance for wNative to heavily weight value.\n return (nativePrice, 1e36);\n }\n\n uint256 tempPrice;\n uint256 totalPrice;\n tempPrice = getLPPriceAlgebraFromFactory(factoryAlgebra, token, wNative);\n if (tempPrice > 0) {\n address pair = factoryAlgebra.poolByPair(token, wNative);\n uint256 balance = IERC20(token).balanceOf(pair);\n totalPrice += ((tempPrice * nativePrice) / 1e18) * balance;\n totalBalance += balance;\n }\n\n for (uint256 i = 0; i < stableUsdTokens.length; i++) {\n address stableUsdToken = stableUsdTokens[i];\n tempPrice = getLPPriceAlgebraFromFactory(factoryAlgebra, token, stableUsdToken);\n if (tempPrice > 0) {\n address pair = factoryAlgebra.poolByPair(token, stableUsdToken);\n uint256 balance = IERC20(token).balanceOf(pair);\n uint256 balanceStable = IERC20(stableUsdToken).balanceOf(pair);\n if (balanceStable > 10 * (10 ** IERC20(stableUsdToken).decimals())) {\n uint256 stableUsdPrice = _getOraclePriceNormalized(stableUsdToken);\n if (stableUsdPrice > 0) {\n tempPrice = (tempPrice * stableUsdPrice) / 1e18;\n }\n\n totalPrice += tempPrice * balance;\n totalBalance += balance;\n }\n }\n }\n\n if (totalBalance == 0) {\n return (0, 0);\n }\n price = totalPrice / totalBalance;\n }\n\n /**\n * @dev Retrieves the normalized USD price of a token from its oracle.\n * @param token Address of the token to retrieve the price for.\n * @return price The normalized USD price of the token from its oracle.\n */\n function _getOraclePriceNormalized(address token) internal view returns (uint256 price) {\n OracleInfo memory oracleInfo = tokenOracles[token];\n if (oracleInfo.oracleType == OracleType.CHAIN_LINK) {\n uint256 tokenUSDPrice = _getChainlinkPriceRaw(oracleInfo.oracleAddress);\n return _normalize(tokenUSDPrice, oracleInfo.oracleDecimals);\n }\n /// @dev Additional oracle types can be implemented here.\n // else if (oracleInfo.oracleType == OracleType.<NEW_ORACLE>) { }\n return 0;\n }\n\n /**\n * @dev This private helper function takes in a DEX contract factory address and two token addresses (tokenA and tokenB).\n * It returns the current price of tokenA in terms of tokenB by dividing the normalized reserve value of tokenA\n * from the normalized reserve value of tokenB.\n *\n * Before calculating the price, it calls the internal _getNormalizedReservesFromFactory() function to retrieve\n * the normalized reserves of tokenA and tokenB. If either normalized reserve value is 0, it returns 0 for the price.\n *\n * @param tokenA Address of one of the tokens in the pair\n * @param tokenB Address of the other token in the pair\n * @return priceAForB The price of tokenA in terms of tokenB\n */\n function _getPriceFromV2LP(\n IApeFactory factoryV2,\n address tokenA,\n address tokenB\n ) private view returns (uint256 priceAForB) {\n (uint256 normalizedReserveA, uint256 normalizedReserveB) = _getNormalizedReservesFromFactoryV2(\n factoryV2,\n tokenA,\n tokenB\n );\n\n if (normalizedReserveA == 0 || normalizedReserveA == 0) {\n return 0;\n }\n\n // Calculate the price of tokenA in terms of tokenB by dividing the normalized reserve value of tokenA\n // from the normalized reserve value of tokenB.\n priceAForB = (normalizedReserveA * (10 ** 18)) / normalizedReserveB;\n }\n\n /**\n * @dev Get normalized reserves for a given token pair from the Factory contract.\n * @param factoryV2 The address of the V2 factory.\n * @param tokenA The address of the first token in the pair.\n * @param tokenB The address of the second token in the pair.\n * @return normalizedReserveA The normalized reserve of the first token in the pair.\n * @return normalizedReserveB The normalized reserve of the second token in the pair.\n */\n function _getNormalizedReservesFromFactoryV2(\n IApeFactory factoryV2,\n address tokenA,\n address tokenB\n ) internal view returns (uint256 normalizedReserveA, uint256 normalizedReserveB) {\n address pairAddress = factoryV2.getPair(tokenA, tokenB);\n if (pairAddress == address(0)) {\n return (0, 0);\n }\n\n IApePair pair = IApePair(pairAddress);\n address token0 = pair.token0();\n address token1 = pair.token1();\n\n uint8 decimals0 = IERC20(token0).decimals();\n uint8 decimals1 = IERC20(token1).decimals();\n\n return _getNormalizedReservesFromPair_Decimals(pairAddress, token0, token1, decimals0, decimals1);\n }\n\n /**\n * @dev Get normalized reserves for a given token pair from the ApeSwap Factory contract, specifying decimals.\n * @param factoryV2 The address of the V2 factory.\n * @param tokenA The address of the first token in the pair.\n * @param tokenB The address of the second token in the pair.\n * @param decimalsA The number of decimals for the first token in the pair.\n * @param decimalsB The number of decimals for the second token in the pair.\n * @return normalizedReserveA The normalized reserve of the first token in the pair.\n * @return normalizedReserveB The normalized reserve of the second token in the pair.\n */\n function _getNormalizedReservesFromFactoryV2_Decimals(\n IApeFactory factoryV2,\n address tokenA,\n address tokenB,\n uint8 decimalsA,\n uint8 decimalsB\n ) internal view returns (uint256 normalizedReserveA, uint256 normalizedReserveB) {\n address pairAddress = factoryV2.getPair(tokenA, tokenB);\n if (pairAddress == address(0)) {\n return (0, 0);\n }\n return _getNormalizedReservesFromPair_Decimals(pairAddress, tokenA, tokenB, decimalsA, decimalsB);\n }\n\n /**\n * @dev Get normalized reserves for a given token pair from the ApeSwap Factory contract, specifying decimals.\n * @param factorySolidly The address of the V2 factory.\n * @param tokenA The address of the first token in the pair.\n * @param tokenB The address of the second token in the pair.\n * @param decimalsA The number of decimals for the first token in the pair.\n * @param decimalsB The number of decimals for the second token in the pair.\n * @return normalizedReserveA The normalized reserve of the first token in the pair.\n * @return normalizedReserveB The normalized reserve of the second token in the pair.\n */\n function _getNormalizedReservesFromFactorySolidly_Decimals(\n ISolidlyFactory factorySolidly,\n address tokenA,\n address tokenB,\n uint8 decimalsA,\n uint8 decimalsB\n ) internal view returns (uint256 normalizedReserveA, uint256 normalizedReserveB) {\n address pairAddress = factorySolidly.getPair(tokenA, tokenB, false);\n if (pairAddress == address(0)) {\n return (0, 0);\n }\n return _getNormalizedReservesFromPair_Decimals(pairAddress, tokenA, tokenB, decimalsA, decimalsB);\n }\n\n /**\n * @dev This internal function takes in a pair address, two token addresses (tokenA and tokenB), and their respective decimals.\n * It returns the normalized reserves for each token in the pair.\n *\n * This function uses the IApePair interface to get the current reserves of the given token pair\n * If successful, it returns the normalized reserves for each token in the pair by calling _normalize() on\n * the reserve values. The order of the returned normalized reserve values depends on the lexicographic ordering\n * of tokenA and tokenB.\n *\n * @param pair Address of the liquidity pool contract representing the token pair\n * @param tokenA Address of one of the tokens in the pair. Assumed to be a valid address in the pair to save on gas.\n * @param tokenB Address of the other token in the pair. Assumed to be a valid address in the pair to save on gas.\n * @param decimalsA The number of decimals for tokenA\n * @param decimalsB The number of decimals for tokenB\n * @return normalizedReserveA The normalized reserve value for tokenA\n * @return normalizedReserveB The normalized reserve value for tokenB\n */\n function _getNormalizedReservesFromPair_Decimals(\n address pair,\n address tokenA,\n address tokenB,\n uint8 decimalsA,\n uint8 decimalsB\n ) internal view returns (uint256 normalizedReserveA, uint256 normalizedReserveB) {\n try IApePair(pair).getReserves() returns (uint112 reserve0, uint112 reserve1, uint32) {\n if (_isSorted(tokenA, tokenB)) {\n return (_normalize(reserve0, decimalsA), _normalize(reserve1, decimalsB));\n } else {\n return (_normalize(reserve1, decimalsA), _normalize(reserve0, decimalsB));\n }\n } catch {\n return (0, 0);\n }\n }\n\n function _isSorted(address tokenA, address tokenB) internal pure returns (bool isSorted) {\n // (address token0, address token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);\n isSorted = tokenA < tokenB ? true : false;\n }\n\n function _getTokenDecimals(address token) internal view returns (uint8 decimals) {\n try IERC20(token).decimals() returns (uint8 dec) {\n decimals = dec;\n } catch {\n decimals = 18;\n }\n }\n\n /// @notice Normalize the amount of a token to wei or 1e18\n function _normalizeToken(uint256 amount, address token) private view returns (uint256) {\n return _normalize(amount, _getTokenDecimals(token));\n }\n\n /// @notice Normalize the amount of a token to wei or 1e18\n function _normalizeToken112(uint112 amount, address token) private view returns (uint112) {\n return _normalize112(amount, _getTokenDecimals(token));\n }\n\n /// @notice Normalize the amount passed to wei or 1e18 decimals\n function _normalize(uint256 amount, uint8 decimals) private pure returns (uint256) {\n if (decimals == 18) return amount;\n return (amount * (10 ** 18)) / (10 ** decimals);\n }\n\n /// @notice Normalize the amount passed to wei or 1e18 decimals\n function _normalize112(uint112 amount, uint8 decimals) private pure returns (uint112) {\n if (decimals == 18) {\n return amount;\n } else if (decimals > 18) {\n return uint112(amount / (10 ** (decimals - 18)));\n } else {\n return uint112(amount * (10 ** (18 - decimals)));\n }\n }\n}\n"
},
"./contracts/token-lib/IERC20.sol": {
"content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity >=0.5.0;\n\ninterface IERC20 {\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 view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function decimals() external view returns (uint8);\n\n function totalSupply() external view returns (uint);\n\n function balanceOf(address owner) external view returns (uint);\n\n function allowance(address owner, address spender) external view returns (uint);\n\n function approve(address spender, uint value) external returns (bool);\n\n function transfer(address to, uint value) external returns (bool);\n\n function transferFrom(address from, address to, uint value) external returns (bool);\n}\n"
},
"./contracts/swap-v2-lib/IApePair.sol": {
"content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity >=0.6.6;\n\ninterface IApePair {\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\n function symbol() external pure returns (string memory);\n\n function decimals() external pure returns (uint8);\n\n function totalSupply() external view returns (uint);\n\n function balanceOf(address owner) external view returns (uint);\n\n function allowance(address owner, address spender) external view returns (uint);\n\n function approve(address spender, uint value) external returns (bool);\n\n function transfer(address to, uint value) external returns (bool);\n\n function transferFrom(address from, address to, uint value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n\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\n function factory() external view returns (address);\n\n function token0() external view returns (address);\n\n function token1() external view returns (address);\n\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n\n function price0CumulativeLast() external view returns (uint);\n\n function price1CumulativeLast() external view returns (uint);\n\n function kLast() external view returns (uint);\n\n function mint(address to) external returns (uint liquidity);\n\n function burn(address to) external returns (uint amount0, uint amount1);\n\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\n\n function skim(address to) external;\n\n function sync() external;\n\n function initialize(address, address) external;\n}\n"
},
"./contracts/swap-v2-lib/IApeFactory.sol": {
"content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity >=0.6.6;\n\ninterface IApeFactory {\n event PairCreated(address indexed token0, address indexed token1, address pair, uint);\n\n function feeTo() external view returns (address);\n\n function feeToSetter() external view returns (address);\n\n function getPair(address tokenA, address tokenB) external view returns (address pair);\n\n function allPairs(uint) external view returns (address pair);\n\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\n function setFeeToSetter(address) external;\n}\n"
},
"./contracts/swap-v2-lib/ISolidlyFactory.sol": {
"content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity >=0.6.6;\n\ninterface ISolidlyFactory {\n function getPair(address tokenA, address tokenB, bool stable) external view returns (address pair);\n}\n"
},
"./contracts/chainlink/ChainlinkOracle.sol": {
"content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.0;\n\nimport \"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\";\n\nabstract contract ChainlinkOracle {\n /// @notice Returns the price of the token in decimals of oracle\n function _getChainlinkPriceRaw(address oracleAddress) internal view returns (uint256) {\n AggregatorV3Interface priceFeed = AggregatorV3Interface(oracleAddress);\n (, int256 price, , , ) = priceFeed.latestRoundData();\n return uint256(price);\n }\n\n /// @notice Returns the price of the token in wei with 18 decimals\n function _getChainlinkPriceNormalized(address oracleAddress) internal view returns (uint256) {\n AggregatorV3Interface priceFeed = AggregatorV3Interface(oracleAddress);\n (, int256 price, , , ) = AggregatorV3Interface(oracleAddress).latestRoundData();\n uint8 decimals = priceFeed.decimals();\n return (uint256(price) * 10 ** 18) / 10 ** decimals;\n }\n}\n"
},
"./contracts/IPriceGetterV2.sol": {
"content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity 0.8.16;\n\nimport \"./swap-v2-lib/IApeFactory.sol\";\nimport \"./swap-v2-lib/ISolidlyFactory.sol\";\nimport \"@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol\";\nimport \"./interfaces/IAlgebraFactory.sol\";\nimport \"./interfaces/IGammaHypervisor.sol\";\nimport \"./interfaces/ISteerVault.sol\";\n\ninterface IPriceGetterV2 {\n enum Protocol {\n __,\n Both,\n V2,\n V3,\n Algebra,\n Gamma,\n Steer,\n Solidly\n }\n\n function getLPPriceV2(address lp) external view returns (uint256 price);\n\n function getLPPricesV2(address[] calldata tokens) external view returns (uint256[] memory prices);\n\n function getLPPriceV2FromFactory(IApeFactory factoryV2, address lp) external view returns (uint256 price);\n\n function getLPPricesV2FromFactory(\n IApeFactory factoryV2,\n address[] calldata tokens\n ) external view returns (uint256[] memory prices);\n\n function getLPPriceV3(address token0, address token1, uint24 fee) external view returns (uint256 price);\n\n function getLPPricesV3(\n address[] calldata tokens0,\n address[] calldata tokens1,\n uint24[] calldata fees\n ) external view returns (uint256[] memory prices);\n\n function getLPPriceV3FromFactory(\n address factoryV3,\n address token0,\n address token1,\n uint24 fee\n ) external view returns (uint256 price);\n\n function getLPPricesV3FromFactory(\n IUniswapV3Factory factoryV3,\n address[] calldata tokens0,\n address[] calldata tokens1,\n uint24[] calldata fees\n ) external view returns (uint256[] memory prices);\n\n function getLPPriceAlgebra(address token0, address token1) external view returns (uint256 price);\n\n function getLPPriceAlgebraFromFactory(\n IAlgebraFactory factoryAlgebra,\n address tokens0,\n address tokens1\n ) external view returns (uint256 price);\n\n function getLPPriceGamma(Hypervisor lp) external view returns (uint256 price);\n\n function getLPPriceGammaFromFactory(\n IAlgebraFactory factory,\n IApeFactory factoryV2,\n Hypervisor lp\n ) external view returns (uint256 price);\n\n function getLPPriceSteerFromFactory(\n IUniswapV3Factory factoryV3,\n IApeFactory factoryV2,\n ISteerVault lp\n ) external view returns (uint256 price);\n\n function getLPPriceFromFactory(\n address token,\n Protocol protocol,\n IApeFactory factoryV2,\n IUniswapV3Factory factoryV3,\n IAlgebraFactory factoryAlgebra,\n ISolidlyFactory factorySolidly\n ) external view returns (uint256 price);\n\n function getPriceV2(address token) external view returns (uint256 price);\n\n function getPriceV2FromFactory(IApeFactory factoryV2, address token) external view returns (uint256 price);\n\n function getPriceV3(address token) external view returns (uint256 price);\n\n function getPriceV3FromFactory(IUniswapV3Factory factoryV3, address token) external view returns (uint256 price);\n\n function getPriceAlgebra(address token) external view returns (uint256 price);\n\n function getPriceAlgebraFromFactory(\n IAlgebraFactory factoryAlgebra,\n address token\n ) external view returns (uint256 price);\n\n function getPrice(address token, Protocol protocol) external view returns (uint256 price);\n\n function getPrices(address[] calldata tokens, Protocol protocol) external view returns (uint256[] memory prices);\n\n function getPriceFromFactory(\n address token,\n Protocol protocol,\n IApeFactory factoryV2,\n IUniswapV3Factory factoryV3,\n IAlgebraFactory factoryAlgebra,\n ISolidlyFactory factorySolidly\n ) external view returns (uint256 price);\n\n function getPricesFromFactory(\n address[] calldata tokens,\n Protocol protocol,\n IApeFactory factoryV2,\n IUniswapV3Factory factoryV3,\n IAlgebraFactory factoryAlgebra,\n ISolidlyFactory factorySolidly\n ) external view returns (uint256[] memory prices);\n\n function getNativePrice(Protocol protocol) external view returns (uint256 price);\n\n function getNativePriceFromFactory(\n Protocol protocol,\n IApeFactory factoryV2,\n IUniswapV3Factory factoryV3,\n ISolidlyFactory factorySolidly\n ) external view returns (uint256 price);\n}\n"
},
"./contracts/interfaces/IAlgebraFactory.sol": {
"content": "// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.5.0;\npragma abicoder v2;\n\n/// @title The interface for the Algebra Factory\n/// @dev Credit to Uniswap Labs under GPL-2.0-or-later license:\n/// https://github.com/Uniswap/v3-core/tree/main/contracts/interfaces\ninterface IAlgebraFactory {\n /// @notice Emitted when a process of ownership renounce is started\n /// @param timestamp The timestamp of event\n /// @param finishTimestamp The timestamp when ownership renounce will be possible to finish\n event RenounceOwnershipStart(uint256 timestamp, uint256 finishTimestamp);\n\n /// @notice Emitted when a process of ownership renounce cancelled\n /// @param timestamp The timestamp of event\n event RenounceOwnershipStop(uint256 timestamp);\n\n /// @notice Emitted when a process of ownership renounce finished\n /// @param timestamp The timestamp of ownership renouncement\n event RenounceOwnershipFinish(uint256 timestamp);\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 pool The address of the created pool\n event Pool(address indexed token0, address indexed token1, address pool);\n\n /// @notice Emitted when the farming address is changed\n /// @param newFarmingAddress The farming address after the address was changed\n event FarmingAddress(address indexed newFarmingAddress);\n\n /// @notice Emitted when the default community fee is changed\n /// @param newDefaultCommunityFee The new default community fee value\n event DefaultCommunityFee(uint8 newDefaultCommunityFee);\n\n /// @notice role that can change communityFee and tickspacing in pools\n function POOLS_ADMINISTRATOR_ROLE() external view returns (bytes32);\n\n /// @dev Returns `true` if `account` has been granted `role` or `account` is owner.\n function hasRoleOrOwner(bytes32 role, address account) external view returns (bool);\n\n /// @notice Returns the current owner of the factory\n /// @dev Can be changed by the current owner via transferOwnership(address newOwner)\n /// @return The address of the factory owner\n function owner() external view returns (address);\n\n /// @notice Returns the current poolDeployerAddress\n /// @return The address of the poolDeployer\n function poolDeployer() external view returns (address);\n\n /// @dev Is retrieved from the pools to restrict calling certain functions not by a tokenomics contract\n /// @return The tokenomics contract address\n function farmingAddress() external view returns (address);\n\n /// @notice Returns the current communityVaultAddress\n /// @return The address to which community fees are transferred\n function communityVault() external view returns (address);\n\n /// @notice Returns the default community fee\n /// @return Fee which will be set at the creation of the pool\n function defaultCommunityFee() external view returns (uint8);\n\n /// @notice Returns the pool address for a given pair of tokens, 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 /// @return pool The pool address\n function poolByPair(address tokenA, address tokenB) external view returns (address pool);\n\n /// @return timestamp The timestamp of the beginning of the renounceOwnership process\n function renounceOwnershipStartTimestamp() external view returns (uint256 timestamp);\n\n /// @notice Creates a pool for the given two tokens\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 /// @dev tokenA and tokenB may be passed in either order: token0/token1 or token1/token0.\n /// The call will revert if the pool already exists or the token arguments are invalid.\n /// @return pool The address of the newly created pool\n function createPool(address tokenA, address tokenB) external returns (address pool);\n\n /// @dev updates tokenomics address on the factory\n /// @param newFarmingAddress The new tokenomics contract address\n function setFarmingAddress(address newFarmingAddress) external;\n\n /// @dev updates default community fee for new pools\n /// @param newDefaultCommunityFee The new community fee, _must_ be <= MAX_COMMUNITY_FEE\n function setDefaultCommunityFee(uint8 newDefaultCommunityFee) external;\n\n /// @notice Starts process of renounceOwnership. After that, a certain period\n /// of time must pass before the ownership renounce can be completed.\n function startRenounceOwnership() external;\n\n /// @notice Stops process of renounceOwnership and removes timer.\n function stopRenounceOwnership() external;\n}\n"
},
"./contracts/interfaces/IGammaHypervisor.sol": {
"content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.16;\n\nimport \"../token-lib/IERC20.sol\";\n\ninterface Hypervisor is IERC20 {\n function token0() external view returns (IERC20);\n\n function token1() external view returns (IERC20);\n\n function whitelistedAddress() external view returns (address);\n\n function withdraw(\n uint256 shares,\n address to,\n address from,\n uint256[4] memory minAmounts\n ) external returns (uint256 amount0, uint256 amount1);\n\n function getTotalAmounts() external view returns (uint256 total0, uint256 total1);\n}\n"
},
"./contracts/interfaces/ISteerVault.sol": {
"content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.16;\n\nimport \"../token-lib/IERC20.sol\";\n\ninterface ISteerVault is IERC20 {\n function token0() external view returns (IERC20);\n\n function token1() external view returns (IERC20);\n\n function getTotalAmounts() external view returns (uint256 total0, uint256 total1);\n}\n"
},
"./contracts/interfaces/IUniswapV3PoolStateSlot0.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 IUniswapV3PoolStateSlot0 {\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 /// @return 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 /// @return observationIndex The index of the last oracle observation that was written,\n /// @return observationCardinality The current maximum number of observations stored in the pool,\n /// @return observationCardinalityNext The next maximum number of observations, to be updated when the observation.\n /// @return 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 uint32 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 /// @return The liquidity at the current price of the pool\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 /// @return liquidityNet how much liquidity changes when the pool price crosses the tick,\n /// @return feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,\n /// @return feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,\n /// @return tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick\n /// @return secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,\n /// @return secondsOutside the seconds spent on the other side of the tick from the current tick,\n /// @return 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(\n int24 tick\n )\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 /// @return feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,\n /// @return feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,\n /// @return tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,\n /// @return tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke\n function positions(\n bytes32 key\n )\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 /// @return tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,\n /// @return secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,\n /// @return initialized whether the observation has been initialized and the values are safe to use\n function observations(\n uint256 index\n )\n external\n view\n returns (\n uint32 blockTimestamp,\n int56 tickCumulative,\n uint160 secondsPerLiquidityCumulativeX128,\n bool initialized\n );\n}\n"
},
"./contracts/interfaces/IAlgebraPool.sol": {
"content": "// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.5.0;\n\n/// @title Pool state that can change\n/// @dev Credit to Uniswap Labs under GPL-2.0-or-later license:\n/// https://github.com/Uniswap/v3-core/tree/main/contracts/interfaces\ninterface IAlgebraPool {\n /// @notice The globalState structure in the pool stores many values but requires only one slot\n /// and is exposed as a single method to save gas when accessed externally.\n /// @return price The current price of the pool as a sqrt(dToken1/dToken0) Q64.96 value;\n /// @return 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(price) if the price is on a tick boundary;\n /// @return prevInitializedTick The previous initialized tick\n /// @return fee The last pool fee value in hundredths of a bip, i.e. 1e-6\n /// @return timepointIndex The index of the last written timepoint\n /// @return communityFee The community fee percentage of the swap fee in thousandths (1e-3)\n /// @return unlocked Whether the pool is currently locked to reentrancy\n function globalState()\n external\n view\n returns (\n uint160 price,\n int24 tick,\n int24 prevInitializedTick,\n uint16 fee,\n uint16 timepointIndex,\n uint8 communityFee,\n bool unlocked\n );\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 {IUniswapV3PoolImmutables} from './pool/IUniswapV3PoolImmutables.sol';\nimport {IUniswapV3PoolState} from './pool/IUniswapV3PoolState.sol';\nimport {IUniswapV3PoolDerivedState} from './pool/IUniswapV3PoolDerivedState.sol';\nimport {IUniswapV3PoolActions} from './pool/IUniswapV3PoolActions.sol';\nimport {IUniswapV3PoolOwnerActions} from './pool/IUniswapV3PoolOwnerActions.sol';\nimport {IUniswapV3PoolErrors} from './pool/IUniswapV3PoolErrors.sol';\nimport {IUniswapV3PoolEvents} from './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 IUniswapV3PoolErrors,\n IUniswapV3PoolEvents\n{\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 /// @return 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 /// @return observationIndex The index of the last oracle observation that was written,\n /// @return observationCardinality The current maximum number of observations stored in the pool,\n /// @return observationCardinalityNext The next maximum number of observations, to be updated when the observation.\n /// @return 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 /// @return The liquidity at the current price of the pool\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 /// @return liquidityNet how much liquidity changes when the pool price crosses the tick,\n /// @return feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,\n /// @return feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,\n /// @return tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick\n /// @return secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,\n /// @return secondsOutside the seconds spent on the other side of the tick from the current tick,\n /// @return 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 /// @return feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,\n /// @return feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,\n /// @return tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,\n /// @return 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 /// @return tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,\n /// @return secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,\n /// @return 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/IUniswapV3PoolErrors.sol": {
"content": "// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.5.0;\n\n/// @title Errors emitted by a pool\n/// @notice Contains all events emitted by the pool\ninterface IUniswapV3PoolErrors {\n error LOK();\n error TLU();\n error TLM();\n error TUM();\n error AI();\n error M0();\n error M1();\n error AS();\n error IIA();\n error L();\n error F0();\n error F1();\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"
},
"@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/libraries/TickMath.sol": {
"content": "// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity ^0.8.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 error T();\n error R();\n\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 unchecked {\n uint256 absTick = tick < 0 ? uint256(-int256(tick)) : uint256(int256(tick));\n if (absTick > uint256(int256(MAX_TICK))) revert T();\n\n uint256 ratio = absTick & 0x1 != 0\n ? 0xfffcb933bd6fad37aa2d162d1a594001\n : 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\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 unchecked {\n // second inequality must be < because the price can never reach the price at the max tick\n if (!(sqrtPriceX96 >= MIN_SQRT_RATIO && sqrtPriceX96 < MAX_SQRT_RATIO)) revert 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}\n"
},
"@uniswap/v3-core/contracts/libraries/FixedPoint96.sol": {
"content": "// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.4.0;\n\n/// @title FixedPoint96\n/// @notice A library for handling binary fixed point numbers, see https://en.wikipedia.org/wiki/Q_(number_format)\n/// @dev Used in SqrtPriceMath.sol\nlibrary FixedPoint96 {\n uint8 internal constant RESOLUTION = 96;\n uint256 internal constant Q96 = 0x1000000000000000000000000;\n}\n"
},
"@uniswap/v3-core/contracts/libraries/FullMath.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Contains 512-bit math functions\n/// @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision\n/// @dev Handles \"phantom overflow\" i.e., allows multiplication and division where an intermediate value overflows 256 bits\nlibrary FullMath {\n /// @notice Calculates floor(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n /// @param a The multiplicand\n /// @param b The multiplier\n /// @param denominator The divisor\n /// @return result The 256-bit result\n /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv\n function mulDiv(\n uint256 a,\n uint256 b,\n uint256 denominator\n ) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = a * b\n // Compute the product mod 2**256 and mod 2**256 - 1\n // then use the Chinese Remainder Theorem to reconstruct\n // the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2**256 + prod0\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(a, b, not(0))\n prod0 := mul(a, b)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division\n if (prod1 == 0) {\n require(denominator > 0);\n assembly {\n result := div(prod0, denominator)\n }\n return result;\n }\n\n // Make sure the result is less than 2**256.\n // Also prevents denominator == 0\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0]\n // Compute remainder using mulmod\n uint256 remainder;\n assembly {\n remainder := mulmod(a, b, denominator)\n }\n // Subtract 256 bit number from 512 bit number\n assembly {\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator\n // Compute largest power of two divisor of denominator.\n // Always >= 1.\n uint256 twos = (0 - denominator) & denominator;\n // Divide denominator by power of two\n assembly {\n denominator := div(denominator, twos)\n }\n\n // Divide [prod1 prod0] by the factors of two\n assembly {\n prod0 := div(prod0, twos)\n }\n // Shift in bits from prod1 into prod0. For this we need\n // to flip `twos` such that it is 2**256 / twos.\n // If twos is zero, then it becomes one\n assembly {\n twos := add(div(sub(0, twos), twos), 1)\n }\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2**256\n // Now that denominator is an odd number, it has an inverse\n // modulo 2**256 such that denominator * inv = 1 mod 2**256.\n // Compute the inverse by starting with a seed that is correct\n // correct for four bits. That is, denominator * inv = 1 mod 2**4\n uint256 inv = (3 * denominator) ^ 2;\n // Now use Newton-Raphson iteration to improve the precision.\n // Thanks to Hensel's lifting lemma, this also works in modular\n // arithmetic, doubling the correct bits in each step.\n inv *= 2 - denominator * inv; // inverse mod 2**8\n inv *= 2 - denominator * inv; // inverse mod 2**16\n inv *= 2 - denominator * inv; // inverse mod 2**32\n inv *= 2 - denominator * inv; // inverse mod 2**64\n inv *= 2 - denominator * inv; // inverse mod 2**128\n inv *= 2 - denominator * inv; // inverse mod 2**256\n\n // Because the division is now exact we can divide by multiplying\n // with the modular inverse of denominator. This will give us the\n // correct result modulo 2**256. Since the precoditions guarantee\n // that the outcome is less than 2**256, this is the final result.\n // We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inv;\n return result;\n }\n }\n\n /// @notice Calculates ceil(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n /// @param a The multiplicand\n /// @param b The multiplier\n /// @param denominator The divisor\n /// @return result The 256-bit result\n function mulDivRoundingUp(\n uint256 a,\n uint256 b,\n uint256 denominator\n ) internal pure returns (uint256 result) {\n unchecked {\n result = mulDiv(a, b, denominator);\n if (mulmod(a, b, denominator) > 0) {\n require(result < type(uint256).max);\n result++;\n }\n }\n }\n}\n"
},
"@openzeppelin/contracts/access/Ownable.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\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() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\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 the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\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 _transferOwnership(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 _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n"
},
"@openzeppelin/contracts/utils/Context.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^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 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) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n"
},
"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\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 proxied contracts do not make use of 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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\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 {ERC1967Proxy-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 *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 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 Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\n * initialization step. This is essential to configure modules that are added through upgrades and that require\n * initialization.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized < type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n}\n"
},
"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\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 * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 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 (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(\n address target,\n bytes memory data,\n string memory errorMessage\n ) 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(\n address target,\n bytes memory data,\n uint256 value\n ) 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(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) 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 (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(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal 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 /// @solidity memory-safe-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-upgradeable/access/OwnableUpgradeable.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\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 onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable_init_unchained() internal onlyInitializing {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\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 the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\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 _transferOwnership(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 _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n"
},
"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/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 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 onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n"
},
"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(int256 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(int256)\", p0));\n\t}\n\n\tfunction logUint(uint256 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", 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(uint256 p0) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256)\", 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(uint256 p0, uint256 p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256)\", p0, p1));\n\t}\n\n\tfunction log(uint256 p0, string memory p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,string)\", p0, p1));\n\t}\n\n\tfunction log(uint256 p0, bool p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool)\", p0, p1));\n\t}\n\n\tfunction log(uint256 p0, address p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,address)\", p0, p1));\n\t}\n\n\tfunction log(string memory p0, uint256 p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint256)\", 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, uint256 p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256)\", 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, uint256 p1) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint256)\", 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(uint256 p0, uint256 p1, uint256 p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint256 p0, uint256 p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint256 p0, uint256 p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint256 p0, uint256 p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint256 p0, string memory p1, uint256 p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint256 p0, string memory p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint256 p0, string memory p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint256 p0, string memory p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint256 p0, bool p1, uint256 p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint256 p0, bool p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint256 p0, bool p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint256 p0, bool p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint256 p0, address p1, uint256 p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint256 p0, address p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint256 p0, address p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(uint256 p0, address p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint256 p1, uint256 p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint256 p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint256 p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, uint256 p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint256 p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256)\", 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, uint256 p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256)\", 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, uint256 p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256)\", 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, uint256 p1, uint256 p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint256 p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint256 p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, uint256 p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint256 p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256)\", 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, uint256 p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256)\", 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, uint256 p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256)\", 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, uint256 p1, uint256 p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint256 p1, string memory p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint256 p1, bool p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, uint256 p1, address p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address)\", p0, p1, p2));\n\t}\n\n\tfunction log(address p0, string memory p1, uint256 p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256)\", 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, uint256 p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256)\", 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, uint256 p2) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256)\", 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(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, uint256 p1, uint256 p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,uint256,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, uint256 p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, uint256 p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, uint256 p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, uint256 p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, uint256 p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, uint256 p1, address p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, uint256 p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, uint256 p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, uint256 p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,uint256,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, string memory p1, uint256 p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, string memory p1, uint256 p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,uint256,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, string memory p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, string memory p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, string memory p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, string memory p1, bool p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, string memory p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, string memory p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, string memory p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, string memory p1, address p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, string memory p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, string memory p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, string memory p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,string,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, bool p1, uint256 p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, bool p1, uint256 p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, bool p1, uint256 p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,uint256,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, bool p1, string memory p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, bool p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, bool p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, bool p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, bool p1, bool p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, bool p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, bool p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, bool p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, bool p1, address p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, bool p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, bool p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, bool p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,bool,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, address p1, uint256 p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, address p1, uint256 p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, address p1, uint256 p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, address p1, uint256 p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,uint256,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, address p1, string memory p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, address p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, address p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, address p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, address p1, bool p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, address p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, address p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, address p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, address p1, address p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, address p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, address p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(uint256 p0, address p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(uint256,address,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint256 p1, uint256 p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint256 p1, uint256 p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,uint256,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint256 p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint256 p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint256 p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint256 p1, bool p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint256 p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint256 p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint256 p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint256 p1, address p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint256 p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint256 p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, uint256 p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,uint256,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint256 p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint256 p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, uint256 p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,uint256,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, string memory p1, string memory p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,string,uint256)\", 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, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,bool,uint256)\", 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, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,string,address,uint256)\", 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, uint256 p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint256 p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint256 p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, uint256 p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,uint256,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, bool p1, string memory p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,string,uint256)\", 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, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,bool,uint256)\", 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, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,bool,address,uint256)\", 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, uint256 p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint256 p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint256 p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, uint256 p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,uint256,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(string memory p0, address p1, string memory p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,string,uint256)\", 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, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,bool,uint256)\", 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, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(string,address,address,uint256)\", 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, uint256 p1, uint256 p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint256 p1, uint256 p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint256 p1, uint256 p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint256 p1, uint256 p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,uint256,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint256 p1, string memory p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint256 p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint256 p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint256 p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint256 p1, bool p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint256 p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint256 p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint256 p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint256 p1, address p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint256 p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint256 p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, uint256 p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,uint256,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint256 p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint256 p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint256 p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, uint256 p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,uint256,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, string memory p1, string memory p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,string,uint256)\", 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, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,bool,uint256)\", 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, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,string,address,uint256)\", 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, uint256 p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint256 p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint256 p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, uint256 p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,uint256,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, bool p1, string memory p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,string,uint256)\", 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, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,bool,uint256)\", 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, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,bool,address,uint256)\", 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, uint256 p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint256 p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint256 p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, uint256 p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,uint256,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(bool p0, address p1, string memory p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,string,uint256)\", 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, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,bool,uint256)\", 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, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(bool,address,address,uint256)\", 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, uint256 p1, uint256 p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint256 p1, uint256 p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint256 p1, uint256 p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint256 p1, uint256 p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,uint256,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint256 p1, string memory p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint256 p1, string memory p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint256 p1, string memory p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint256 p1, string memory p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,string,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint256 p1, bool p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint256 p1, bool p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint256 p1, bool p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint256 p1, bool p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,bool,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint256 p1, address p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint256 p1, address p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint256 p1, address p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, uint256 p1, address p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,uint256,address,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint256 p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint256 p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint256 p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, uint256 p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,uint256,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, string memory p1, string memory p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,string,uint256)\", 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, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,bool,uint256)\", 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, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,string,address,uint256)\", 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, uint256 p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint256 p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint256 p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, uint256 p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,uint256,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, bool p1, string memory p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,string,uint256)\", 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, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,bool,uint256)\", 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, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,bool,address,uint256)\", 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, uint256 p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,uint256)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint256 p2, string memory p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,string)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint256 p2, bool p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,bool)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, uint256 p2, address p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,uint256,address)\", p0, p1, p2, p3));\n\t}\n\n\tfunction log(address p0, address p1, string memory p2, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,string,uint256)\", 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, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,bool,uint256)\", 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, uint256 p3) internal view {\n\t\t_sendLogPayload(abi.encodeWithSignature(\"log(address,address,address,uint256)\", 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"
},
"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface AggregatorV3Interface {\n function decimals() external view returns (uint8);\n\n function description() external view returns (string memory);\n\n function version() external view returns (uint256);\n\n function getRoundData(uint80 _roundId)\n external\n view\n returns (\n uint80 roundId,\n int256 answer,\n uint256 startedAt,\n uint256 updatedAt,\n uint80 answeredInRound\n );\n\n function latestRoundData()\n external\n view\n returns (\n uint80 roundId,\n int256 answer,\n uint256 startedAt,\n uint256 updatedAt,\n uint80 answeredInRound\n );\n}\n"
}
},
"settings": {
"metadata": {
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers"
],
"": [
"id",
"ast"
]
}
}
}
}