diff --git a/contracts/periphery/zaps/implementations/base/ZapAerodromePoolUSDC.sol b/contracts/periphery/zaps/implementations/base/ZapAerodromePoolUSDC.sol index 4e29ee8..8a65495 100644 --- a/contracts/periphery/zaps/implementations/base/ZapAerodromePoolUSDC.sol +++ b/contracts/periphery/zaps/implementations/base/ZapAerodromePoolUSDC.sol @@ -17,21 +17,43 @@ import {IAerodromePool} from "../../../../interfaces/periphery/dex/IAerodromePoo import {IAerodromeRouter} from "../../../../interfaces/periphery/dex/IAerodromeRouter.sol"; import {ZapAerodromeBase} from "./ZapAerodromeBase.sol"; +import {IERC20Metadata} from "@openzeppelin/contracts/interfaces/IERC20Metadata.sol"; +import {IERC20, SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; + contract ZapAerodromePoolUSDC is ZapAerodromeBase { - constructor(address _staking, address _bridge, address _router) ZapAerodromeBase(_staking, _bridge, _router) { + using SafeERC20 for IERC20; + using SafeERC20 for IERC20Metadata; + + address public odos; + + constructor( + address _staking, + address _bridge, + address _router, + address _odos + ) ZapAerodromeBase(_staking, _bridge, _router) { // nothing + odos = _odos; } /** - * @notice Zaps collateral into ZAI LP tokens - * @dev This function is used when the user only has collateral tokens. - * @param collateralAmount The amount of collateral to zap - * @param minLpAmount The minimum amount of LP tokens to stake + * @notice Wrapper function for directly zapping with USDC collateral + * @param collateralAmount The amount of USDC to deposit into the LP + * @param minLpAmount The minimum LP tokens to receive after zapping */ - function zapIntoLP(uint256 collateralAmount, uint256 minLpAmount) external { - collateral.transferFrom(msg.sender, me, collateralAmount); + function zapIntoLP(uint256 collateralAmount, uint256 minLpAmount) public { + collateral.safeTransferFrom(msg.sender, me, collateralAmount); + _zapIntoLP(collateralAmount, minLpAmount); + } - uint256 price = collateral.balanceOf(address(pool)) * 1e30 / zai.balanceOf(address(pool)); + /** + * @notice Internal function to zap collateral into ZAI LP tokens + * @dev Decides which zap function to use based on pool price stability + * @param collateralAmount The amount of USDC available for LP zapping + * @param minLpAmount The minimum LP tokens to receive after zapping + */ + function _zapIntoLP(uint256 collateralAmount, uint256 minLpAmount) internal { + uint256 price = (collateral.balanceOf(address(pool)) * 1e30) / zai.balanceOf(address(pool)); if (price < 90 * 1e16) { // < 0.99 _zapDepegged(collateralAmount, minLpAmount); @@ -40,6 +62,33 @@ contract ZapAerodromePoolUSDC is ZapAerodromeBase { } } + /** + * @notice Zaps collateral into ZAI LP tokens with any token by using Odos + * @param swapAsset The asset to swap into USDC using Odos + * @param swapAmount The amount of `swapAsset` to swap + * @param minLpAmount The minimum LP tokens to receive after zapping + * @param odosCallData Encoded Odos swap data + */ + function zapIntoLPWithOdos( + IERC20 swapAsset, + uint256 swapAmount, + uint256 minLpAmount, + bytes memory odosCallData + ) external payable { + if (address(swapAsset) != address(0)) { + // Transfer swapAsset from user + swapAsset.safeTransferFrom(msg.sender, me, swapAmount); + // Approve Odos to spend swapAsset and perform the swap + swapAsset.approve(odos, swapAmount); + } + + (bool success,) = odos.call{value: msg.value}(odosCallData); + require(success, "Odos swap failed"); + + // Now we have USDC in contract, call internal zap function + _zapIntoLP(collateral.balanceOf(me), minLpAmount); + } + function _zapDepegged(uint256 collateralAmount, uint256 minLpAmount) internal { IAerodromeRouter.Route memory route = IAerodromeRouter.Route({from: address(collateral), to: address(zai), stable: true, factory: factory}); @@ -49,7 +98,7 @@ contract ZapAerodromePoolUSDC is ZapAerodromeBase { router.swapExactTokensForTokens( collateralAmount / 2, // uint256 amountIn, - collateralAmount / 2 * 1e12, // uint256 amountOutMin, + (collateralAmount / 2) * 1e12, // uint256 amountOutMin, routes, // Route[] calldata routes, me, // address to, block.timestamp // uint256 deadline diff --git a/deploy/base/zap-aerodrome-usdc.ts b/deploy/base/zap-aerodrome-usdc.ts index 907e955..750d6bd 100644 --- a/deploy/base/zap-aerodrome-usdc.ts +++ b/deploy/base/zap-aerodrome-usdc.ts @@ -8,10 +8,13 @@ async function main(hre: HardhatRuntimeEnvironment) { assert(hre.network.name === "base", "Wrong network"); const { deployments } = hre; + const ODOS_ROUTER_BASE = "0x19cEeAd7105607Cd444F5ad10dd51356436095a1" + const args = [ (await deployments.get("StakingLPRewards-sUSDZUSDC")).address, (await deployments.get("L2DepositCollateralL0")).address, (await deployments.get("AerodromeRouter")).address, + ODOS_ROUTER_BASE ]; const zapD = await deployContract( @@ -29,8 +32,8 @@ async function main(hre: HardhatRuntimeEnvironment) { ).address ); - await waitForTx(await usdc.approve(zap.target, MaxUint256)); - await waitForTx(await zap.zapIntoLP(1e6, 0)); + // await waitForTx(await usdc.approve(zap.target, MaxUint256)); + // await waitForTx(await zap.zapIntoLP(1e6, 0)); } main.tags = ["ZapAerodromePoolUSDC"]; diff --git a/deployments/base/ZapAerodromePoolUSDC.json b/deployments/base/ZapAerodromePoolUSDC.json index e3f4fc1..c55aded 100644 --- a/deployments/base/ZapAerodromePoolUSDC.json +++ b/deployments/base/ZapAerodromePoolUSDC.json @@ -1,5 +1,5 @@ { - "address": "0x7Fa33056B3e8D441523faF85A488A87Aaa3cA644", + "address": "0xF311b30A46A8A074a7f9E8545dBb7238fE9AEA50", "abi": [ { "inputs": [ @@ -17,21 +17,64 @@ "internalType": "address", "name": "_router", "type": "address" + }, + { + "internalType": "address", + "name": "_odos", + "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "AddressInsufficientBalance", + "type": "error" + }, { "inputs": [], "name": "CollateralTransferFailed", "type": "error" }, + { + "inputs": [], + "name": "FailedInnerCall", + "type": "error" + }, { "inputs": [], "name": "OdosSwapFailed", "type": "error" }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, { "inputs": [], "name": "TokenTransferFailed", @@ -133,6 +176,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "odos", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "pool", @@ -203,6 +259,34 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "swapAsset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "swapAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minLpAmount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "odosCallData", + "type": "bytes" + } + ], + "name": "zapIntoLPWithOdos", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, { "inputs": [ { @@ -222,111 +306,141 @@ "type": "function" } ], - "transactionHash": "0xdaacaf7761590dd36c70238015823b06ddc1f9c70db904312ea65209eef366d4", + "transactionHash": "0x783b5ac51331196203ba88ec95898efe8fcf9619b860361f8fc1b6b883bfcebe", "receipt": { "to": null, - "from": "0x1F09Ec21d7fd0A21879b919bf0f9C46e6b85CA8b", - "contractAddress": "0x7Fa33056B3e8D441523faF85A488A87Aaa3cA644", - "transactionIndex": 113, - "gasUsed": "1640576", - "logsBloom": "0x00000000000000000000000010000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000300000000008000000000000000000000000080000000000080000000000000000000000800000000000000000000000040000000000000000000000000000000000000040800000000000000000000004000000000000000000800000000200000000020000000010000020000000000002000000800000000000000000000000000000000000004000000000000000000000004000000000000000000000000000000010000000000000800000200000000000000000080000000000010000000000", - "blockHash": "0x63ac51ce959981028d458c1dc6c29d1cecb47019a4f8f98983f63094de515f86", - "transactionHash": "0xdaacaf7761590dd36c70238015823b06ddc1f9c70db904312ea65209eef366d4", + "from": "0x1A9CE4fC65b2267bb32d692E17dE54Ff996747D8", + "contractAddress": "0xF311b30A46A8A074a7f9E8545dBb7238fE9AEA50", + "transactionIndex": 68, + "gasUsed": "1985483", + "logsBloom": "0x00000000000000000000000010000000000000000004000000000000000000000000000800000000000000000000100000000000000000000000000000300000000008000000000000000000100000080000000000080000000000000000000000800000000000000000000000040000000000000000000000000000000000000040000000000000000000000004000000000000000000800000000200000000020000000010000020000000000002000000800000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000010000000000000810000200000000000000000080000000000000000000000", + "blockHash": "0xc683b2627d152755b5ede27395cc132235aa302ba02940160b12206b041bb78f", + "transactionHash": "0x783b5ac51331196203ba88ec95898efe8fcf9619b860361f8fc1b6b883bfcebe", "logs": [ { - "transactionIndex": 113, - "blockNumber": 20727932, - "transactionHash": "0xdaacaf7761590dd36c70238015823b06ddc1f9c70db904312ea65209eef366d4", + "transactionIndex": 68, + "blockNumber": 22653075, + "transactionHash": "0x783b5ac51331196203ba88ec95898efe8fcf9619b860361f8fc1b6b883bfcebe", "address": "0x72d509aFF75753aAaD6A10d3EB98f2DBC58C480D", "topics": [ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", - "0x0000000000000000000000007fa33056b3e8d441523faf85a488a87aaa3ca644", + "0x000000000000000000000000f311b30a46a8a074a7f9e8545dbb7238fe9aea50", "0x0000000000000000000000001097dfe9539350cb466df9ca89a5e61195a520b0" ], "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", - "logIndex": 249, - "blockHash": "0x63ac51ce959981028d458c1dc6c29d1cecb47019a4f8f98983f63094de515f86" + "logIndex": 153, + "blockHash": "0xc683b2627d152755b5ede27395cc132235aa302ba02940160b12206b041bb78f" }, { - "transactionIndex": 113, - "blockNumber": 20727932, - "transactionHash": "0xdaacaf7761590dd36c70238015823b06ddc1f9c70db904312ea65209eef366d4", + "transactionIndex": 68, + "blockNumber": 22653075, + "transactionHash": "0x783b5ac51331196203ba88ec95898efe8fcf9619b860361f8fc1b6b883bfcebe", "address": "0x0A27E060C0406f8Ab7B64e3BEE036a37e5a62853", "topics": [ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", - "0x0000000000000000000000007fa33056b3e8d441523faf85a488a87aaa3ca644", + "0x000000000000000000000000f311b30a46a8a074a7f9e8545dbb7238fe9aea50", "0x00000000000000000000000072d509aff75753aaad6a10d3eb98f2dbc58c480d" ], "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", - "logIndex": 250, - "blockHash": "0x63ac51ce959981028d458c1dc6c29d1cecb47019a4f8f98983f63094de515f86" + "logIndex": 154, + "blockHash": "0xc683b2627d152755b5ede27395cc132235aa302ba02940160b12206b041bb78f" }, { - "transactionIndex": 113, - "blockNumber": 20727932, - "transactionHash": "0xdaacaf7761590dd36c70238015823b06ddc1f9c70db904312ea65209eef366d4", + "transactionIndex": 68, + "blockNumber": 22653075, + "transactionHash": "0x783b5ac51331196203ba88ec95898efe8fcf9619b860361f8fc1b6b883bfcebe", "address": "0x0A27E060C0406f8Ab7B64e3BEE036a37e5a62853", "topics": [ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", - "0x0000000000000000000000007fa33056b3e8d441523faf85a488a87aaa3ca644", + "0x000000000000000000000000f311b30a46a8a074a7f9e8545dbb7238fe9aea50", "0x000000000000000000000000cf77a3ba9a5ca399b7c97c74d54e5b1beb874e43" ], "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", - "logIndex": 251, - "blockHash": "0x63ac51ce959981028d458c1dc6c29d1cecb47019a4f8f98983f63094de515f86" + "logIndex": 155, + "blockHash": "0xc683b2627d152755b5ede27395cc132235aa302ba02940160b12206b041bb78f" }, { - "transactionIndex": 113, - "blockNumber": 20727932, - "transactionHash": "0xdaacaf7761590dd36c70238015823b06ddc1f9c70db904312ea65209eef366d4", + "transactionIndex": 68, + "blockNumber": 22653075, + "transactionHash": "0x783b5ac51331196203ba88ec95898efe8fcf9619b860361f8fc1b6b883bfcebe", "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "topics": [ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", - "0x0000000000000000000000007fa33056b3e8d441523faf85a488a87aaa3ca644", + "0x000000000000000000000000f311b30a46a8a074a7f9e8545dbb7238fe9aea50", "0x000000000000000000000000cf77a3ba9a5ca399b7c97c74d54e5b1beb874e43" ], "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", - "logIndex": 252, - "blockHash": "0x63ac51ce959981028d458c1dc6c29d1cecb47019a4f8f98983f63094de515f86" + "logIndex": 156, + "blockHash": "0xc683b2627d152755b5ede27395cc132235aa302ba02940160b12206b041bb78f" }, { - "transactionIndex": 113, - "blockNumber": 20727932, - "transactionHash": "0xdaacaf7761590dd36c70238015823b06ddc1f9c70db904312ea65209eef366d4", + "transactionIndex": 68, + "blockNumber": 22653075, + "transactionHash": "0x783b5ac51331196203ba88ec95898efe8fcf9619b860361f8fc1b6b883bfcebe", "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "topics": [ "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", - "0x0000000000000000000000007fa33056b3e8d441523faf85a488a87aaa3ca644", + "0x000000000000000000000000f311b30a46a8a074a7f9e8545dbb7238fe9aea50", "0x000000000000000000000000a07cf1c081f46524a133c1b6e8ee0b5f96a51255" ], "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", - "logIndex": 253, - "blockHash": "0x63ac51ce959981028d458c1dc6c29d1cecb47019a4f8f98983f63094de515f86" + "logIndex": 157, + "blockHash": "0xc683b2627d152755b5ede27395cc132235aa302ba02940160b12206b041bb78f" } ], - "blockNumber": 20727932, - "cumulativeGasUsed": "26394373", + "blockNumber": 22653075, + "cumulativeGasUsed": "21375670", "status": 1, "byzantium": true }, "args": [ "0x1097dFe9539350cb466dF9CA89A5e61195A520B0", "0xA07cf1c081F46524A133c1B6E8eE0B5f96A51255", - "0xcf77a3ba9a5ca399b7c97c74d54e5b1beb874e43" + "0xcf77a3ba9a5ca399b7c97c74d54e5b1beb874e43", + "0x19cEeAd7105607Cd444F5ad10dd51356436095a1" ], "numDeployments": 1, - "solcInputHash": "fe46f4678f32b038db1780e14d29d9b5", - "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_staking\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_router\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CollateralTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OdosSwapFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenTransferFailed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"collateralAmount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"zaiAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newStakedAmount\",\"type\":\"uint256\"}],\"name\":\"Zapped\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IL2DepositCollateralL0\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"collateral\",\"outputs\":[{\"internalType\":\"contract IERC20Metadata\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimalOffset\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"me\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pool\",\"outputs\":[{\"internalType\":\"contract IERC20Metadata\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"contract IAerodromeRouter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staking\",\"outputs\":[{\"internalType\":\"contract IERC4626\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"zai\",\"outputs\":[{\"internalType\":\"contract IERC20Metadata\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collateralAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minLpAmount\",\"type\":\"uint256\"}],\"name\":\"zapIntoLP\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minCollateralAmount\",\"type\":\"uint256\"}],\"name\":\"zapOutOfLP\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"zapIntoLP(uint256,uint256)\":{\"details\":\"This function is used when the user only has collateral tokens.\",\"params\":{\"collateralAmount\":\"The amount of collateral to zap\",\"minLpAmount\":\"The minimum amount of LP tokens to stake\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"zapIntoLP(uint256,uint256)\":{\"notice\":\"Zaps collateral into ZAI LP tokens\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/periphery/zaps/implementations/base/ZapAerodromePoolUSDC.sol\":\"ZapAerodromePoolUSDC\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[]},\"sources\":{\"@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/OAppCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.20;\\n\\nimport { Ownable } from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport { IOAppCore, ILayerZeroEndpointV2 } from \\\"./interfaces/IOAppCore.sol\\\";\\n\\n/**\\n * @title OAppCore\\n * @dev Abstract contract implementing the IOAppCore interface with basic OApp configurations.\\n */\\nabstract contract OAppCore is IOAppCore, Ownable {\\n // The LayerZero endpoint associated with the given OApp\\n ILayerZeroEndpointV2 public immutable endpoint;\\n\\n // Mapping to store peers associated with corresponding endpoints\\n mapping(uint32 eid => bytes32 peer) public peers;\\n\\n /**\\n * @dev Constructor to initialize the OAppCore with the provided endpoint and delegate.\\n * @param _endpoint The address of the LOCAL Layer Zero endpoint.\\n * @param _delegate The delegate capable of making OApp configurations inside of the endpoint.\\n *\\n * @dev The delegate typically should be set as the owner of the contract.\\n */\\n constructor(address _endpoint, address _delegate) {\\n endpoint = ILayerZeroEndpointV2(_endpoint);\\n\\n if (_delegate == address(0)) revert InvalidDelegate();\\n endpoint.setDelegate(_delegate);\\n }\\n\\n /**\\n * @notice Sets the peer address (OApp instance) for a corresponding endpoint.\\n * @param _eid The endpoint ID.\\n * @param _peer The address of the peer to be associated with the corresponding endpoint.\\n *\\n * @dev Only the owner/admin of the OApp can call this function.\\n * @dev Indicates that the peer is trusted to send LayerZero messages to this OApp.\\n * @dev Set this to bytes32(0) to remove the peer address.\\n * @dev Peer is a bytes32 to accommodate non-evm chains.\\n */\\n function setPeer(uint32 _eid, bytes32 _peer) public virtual onlyOwner {\\n _setPeer(_eid, _peer);\\n }\\n\\n /**\\n * @notice Sets the peer address (OApp instance) for a corresponding endpoint.\\n * @param _eid The endpoint ID.\\n * @param _peer The address of the peer to be associated with the corresponding endpoint.\\n *\\n * @dev Indicates that the peer is trusted to send LayerZero messages to this OApp.\\n * @dev Set this to bytes32(0) to remove the peer address.\\n * @dev Peer is a bytes32 to accommodate non-evm chains.\\n */\\n function _setPeer(uint32 _eid, bytes32 _peer) internal virtual {\\n peers[_eid] = _peer;\\n emit PeerSet(_eid, _peer);\\n }\\n\\n /**\\n * @notice Internal function to get the peer address associated with a specific endpoint; reverts if NOT set.\\n * ie. the peer is set to bytes32(0).\\n * @param _eid The endpoint ID.\\n * @return peer The address of the peer associated with the specified endpoint.\\n */\\n function _getPeerOrRevert(uint32 _eid) internal view virtual returns (bytes32) {\\n bytes32 peer = peers[_eid];\\n if (peer == bytes32(0)) revert NoPeer(_eid);\\n return peer;\\n }\\n\\n /**\\n * @notice Sets the delegate address for the OApp.\\n * @param _delegate The address of the delegate to be set.\\n *\\n * @dev Only the owner/admin of the OApp can call this function.\\n * @dev Provides the ability for a delegate to set configs, on behalf of the OApp, directly on the Endpoint contract.\\n */\\n function setDelegate(address _delegate) public onlyOwner {\\n endpoint.setDelegate(_delegate);\\n }\\n}\\n\",\"keccak256\":\"0x13a9c2d1d2c1f086b8624f2e84c4a4702212daae36f701d92bb915b535cbe4cc\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/OAppSender.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.20;\\n\\nimport { SafeERC20, IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { MessagingParams, MessagingFee, MessagingReceipt } from \\\"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol\\\";\\nimport { OAppCore } from \\\"./OAppCore.sol\\\";\\n\\n/**\\n * @title OAppSender\\n * @dev Abstract contract implementing the OAppSender functionality for sending messages to a LayerZero endpoint.\\n */\\nabstract contract OAppSender is OAppCore {\\n using SafeERC20 for IERC20;\\n\\n // Custom error messages\\n error NotEnoughNative(uint256 msgValue);\\n error LzTokenUnavailable();\\n\\n // @dev The version of the OAppSender implementation.\\n // @dev Version is bumped when changes are made to this contract.\\n uint64 internal constant SENDER_VERSION = 1;\\n\\n /**\\n * @notice Retrieves the OApp version information.\\n * @return senderVersion The version of the OAppSender.sol contract.\\n * @return receiverVersion The version of the OAppReceiver.sol contract.\\n *\\n * @dev Providing 0 as the default for OAppReceiver version. Indicates that the OAppReceiver is not implemented.\\n * ie. this is a SEND only OApp.\\n * @dev If the OApp uses both OAppSender and OAppReceiver, then this needs to be override returning the correct versions\\n */\\n function oAppVersion() public view virtual returns (uint64 senderVersion, uint64 receiverVersion) {\\n return (SENDER_VERSION, 0);\\n }\\n\\n /**\\n * @dev Internal function to interact with the LayerZero EndpointV2.quote() for fee calculation.\\n * @param _dstEid The destination endpoint ID.\\n * @param _message The message payload.\\n * @param _options Additional options for the message.\\n * @param _payInLzToken Flag indicating whether to pay the fee in LZ tokens.\\n * @return fee The calculated MessagingFee for the message.\\n * - nativeFee: The native fee for the message.\\n * - lzTokenFee: The LZ token fee for the message.\\n */\\n function _quote(\\n uint32 _dstEid,\\n bytes memory _message,\\n bytes memory _options,\\n bool _payInLzToken\\n ) internal view virtual returns (MessagingFee memory fee) {\\n return\\n endpoint.quote(\\n MessagingParams(_dstEid, _getPeerOrRevert(_dstEid), _message, _options, _payInLzToken),\\n address(this)\\n );\\n }\\n\\n /**\\n * @dev Internal function to interact with the LayerZero EndpointV2.send() for sending a message.\\n * @param _dstEid The destination endpoint ID.\\n * @param _message The message payload.\\n * @param _options Additional options for the message.\\n * @param _fee The calculated LayerZero fee for the message.\\n * - nativeFee: The native fee.\\n * - lzTokenFee: The lzToken fee.\\n * @param _refundAddress The address to receive any excess fee values sent to the endpoint.\\n * @return receipt The receipt for the sent message.\\n * - guid: The unique identifier for the sent message.\\n * - nonce: The nonce of the sent message.\\n * - fee: The LayerZero fee incurred for the message.\\n */\\n function _lzSend(\\n uint32 _dstEid,\\n bytes memory _message,\\n bytes memory _options,\\n MessagingFee memory _fee,\\n address _refundAddress\\n ) internal virtual returns (MessagingReceipt memory receipt) {\\n // @dev Push corresponding fees to the endpoint, any excess is sent back to the _refundAddress from the endpoint.\\n uint256 messageValue = _payNative(_fee.nativeFee);\\n if (_fee.lzTokenFee > 0) _payLzToken(_fee.lzTokenFee);\\n\\n return\\n // solhint-disable-next-line check-send-result\\n endpoint.send{ value: messageValue }(\\n MessagingParams(_dstEid, _getPeerOrRevert(_dstEid), _message, _options, _fee.lzTokenFee > 0),\\n _refundAddress\\n );\\n }\\n\\n /**\\n * @dev Internal function to pay the native fee associated with the message.\\n * @param _nativeFee The native fee to be paid.\\n * @return nativeFee The amount of native currency paid.\\n *\\n * @dev If the OApp needs to initiate MULTIPLE LayerZero messages in a single transaction,\\n * this will need to be overridden because msg.value would contain multiple lzFees.\\n * @dev Should be overridden in the event the LayerZero endpoint requires a different native currency.\\n * @dev Some EVMs use an ERC20 as a method for paying transactions/gasFees.\\n * @dev The endpoint is EITHER/OR, ie. it will NOT support both types of native payment at a time.\\n */\\n function _payNative(uint256 _nativeFee) internal virtual returns (uint256 nativeFee) {\\n if (msg.value != _nativeFee) revert NotEnoughNative(msg.value);\\n return _nativeFee;\\n }\\n\\n /**\\n * @dev Internal function to pay the LZ token fee associated with the message.\\n * @param _lzTokenFee The LZ token fee to be paid.\\n *\\n * @dev If the caller is trying to pay in the specified lzToken, then the lzTokenFee is passed to the endpoint.\\n * @dev Any excess sent, is passed back to the specified _refundAddress in the _lzSend().\\n */\\n function _payLzToken(uint256 _lzTokenFee) internal virtual {\\n // @dev Cannot cache the token because it is not immutable in the endpoint.\\n address lzToken = endpoint.lzToken();\\n if (lzToken == address(0)) revert LzTokenUnavailable();\\n\\n // Pay LZ token fee by sending tokens to the endpoint.\\n IERC20(lzToken).safeTransferFrom(msg.sender, address(endpoint), _lzTokenFee);\\n }\\n}\\n\",\"keccak256\":\"0x518cf4adca601923ed4baa6619846a253ea32b8d8775f8bc1faa3dfac7f67c20\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/interfaces/IOAppCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.20;\\n\\nimport { ILayerZeroEndpointV2 } from \\\"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol\\\";\\n\\n/**\\n * @title IOAppCore\\n */\\ninterface IOAppCore {\\n // Custom error messages\\n error OnlyPeer(uint32 eid, bytes32 sender);\\n error NoPeer(uint32 eid);\\n error InvalidEndpointCall();\\n error InvalidDelegate();\\n\\n // Event emitted when a peer (OApp) is set for a corresponding endpoint\\n event PeerSet(uint32 eid, bytes32 peer);\\n\\n /**\\n * @notice Retrieves the OApp version information.\\n * @return senderVersion The version of the OAppSender.sol contract.\\n * @return receiverVersion The version of the OAppReceiver.sol contract.\\n */\\n function oAppVersion() external view returns (uint64 senderVersion, uint64 receiverVersion);\\n\\n /**\\n * @notice Retrieves the LayerZero endpoint associated with the OApp.\\n * @return iEndpoint The LayerZero endpoint as an interface.\\n */\\n function endpoint() external view returns (ILayerZeroEndpointV2 iEndpoint);\\n\\n /**\\n * @notice Retrieves the peer (OApp) associated with a corresponding endpoint.\\n * @param _eid The endpoint ID.\\n * @return peer The peer address (OApp instance) associated with the corresponding endpoint.\\n */\\n function peers(uint32 _eid) external view returns (bytes32 peer);\\n\\n /**\\n * @notice Sets the peer address (OApp instance) for a corresponding endpoint.\\n * @param _eid The endpoint ID.\\n * @param _peer The address of the peer to be associated with the corresponding endpoint.\\n */\\n function setPeer(uint32 _eid, bytes32 _peer) external;\\n\\n /**\\n * @notice Sets the delegate address for the OApp Core.\\n * @param _delegate The address of the delegate to be set.\\n */\\n function setDelegate(address _delegate) external;\\n}\\n\",\"keccak256\":\"0x40e49f2de74506e1da5dcaed53a39853f691647f4ceb0fccc8f49a68d3f47c58\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-oapp-v2/contracts/oft/interfaces/IOFT.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.20;\\n\\nimport { MessagingReceipt, MessagingFee } from \\\"../../oapp/OAppSender.sol\\\";\\n\\n/**\\n * @dev Struct representing token parameters for the OFT send() operation.\\n */\\nstruct SendParam {\\n uint32 dstEid; // Destination endpoint ID.\\n bytes32 to; // Recipient address.\\n uint256 amountLD; // Amount to send in local decimals.\\n uint256 minAmountLD; // Minimum amount to send in local decimals.\\n bytes extraOptions; // Additional options supplied by the caller to be used in the LayerZero message.\\n bytes composeMsg; // The composed message for the send() operation.\\n bytes oftCmd; // The OFT command to be executed, unused in default OFT implementations.\\n}\\n\\n/**\\n * @dev Struct representing OFT limit information.\\n * @dev These amounts can change dynamically and are up the the specific oft implementation.\\n */\\nstruct OFTLimit {\\n uint256 minAmountLD; // Minimum amount in local decimals that can be sent to the recipient.\\n uint256 maxAmountLD; // Maximum amount in local decimals that can be sent to the recipient.\\n}\\n\\n/**\\n * @dev Struct representing OFT receipt information.\\n */\\nstruct OFTReceipt {\\n uint256 amountSentLD; // Amount of tokens ACTUALLY debited from the sender in local decimals.\\n // @dev In non-default implementations, the amountReceivedLD COULD differ from this value.\\n uint256 amountReceivedLD; // Amount of tokens to be received on the remote side.\\n}\\n\\n/**\\n * @dev Struct representing OFT fee details.\\n * @dev Future proof mechanism to provide a standardized way to communicate fees to things like a UI.\\n */\\nstruct OFTFeeDetail {\\n int256 feeAmountLD; // Amount of the fee in local decimals.\\n string description; // Description of the fee.\\n}\\n\\n/**\\n * @title IOFT\\n * @dev Interface for the OftChain (OFT) token.\\n * @dev Does not inherit ERC20 to accommodate usage by OFTAdapter as well.\\n * @dev This specific interface ID is '0x02e49c2c'.\\n */\\ninterface IOFT {\\n // Custom error messages\\n error InvalidLocalDecimals();\\n error SlippageExceeded(uint256 amountLD, uint256 minAmountLD);\\n\\n // Events\\n event OFTSent(\\n bytes32 indexed guid, // GUID of the OFT message.\\n uint32 dstEid, // Destination Endpoint ID.\\n address indexed fromAddress, // Address of the sender on the src chain.\\n uint256 amountSentLD, // Amount of tokens sent in local decimals.\\n uint256 amountReceivedLD // Amount of tokens received in local decimals.\\n );\\n event OFTReceived(\\n bytes32 indexed guid, // GUID of the OFT message.\\n uint32 srcEid, // Source Endpoint ID.\\n address indexed toAddress, // Address of the recipient on the dst chain.\\n uint256 amountReceivedLD // Amount of tokens received in local decimals.\\n );\\n\\n /**\\n * @notice Retrieves interfaceID and the version of the OFT.\\n * @return interfaceId The interface ID.\\n * @return version The version.\\n *\\n * @dev interfaceId: This specific interface ID is '0x02e49c2c'.\\n * @dev version: Indicates a cross-chain compatible msg encoding with other OFTs.\\n * @dev If a new feature is added to the OFT cross-chain msg encoding, the version will be incremented.\\n * ie. localOFT version(x,1) CAN send messages to remoteOFT version(x,1)\\n */\\n function oftVersion() external view returns (bytes4 interfaceId, uint64 version);\\n\\n /**\\n * @notice Retrieves the address of the token associated with the OFT.\\n * @return token The address of the ERC20 token implementation.\\n */\\n function token() external view returns (address);\\n\\n /**\\n * @notice Indicates whether the OFT contract requires approval of the 'token()' to send.\\n * @return requiresApproval Needs approval of the underlying token implementation.\\n *\\n * @dev Allows things like wallet implementers to determine integration requirements,\\n * without understanding the underlying token implementation.\\n */\\n function approvalRequired() external view returns (bool);\\n\\n /**\\n * @notice Retrieves the shared decimals of the OFT.\\n * @return sharedDecimals The shared decimals of the OFT.\\n */\\n function sharedDecimals() external view returns (uint8);\\n\\n /**\\n * @notice Provides a quote for OFT-related operations.\\n * @param _sendParam The parameters for the send operation.\\n * @return limit The OFT limit information.\\n * @return oftFeeDetails The details of OFT fees.\\n * @return receipt The OFT receipt information.\\n */\\n function quoteOFT(\\n SendParam calldata _sendParam\\n ) external view returns (OFTLimit memory, OFTFeeDetail[] memory oftFeeDetails, OFTReceipt memory);\\n\\n /**\\n * @notice Provides a quote for the send() operation.\\n * @param _sendParam The parameters for the send() operation.\\n * @param _payInLzToken Flag indicating whether the caller is paying in the LZ token.\\n * @return fee The calculated LayerZero messaging fee from the send() operation.\\n *\\n * @dev MessagingFee: LayerZero msg fee\\n * - nativeFee: The native fee.\\n * - lzTokenFee: The lzToken fee.\\n */\\n function quoteSend(SendParam calldata _sendParam, bool _payInLzToken) external view returns (MessagingFee memory);\\n\\n /**\\n * @notice Executes the send() operation.\\n * @param _sendParam The parameters for the send operation.\\n * @param _fee The fee information supplied by the caller.\\n * - nativeFee: The native fee.\\n * - lzTokenFee: The lzToken fee.\\n * @param _refundAddress The address to receive any excess funds from fees etc. on the src.\\n * @return receipt The LayerZero messaging receipt from the send() operation.\\n * @return oftReceipt The OFT receipt information.\\n *\\n * @dev MessagingReceipt: LayerZero msg receipt\\n * - guid: The unique identifier for the sent message.\\n * - nonce: The nonce of the sent message.\\n * - fee: The LayerZero fee incurred for the message.\\n */\\n function send(\\n SendParam calldata _sendParam,\\n MessagingFee calldata _fee,\\n address _refundAddress\\n ) external payable returns (MessagingReceipt memory, OFTReceipt memory);\\n}\\n\",\"keccak256\":\"0x42431bdbe135f7cfefd0be6cd345a6a1045124f6ea707a06756ef2322140eef5\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0;\\n\\nimport { IMessageLibManager } from \\\"./IMessageLibManager.sol\\\";\\nimport { IMessagingComposer } from \\\"./IMessagingComposer.sol\\\";\\nimport { IMessagingChannel } from \\\"./IMessagingChannel.sol\\\";\\nimport { IMessagingContext } from \\\"./IMessagingContext.sol\\\";\\n\\nstruct MessagingParams {\\n uint32 dstEid;\\n bytes32 receiver;\\n bytes message;\\n bytes options;\\n bool payInLzToken;\\n}\\n\\nstruct MessagingReceipt {\\n bytes32 guid;\\n uint64 nonce;\\n MessagingFee fee;\\n}\\n\\nstruct MessagingFee {\\n uint256 nativeFee;\\n uint256 lzTokenFee;\\n}\\n\\nstruct Origin {\\n uint32 srcEid;\\n bytes32 sender;\\n uint64 nonce;\\n}\\n\\ninterface ILayerZeroEndpointV2 is IMessageLibManager, IMessagingComposer, IMessagingChannel, IMessagingContext {\\n event PacketSent(bytes encodedPayload, bytes options, address sendLibrary);\\n\\n event PacketVerified(Origin origin, address receiver, bytes32 payloadHash);\\n\\n event PacketDelivered(Origin origin, address receiver);\\n\\n event LzReceiveAlert(\\n address indexed receiver,\\n address indexed executor,\\n Origin origin,\\n bytes32 guid,\\n uint256 gas,\\n uint256 value,\\n bytes message,\\n bytes extraData,\\n bytes reason\\n );\\n\\n event LzTokenSet(address token);\\n\\n event DelegateSet(address sender, address delegate);\\n\\n function quote(MessagingParams calldata _params, address _sender) external view returns (MessagingFee memory);\\n\\n function send(\\n MessagingParams calldata _params,\\n address _refundAddress\\n ) external payable returns (MessagingReceipt memory);\\n\\n function verify(Origin calldata _origin, address _receiver, bytes32 _payloadHash) external;\\n\\n function verifiable(Origin calldata _origin, address _receiver) external view returns (bool);\\n\\n function initializable(Origin calldata _origin, address _receiver) external view returns (bool);\\n\\n function lzReceive(\\n Origin calldata _origin,\\n address _receiver,\\n bytes32 _guid,\\n bytes calldata _message,\\n bytes calldata _extraData\\n ) external payable;\\n\\n // oapp can burn messages partially by calling this function with its own business logic if messages are verified in order\\n function clear(address _oapp, Origin calldata _origin, bytes32 _guid, bytes calldata _message) external;\\n\\n function setLzToken(address _lzToken) external;\\n\\n function lzToken() external view returns (address);\\n\\n function nativeToken() external view returns (address);\\n\\n function setDelegate(address _delegate) external;\\n}\\n\",\"keccak256\":\"0xf7f941bee89ea6369950fe54e8ac476ae6478b958b20fc0e8a83e8ff1364eac3\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0;\\n\\nstruct SetConfigParam {\\n uint32 eid;\\n uint32 configType;\\n bytes config;\\n}\\n\\ninterface IMessageLibManager {\\n struct Timeout {\\n address lib;\\n uint256 expiry;\\n }\\n\\n event LibraryRegistered(address newLib);\\n event DefaultSendLibrarySet(uint32 eid, address newLib);\\n event DefaultReceiveLibrarySet(uint32 eid, address newLib);\\n event DefaultReceiveLibraryTimeoutSet(uint32 eid, address oldLib, uint256 expiry);\\n event SendLibrarySet(address sender, uint32 eid, address newLib);\\n event ReceiveLibrarySet(address receiver, uint32 eid, address newLib);\\n event ReceiveLibraryTimeoutSet(address receiver, uint32 eid, address oldLib, uint256 timeout);\\n\\n function registerLibrary(address _lib) external;\\n\\n function isRegisteredLibrary(address _lib) external view returns (bool);\\n\\n function getRegisteredLibraries() external view returns (address[] memory);\\n\\n function setDefaultSendLibrary(uint32 _eid, address _newLib) external;\\n\\n function defaultSendLibrary(uint32 _eid) external view returns (address);\\n\\n function setDefaultReceiveLibrary(uint32 _eid, address _newLib, uint256 _gracePeriod) external;\\n\\n function defaultReceiveLibrary(uint32 _eid) external view returns (address);\\n\\n function setDefaultReceiveLibraryTimeout(uint32 _eid, address _lib, uint256 _expiry) external;\\n\\n function defaultReceiveLibraryTimeout(uint32 _eid) external view returns (address lib, uint256 expiry);\\n\\n function isSupportedEid(uint32 _eid) external view returns (bool);\\n\\n function isValidReceiveLibrary(address _receiver, uint32 _eid, address _lib) external view returns (bool);\\n\\n /// ------------------- OApp interfaces -------------------\\n function setSendLibrary(address _oapp, uint32 _eid, address _newLib) external;\\n\\n function getSendLibrary(address _sender, uint32 _eid) external view returns (address lib);\\n\\n function isDefaultSendLibrary(address _sender, uint32 _eid) external view returns (bool);\\n\\n function setReceiveLibrary(address _oapp, uint32 _eid, address _newLib, uint256 _gracePeriod) external;\\n\\n function getReceiveLibrary(address _receiver, uint32 _eid) external view returns (address lib, bool isDefault);\\n\\n function setReceiveLibraryTimeout(address _oapp, uint32 _eid, address _lib, uint256 _expiry) external;\\n\\n function receiveLibraryTimeout(address _receiver, uint32 _eid) external view returns (address lib, uint256 expiry);\\n\\n function setConfig(address _oapp, address _lib, SetConfigParam[] calldata _params) external;\\n\\n function getConfig(\\n address _oapp,\\n address _lib,\\n uint32 _eid,\\n uint32 _configType\\n ) external view returns (bytes memory config);\\n}\\n\",\"keccak256\":\"0x919b37133adff4dc528e3061deb2789c3149971b530c61e556fb3d09ab315dfc\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingChannel.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0;\\n\\ninterface IMessagingChannel {\\n event InboundNonceSkipped(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce);\\n event PacketNilified(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce, bytes32 payloadHash);\\n event PacketBurnt(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce, bytes32 payloadHash);\\n\\n function eid() external view returns (uint32);\\n\\n // this is an emergency function if a message cannot be verified for some reasons\\n // required to provide _nextNonce to avoid race condition\\n function skip(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce) external;\\n\\n function nilify(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce, bytes32 _payloadHash) external;\\n\\n function burn(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce, bytes32 _payloadHash) external;\\n\\n function nextGuid(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (bytes32);\\n\\n function inboundNonce(address _receiver, uint32 _srcEid, bytes32 _sender) external view returns (uint64);\\n\\n function outboundNonce(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (uint64);\\n\\n function inboundPayloadHash(\\n address _receiver,\\n uint32 _srcEid,\\n bytes32 _sender,\\n uint64 _nonce\\n ) external view returns (bytes32);\\n\\n function lazyInboundNonce(address _receiver, uint32 _srcEid, bytes32 _sender) external view returns (uint64);\\n}\\n\",\"keccak256\":\"0x0878f64dffebf58c4165569416372f40860fab546b88cd926eba0d5cb6d8d972\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingComposer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0;\\n\\ninterface IMessagingComposer {\\n event ComposeSent(address from, address to, bytes32 guid, uint16 index, bytes message);\\n event ComposeDelivered(address from, address to, bytes32 guid, uint16 index);\\n event LzComposeAlert(\\n address indexed from,\\n address indexed to,\\n address indexed executor,\\n bytes32 guid,\\n uint16 index,\\n uint256 gas,\\n uint256 value,\\n bytes message,\\n bytes extraData,\\n bytes reason\\n );\\n\\n function composeQueue(\\n address _from,\\n address _to,\\n bytes32 _guid,\\n uint16 _index\\n ) external view returns (bytes32 messageHash);\\n\\n function sendCompose(address _to, bytes32 _guid, uint16 _index, bytes calldata _message) external;\\n\\n function lzCompose(\\n address _from,\\n address _to,\\n bytes32 _guid,\\n uint16 _index,\\n bytes calldata _message,\\n bytes calldata _extraData\\n ) external payable;\\n}\\n\",\"keccak256\":\"0x85bc7090134529ec474866dc4bb1c48692d518c756eb0a961c82574829c51901\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingContext.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0;\\n\\ninterface IMessagingContext {\\n function isSendingMessage() external view returns (bool);\\n\\n function getSendContext() external view returns (uint32 dstEid, address sender);\\n}\\n\",\"keccak256\":\"0xff0c546c2813dae3e440882f46b377375f7461b0714efd80bd3f0c6e5cb8da4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../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 * The initial owner is set to the address provided by the deployer. This can\\n * 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 /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n constructor(address initialOwner) {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\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 if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling 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 if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\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\",\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0xce41876e78d1badc0512229b4d14e4daf83bc1003d7f83978d18e0e56f965b9c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20Metadata} from \\\"../token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\",\"keccak256\":\"0x00c23b80f74717a6765b606001c5c633116020d488ee8f53600685b8200e4bf3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC4626.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\nimport {IERC20Metadata} from \\\"../token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\\n/**\\n * @dev Interface of the ERC4626 \\\"Tokenized Vault Standard\\\", as defined in\\n * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626].\\n */\\ninterface IERC4626 is IERC20, IERC20Metadata {\\n event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares);\\n\\n event Withdraw(\\n address indexed sender,\\n address indexed receiver,\\n address indexed owner,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /**\\n * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.\\n *\\n * - MUST be an ERC-20 token contract.\\n * - MUST NOT revert.\\n */\\n function asset() external view returns (address assetTokenAddress);\\n\\n /**\\n * @dev Returns the total amount of the underlying asset that is \\u201cmanaged\\u201d by Vault.\\n *\\n * - SHOULD include any compounding that occurs from yield.\\n * - MUST be inclusive of any fees that are charged against assets in the Vault.\\n * - MUST NOT revert.\\n */\\n function totalAssets() external view returns (uint256 totalManagedAssets);\\n\\n /**\\n * @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal\\n * scenario where all the conditions are met.\\n *\\n * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.\\n * - MUST NOT show any variations depending on the caller.\\n * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.\\n * - MUST NOT revert.\\n *\\n * NOTE: This calculation MAY NOT reflect the \\u201cper-user\\u201d price-per-share, and instead should reflect the\\n * \\u201caverage-user\\u2019s\\u201d price-per-share, meaning what the average user should expect to see when exchanging to and\\n * from.\\n */\\n function convertToShares(uint256 assets) external view returns (uint256 shares);\\n\\n /**\\n * @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal\\n * scenario where all the conditions are met.\\n *\\n * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.\\n * - MUST NOT show any variations depending on the caller.\\n * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.\\n * - MUST NOT revert.\\n *\\n * NOTE: This calculation MAY NOT reflect the \\u201cper-user\\u201d price-per-share, and instead should reflect the\\n * \\u201caverage-user\\u2019s\\u201d price-per-share, meaning what the average user should expect to see when exchanging to and\\n * from.\\n */\\n function convertToAssets(uint256 shares) external view returns (uint256 assets);\\n\\n /**\\n * @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,\\n * through a deposit call.\\n *\\n * - MUST return a limited value if receiver is subject to some deposit limit.\\n * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.\\n * - MUST NOT revert.\\n */\\n function maxDeposit(address receiver) external view returns (uint256 maxAssets);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given\\n * current on-chain conditions.\\n *\\n * - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit\\n * call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called\\n * in the same transaction.\\n * - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the\\n * deposit would be accepted, regardless if the user has enough tokens approved, etc.\\n * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by depositing.\\n */\\n function previewDeposit(uint256 assets) external view returns (uint256 shares);\\n\\n /**\\n * @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens.\\n *\\n * - MUST emit the Deposit event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\\n * deposit execution, and are accounted for during deposit.\\n * - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not\\n * approving enough underlying tokens to the Vault contract, etc).\\n *\\n * NOTE: most implementations will require pre-approval of the Vault with the Vault\\u2019s underlying asset token.\\n */\\n function deposit(uint256 assets, address receiver) external returns (uint256 shares);\\n\\n /**\\n * @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.\\n * - MUST return a limited value if receiver is subject to some mint limit.\\n * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.\\n * - MUST NOT revert.\\n */\\n function maxMint(address receiver) external view returns (uint256 maxShares);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given\\n * current on-chain conditions.\\n *\\n * - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call\\n * in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the\\n * same transaction.\\n * - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint\\n * would be accepted, regardless if the user has enough tokens approved, etc.\\n * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by minting.\\n */\\n function previewMint(uint256 shares) external view returns (uint256 assets);\\n\\n /**\\n * @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens.\\n *\\n * - MUST emit the Deposit event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint\\n * execution, and are accounted for during mint.\\n * - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not\\n * approving enough underlying tokens to the Vault contract, etc).\\n *\\n * NOTE: most implementations will require pre-approval of the Vault with the Vault\\u2019s underlying asset token.\\n */\\n function mint(uint256 shares, address receiver) external returns (uint256 assets);\\n\\n /**\\n * @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the\\n * Vault, through a withdraw call.\\n *\\n * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.\\n * - MUST NOT revert.\\n */\\n function maxWithdraw(address owner) external view returns (uint256 maxAssets);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,\\n * given current on-chain conditions.\\n *\\n * - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw\\n * call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if\\n * called\\n * in the same transaction.\\n * - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though\\n * the withdrawal would be accepted, regardless if the user has enough shares, etc.\\n * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by depositing.\\n */\\n function previewWithdraw(uint256 assets) external view returns (uint256 shares);\\n\\n /**\\n * @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver.\\n *\\n * - MUST emit the Withdraw event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\\n * withdraw execution, and are accounted for during withdraw.\\n * - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner\\n * not having enough shares, etc).\\n *\\n * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.\\n * Those methods should be performed separately.\\n */\\n function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares);\\n\\n /**\\n * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,\\n * through a redeem call.\\n *\\n * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.\\n * - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.\\n * - MUST NOT revert.\\n */\\n function maxRedeem(address owner) external view returns (uint256 maxShares);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block,\\n * given current on-chain conditions.\\n *\\n * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call\\n * in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the\\n * same transaction.\\n * - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the\\n * redemption would be accepted, regardless if the user has enough shares, etc.\\n * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by redeeming.\\n */\\n function previewRedeem(uint256 shares) external view returns (uint256 assets);\\n\\n /**\\n * @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver.\\n *\\n * - MUST emit the Withdraw event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\\n * redeem execution, and are accounted for during redeem.\\n * - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner\\n * not having enough shares, etc).\\n *\\n * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.\\n * Those methods should be performed separately.\\n */\\n function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets);\\n}\\n\",\"keccak256\":\"0x207f64371bc0fcc5be86713aa5da109a870cc3a6da50e93b64ee881e369b593d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n *\\n * CAUTION: See Security Considerations above.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x6008dabfe393240d73d7dd7688033f72740d570aa422254d29a7dce8568f3aff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC20Permit} from \\\"../extensions/IERC20Permit.sol\\\";\\nimport {Address} from \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev An operation with an ERC20 token failed.\\n */\\n error SafeERC20FailedOperation(address token);\\n\\n /**\\n * @dev Indicates a failed `decreaseAllowance` request.\\n */\\n error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n forceApprove(token, spender, oldAllowance + value);\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\\n * value, non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\\n unchecked {\\n uint256 currentAllowance = token.allowance(address(this), spender);\\n if (currentAllowance < requestedDecrease) {\\n revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\\n }\\n forceApprove(token, spender, currentAllowance - requestedDecrease);\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data);\\n if (returndata.length != 0 && !abi.decode(returndata, (bool))) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;\\n }\\n}\\n\",\"keccak256\":\"0x37bb49513c49c87c4642a891b13b63571bc87013dde806617aa1efb54605f386\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev The ETH balance of the account is not enough to perform the operation.\\n */\\n error AddressInsufficientBalance(address account);\\n\\n /**\\n * @dev There's no code at `target` (it is not a contract).\\n */\\n error AddressEmptyCode(address target);\\n\\n /**\\n * @dev A call to an address target failed. The target may have reverted.\\n */\\n error FailedInnerCall();\\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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n if (address(this).balance < amount) {\\n revert AddressInsufficientBalance(address(this));\\n }\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n if (!success) {\\n revert FailedInnerCall();\\n }\\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 or custom error, it is bubbled\\n * up by this function (like regular Solidity function calls). However, if\\n * the call reverted with no returned reason, this function reverts with a\\n * {FailedInnerCall} error.\\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 function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0);\\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 function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n if (address(this).balance < value) {\\n revert AddressInsufficientBalance(address(this));\\n }\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target\\n * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an\\n * unsuccessful call.\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata\\n ) internal view returns (bytes memory) {\\n if (!success) {\\n _revert(returndata);\\n } else {\\n // only check if target is a contract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n if (returndata.length == 0 && target.code.length == 0) {\\n revert AddressEmptyCode(target);\\n }\\n return returndata;\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the\\n * revert reason or with a default {FailedInnerCall} error.\\n */\\n function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {\\n if (!success) {\\n _revert(returndata);\\n } else {\\n return returndata;\\n }\\n }\\n\\n /**\\n * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.\\n */\\n function _revert(bytes memory returndata) private pure {\\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 FailedInnerCall();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xaf28a975a78550e45f65e559a3ad6a5ad43b9b8a37366999abd1b7084eb70721\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\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 function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\"},\"contracts/interfaces/periphery/IStablecoinOFT.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\n// \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2554\\u2588\\u2588\\u2588\\u2588\\u2554\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551\\u255a\\u2588\\u2588\\u2554\\u255d\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551 \\u255a\\u2550\\u255d \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\n// \\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\n\\n// Website: https://maha.xyz\\n// Discord: https://discord.gg/mahadao\\n// Twitter: https://twitter.com/mahaxyz_\\n\\npragma solidity 0.8.21;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\n\\ninterface IStablecoinOFT is IERC20 {\\n function setRestaker(address _restaking) external;\\n\\n function restakingMint(address _to, uint256 _amount) external;\\n}\\n\",\"keccak256\":\"0xc5c526d0c347770a308d6b46fa2f45e206cfb8622f423f0b9e2fec94373d3b2e\",\"license\":\"GPL-3.0\"},\"contracts/interfaces/periphery/dex/IAerodromePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\n// \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2554\\u2588\\u2588\\u2588\\u2588\\u2554\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551\\u255a\\u2588\\u2588\\u2554\\u255d\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551 \\u255a\\u2550\\u255d \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\n// \\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\n\\n// Website: https://maha.xyz\\n// Discord: https://discord.gg/mahadao\\n// Twitter: https://twitter.com/mahaxyz_\\n\\npragma solidity 0.8.21;\\n\\ninterface IAerodromePool {\\n error DepositsNotEqual();\\n error BelowMinimumK();\\n error FactoryAlreadySet();\\n error InsufficientLiquidity();\\n error InsufficientLiquidityMinted();\\n error InsufficientLiquidityBurned();\\n error InsufficientOutputAmount();\\n error InsufficientInputAmount();\\n error IsPaused();\\n error InvalidTo();\\n error K();\\n error NotEmergencyCouncil();\\n\\n event Fees(address indexed sender, uint256 amount0, uint256 amount1);\\n event Mint(address indexed sender, uint256 amount0, uint256 amount1);\\n event Burn(address indexed sender, address indexed to, uint256 amount0, uint256 amount1);\\n event Swap(\\n address indexed sender,\\n address indexed to,\\n uint256 amount0In,\\n uint256 amount1In,\\n uint256 amount0Out,\\n uint256 amount1Out\\n );\\n event Sync(uint256 reserve0, uint256 reserve1);\\n event Claim(address indexed sender, address indexed recipient, uint256 amount0, uint256 amount1);\\n\\n // Struct to capture time period obervations every 30 minutes, used for local oracles\\n struct Observation {\\n uint256 timestamp;\\n uint256 reserve0Cumulative;\\n uint256 reserve1Cumulative;\\n }\\n\\n /// @notice Returns the decimal (dec), reserves (r), stable (st), and tokens (t) of token0 and token1\\n function metadata()\\n external\\n view\\n returns (uint256 dec0, uint256 dec1, uint256 r0, uint256 r1, bool st, address t0, address t1);\\n\\n /// @notice Claim accumulated but unclaimed fees (claimable0 and claimable1)\\n function claimFees() external returns (uint256, uint256);\\n\\n /// @notice Returns [token0, token1]\\n function tokens() external view returns (address, address);\\n\\n /// @notice Address of token in the pool with the lower address value\\n function token0() external view returns (address);\\n\\n /// @notice Address of token in the poool with the higher address value\\n function token1() external view returns (address);\\n\\n /// @notice Address of linked PoolFees.sol\\n function poolFees() external view returns (address);\\n\\n /// @notice Address of PoolFactory that created this contract\\n function factory() external view returns (address);\\n\\n /// @notice Capture oracle reading every 30 minutes (1800 seconds)\\n function periodSize() external view returns (uint256);\\n\\n /// @notice Amount of token0 in pool\\n function reserve0() external view returns (uint256);\\n\\n /// @notice Amount of token1 in pool\\n function reserve1() external view returns (uint256);\\n\\n /// @notice Timestamp of last update to pool\\n function blockTimestampLast() external view returns (uint256);\\n\\n /// @notice Cumulative of reserve0 factoring in time elapsed\\n function reserve0CumulativeLast() external view returns (uint256);\\n\\n /// @notice Cumulative of reserve1 factoring in time elapsed\\n function reserve1CumulativeLast() external view returns (uint256);\\n\\n /// @notice Accumulated fees of token0 (global)\\n function index0() external view returns (uint256);\\n\\n /// @notice Accumulated fees of token1 (global)\\n function index1() external view returns (uint256);\\n\\n /// @notice Get an LP's relative index0 to index0\\n function supplyIndex0(address) external view returns (uint256);\\n\\n /// @notice Get an LP's relative index1 to index1\\n function supplyIndex1(address) external view returns (uint256);\\n\\n /// @notice Amount of unclaimed, but claimable tokens from fees of token0 for an LP\\n function claimable0(address) external view returns (uint256);\\n\\n /// @notice Amount of unclaimed, but claimable tokens from fees of token1 for an LP\\n function claimable1(address) external view returns (uint256);\\n\\n function totalSupply() external view returns (uint256);\\n\\n /// @notice Returns the value of K in the Pool, based on its reserves.\\n function getK() external returns (uint256);\\n\\n /// @notice Set pool name\\n /// Only callable by Voter.emergencyCouncil()\\n /// @param __name String of new name\\n function setName(string calldata __name) external;\\n\\n /// @notice Set pool symbol\\n /// Only callable by Voter.emergencyCouncil()\\n /// @param __symbol String of new symbol\\n function setSymbol(string calldata __symbol) external;\\n\\n /// @notice Get the number of observations recorded\\n function observationLength() external view returns (uint256);\\n\\n /// @notice Get the value of the most recent observation\\n function lastObservation() external view returns (Observation memory);\\n\\n /// @notice True if pool is stable, false if volatile\\n function stable() external view returns (bool);\\n\\n /// @notice Produces the cumulative price using counterfactuals to save gas and avoid a call to sync.\\n function currentCumulativePrices()\\n external\\n view\\n returns (uint256 reserve0Cumulative, uint256 reserve1Cumulative, uint256 blockTimestamp);\\n\\n /// @notice Provides twap price with user configured granularity, up to the full window size\\n /// @param tokenIn .\\n /// @param amountIn .\\n /// @param granularity .\\n /// @return amountOut .\\n function quote(address tokenIn, uint256 amountIn, uint256 granularity) external view returns (uint256 amountOut);\\n\\n /// @notice Returns a memory set of TWAP prices\\n /// Same as calling sample(tokenIn, amountIn, points, 1)\\n /// @param tokenIn .\\n /// @param amountIn .\\n /// @param points Number of points to return\\n /// @return Array of TWAP prices\\n function prices(address tokenIn, uint256 amountIn, uint256 points) external view returns (uint256[] memory);\\n\\n /// @notice Same as prices with with an additional window argument.\\n /// Window = 2 means 2 * 30min (or 1 hr) between observations\\n /// @param tokenIn .\\n /// @param amountIn .\\n /// @param points .\\n /// @param window .\\n /// @return Array of TWAP prices\\n function sample(\\n address tokenIn,\\n uint256 amountIn,\\n uint256 points,\\n uint256 window\\n ) external view returns (uint256[] memory);\\n\\n /// @notice This low-level function should be called from a contract which performs important safety checks\\n /// @param amount0Out Amount of token0 to send to `to`\\n /// @param amount1Out Amount of token1 to send to `to`\\n /// @param to Address to recieve the swapped output\\n /// @param data Additional calldata for flashloans\\n function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external;\\n\\n /// @notice This low-level function should be called from a contract which performs important safety checks\\n /// standard uniswap v2 implementation\\n /// @param to Address to receive token0 and token1 from burning the pool token\\n /// @return amount0 Amount of token0 returned\\n /// @return amount1 Amount of token1 returned\\n function burn(address to) external returns (uint256 amount0, uint256 amount1);\\n\\n /// @notice This low-level function should be called by addLiquidity functions in Router.sol, which performs important\\n /// safety checks\\n /// standard uniswap v2 implementation\\n /// @param to Address to receive the minted LP token\\n /// @return liquidity Amount of LP token minted\\n function mint(address to) external returns (uint256 liquidity);\\n\\n /// @notice Update reserves and, on the first call per block, price accumulators\\n /// @return _reserve0 .\\n /// @return _reserve1 .\\n /// @return _blockTimestampLast .\\n function getReserves() external view returns (uint256 _reserve0, uint256 _reserve1, uint256 _blockTimestampLast);\\n\\n /// @notice Get the amount of tokenOut given the amount of tokenIn\\n /// @param amountIn Amount of token in\\n /// @param tokenIn Address of token\\n /// @return Amount out\\n function getAmountOut(uint256 amountIn, address tokenIn) external view returns (uint256);\\n\\n /// @notice Force balances to match reserves\\n /// @param to Address to receive any skimmed rewards\\n function skim(address to) external;\\n\\n /// @notice Force reserves to match balances\\n function sync() external;\\n\\n /// @notice Called on pool creation by PoolFactory\\n /// @param _token0 Address of token0\\n /// @param _token1 Address of token1\\n /// @param _stable True if stable, false if volatile\\n function initialize(address _token0, address _token1, bool _stable) external;\\n}\\n\",\"keccak256\":\"0x33a1b19179d400dccc2a645dfd347d79de77e1a3d8a94bc8c9963a2292d57455\",\"license\":\"GPL-3.0\"},\"contracts/interfaces/periphery/dex/IAerodromeRouter.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\n// \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2554\\u2588\\u2588\\u2588\\u2588\\u2554\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551\\u255a\\u2588\\u2588\\u2554\\u255d\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551 \\u255a\\u2550\\u255d \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\n// \\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\n\\n// Website: https://maha.xyz\\n// Discord: https://discord.gg/mahadao\\n// Twitter: https://twitter.com/mahaxyz_\\n\\npragma solidity 0.8.21;\\n\\ninterface IAerodromeRouter {\\n struct Route {\\n address from;\\n address to;\\n bool stable;\\n address factory;\\n }\\n\\n error ETHTransferFailed();\\n error Expired();\\n error InsufficientAmount();\\n error InsufficientAmountA();\\n error InsufficientAmountB();\\n error InsufficientAmountADesired();\\n error InsufficientAmountBDesired();\\n error InsufficientAmountAOptimal();\\n error InsufficientLiquidity();\\n error InsufficientOutputAmount();\\n error InvalidAmountInForETHDeposit();\\n error InvalidTokenInForETHDeposit();\\n error InvalidPath();\\n error InvalidRouteA();\\n error InvalidRouteB();\\n error OnlyWETH();\\n error PoolDoesNotExist();\\n error PoolFactoryDoesNotExist();\\n error SameAddresses();\\n error ZeroAddress();\\n\\n /// @notice Address of FactoryRegistry.sol\\n function factoryRegistry() external view returns (address);\\n\\n /// @notice Address of Protocol PoolFactory.sol\\n function defaultFactory() external view returns (address);\\n\\n /// @notice Address of Voter.sol\\n function voter() external view returns (address);\\n\\n /// @dev Represents Ether. Used by zapper to determine whether to return assets as ETH/WETH.\\n function ETHER() external view returns (address);\\n\\n /// @dev Struct containing information necessary to zap in and out of pools\\n /// @param tokenA .\\n /// @param tokenB .\\n /// @param stable Stable or volatile pool\\n /// @param factory factory of pool\\n /// @param amountOutMinA Minimum amount expected from swap leg of zap via routesA\\n /// @param amountOutMinB Minimum amount expected from swap leg of zap via routesB\\n /// @param amountAMin Minimum amount of tokenA expected from liquidity leg of zap\\n /// @param amountBMin Minimum amount of tokenB expected from liquidity leg of zap\\n struct Zap {\\n address tokenA;\\n address tokenB;\\n bool stable;\\n address factory;\\n uint256 amountOutMinA;\\n uint256 amountOutMinB;\\n uint256 amountAMin;\\n uint256 amountBMin;\\n }\\n\\n /// @notice Sort two tokens by which address value is less than the other\\n /// @param tokenA Address of token to sort\\n /// @param tokenB Address of token to sort\\n /// @return token0 Lower address value between tokenA and tokenB\\n /// @return token1 Higher address value between tokenA and tokenB\\n function sortTokens(address tokenA, address tokenB) external pure returns (address token0, address token1);\\n\\n /// @notice Calculate the address of a pool by its' factory.\\n /// Used by all Router functions containing a `Route[]` or `_factory` argument.\\n /// Reverts if _factory is not approved by the FactoryRegistry\\n /// @dev Returns a randomly generated address for a nonexistent pool\\n /// @param tokenA Address of token to query\\n /// @param tokenB Address of token to query\\n /// @param stable True if pool is stable, false if volatile\\n /// @param _factory Address of factory which created the pool\\n function poolFor(address tokenA, address tokenB, bool stable, address _factory) external view returns (address pool);\\n\\n /// @notice Fetch and sort the reserves for a pool\\n /// @param tokenA .\\n /// @param tokenB .\\n /// @param stable True if pool is stable, false if volatile\\n /// @param _factory Address of PoolFactory for tokenA and tokenB\\n /// @return reserveA Amount of reserves of the sorted token A\\n /// @return reserveB Amount of reserves of the sorted token B\\n function getReserves(\\n address tokenA,\\n address tokenB,\\n bool stable,\\n address _factory\\n ) external view returns (uint256 reserveA, uint256 reserveB);\\n\\n /// @notice Perform chained getAmountOut calculations on any number of pools\\n function getAmountsOut(uint256 amountIn, Route[] memory routes) external view returns (uint256[] memory amounts);\\n\\n // **** ADD LIQUIDITY ****\\n\\n /// @notice Quote the amount deposited into a Pool\\n /// @param tokenA .\\n /// @param tokenB .\\n /// @param stable True if pool is stable, false if volatile\\n /// @param _factory Address of PoolFactory for tokenA and tokenB\\n /// @param amountADesired Amount of tokenA desired to deposit\\n /// @param amountBDesired Amount of tokenB desired to deposit\\n /// @return amountA Amount of tokenA to actually deposit\\n /// @return amountB Amount of tokenB to actually deposit\\n /// @return liquidity Amount of liquidity token returned from deposit\\n function quoteAddLiquidity(\\n address tokenA,\\n address tokenB,\\n bool stable,\\n address _factory,\\n uint256 amountADesired,\\n uint256 amountBDesired\\n ) external view returns (uint256 amountA, uint256 amountB, uint256 liquidity);\\n\\n /// @notice Quote the amount of liquidity removed from a Pool\\n /// @param tokenA .\\n /// @param tokenB .\\n /// @param stable True if pool is stable, false if volatile\\n /// @param _factory Address of PoolFactory for tokenA and tokenB\\n /// @param liquidity Amount of liquidity to remove\\n /// @return amountA Amount of tokenA received\\n /// @return amountB Amount of tokenB received\\n function quoteRemoveLiquidity(\\n address tokenA,\\n address tokenB,\\n bool stable,\\n address _factory,\\n uint256 liquidity\\n ) external view returns (uint256 amountA, uint256 amountB);\\n\\n /// @notice Add liquidity of two tokens to a Pool\\n /// @param tokenA .\\n /// @param tokenB .\\n /// @param stable True if pool is stable, false if volatile\\n /// @param amountADesired Amount of tokenA desired to deposit\\n /// @param amountBDesired Amount of tokenB desired to deposit\\n /// @param amountAMin Minimum amount of tokenA to deposit\\n /// @param amountBMin Minimum amount of tokenB to deposit\\n /// @param to Recipient of liquidity token\\n /// @param deadline Deadline to receive liquidity\\n /// @return amountA Amount of tokenA to actually deposit\\n /// @return amountB Amount of tokenB to actually deposit\\n /// @return liquidity Amount of liquidity token returned from deposit\\n function addLiquidity(\\n address tokenA,\\n address tokenB,\\n bool stable,\\n uint256 amountADesired,\\n uint256 amountBDesired,\\n uint256 amountAMin,\\n uint256 amountBMin,\\n address to,\\n uint256 deadline\\n ) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);\\n\\n /// @notice Add liquidity of a token and WETH (transferred as ETH) to a Pool\\n /// @param token .\\n /// @param stable True if pool is stable, false if volatile\\n /// @param amountTokenDesired Amount of token desired to deposit\\n /// @param amountTokenMin Minimum amount of token to deposit\\n /// @param amountETHMin Minimum amount of ETH to deposit\\n /// @param to Recipient of liquidity token\\n /// @param deadline Deadline to add liquidity\\n /// @return amountToken Amount of token to actually deposit\\n /// @return amountETH Amount of tokenETH to actually deposit\\n /// @return liquidity Amount of liquidity token returned from deposit\\n function addLiquidityETH(\\n address token,\\n bool stable,\\n uint256 amountTokenDesired,\\n uint256 amountTokenMin,\\n uint256 amountETHMin,\\n address to,\\n uint256 deadline\\n ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);\\n\\n // **** REMOVE LIQUIDITY ****\\n\\n /// @notice Remove liquidity of two tokens from a Pool\\n /// @param tokenA .\\n /// @param tokenB .\\n /// @param stable True if pool is stable, false if volatile\\n /// @param liquidity Amount of liquidity to remove\\n /// @param amountAMin Minimum amount of tokenA to receive\\n /// @param amountBMin Minimum amount of tokenB to receive\\n /// @param to Recipient of tokens received\\n /// @param deadline Deadline to remove liquidity\\n /// @return amountA Amount of tokenA received\\n /// @return amountB Amount of tokenB received\\n function removeLiquidity(\\n address tokenA,\\n address tokenB,\\n bool stable,\\n uint256 liquidity,\\n uint256 amountAMin,\\n uint256 amountBMin,\\n address to,\\n uint256 deadline\\n ) external returns (uint256 amountA, uint256 amountB);\\n\\n /// @notice Remove liquidity of a token and WETH (returned as ETH) from a Pool\\n /// @param token .\\n /// @param stable True if pool is stable, false if volatile\\n /// @param liquidity Amount of liquidity to remove\\n /// @param amountTokenMin Minimum amount of token to receive\\n /// @param amountETHMin Minimum amount of ETH to receive\\n /// @param to Recipient of liquidity token\\n /// @param deadline Deadline to receive liquidity\\n /// @return amountToken Amount of token received\\n /// @return amountETH Amount of ETH received\\n function removeLiquidityETH(\\n address token,\\n bool stable,\\n uint256 liquidity,\\n uint256 amountTokenMin,\\n uint256 amountETHMin,\\n address to,\\n uint256 deadline\\n ) external returns (uint256 amountToken, uint256 amountETH);\\n\\n /// @notice Remove liquidity of a fee-on-transfer token and WETH (returned as ETH) from a Pool\\n /// @param token .\\n /// @param stable True if pool is stable, false if volatile\\n /// @param liquidity Amount of liquidity to remove\\n /// @param amountTokenMin Minimum amount of token to receive\\n /// @param amountETHMin Minimum amount of ETH to receive\\n /// @param to Recipient of liquidity token\\n /// @param deadline Deadline to receive liquidity\\n /// @return amountETH Amount of ETH received\\n function removeLiquidityETHSupportingFeeOnTransferTokens(\\n address token,\\n bool stable,\\n uint256 liquidity,\\n uint256 amountTokenMin,\\n uint256 amountETHMin,\\n address to,\\n uint256 deadline\\n ) external returns (uint256 amountETH);\\n\\n // **** SWAP ****\\n\\n /// @notice Swap one token for another\\n /// @param amountIn Amount of token in\\n /// @param amountOutMin Minimum amount of desired token received\\n /// @param routes Array of trade routes used in the swap\\n /// @param to Recipient of the tokens received\\n /// @param deadline Deadline to receive tokens\\n /// @return amounts Array of amounts returned per route\\n function swapExactTokensForTokens(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n Route[] calldata routes,\\n address to,\\n uint256 deadline\\n ) external returns (uint256[] memory amounts);\\n\\n /// @notice Swap ETH for a token\\n /// @param amountOutMin Minimum amount of desired token received\\n /// @param routes Array of trade routes used in the swap\\n /// @param to Recipient of the tokens received\\n /// @param deadline Deadline to receive tokens\\n /// @return amounts Array of amounts returned per route\\n function swapExactETHForTokens(\\n uint256 amountOutMin,\\n Route[] calldata routes,\\n address to,\\n uint256 deadline\\n ) external payable returns (uint256[] memory amounts);\\n\\n /// @notice Swap a token for WETH (returned as ETH)\\n /// @param amountIn Amount of token in\\n /// @param amountOutMin Minimum amount of desired ETH\\n /// @param routes Array of trade routes used in the swap\\n /// @param to Recipient of the tokens received\\n /// @param deadline Deadline to receive tokens\\n /// @return amounts Array of amounts returned per route\\n function swapExactTokensForETH(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n Route[] calldata routes,\\n address to,\\n uint256 deadline\\n ) external returns (uint256[] memory amounts);\\n\\n /// @notice Swap one token for another without slippage protection\\n /// @return amounts Array of amounts to swap per route\\n /// @param routes Array of trade routes used in the swap\\n /// @param to Recipient of the tokens received\\n /// @param deadline Deadline to receive tokens\\n function UNSAFE_swapExactTokensForTokens(\\n uint256[] memory amounts,\\n Route[] calldata routes,\\n address to,\\n uint256 deadline\\n ) external returns (uint256[] memory);\\n\\n // **** SWAP (supporting fee-on-transfer tokens) ****\\n\\n /// @notice Swap one token for another supporting fee-on-transfer tokens\\n /// @param amountIn Amount of token in\\n /// @param amountOutMin Minimum amount of desired token received\\n /// @param routes Array of trade routes used in the swap\\n /// @param to Recipient of the tokens received\\n /// @param deadline Deadline to receive tokens\\n function swapExactTokensForTokensSupportingFeeOnTransferTokens(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n Route[] calldata routes,\\n address to,\\n uint256 deadline\\n ) external;\\n\\n /// @notice Swap ETH for a token supporting fee-on-transfer tokens\\n /// @param amountOutMin Minimum amount of desired token received\\n /// @param routes Array of trade routes used in the swap\\n /// @param to Recipient of the tokens received\\n /// @param deadline Deadline to receive tokens\\n function swapExactETHForTokensSupportingFeeOnTransferTokens(\\n uint256 amountOutMin,\\n Route[] calldata routes,\\n address to,\\n uint256 deadline\\n ) external payable;\\n\\n /// @notice Swap a token for WETH (returned as ETH) supporting fee-on-transfer tokens\\n /// @param amountIn Amount of token in\\n /// @param amountOutMin Minimum amount of desired ETH\\n /// @param routes Array of trade routes used in the swap\\n /// @param to Recipient of the tokens received\\n /// @param deadline Deadline to receive tokens\\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n Route[] calldata routes,\\n address to,\\n uint256 deadline\\n ) external;\\n\\n /// @notice Zap a token A into a pool (B, C). (A can be equal to B or C).\\n /// Supports standard ERC20 tokens only (i.e. not fee-on-transfer tokens etc).\\n /// Slippage is required for the initial swap.\\n /// Additional slippage may be required when adding liquidity as the\\n /// price of the token may have changed.\\n /// @param tokenIn Token you are zapping in from (i.e. input token).\\n /// @param amountInA Amount of input token you wish to send down routesA\\n /// @param amountInB Amount of input token you wish to send down routesB\\n /// @param zapInPool Contains zap struct information. See Zap struct.\\n /// @param routesA Route used to convert input token to tokenA\\n /// @param routesB Route used to convert input token to tokenB\\n /// @param to Address you wish to mint liquidity to.\\n /// @param stake Auto-stake liquidity in corresponding gauge.\\n /// @return liquidity Amount of LP tokens created from zapping in.\\n function zapIn(\\n address tokenIn,\\n uint256 amountInA,\\n uint256 amountInB,\\n Zap calldata zapInPool,\\n Route[] calldata routesA,\\n Route[] calldata routesB,\\n address to,\\n bool stake\\n ) external payable returns (uint256 liquidity);\\n\\n /// @notice Zap out a pool (B, C) into A.\\n /// Supports standard ERC20 tokens only (i.e. not fee-on-transfer tokens etc).\\n /// Slippage is required for the removal of liquidity.\\n /// Additional slippage may be required on the swap as the\\n /// price of the token may have changed.\\n /// @param tokenOut Token you are zapping out to (i.e. output token).\\n /// @param liquidity Amount of liquidity you wish to remove.\\n /// @param zapOutPool Contains zap struct information. See Zap struct.\\n /// @param routesA Route used to convert tokenA into output token.\\n /// @param routesB Route used to convert tokenB into output token.\\n function zapOut(\\n address tokenOut,\\n uint256 liquidity,\\n Zap calldata zapOutPool,\\n Route[] calldata routesA,\\n Route[] calldata routesB\\n ) external;\\n\\n /// @notice Used to generate params required for zapping in.\\n /// Zap in => remove liquidity then swap.\\n /// Apply slippage to expected swap values to account for changes in reserves in between.\\n /// @dev Output token refers to the token you want to zap in from.\\n /// @param tokenA .\\n /// @param tokenB .\\n /// @param stable .\\n /// @param _factory .\\n /// @param amountInA Amount of input token you wish to send down routesA\\n /// @param amountInB Amount of input token you wish to send down routesB\\n /// @param routesA Route used to convert input token to tokenA\\n /// @param routesB Route used to convert input token to tokenB\\n /// @return amountOutMinA Minimum output expected from swapping input token to tokenA.\\n /// @return amountOutMinB Minimum output expected from swapping input token to tokenB.\\n /// @return amountAMin Minimum amount of tokenA expected from depositing liquidity.\\n /// @return amountBMin Minimum amount of tokenB expected from depositing liquidity.\\n function generateZapInParams(\\n address tokenA,\\n address tokenB,\\n bool stable,\\n address _factory,\\n uint256 amountInA,\\n uint256 amountInB,\\n Route[] calldata routesA,\\n Route[] calldata routesB\\n ) external view returns (uint256 amountOutMinA, uint256 amountOutMinB, uint256 amountAMin, uint256 amountBMin);\\n\\n /// @notice Used to generate params required for zapping out.\\n /// Zap out => swap then add liquidity.\\n /// Apply slippage to expected liquidity values to account for changes in reserves in between.\\n /// @dev Output token refers to the token you want to zap out of.\\n /// @param tokenA .\\n /// @param tokenB .\\n /// @param stable .\\n /// @param _factory .\\n /// @param liquidity Amount of liquidity being zapped out of into a given output token.\\n /// @param routesA Route used to convert tokenA into output token.\\n /// @param routesB Route used to convert tokenB into output token.\\n /// @return amountOutMinA Minimum output expected from swapping tokenA into output token.\\n /// @return amountOutMinB Minimum output expected from swapping tokenB into output token.\\n /// @return amountAMin Minimum amount of tokenA expected from withdrawing liquidity.\\n /// @return amountBMin Minimum amount of tokenB expected from withdrawing liquidity.\\n function generateZapOutParams(\\n address tokenA,\\n address tokenB,\\n bool stable,\\n address _factory,\\n uint256 liquidity,\\n Route[] calldata routesA,\\n Route[] calldata routesB\\n ) external view returns (uint256 amountOutMinA, uint256 amountOutMinB, uint256 amountAMin, uint256 amountBMin);\\n\\n /// @notice Used by zapper to determine appropriate ratio of A to B to deposit liquidity. Assumes stable pool.\\n /// @dev Returns stable liquidity ratio of B to (A + B).\\n /// E.g. if ratio is 0.4, it means there is more of A than there is of B.\\n /// Therefore you should deposit more of token A than B.\\n /// @param tokenA tokenA of stable pool you are zapping into.\\n /// @param tokenB tokenB of stable pool you are zapping into.\\n /// @param factory Factory that created stable pool.\\n /// @return ratio Ratio of token0 to token1 required to deposit into zap.\\n function quoteStableLiquidityRatio(\\n address tokenA,\\n address tokenB,\\n address factory\\n ) external view returns (uint256 ratio);\\n}\\n\",\"keccak256\":\"0x9ec71ce30ff33be579d364102570a46d841dee91ac83f3ff3cb9d3282315d4a5\",\"license\":\"GPL-3.0\"},\"contracts/interfaces/periphery/layerzero/IL2DepositCollateralL0.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\n// \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2554\\u2588\\u2588\\u2588\\u2588\\u2554\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551\\u255a\\u2588\\u2588\\u2554\\u255d\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551 \\u255a\\u2550\\u255d \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\n// \\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\n\\n// Website: https://maha.xyz\\n// Discord: https://discord.gg/mahadao\\n// Twitter: https://twitter.com/mahaxyz_\\n\\npragma solidity 0.8.21;\\n\\nimport {IERC20, IStablecoinOFT} from \\\"../IStablecoinOFT.sol\\\";\\nimport {IStargate} from \\\"./IStargate.sol\\\";\\n\\ninterface IL2DepositCollateralL0 {\\n /// @notice The rate at which the deposit token is converted to OFT\\n function rate() external view returns (uint256);\\n\\n /// @notice The slippage allowed for the bridge\\n function slippage() external view returns (uint256);\\n\\n /// @notice The OFT token address\\n function oft() external view returns (IStablecoinOFT);\\n\\n /// @notice The deposit token address - this is what users will deposit to mint the OFT\\n function depositToken() external view returns (IERC20);\\n\\n /// @notice The address of the stargate bridge\\n function stargate() external view returns (IStargate);\\n\\n /// @notice The contract address where the bridge call should be sent on mainnet ETH\\n function bridgeTargetAddress() external view returns (bytes32);\\n\\n /// @notice The mapping of allowed addresses that can trigger the bridge function\\n // mapping(address => bool) public allowedBridgeSweepers;\\n\\n function allowedBridgeSweepers(address) external view returns (bool);\\n\\n event Deposit(address from, uint256 amountIn, uint256 amountOut);\\n\\n event BridgeSwept(bytes32 bridgeTargetAddress, address caller, uint256 balance);\\n\\n function initialize(\\n IStablecoinOFT _oft,\\n IERC20 _depositToken,\\n IStargate _stargate,\\n bytes32 _bridgeTargetAddress,\\n address _governance,\\n uint256 _rate,\\n uint256 _slippage\\n ) external;\\n\\n function deposit(uint256 _amountIn) external returns (uint256 amountOut);\\n\\n function sweep(uint256 amount) external payable;\\n}\\n\",\"keccak256\":\"0xa13c5e4b6cb667e7ed6ed18523ca0a19b16fdf9cff1821cdbe99fcbc81494918\",\"license\":\"GPL-3.0\"},\"contracts/interfaces/periphery/layerzero/IStargate.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\n// \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2554\\u2588\\u2588\\u2588\\u2588\\u2554\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551\\u255a\\u2588\\u2588\\u2554\\u255d\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551 \\u255a\\u2550\\u255d \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\n// \\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\n\\n// Website: https://maha.xyz\\n// Discord: https://discord.gg/mahadao\\n// Twitter: https://twitter.com/mahaxyz_\\n\\npragma solidity 0.8.21;\\n\\nimport {\\n IOFT,\\n MessagingFee,\\n MessagingReceipt,\\n OFTReceipt,\\n SendParam\\n} from \\\"@layerzerolabs/lz-evm-oapp-v2/contracts/oft/interfaces/IOFT.sol\\\";\\n\\nenum StargateType {\\n Pool,\\n OFT\\n}\\n\\nstruct Ticket {\\n uint56 ticketId;\\n bytes passenger;\\n}\\n\\n/// @title Interface for Stargate.\\n/// @notice Defines an API for sending tokens to destination chains.\\ninterface IStargate is IOFT {\\n /// @dev This function is same as `send` in OFT interface but returns the ticket data if in the bus ride mode,\\n /// which allows the caller to ride and drive the bus in the same transaction.\\n function sendToken(\\n SendParam calldata _sendParam,\\n MessagingFee calldata _fee,\\n address _refundAddress\\n ) external payable returns (MessagingReceipt memory msgReceipt, OFTReceipt memory oftReceipt, Ticket memory ticket);\\n\\n /// @notice Returns the Stargate implementation type.\\n function stargateType() external pure returns (StargateType);\\n}\\n\",\"keccak256\":\"0x47fc2b1949570369a60313ce8d71de7350a3c4f0d7e6b838258d715eaff23ab3\",\"license\":\"GPL-3.0\"},\"contracts/periphery/zaps/ZapBase.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\n// \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2554\\u2588\\u2588\\u2588\\u2588\\u2554\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551\\u255a\\u2588\\u2588\\u2554\\u255d\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551 \\u255a\\u2550\\u255d \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\n// \\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\n\\n// Website: https://maha.xyz\\n// Discord: https://discord.gg/mahadao\\n// Twitter: https://twitter.com/mahaxyz_\\n\\npragma solidity 0.8.21;\\n\\nimport {IERC20Metadata} from \\\"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\\\";\\nimport {IERC4626} from \\\"@openzeppelin/contracts/interfaces/IERC4626.sol\\\";\\n\\n/**\\n * @title ZapBase\\n * @dev This contract allows users to perform a Zap operation by swapping collateral for zai tokens, adding liquidity to\\n * curve LP, and staking the LP tokens.\\n */\\nabstract contract ZapBase {\\n IERC4626 public staking;\\n\\n IERC20Metadata public pool;\\n\\n IERC20Metadata public zai;\\n\\n IERC20Metadata public collateral;\\n\\n uint256 public decimalOffset;\\n\\n address public me;\\n\\n error OdosSwapFailed();\\n error CollateralTransferFailed();\\n error TokenTransferFailed();\\n\\n event Zapped(\\n address indexed user, uint256 indexed collateralAmount, uint256 indexed zaiAmount, uint256 newStakedAmount\\n );\\n\\n /**\\n * @dev Initializes the contract with the required contracts\\n */\\n constructor(address _staking) {\\n staking = IERC4626(_staking);\\n pool = IERC20Metadata(staking.asset());\\n pool.approve(_staking, type(uint256).max);\\n me = address(this);\\n }\\n\\n function _sweep(IERC20Metadata token) internal {\\n uint256 tokenB = token.balanceOf(address(this));\\n if (tokenB > 0 && !token.transfer(msg.sender, tokenB)) {\\n revert TokenTransferFailed();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xbb5a31d035f26b07bc1413382b1c82911b18bdd61dd1c89653ff36cca892431d\",\"license\":\"GPL-3.0\"},\"contracts/periphery/zaps/implementations/base/ZapAerodromeBase.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\n// \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2554\\u2588\\u2588\\u2588\\u2588\\u2554\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551\\u255a\\u2588\\u2588\\u2554\\u255d\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551 \\u255a\\u2550\\u255d \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\n// \\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\n\\n// Website: https://maha.xyz\\n// Discord: https://discord.gg/mahadao\\n// Twitter: https://twitter.com/mahaxyz_\\n\\npragma solidity 0.8.21;\\n\\nimport {IAerodromeRouter} from \\\"../../../../interfaces/periphery/dex/IAerodromeRouter.sol\\\";\\nimport {IAerodromePool} from \\\"../../../../interfaces/periphery/dex/IAerodromePool.sol\\\";\\n\\nimport {IL2DepositCollateralL0} from \\\"../../../../interfaces/periphery/layerzero/IL2DepositCollateralL0.sol\\\";\\nimport {IERC20Metadata, ZapBase} from \\\"../../ZapBase.sol\\\";\\n\\ncontract ZapAerodromeBase is ZapBase {\\n IL2DepositCollateralL0 public bridge;\\n IAerodromeRouter public router;\\n address public factory;\\n\\n constructor(address _staking, address _bridge, address _router) ZapBase(_staking) {\\n bridge = IL2DepositCollateralL0(_bridge);\\n router = IAerodromeRouter(_router);\\n\\n zai = IERC20Metadata(address(bridge.oft()));\\n collateral = IERC20Metadata(address(bridge.depositToken()));\\n\\n // nothing\\n zai.approve(address(pool), type(uint256).max);\\n\\n decimalOffset = 10 ** (18 - collateral.decimals());\\n\\n // give approvals\\n zai.approve(address(router), type(uint256).max);\\n collateral.approve(address(router), type(uint256).max);\\n collateral.approve(address(bridge), type(uint256).max);\\n\\n factory = IAerodromePool(address(pool)).factory();\\n }\\n}\\n\",\"keccak256\":\"0x75858c5d14d228be71da9e2e69496c647164b9498f7b69e442e9f82882a4a09f\",\"license\":\"GPL-3.0\"},\"contracts/periphery/zaps/implementations/base/ZapAerodromePoolUSDC.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\n// \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2554\\u2588\\u2588\\u2588\\u2588\\u2554\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551\\u255a\\u2588\\u2588\\u2554\\u255d\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551 \\u255a\\u2550\\u255d \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\n// \\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\n\\n// Website: https://maha.xyz\\n// Discord: https://discord.gg/mahadao\\n// Twitter: https://twitter.com/mahaxyz_\\n\\npragma solidity 0.8.21;\\n\\nimport {IAerodromePool} from \\\"../../../../interfaces/periphery/dex/IAerodromePool.sol\\\";\\nimport {IAerodromeRouter} from \\\"../../../../interfaces/periphery/dex/IAerodromeRouter.sol\\\";\\nimport {ZapAerodromeBase} from \\\"./ZapAerodromeBase.sol\\\";\\n\\ncontract ZapAerodromePoolUSDC is ZapAerodromeBase {\\n constructor(address _staking, address _bridge, address _router) ZapAerodromeBase(_staking, _bridge, _router) {\\n // nothing\\n }\\n\\n /**\\n * @notice Zaps collateral into ZAI LP tokens\\n * @dev This function is used when the user only has collateral tokens.\\n * @param collateralAmount The amount of collateral to zap\\n * @param minLpAmount The minimum amount of LP tokens to stake\\n */\\n function zapIntoLP(uint256 collateralAmount, uint256 minLpAmount) external {\\n collateral.transferFrom(msg.sender, me, collateralAmount);\\n\\n uint256 price = collateral.balanceOf(address(pool)) * 1e30 / zai.balanceOf(address(pool));\\n if (price < 90 * 1e16) {\\n // < 0.99\\n _zapDepegged(collateralAmount, minLpAmount);\\n } else {\\n _zapNormal(collateralAmount, minLpAmount);\\n }\\n }\\n\\n function _zapDepegged(uint256 collateralAmount, uint256 minLpAmount) internal {\\n IAerodromeRouter.Route memory route =\\n IAerodromeRouter.Route({from: address(collateral), to: address(zai), stable: true, factory: factory});\\n\\n IAerodromeRouter.Route[] memory routes = new IAerodromeRouter.Route[](1);\\n routes[0] = route;\\n\\n router.swapExactTokensForTokens(\\n collateralAmount / 2, // uint256 amountIn,\\n collateralAmount / 2 * 1e12, // uint256 amountOutMin,\\n routes, // Route[] calldata routes,\\n me, // address to,\\n block.timestamp // uint256 deadline\\n );\\n\\n router.addLiquidity(\\n address(collateral), address(zai), true, collateralAmount / 2, zai.balanceOf(me), 0, 0, me, block.timestamp\\n );\\n\\n require(pool.balanceOf(me) >= minLpAmount, \\\"!insufficient\\\");\\n\\n // we now have LP tokens; deposit into staking contract for the user\\n staking.deposit(pool.balanceOf(me), msg.sender);\\n\\n // sweep any dust\\n _sweep(collateral);\\n\\n emit Zapped(msg.sender, collateralAmount, 0, pool.balanceOf(msg.sender));\\n }\\n\\n function _zapNormal(uint256 collateralAmount, uint256 minLpAmount) internal {\\n // convert 50% collateral for zai\\n uint256 zaiAmount = bridge.deposit(collateralAmount / 2);\\n\\n router.addLiquidity(\\n address(collateral), address(zai), true, collateralAmount / 2, zaiAmount, 0, 0, me, block.timestamp\\n );\\n\\n require(pool.balanceOf(me) >= minLpAmount, \\\"!insufficient\\\");\\n\\n // we now have LP tokens; deposit into staking contract for the user\\n staking.deposit(pool.balanceOf(me), msg.sender);\\n\\n // sweep any dust\\n _sweep(zai);\\n _sweep(collateral);\\n\\n emit Zapped(msg.sender, collateralAmount / 2, zaiAmount, pool.balanceOf(msg.sender));\\n }\\n\\n function zapOutOfLP(uint256 amount, uint256 minCollateralAmount) external {\\n staking.withdraw(amount, msg.sender, me);\\n\\n IAerodromeRouter(address(pool)).removeLiquidity(\\n address(collateral), address(zai), true, pool.balanceOf(me), 0, 0, me, block.timestamp\\n );\\n\\n IAerodromeRouter.Route memory route = IAerodromeRouter.Route({\\n from: address(zai),\\n to: address(collateral),\\n stable: true,\\n factory: IAerodromeRouter(address(pool)).defaultFactory()\\n });\\n\\n // swap usdc into zai\\n IAerodromeRouter.Route[] memory routes = new IAerodromeRouter.Route[](1);\\n routes[0] = route;\\n router.swapExactTokensForTokens(zai.balanceOf(me), 0, routes, me, block.timestamp);\\n\\n require(collateral.balanceOf(me) >= minCollateralAmount, \\\"!insufficient\\\");\\n\\n // sweep any dust\\n _sweep(zai);\\n _sweep(collateral);\\n }\\n}\\n\",\"keccak256\":\"0x42d541a0545471746855b9d6cdc259c819a969785cdd6fd6c655281e9e7006ac\",\"license\":\"GPL-3.0\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5060405162001d4538038062001d458339810160408190526200003491620005d4565b600080546001600160a01b0319166001600160a01b038516908117909155604080516338d52e0f60e01b815290518592859285928592916338d52e0f9160048083019260209291908290030181865afa15801562000096573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000bc919062000628565b600180546001600160a01b0319166001600160a01b0392831690811790915560405163095ea7b360e01b8152918316600483015260001960248301529063095ea7b3906044016020604051808303816000875af115801562000122573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200014891906200064f565b505060058054306001600160a01b0319918216179091556006805482166001600160a01b03858116918217909255600780549093169184169190911790915560408051634da90afb60e11b81529051639b5215f6916004808201926020929091908290030181865afa158015620001c3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001e9919062000628565b600280546001600160a01b0319166001600160a01b039283161790556006546040805163c89039c560e01b81529051919092169163c89039c59160048083019260209291908290030181865afa15801562000248573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200026e919062000628565b600380546001600160a01b0319166001600160a01b0392831617905560025460015460405163095ea7b360e01b81529083166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af1158015620002d9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002ff91906200064f565b50600360009054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000354573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200037a919062000673565b62000387906012620006ae565b6200039490600a620007cd565b600490815560025460075460405163095ea7b360e01b81526001600160a01b03918216938101939093526000196024840152169063095ea7b3906044016020604051808303816000875af1158015620003f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200041791906200064f565b5060035460075460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af11580156200046f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200049591906200064f565b5060035460065460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af1158015620004ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200051391906200064f565b50600160009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000568573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200058e919062000628565b600880546001600160a01b0319166001600160a01b039290921691909117905550620007de945050505050565b6001600160a01b0381168114620005d157600080fd5b50565b600080600060608486031215620005ea57600080fd5b8351620005f781620005bb565b60208501519093506200060a81620005bb565b60408501519092506200061d81620005bb565b809150509250925092565b6000602082840312156200063b57600080fd5b81516200064881620005bb565b9392505050565b6000602082840312156200066257600080fd5b815180151581146200064857600080fd5b6000602082840312156200068657600080fd5b815160ff811681146200064857600080fd5b634e487b7160e01b600052601160045260246000fd5b60ff8281168282160390811115620006ca57620006ca62000698565b92915050565b600181815b8085111562000711578160001904821115620006f557620006f562000698565b808516156200070357918102915b93841c9390800290620006d5565b509250929050565b6000826200072a57506001620006ca565b816200073957506000620006ca565b81600181146200075257600281146200075d576200077d565b6001915050620006ca565b60ff84111562000771576200077162000698565b50506001821b620006ca565b5060208310610133831016604e8410600b8410161715620007a2575081810a620006ca565b620007ae8383620006d0565b8060001904821115620007c557620007c562000698565b029392505050565b60006200064860ff84168362000719565b61155780620007ee6000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c8063cb12b48f11610081578063e78cea921161005b578063e78cea9214610189578063f887ea401461019c578063fbbe5a33146101af57600080fd5b8063cb12b48f1461014c578063d1b39ae51461015f578063d8dfeb451461017657600080fd5b806316f0115b116100b257806316f0115b146101135780634cf088d914610126578063c45a01551461013957600080fd5b8063050ad121146100ce57806307140b34146100e3575b600080fd5b6100e16100dc366004611264565b6101c2565b005b6002546100f6906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6001546100f6906001600160a01b031681565b6000546100f6906001600160a01b031681565b6008546100f6906001600160a01b031681565b6005546100f6906001600160a01b031681565b61016860045481565b60405190815260200161010a565b6003546100f6906001600160a01b031681565b6006546100f6906001600160a01b031681565b6007546100f6906001600160a01b031681565b6100e16101bd366004611264565b610693565b6000546005546040517fb460af94000000000000000000000000000000000000000000000000000000008152600481018590523360248201526001600160a01b03918216604482015291169063b460af94906064016020604051808303816000875af1158015610236573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025a9190611286565b50600180546003546002546005546040516370a0823160e01b81526001600160a01b03918216600482015293811694630dede6c4949382169391909216919085906370a0823190602401602060405180830381865afa1580156102c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e59190611286565b60055460405160e087901b6001600160e01b03191681526001600160a01b03958616600482015293851660248501529115156044840152606483015260006084830181905260a48301529190911660c48201524260e48201526101040160408051808303816000875af1158015610360573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610384919061129f565b5050604080516080810182526002546001600160a01b039081168252600354811660208084019190915260018385018190525484517fd4b6846d00000000000000000000000000000000000000000000000000000000815294516000956060860194929092169263d4b6846d92600480820193918290030181865afa158015610411573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043591906112c3565b6001600160a01b0316905260408051600180825281830190925291925060009190816020015b60408051608081018252600080825260208083018290529282018190526060820152825260001990920191018161045b57905050905081816000815181106104a5576104a5611309565b60209081029190910101526007546002546005546040516370a0823160e01b81526001600160a01b0391821660048201529281169263cac88ea99291909116906370a0823190602401602060405180830381865afa15801561050b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052f9190611286565b6005546040516001600160e01b031960e085901b168152610564929160009187916001600160a01b031690429060040161138a565b6000604051808303816000875af1158015610583573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105ab91908101906113c6565b506003546005546040516370a0823160e01b81526001600160a01b039182166004820152859291909116906370a0823190602401602060405180830381865afa1580156105fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106209190611286565b10156106635760405162461bcd60e51b815260206004820152600d60248201526c085a5b9cdd59999a58da595b9d609a1b60448201526064015b60405180910390fd5b600254610678906001600160a01b031661085d565b60035461068d906001600160a01b031661085d565b50505050565b6003546005546040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b039182166024820152604481018590529116906323b872dd906064016020604051808303816000875af1158015610707573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072b9190611484565b506002546001546040516370a0823160e01b81526001600160a01b03918216600482015260009291909116906370a0823190602401602060405180830381865afa15801561077d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a19190611286565b6003546001546040516370a0823160e01b81526001600160a01b0391821660048201529116906370a0823190602401602060405180830381865afa1580156107ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108119190611286565b610828906c0c9f2c9cd04674edea400000006114a6565b61083291906114d1565b9050670c7d713b49da00008110156108535761084e838361099c565b505050565b61084e8383610e92565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156108a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c89190611286565b905060008111801561096157506040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af115801561093b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095f9190611484565b155b15610998576040517f045c4b0200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b604080516080810182526003546001600160a01b039081168252600254811660208301526001828401819052600854909116606083015282518181528084019093529091600091816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816109e85790505090508181600081518110610a3257610a32611309565b60209081029190910101526007546001600160a01b031663cac88ea9610a596002876114d1565b610a646002886114d1565b610a739064e8d4a510006114a6565b6005546040516001600160e01b031960e086901b168152610aa893929187916001600160a01b0390911690429060040161138a565b6000604051808303816000875af1158015610ac7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610aef91908101906113c6565b50600754600354600280546001600160a01b0393841693635a47ddc393811692911690600190610b1f908a6114d1565b6002546005546040516370a0823160e01b81526001600160a01b0391821660048201529116906370a0823190602401602060405180830381865afa158015610b6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8f9190611286565b60055460405160e088901b6001600160e01b03191681526001600160a01b0396871660048201529486166024860152921515604485015260648401919091526084830152600060a4830181905260c48301529190911660e482015242610104820152610124016060604051808303816000875af1158015610c14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c3891906114f3565b50506001546005546040516370a0823160e01b81526001600160a01b0391821660048201528693509116906370a0823190602401602060405180830381865afa158015610c89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cad9190611286565b1015610ceb5760405162461bcd60e51b815260206004820152600d60248201526c085a5b9cdd59999a58da595b9d609a1b604482015260640161065a565b6000546001546005546040516370a0823160e01b81526001600160a01b03918216600482015292811692636e553f659291909116906370a0823190602401602060405180830381865afa158015610d46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6a9190611286565b6040516001600160e01b031960e084901b16815260048101919091523360248201526044016020604051808303816000875af1158015610dae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd29190611286565b50600354610de8906001600160a01b031661085d565b6001546040516370a0823160e01b8152336004820181905260009287927f8254cb1554a3a4f342e4d6bc29ea29f483d72ec4183e94e4a83410c93af84341916001600160a01b0316906370a0823190602401602060405180830381865afa158015610e57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7b9190611286565b60405190815260200160405180910390a450505050565b6006546000906001600160a01b031663b6b55f25610eb16002866114d1565b6040518263ffffffff1660e01b8152600401610ecf91815260200190565b6020604051808303816000875af1158015610eee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f129190611286565b600754600354600280549394506001600160a01b0392831693635a47ddc393928316921690600190610f4490896114d1565b60055460405160e087901b6001600160e01b03191681526001600160a01b03958616600482015293851660248501529115156044840152606483015260848201869052600060a4830181905260c48301529190911660e482015242610104820152610124016060604051808303816000875af1158015610fc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fec91906114f3565b50506001546005546040516370a0823160e01b81526001600160a01b0391821660048201528593509116906370a0823190602401602060405180830381865afa15801561103d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110619190611286565b101561109f5760405162461bcd60e51b815260206004820152600d60248201526c085a5b9cdd59999a58da595b9d609a1b604482015260640161065a565b6000546001546005546040516370a0823160e01b81526001600160a01b03918216600482015292811692636e553f659291909116906370a0823190602401602060405180830381865afa1580156110fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111e9190611286565b6040516001600160e01b031960e084901b16815260048101919091523360248201526044016020604051808303816000875af1158015611162573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111869190611286565b5060025461119c906001600160a01b031661085d565b6003546111b1906001600160a01b031661085d565b806111bd6002856114d1565b6001546040516370a0823160e01b81523360048201819052917f8254cb1554a3a4f342e4d6bc29ea29f483d72ec4183e94e4a83410c93af84341916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561122a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061124e9190611286565b60405190815260200160405180910390a4505050565b6000806040838503121561127757600080fd5b50508035926020909101359150565b60006020828403121561129857600080fd5b5051919050565b600080604083850312156112b257600080fd5b505080516020909101519092909150565b6000602082840312156112d557600080fd5b81516001600160a01b03811681146112ec57600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600081518084526020808501945080840160005b8381101561137f57815180516001600160a01b039081168952848201518116858a01526040808301511515908a0152606091820151169088015260809096019590820190600101611333565b509495945050505050565b85815284602082015260a0604082015260006113a960a083018661131f565b6001600160a01b0394909416606083015250608001529392505050565b600060208083850312156113d957600080fd5b825167ffffffffffffffff808211156113f157600080fd5b818501915085601f83011261140557600080fd5b815181811115611417576114176112f3565b8060051b604051601f19603f8301168101818110858211171561143c5761143c6112f3565b60405291825284820192508381018501918883111561145a57600080fd5b938501935b828510156114785784518452938501939285019261145f565b98975050505050505050565b60006020828403121561149657600080fd5b815180151581146112ec57600080fd5b80820281158282048414176114cb57634e487b7160e01b600052601160045260246000fd5b92915050565b6000826114ee57634e487b7160e01b600052601260045260246000fd5b500490565b60008060006060848603121561150857600080fd5b835192506020840151915060408401519050925092509256fea2646970667358221220cd1b98180d5e47cc78d83b1179ed9d4eb682f08d3ebf020f92af6999f6d98f0864736f6c63430008150033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100c95760003560e01c8063cb12b48f11610081578063e78cea921161005b578063e78cea9214610189578063f887ea401461019c578063fbbe5a33146101af57600080fd5b8063cb12b48f1461014c578063d1b39ae51461015f578063d8dfeb451461017657600080fd5b806316f0115b116100b257806316f0115b146101135780634cf088d914610126578063c45a01551461013957600080fd5b8063050ad121146100ce57806307140b34146100e3575b600080fd5b6100e16100dc366004611264565b6101c2565b005b6002546100f6906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6001546100f6906001600160a01b031681565b6000546100f6906001600160a01b031681565b6008546100f6906001600160a01b031681565b6005546100f6906001600160a01b031681565b61016860045481565b60405190815260200161010a565b6003546100f6906001600160a01b031681565b6006546100f6906001600160a01b031681565b6007546100f6906001600160a01b031681565b6100e16101bd366004611264565b610693565b6000546005546040517fb460af94000000000000000000000000000000000000000000000000000000008152600481018590523360248201526001600160a01b03918216604482015291169063b460af94906064016020604051808303816000875af1158015610236573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025a9190611286565b50600180546003546002546005546040516370a0823160e01b81526001600160a01b03918216600482015293811694630dede6c4949382169391909216919085906370a0823190602401602060405180830381865afa1580156102c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e59190611286565b60055460405160e087901b6001600160e01b03191681526001600160a01b03958616600482015293851660248501529115156044840152606483015260006084830181905260a48301529190911660c48201524260e48201526101040160408051808303816000875af1158015610360573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610384919061129f565b5050604080516080810182526002546001600160a01b039081168252600354811660208084019190915260018385018190525484517fd4b6846d00000000000000000000000000000000000000000000000000000000815294516000956060860194929092169263d4b6846d92600480820193918290030181865afa158015610411573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043591906112c3565b6001600160a01b0316905260408051600180825281830190925291925060009190816020015b60408051608081018252600080825260208083018290529282018190526060820152825260001990920191018161045b57905050905081816000815181106104a5576104a5611309565b60209081029190910101526007546002546005546040516370a0823160e01b81526001600160a01b0391821660048201529281169263cac88ea99291909116906370a0823190602401602060405180830381865afa15801561050b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052f9190611286565b6005546040516001600160e01b031960e085901b168152610564929160009187916001600160a01b031690429060040161138a565b6000604051808303816000875af1158015610583573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105ab91908101906113c6565b506003546005546040516370a0823160e01b81526001600160a01b039182166004820152859291909116906370a0823190602401602060405180830381865afa1580156105fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106209190611286565b10156106635760405162461bcd60e51b815260206004820152600d60248201526c085a5b9cdd59999a58da595b9d609a1b60448201526064015b60405180910390fd5b600254610678906001600160a01b031661085d565b60035461068d906001600160a01b031661085d565b50505050565b6003546005546040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b039182166024820152604481018590529116906323b872dd906064016020604051808303816000875af1158015610707573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072b9190611484565b506002546001546040516370a0823160e01b81526001600160a01b03918216600482015260009291909116906370a0823190602401602060405180830381865afa15801561077d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a19190611286565b6003546001546040516370a0823160e01b81526001600160a01b0391821660048201529116906370a0823190602401602060405180830381865afa1580156107ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108119190611286565b610828906c0c9f2c9cd04674edea400000006114a6565b61083291906114d1565b9050670c7d713b49da00008110156108535761084e838361099c565b505050565b61084e8383610e92565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156108a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c89190611286565b905060008111801561096157506040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af115801561093b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095f9190611484565b155b15610998576040517f045c4b0200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b604080516080810182526003546001600160a01b039081168252600254811660208301526001828401819052600854909116606083015282518181528084019093529091600091816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816109e85790505090508181600081518110610a3257610a32611309565b60209081029190910101526007546001600160a01b031663cac88ea9610a596002876114d1565b610a646002886114d1565b610a739064e8d4a510006114a6565b6005546040516001600160e01b031960e086901b168152610aa893929187916001600160a01b0390911690429060040161138a565b6000604051808303816000875af1158015610ac7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610aef91908101906113c6565b50600754600354600280546001600160a01b0393841693635a47ddc393811692911690600190610b1f908a6114d1565b6002546005546040516370a0823160e01b81526001600160a01b0391821660048201529116906370a0823190602401602060405180830381865afa158015610b6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8f9190611286565b60055460405160e088901b6001600160e01b03191681526001600160a01b0396871660048201529486166024860152921515604485015260648401919091526084830152600060a4830181905260c48301529190911660e482015242610104820152610124016060604051808303816000875af1158015610c14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c3891906114f3565b50506001546005546040516370a0823160e01b81526001600160a01b0391821660048201528693509116906370a0823190602401602060405180830381865afa158015610c89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cad9190611286565b1015610ceb5760405162461bcd60e51b815260206004820152600d60248201526c085a5b9cdd59999a58da595b9d609a1b604482015260640161065a565b6000546001546005546040516370a0823160e01b81526001600160a01b03918216600482015292811692636e553f659291909116906370a0823190602401602060405180830381865afa158015610d46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6a9190611286565b6040516001600160e01b031960e084901b16815260048101919091523360248201526044016020604051808303816000875af1158015610dae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd29190611286565b50600354610de8906001600160a01b031661085d565b6001546040516370a0823160e01b8152336004820181905260009287927f8254cb1554a3a4f342e4d6bc29ea29f483d72ec4183e94e4a83410c93af84341916001600160a01b0316906370a0823190602401602060405180830381865afa158015610e57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7b9190611286565b60405190815260200160405180910390a450505050565b6006546000906001600160a01b031663b6b55f25610eb16002866114d1565b6040518263ffffffff1660e01b8152600401610ecf91815260200190565b6020604051808303816000875af1158015610eee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f129190611286565b600754600354600280549394506001600160a01b0392831693635a47ddc393928316921690600190610f4490896114d1565b60055460405160e087901b6001600160e01b03191681526001600160a01b03958616600482015293851660248501529115156044840152606483015260848201869052600060a4830181905260c48301529190911660e482015242610104820152610124016060604051808303816000875af1158015610fc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fec91906114f3565b50506001546005546040516370a0823160e01b81526001600160a01b0391821660048201528593509116906370a0823190602401602060405180830381865afa15801561103d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110619190611286565b101561109f5760405162461bcd60e51b815260206004820152600d60248201526c085a5b9cdd59999a58da595b9d609a1b604482015260640161065a565b6000546001546005546040516370a0823160e01b81526001600160a01b03918216600482015292811692636e553f659291909116906370a0823190602401602060405180830381865afa1580156110fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111e9190611286565b6040516001600160e01b031960e084901b16815260048101919091523360248201526044016020604051808303816000875af1158015611162573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111869190611286565b5060025461119c906001600160a01b031661085d565b6003546111b1906001600160a01b031661085d565b806111bd6002856114d1565b6001546040516370a0823160e01b81523360048201819052917f8254cb1554a3a4f342e4d6bc29ea29f483d72ec4183e94e4a83410c93af84341916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561122a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061124e9190611286565b60405190815260200160405180910390a4505050565b6000806040838503121561127757600080fd5b50508035926020909101359150565b60006020828403121561129857600080fd5b5051919050565b600080604083850312156112b257600080fd5b505080516020909101519092909150565b6000602082840312156112d557600080fd5b81516001600160a01b03811681146112ec57600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600081518084526020808501945080840160005b8381101561137f57815180516001600160a01b039081168952848201518116858a01526040808301511515908a0152606091820151169088015260809096019590820190600101611333565b509495945050505050565b85815284602082015260a0604082015260006113a960a083018661131f565b6001600160a01b0394909416606083015250608001529392505050565b600060208083850312156113d957600080fd5b825167ffffffffffffffff808211156113f157600080fd5b818501915085601f83011261140557600080fd5b815181811115611417576114176112f3565b8060051b604051601f19603f8301168101818110858211171561143c5761143c6112f3565b60405291825284820192508381018501918883111561145a57600080fd5b938501935b828510156114785784518452938501939285019261145f565b98975050505050505050565b60006020828403121561149657600080fd5b815180151581146112ec57600080fd5b80820281158282048414176114cb57634e487b7160e01b600052601160045260246000fd5b92915050565b6000826114ee57634e487b7160e01b600052601260045260246000fd5b500490565b60008060006060848603121561150857600080fd5b835192506020840151915060408401519050925092509256fea2646970667358221220cd1b98180d5e47cc78d83b1179ed9d4eb682f08d3ebf020f92af6999f6d98f0864736f6c63430008150033", + "solcInputHash": "aff0e692b5c2772dceb6058a56c03f3f", + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_staking\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_odos\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CollateralTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OdosSwapFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenTransferFailed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"collateralAmount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"zaiAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newStakedAmount\",\"type\":\"uint256\"}],\"name\":\"Zapped\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IL2DepositCollateralL0\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"collateral\",\"outputs\":[{\"internalType\":\"contract IERC20Metadata\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimalOffset\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"me\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"odos\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pool\",\"outputs\":[{\"internalType\":\"contract IERC20Metadata\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"contract IAerodromeRouter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staking\",\"outputs\":[{\"internalType\":\"contract IERC4626\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"zai\",\"outputs\":[{\"internalType\":\"contract IERC20Metadata\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collateralAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minLpAmount\",\"type\":\"uint256\"}],\"name\":\"zapIntoLP\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"swapAsset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"swapAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minLpAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"odosCallData\",\"type\":\"bytes\"}],\"name\":\"zapIntoLPWithOdos\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minCollateralAmount\",\"type\":\"uint256\"}],\"name\":\"zapOutOfLP\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AddressEmptyCode(address)\":[{\"details\":\"There's no code at `target` (it is not a contract).\"}],\"AddressInsufficientBalance(address)\":[{\"details\":\"The ETH balance of the account is not enough to perform the operation.\"}],\"FailedInnerCall()\":[{\"details\":\"A call to an address target failed. The target may have reverted.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC20 token failed.\"}]},\"kind\":\"dev\",\"methods\":{\"zapIntoLP(uint256,uint256)\":{\"params\":{\"collateralAmount\":\"The amount of USDC to deposit into the LP\",\"minLpAmount\":\"The minimum LP tokens to receive after zapping\"}},\"zapIntoLPWithOdos(address,uint256,uint256,bytes)\":{\"params\":{\"minLpAmount\":\"The minimum LP tokens to receive after zapping\",\"odosCallData\":\"Encoded Odos swap data\",\"swapAmount\":\"The amount of `swapAsset` to swap\",\"swapAsset\":\"The asset to swap into USDC using Odos\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"zapIntoLP(uint256,uint256)\":{\"notice\":\"Wrapper function for directly zapping with USDC collateral\"},\"zapIntoLPWithOdos(address,uint256,uint256,bytes)\":{\"notice\":\"Zaps collateral into ZAI LP tokens with any token by using Odos\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/periphery/zaps/implementations/base/ZapAerodromePoolUSDC.sol\":\"ZapAerodromePoolUSDC\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[]},\"sources\":{\"@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/OAppCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.20;\\n\\nimport { Ownable } from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport { IOAppCore, ILayerZeroEndpointV2 } from \\\"./interfaces/IOAppCore.sol\\\";\\n\\n/**\\n * @title OAppCore\\n * @dev Abstract contract implementing the IOAppCore interface with basic OApp configurations.\\n */\\nabstract contract OAppCore is IOAppCore, Ownable {\\n // The LayerZero endpoint associated with the given OApp\\n ILayerZeroEndpointV2 public immutable endpoint;\\n\\n // Mapping to store peers associated with corresponding endpoints\\n mapping(uint32 eid => bytes32 peer) public peers;\\n\\n /**\\n * @dev Constructor to initialize the OAppCore with the provided endpoint and delegate.\\n * @param _endpoint The address of the LOCAL Layer Zero endpoint.\\n * @param _delegate The delegate capable of making OApp configurations inside of the endpoint.\\n *\\n * @dev The delegate typically should be set as the owner of the contract.\\n */\\n constructor(address _endpoint, address _delegate) {\\n endpoint = ILayerZeroEndpointV2(_endpoint);\\n\\n if (_delegate == address(0)) revert InvalidDelegate();\\n endpoint.setDelegate(_delegate);\\n }\\n\\n /**\\n * @notice Sets the peer address (OApp instance) for a corresponding endpoint.\\n * @param _eid The endpoint ID.\\n * @param _peer The address of the peer to be associated with the corresponding endpoint.\\n *\\n * @dev Only the owner/admin of the OApp can call this function.\\n * @dev Indicates that the peer is trusted to send LayerZero messages to this OApp.\\n * @dev Set this to bytes32(0) to remove the peer address.\\n * @dev Peer is a bytes32 to accommodate non-evm chains.\\n */\\n function setPeer(uint32 _eid, bytes32 _peer) public virtual onlyOwner {\\n _setPeer(_eid, _peer);\\n }\\n\\n /**\\n * @notice Sets the peer address (OApp instance) for a corresponding endpoint.\\n * @param _eid The endpoint ID.\\n * @param _peer The address of the peer to be associated with the corresponding endpoint.\\n *\\n * @dev Indicates that the peer is trusted to send LayerZero messages to this OApp.\\n * @dev Set this to bytes32(0) to remove the peer address.\\n * @dev Peer is a bytes32 to accommodate non-evm chains.\\n */\\n function _setPeer(uint32 _eid, bytes32 _peer) internal virtual {\\n peers[_eid] = _peer;\\n emit PeerSet(_eid, _peer);\\n }\\n\\n /**\\n * @notice Internal function to get the peer address associated with a specific endpoint; reverts if NOT set.\\n * ie. the peer is set to bytes32(0).\\n * @param _eid The endpoint ID.\\n * @return peer The address of the peer associated with the specified endpoint.\\n */\\n function _getPeerOrRevert(uint32 _eid) internal view virtual returns (bytes32) {\\n bytes32 peer = peers[_eid];\\n if (peer == bytes32(0)) revert NoPeer(_eid);\\n return peer;\\n }\\n\\n /**\\n * @notice Sets the delegate address for the OApp.\\n * @param _delegate The address of the delegate to be set.\\n *\\n * @dev Only the owner/admin of the OApp can call this function.\\n * @dev Provides the ability for a delegate to set configs, on behalf of the OApp, directly on the Endpoint contract.\\n */\\n function setDelegate(address _delegate) public onlyOwner {\\n endpoint.setDelegate(_delegate);\\n }\\n}\\n\",\"keccak256\":\"0x13a9c2d1d2c1f086b8624f2e84c4a4702212daae36f701d92bb915b535cbe4cc\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/OAppSender.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.20;\\n\\nimport { SafeERC20, IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { MessagingParams, MessagingFee, MessagingReceipt } from \\\"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol\\\";\\nimport { OAppCore } from \\\"./OAppCore.sol\\\";\\n\\n/**\\n * @title OAppSender\\n * @dev Abstract contract implementing the OAppSender functionality for sending messages to a LayerZero endpoint.\\n */\\nabstract contract OAppSender is OAppCore {\\n using SafeERC20 for IERC20;\\n\\n // Custom error messages\\n error NotEnoughNative(uint256 msgValue);\\n error LzTokenUnavailable();\\n\\n // @dev The version of the OAppSender implementation.\\n // @dev Version is bumped when changes are made to this contract.\\n uint64 internal constant SENDER_VERSION = 1;\\n\\n /**\\n * @notice Retrieves the OApp version information.\\n * @return senderVersion The version of the OAppSender.sol contract.\\n * @return receiverVersion The version of the OAppReceiver.sol contract.\\n *\\n * @dev Providing 0 as the default for OAppReceiver version. Indicates that the OAppReceiver is not implemented.\\n * ie. this is a SEND only OApp.\\n * @dev If the OApp uses both OAppSender and OAppReceiver, then this needs to be override returning the correct versions\\n */\\n function oAppVersion() public view virtual returns (uint64 senderVersion, uint64 receiverVersion) {\\n return (SENDER_VERSION, 0);\\n }\\n\\n /**\\n * @dev Internal function to interact with the LayerZero EndpointV2.quote() for fee calculation.\\n * @param _dstEid The destination endpoint ID.\\n * @param _message The message payload.\\n * @param _options Additional options for the message.\\n * @param _payInLzToken Flag indicating whether to pay the fee in LZ tokens.\\n * @return fee The calculated MessagingFee for the message.\\n * - nativeFee: The native fee for the message.\\n * - lzTokenFee: The LZ token fee for the message.\\n */\\n function _quote(\\n uint32 _dstEid,\\n bytes memory _message,\\n bytes memory _options,\\n bool _payInLzToken\\n ) internal view virtual returns (MessagingFee memory fee) {\\n return\\n endpoint.quote(\\n MessagingParams(_dstEid, _getPeerOrRevert(_dstEid), _message, _options, _payInLzToken),\\n address(this)\\n );\\n }\\n\\n /**\\n * @dev Internal function to interact with the LayerZero EndpointV2.send() for sending a message.\\n * @param _dstEid The destination endpoint ID.\\n * @param _message The message payload.\\n * @param _options Additional options for the message.\\n * @param _fee The calculated LayerZero fee for the message.\\n * - nativeFee: The native fee.\\n * - lzTokenFee: The lzToken fee.\\n * @param _refundAddress The address to receive any excess fee values sent to the endpoint.\\n * @return receipt The receipt for the sent message.\\n * - guid: The unique identifier for the sent message.\\n * - nonce: The nonce of the sent message.\\n * - fee: The LayerZero fee incurred for the message.\\n */\\n function _lzSend(\\n uint32 _dstEid,\\n bytes memory _message,\\n bytes memory _options,\\n MessagingFee memory _fee,\\n address _refundAddress\\n ) internal virtual returns (MessagingReceipt memory receipt) {\\n // @dev Push corresponding fees to the endpoint, any excess is sent back to the _refundAddress from the endpoint.\\n uint256 messageValue = _payNative(_fee.nativeFee);\\n if (_fee.lzTokenFee > 0) _payLzToken(_fee.lzTokenFee);\\n\\n return\\n // solhint-disable-next-line check-send-result\\n endpoint.send{ value: messageValue }(\\n MessagingParams(_dstEid, _getPeerOrRevert(_dstEid), _message, _options, _fee.lzTokenFee > 0),\\n _refundAddress\\n );\\n }\\n\\n /**\\n * @dev Internal function to pay the native fee associated with the message.\\n * @param _nativeFee The native fee to be paid.\\n * @return nativeFee The amount of native currency paid.\\n *\\n * @dev If the OApp needs to initiate MULTIPLE LayerZero messages in a single transaction,\\n * this will need to be overridden because msg.value would contain multiple lzFees.\\n * @dev Should be overridden in the event the LayerZero endpoint requires a different native currency.\\n * @dev Some EVMs use an ERC20 as a method for paying transactions/gasFees.\\n * @dev The endpoint is EITHER/OR, ie. it will NOT support both types of native payment at a time.\\n */\\n function _payNative(uint256 _nativeFee) internal virtual returns (uint256 nativeFee) {\\n if (msg.value != _nativeFee) revert NotEnoughNative(msg.value);\\n return _nativeFee;\\n }\\n\\n /**\\n * @dev Internal function to pay the LZ token fee associated with the message.\\n * @param _lzTokenFee The LZ token fee to be paid.\\n *\\n * @dev If the caller is trying to pay in the specified lzToken, then the lzTokenFee is passed to the endpoint.\\n * @dev Any excess sent, is passed back to the specified _refundAddress in the _lzSend().\\n */\\n function _payLzToken(uint256 _lzTokenFee) internal virtual {\\n // @dev Cannot cache the token because it is not immutable in the endpoint.\\n address lzToken = endpoint.lzToken();\\n if (lzToken == address(0)) revert LzTokenUnavailable();\\n\\n // Pay LZ token fee by sending tokens to the endpoint.\\n IERC20(lzToken).safeTransferFrom(msg.sender, address(endpoint), _lzTokenFee);\\n }\\n}\\n\",\"keccak256\":\"0x518cf4adca601923ed4baa6619846a253ea32b8d8775f8bc1faa3dfac7f67c20\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/interfaces/IOAppCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.20;\\n\\nimport { ILayerZeroEndpointV2 } from \\\"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol\\\";\\n\\n/**\\n * @title IOAppCore\\n */\\ninterface IOAppCore {\\n // Custom error messages\\n error OnlyPeer(uint32 eid, bytes32 sender);\\n error NoPeer(uint32 eid);\\n error InvalidEndpointCall();\\n error InvalidDelegate();\\n\\n // Event emitted when a peer (OApp) is set for a corresponding endpoint\\n event PeerSet(uint32 eid, bytes32 peer);\\n\\n /**\\n * @notice Retrieves the OApp version information.\\n * @return senderVersion The version of the OAppSender.sol contract.\\n * @return receiverVersion The version of the OAppReceiver.sol contract.\\n */\\n function oAppVersion() external view returns (uint64 senderVersion, uint64 receiverVersion);\\n\\n /**\\n * @notice Retrieves the LayerZero endpoint associated with the OApp.\\n * @return iEndpoint The LayerZero endpoint as an interface.\\n */\\n function endpoint() external view returns (ILayerZeroEndpointV2 iEndpoint);\\n\\n /**\\n * @notice Retrieves the peer (OApp) associated with a corresponding endpoint.\\n * @param _eid The endpoint ID.\\n * @return peer The peer address (OApp instance) associated with the corresponding endpoint.\\n */\\n function peers(uint32 _eid) external view returns (bytes32 peer);\\n\\n /**\\n * @notice Sets the peer address (OApp instance) for a corresponding endpoint.\\n * @param _eid The endpoint ID.\\n * @param _peer The address of the peer to be associated with the corresponding endpoint.\\n */\\n function setPeer(uint32 _eid, bytes32 _peer) external;\\n\\n /**\\n * @notice Sets the delegate address for the OApp Core.\\n * @param _delegate The address of the delegate to be set.\\n */\\n function setDelegate(address _delegate) external;\\n}\\n\",\"keccak256\":\"0x40e49f2de74506e1da5dcaed53a39853f691647f4ceb0fccc8f49a68d3f47c58\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-oapp-v2/contracts/oft/interfaces/IOFT.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.20;\\n\\nimport { MessagingReceipt, MessagingFee } from \\\"../../oapp/OAppSender.sol\\\";\\n\\n/**\\n * @dev Struct representing token parameters for the OFT send() operation.\\n */\\nstruct SendParam {\\n uint32 dstEid; // Destination endpoint ID.\\n bytes32 to; // Recipient address.\\n uint256 amountLD; // Amount to send in local decimals.\\n uint256 minAmountLD; // Minimum amount to send in local decimals.\\n bytes extraOptions; // Additional options supplied by the caller to be used in the LayerZero message.\\n bytes composeMsg; // The composed message for the send() operation.\\n bytes oftCmd; // The OFT command to be executed, unused in default OFT implementations.\\n}\\n\\n/**\\n * @dev Struct representing OFT limit information.\\n * @dev These amounts can change dynamically and are up the the specific oft implementation.\\n */\\nstruct OFTLimit {\\n uint256 minAmountLD; // Minimum amount in local decimals that can be sent to the recipient.\\n uint256 maxAmountLD; // Maximum amount in local decimals that can be sent to the recipient.\\n}\\n\\n/**\\n * @dev Struct representing OFT receipt information.\\n */\\nstruct OFTReceipt {\\n uint256 amountSentLD; // Amount of tokens ACTUALLY debited from the sender in local decimals.\\n // @dev In non-default implementations, the amountReceivedLD COULD differ from this value.\\n uint256 amountReceivedLD; // Amount of tokens to be received on the remote side.\\n}\\n\\n/**\\n * @dev Struct representing OFT fee details.\\n * @dev Future proof mechanism to provide a standardized way to communicate fees to things like a UI.\\n */\\nstruct OFTFeeDetail {\\n int256 feeAmountLD; // Amount of the fee in local decimals.\\n string description; // Description of the fee.\\n}\\n\\n/**\\n * @title IOFT\\n * @dev Interface for the OftChain (OFT) token.\\n * @dev Does not inherit ERC20 to accommodate usage by OFTAdapter as well.\\n * @dev This specific interface ID is '0x02e49c2c'.\\n */\\ninterface IOFT {\\n // Custom error messages\\n error InvalidLocalDecimals();\\n error SlippageExceeded(uint256 amountLD, uint256 minAmountLD);\\n\\n // Events\\n event OFTSent(\\n bytes32 indexed guid, // GUID of the OFT message.\\n uint32 dstEid, // Destination Endpoint ID.\\n address indexed fromAddress, // Address of the sender on the src chain.\\n uint256 amountSentLD, // Amount of tokens sent in local decimals.\\n uint256 amountReceivedLD // Amount of tokens received in local decimals.\\n );\\n event OFTReceived(\\n bytes32 indexed guid, // GUID of the OFT message.\\n uint32 srcEid, // Source Endpoint ID.\\n address indexed toAddress, // Address of the recipient on the dst chain.\\n uint256 amountReceivedLD // Amount of tokens received in local decimals.\\n );\\n\\n /**\\n * @notice Retrieves interfaceID and the version of the OFT.\\n * @return interfaceId The interface ID.\\n * @return version The version.\\n *\\n * @dev interfaceId: This specific interface ID is '0x02e49c2c'.\\n * @dev version: Indicates a cross-chain compatible msg encoding with other OFTs.\\n * @dev If a new feature is added to the OFT cross-chain msg encoding, the version will be incremented.\\n * ie. localOFT version(x,1) CAN send messages to remoteOFT version(x,1)\\n */\\n function oftVersion() external view returns (bytes4 interfaceId, uint64 version);\\n\\n /**\\n * @notice Retrieves the address of the token associated with the OFT.\\n * @return token The address of the ERC20 token implementation.\\n */\\n function token() external view returns (address);\\n\\n /**\\n * @notice Indicates whether the OFT contract requires approval of the 'token()' to send.\\n * @return requiresApproval Needs approval of the underlying token implementation.\\n *\\n * @dev Allows things like wallet implementers to determine integration requirements,\\n * without understanding the underlying token implementation.\\n */\\n function approvalRequired() external view returns (bool);\\n\\n /**\\n * @notice Retrieves the shared decimals of the OFT.\\n * @return sharedDecimals The shared decimals of the OFT.\\n */\\n function sharedDecimals() external view returns (uint8);\\n\\n /**\\n * @notice Provides a quote for OFT-related operations.\\n * @param _sendParam The parameters for the send operation.\\n * @return limit The OFT limit information.\\n * @return oftFeeDetails The details of OFT fees.\\n * @return receipt The OFT receipt information.\\n */\\n function quoteOFT(\\n SendParam calldata _sendParam\\n ) external view returns (OFTLimit memory, OFTFeeDetail[] memory oftFeeDetails, OFTReceipt memory);\\n\\n /**\\n * @notice Provides a quote for the send() operation.\\n * @param _sendParam The parameters for the send() operation.\\n * @param _payInLzToken Flag indicating whether the caller is paying in the LZ token.\\n * @return fee The calculated LayerZero messaging fee from the send() operation.\\n *\\n * @dev MessagingFee: LayerZero msg fee\\n * - nativeFee: The native fee.\\n * - lzTokenFee: The lzToken fee.\\n */\\n function quoteSend(SendParam calldata _sendParam, bool _payInLzToken) external view returns (MessagingFee memory);\\n\\n /**\\n * @notice Executes the send() operation.\\n * @param _sendParam The parameters for the send operation.\\n * @param _fee The fee information supplied by the caller.\\n * - nativeFee: The native fee.\\n * - lzTokenFee: The lzToken fee.\\n * @param _refundAddress The address to receive any excess funds from fees etc. on the src.\\n * @return receipt The LayerZero messaging receipt from the send() operation.\\n * @return oftReceipt The OFT receipt information.\\n *\\n * @dev MessagingReceipt: LayerZero msg receipt\\n * - guid: The unique identifier for the sent message.\\n * - nonce: The nonce of the sent message.\\n * - fee: The LayerZero fee incurred for the message.\\n */\\n function send(\\n SendParam calldata _sendParam,\\n MessagingFee calldata _fee,\\n address _refundAddress\\n ) external payable returns (MessagingReceipt memory, OFTReceipt memory);\\n}\\n\",\"keccak256\":\"0x42431bdbe135f7cfefd0be6cd345a6a1045124f6ea707a06756ef2322140eef5\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0;\\n\\nimport { IMessageLibManager } from \\\"./IMessageLibManager.sol\\\";\\nimport { IMessagingComposer } from \\\"./IMessagingComposer.sol\\\";\\nimport { IMessagingChannel } from \\\"./IMessagingChannel.sol\\\";\\nimport { IMessagingContext } from \\\"./IMessagingContext.sol\\\";\\n\\nstruct MessagingParams {\\n uint32 dstEid;\\n bytes32 receiver;\\n bytes message;\\n bytes options;\\n bool payInLzToken;\\n}\\n\\nstruct MessagingReceipt {\\n bytes32 guid;\\n uint64 nonce;\\n MessagingFee fee;\\n}\\n\\nstruct MessagingFee {\\n uint256 nativeFee;\\n uint256 lzTokenFee;\\n}\\n\\nstruct Origin {\\n uint32 srcEid;\\n bytes32 sender;\\n uint64 nonce;\\n}\\n\\ninterface ILayerZeroEndpointV2 is IMessageLibManager, IMessagingComposer, IMessagingChannel, IMessagingContext {\\n event PacketSent(bytes encodedPayload, bytes options, address sendLibrary);\\n\\n event PacketVerified(Origin origin, address receiver, bytes32 payloadHash);\\n\\n event PacketDelivered(Origin origin, address receiver);\\n\\n event LzReceiveAlert(\\n address indexed receiver,\\n address indexed executor,\\n Origin origin,\\n bytes32 guid,\\n uint256 gas,\\n uint256 value,\\n bytes message,\\n bytes extraData,\\n bytes reason\\n );\\n\\n event LzTokenSet(address token);\\n\\n event DelegateSet(address sender, address delegate);\\n\\n function quote(MessagingParams calldata _params, address _sender) external view returns (MessagingFee memory);\\n\\n function send(\\n MessagingParams calldata _params,\\n address _refundAddress\\n ) external payable returns (MessagingReceipt memory);\\n\\n function verify(Origin calldata _origin, address _receiver, bytes32 _payloadHash) external;\\n\\n function verifiable(Origin calldata _origin, address _receiver) external view returns (bool);\\n\\n function initializable(Origin calldata _origin, address _receiver) external view returns (bool);\\n\\n function lzReceive(\\n Origin calldata _origin,\\n address _receiver,\\n bytes32 _guid,\\n bytes calldata _message,\\n bytes calldata _extraData\\n ) external payable;\\n\\n // oapp can burn messages partially by calling this function with its own business logic if messages are verified in order\\n function clear(address _oapp, Origin calldata _origin, bytes32 _guid, bytes calldata _message) external;\\n\\n function setLzToken(address _lzToken) external;\\n\\n function lzToken() external view returns (address);\\n\\n function nativeToken() external view returns (address);\\n\\n function setDelegate(address _delegate) external;\\n}\\n\",\"keccak256\":\"0xf7f941bee89ea6369950fe54e8ac476ae6478b958b20fc0e8a83e8ff1364eac3\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0;\\n\\nstruct SetConfigParam {\\n uint32 eid;\\n uint32 configType;\\n bytes config;\\n}\\n\\ninterface IMessageLibManager {\\n struct Timeout {\\n address lib;\\n uint256 expiry;\\n }\\n\\n event LibraryRegistered(address newLib);\\n event DefaultSendLibrarySet(uint32 eid, address newLib);\\n event DefaultReceiveLibrarySet(uint32 eid, address newLib);\\n event DefaultReceiveLibraryTimeoutSet(uint32 eid, address oldLib, uint256 expiry);\\n event SendLibrarySet(address sender, uint32 eid, address newLib);\\n event ReceiveLibrarySet(address receiver, uint32 eid, address newLib);\\n event ReceiveLibraryTimeoutSet(address receiver, uint32 eid, address oldLib, uint256 timeout);\\n\\n function registerLibrary(address _lib) external;\\n\\n function isRegisteredLibrary(address _lib) external view returns (bool);\\n\\n function getRegisteredLibraries() external view returns (address[] memory);\\n\\n function setDefaultSendLibrary(uint32 _eid, address _newLib) external;\\n\\n function defaultSendLibrary(uint32 _eid) external view returns (address);\\n\\n function setDefaultReceiveLibrary(uint32 _eid, address _newLib, uint256 _gracePeriod) external;\\n\\n function defaultReceiveLibrary(uint32 _eid) external view returns (address);\\n\\n function setDefaultReceiveLibraryTimeout(uint32 _eid, address _lib, uint256 _expiry) external;\\n\\n function defaultReceiveLibraryTimeout(uint32 _eid) external view returns (address lib, uint256 expiry);\\n\\n function isSupportedEid(uint32 _eid) external view returns (bool);\\n\\n function isValidReceiveLibrary(address _receiver, uint32 _eid, address _lib) external view returns (bool);\\n\\n /// ------------------- OApp interfaces -------------------\\n function setSendLibrary(address _oapp, uint32 _eid, address _newLib) external;\\n\\n function getSendLibrary(address _sender, uint32 _eid) external view returns (address lib);\\n\\n function isDefaultSendLibrary(address _sender, uint32 _eid) external view returns (bool);\\n\\n function setReceiveLibrary(address _oapp, uint32 _eid, address _newLib, uint256 _gracePeriod) external;\\n\\n function getReceiveLibrary(address _receiver, uint32 _eid) external view returns (address lib, bool isDefault);\\n\\n function setReceiveLibraryTimeout(address _oapp, uint32 _eid, address _lib, uint256 _expiry) external;\\n\\n function receiveLibraryTimeout(address _receiver, uint32 _eid) external view returns (address lib, uint256 expiry);\\n\\n function setConfig(address _oapp, address _lib, SetConfigParam[] calldata _params) external;\\n\\n function getConfig(\\n address _oapp,\\n address _lib,\\n uint32 _eid,\\n uint32 _configType\\n ) external view returns (bytes memory config);\\n}\\n\",\"keccak256\":\"0x919b37133adff4dc528e3061deb2789c3149971b530c61e556fb3d09ab315dfc\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingChannel.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0;\\n\\ninterface IMessagingChannel {\\n event InboundNonceSkipped(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce);\\n event PacketNilified(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce, bytes32 payloadHash);\\n event PacketBurnt(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce, bytes32 payloadHash);\\n\\n function eid() external view returns (uint32);\\n\\n // this is an emergency function if a message cannot be verified for some reasons\\n // required to provide _nextNonce to avoid race condition\\n function skip(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce) external;\\n\\n function nilify(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce, bytes32 _payloadHash) external;\\n\\n function burn(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce, bytes32 _payloadHash) external;\\n\\n function nextGuid(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (bytes32);\\n\\n function inboundNonce(address _receiver, uint32 _srcEid, bytes32 _sender) external view returns (uint64);\\n\\n function outboundNonce(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (uint64);\\n\\n function inboundPayloadHash(\\n address _receiver,\\n uint32 _srcEid,\\n bytes32 _sender,\\n uint64 _nonce\\n ) external view returns (bytes32);\\n\\n function lazyInboundNonce(address _receiver, uint32 _srcEid, bytes32 _sender) external view returns (uint64);\\n}\\n\",\"keccak256\":\"0x0878f64dffebf58c4165569416372f40860fab546b88cd926eba0d5cb6d8d972\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingComposer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0;\\n\\ninterface IMessagingComposer {\\n event ComposeSent(address from, address to, bytes32 guid, uint16 index, bytes message);\\n event ComposeDelivered(address from, address to, bytes32 guid, uint16 index);\\n event LzComposeAlert(\\n address indexed from,\\n address indexed to,\\n address indexed executor,\\n bytes32 guid,\\n uint16 index,\\n uint256 gas,\\n uint256 value,\\n bytes message,\\n bytes extraData,\\n bytes reason\\n );\\n\\n function composeQueue(\\n address _from,\\n address _to,\\n bytes32 _guid,\\n uint16 _index\\n ) external view returns (bytes32 messageHash);\\n\\n function sendCompose(address _to, bytes32 _guid, uint16 _index, bytes calldata _message) external;\\n\\n function lzCompose(\\n address _from,\\n address _to,\\n bytes32 _guid,\\n uint16 _index,\\n bytes calldata _message,\\n bytes calldata _extraData\\n ) external payable;\\n}\\n\",\"keccak256\":\"0x85bc7090134529ec474866dc4bb1c48692d518c756eb0a961c82574829c51901\",\"license\":\"MIT\"},\"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingContext.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.8.0;\\n\\ninterface IMessagingContext {\\n function isSendingMessage() external view returns (bool);\\n\\n function getSendContext() external view returns (uint32 dstEid, address sender);\\n}\\n\",\"keccak256\":\"0xff0c546c2813dae3e440882f46b377375f7461b0714efd80bd3f0c6e5cb8da4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../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 * The initial owner is set to the address provided by the deployer. This can\\n * 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 /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n constructor(address initialOwner) {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\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 if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling 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 if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\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\",\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0xce41876e78d1badc0512229b4d14e4daf83bc1003d7f83978d18e0e56f965b9c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20Metadata} from \\\"../token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\",\"keccak256\":\"0x00c23b80f74717a6765b606001c5c633116020d488ee8f53600685b8200e4bf3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC4626.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../token/ERC20/IERC20.sol\\\";\\nimport {IERC20Metadata} from \\\"../token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\\n/**\\n * @dev Interface of the ERC4626 \\\"Tokenized Vault Standard\\\", as defined in\\n * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626].\\n */\\ninterface IERC4626 is IERC20, IERC20Metadata {\\n event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares);\\n\\n event Withdraw(\\n address indexed sender,\\n address indexed receiver,\\n address indexed owner,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /**\\n * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.\\n *\\n * - MUST be an ERC-20 token contract.\\n * - MUST NOT revert.\\n */\\n function asset() external view returns (address assetTokenAddress);\\n\\n /**\\n * @dev Returns the total amount of the underlying asset that is \\u201cmanaged\\u201d by Vault.\\n *\\n * - SHOULD include any compounding that occurs from yield.\\n * - MUST be inclusive of any fees that are charged against assets in the Vault.\\n * - MUST NOT revert.\\n */\\n function totalAssets() external view returns (uint256 totalManagedAssets);\\n\\n /**\\n * @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal\\n * scenario where all the conditions are met.\\n *\\n * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.\\n * - MUST NOT show any variations depending on the caller.\\n * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.\\n * - MUST NOT revert.\\n *\\n * NOTE: This calculation MAY NOT reflect the \\u201cper-user\\u201d price-per-share, and instead should reflect the\\n * \\u201caverage-user\\u2019s\\u201d price-per-share, meaning what the average user should expect to see when exchanging to and\\n * from.\\n */\\n function convertToShares(uint256 assets) external view returns (uint256 shares);\\n\\n /**\\n * @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal\\n * scenario where all the conditions are met.\\n *\\n * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.\\n * - MUST NOT show any variations depending on the caller.\\n * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.\\n * - MUST NOT revert.\\n *\\n * NOTE: This calculation MAY NOT reflect the \\u201cper-user\\u201d price-per-share, and instead should reflect the\\n * \\u201caverage-user\\u2019s\\u201d price-per-share, meaning what the average user should expect to see when exchanging to and\\n * from.\\n */\\n function convertToAssets(uint256 shares) external view returns (uint256 assets);\\n\\n /**\\n * @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,\\n * through a deposit call.\\n *\\n * - MUST return a limited value if receiver is subject to some deposit limit.\\n * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.\\n * - MUST NOT revert.\\n */\\n function maxDeposit(address receiver) external view returns (uint256 maxAssets);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given\\n * current on-chain conditions.\\n *\\n * - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit\\n * call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called\\n * in the same transaction.\\n * - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the\\n * deposit would be accepted, regardless if the user has enough tokens approved, etc.\\n * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by depositing.\\n */\\n function previewDeposit(uint256 assets) external view returns (uint256 shares);\\n\\n /**\\n * @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens.\\n *\\n * - MUST emit the Deposit event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\\n * deposit execution, and are accounted for during deposit.\\n * - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not\\n * approving enough underlying tokens to the Vault contract, etc).\\n *\\n * NOTE: most implementations will require pre-approval of the Vault with the Vault\\u2019s underlying asset token.\\n */\\n function deposit(uint256 assets, address receiver) external returns (uint256 shares);\\n\\n /**\\n * @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.\\n * - MUST return a limited value if receiver is subject to some mint limit.\\n * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.\\n * - MUST NOT revert.\\n */\\n function maxMint(address receiver) external view returns (uint256 maxShares);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given\\n * current on-chain conditions.\\n *\\n * - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call\\n * in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the\\n * same transaction.\\n * - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint\\n * would be accepted, regardless if the user has enough tokens approved, etc.\\n * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by minting.\\n */\\n function previewMint(uint256 shares) external view returns (uint256 assets);\\n\\n /**\\n * @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens.\\n *\\n * - MUST emit the Deposit event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint\\n * execution, and are accounted for during mint.\\n * - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not\\n * approving enough underlying tokens to the Vault contract, etc).\\n *\\n * NOTE: most implementations will require pre-approval of the Vault with the Vault\\u2019s underlying asset token.\\n */\\n function mint(uint256 shares, address receiver) external returns (uint256 assets);\\n\\n /**\\n * @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the\\n * Vault, through a withdraw call.\\n *\\n * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.\\n * - MUST NOT revert.\\n */\\n function maxWithdraw(address owner) external view returns (uint256 maxAssets);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,\\n * given current on-chain conditions.\\n *\\n * - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw\\n * call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if\\n * called\\n * in the same transaction.\\n * - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though\\n * the withdrawal would be accepted, regardless if the user has enough shares, etc.\\n * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by depositing.\\n */\\n function previewWithdraw(uint256 assets) external view returns (uint256 shares);\\n\\n /**\\n * @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver.\\n *\\n * - MUST emit the Withdraw event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\\n * withdraw execution, and are accounted for during withdraw.\\n * - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner\\n * not having enough shares, etc).\\n *\\n * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.\\n * Those methods should be performed separately.\\n */\\n function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares);\\n\\n /**\\n * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,\\n * through a redeem call.\\n *\\n * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.\\n * - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.\\n * - MUST NOT revert.\\n */\\n function maxRedeem(address owner) external view returns (uint256 maxShares);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block,\\n * given current on-chain conditions.\\n *\\n * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call\\n * in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the\\n * same transaction.\\n * - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the\\n * redemption would be accepted, regardless if the user has enough shares, etc.\\n * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by redeeming.\\n */\\n function previewRedeem(uint256 shares) external view returns (uint256 assets);\\n\\n /**\\n * @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver.\\n *\\n * - MUST emit the Withdraw event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\\n * redeem execution, and are accounted for during redeem.\\n * - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner\\n * not having enough shares, etc).\\n *\\n * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.\\n * Those methods should be performed separately.\\n */\\n function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets);\\n}\\n\",\"keccak256\":\"0x207f64371bc0fcc5be86713aa5da109a870cc3a6da50e93b64ee881e369b593d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n *\\n * CAUTION: See Security Considerations above.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x6008dabfe393240d73d7dd7688033f72740d570aa422254d29a7dce8568f3aff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC20Permit} from \\\"../extensions/IERC20Permit.sol\\\";\\nimport {Address} from \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev An operation with an ERC20 token failed.\\n */\\n error SafeERC20FailedOperation(address token);\\n\\n /**\\n * @dev Indicates a failed `decreaseAllowance` request.\\n */\\n error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n forceApprove(token, spender, oldAllowance + value);\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\\n * value, non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\\n unchecked {\\n uint256 currentAllowance = token.allowance(address(this), spender);\\n if (currentAllowance < requestedDecrease) {\\n revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\\n }\\n forceApprove(token, spender, currentAllowance - requestedDecrease);\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data);\\n if (returndata.length != 0 && !abi.decode(returndata, (bool))) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;\\n }\\n}\\n\",\"keccak256\":\"0x37bb49513c49c87c4642a891b13b63571bc87013dde806617aa1efb54605f386\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev The ETH balance of the account is not enough to perform the operation.\\n */\\n error AddressInsufficientBalance(address account);\\n\\n /**\\n * @dev There's no code at `target` (it is not a contract).\\n */\\n error AddressEmptyCode(address target);\\n\\n /**\\n * @dev A call to an address target failed. The target may have reverted.\\n */\\n error FailedInnerCall();\\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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n if (address(this).balance < amount) {\\n revert AddressInsufficientBalance(address(this));\\n }\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n if (!success) {\\n revert FailedInnerCall();\\n }\\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 or custom error, it is bubbled\\n * up by this function (like regular Solidity function calls). However, if\\n * the call reverted with no returned reason, this function reverts with a\\n * {FailedInnerCall} error.\\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 function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0);\\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 function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n if (address(this).balance < value) {\\n revert AddressInsufficientBalance(address(this));\\n }\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target\\n * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an\\n * unsuccessful call.\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata\\n ) internal view returns (bytes memory) {\\n if (!success) {\\n _revert(returndata);\\n } else {\\n // only check if target is a contract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n if (returndata.length == 0 && target.code.length == 0) {\\n revert AddressEmptyCode(target);\\n }\\n return returndata;\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the\\n * revert reason or with a default {FailedInnerCall} error.\\n */\\n function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {\\n if (!success) {\\n _revert(returndata);\\n } else {\\n return returndata;\\n }\\n }\\n\\n /**\\n * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.\\n */\\n function _revert(bytes memory returndata) private pure {\\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 FailedInnerCall();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xaf28a975a78550e45f65e559a3ad6a5ad43b9b8a37366999abd1b7084eb70721\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\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 function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\"},\"contracts/interfaces/periphery/IStablecoinOFT.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\n// \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2554\\u2588\\u2588\\u2588\\u2588\\u2554\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551\\u255a\\u2588\\u2588\\u2554\\u255d\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551 \\u255a\\u2550\\u255d \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\n// \\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\n\\n// Website: https://maha.xyz\\n// Discord: https://discord.gg/mahadao\\n// Twitter: https://twitter.com/mahaxyz_\\n\\npragma solidity 0.8.21;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\n\\ninterface IStablecoinOFT is IERC20 {\\n function setRestaker(address _restaking) external;\\n\\n function restakingMint(address _to, uint256 _amount) external;\\n}\\n\",\"keccak256\":\"0xc5c526d0c347770a308d6b46fa2f45e206cfb8622f423f0b9e2fec94373d3b2e\",\"license\":\"GPL-3.0\"},\"contracts/interfaces/periphery/dex/IAerodromePool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\n// \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2554\\u2588\\u2588\\u2588\\u2588\\u2554\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551\\u255a\\u2588\\u2588\\u2554\\u255d\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551 \\u255a\\u2550\\u255d \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\n// \\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\n\\n// Website: https://maha.xyz\\n// Discord: https://discord.gg/mahadao\\n// Twitter: https://twitter.com/mahaxyz_\\n\\npragma solidity 0.8.21;\\n\\ninterface IAerodromePool {\\n error DepositsNotEqual();\\n error BelowMinimumK();\\n error FactoryAlreadySet();\\n error InsufficientLiquidity();\\n error InsufficientLiquidityMinted();\\n error InsufficientLiquidityBurned();\\n error InsufficientOutputAmount();\\n error InsufficientInputAmount();\\n error IsPaused();\\n error InvalidTo();\\n error K();\\n error NotEmergencyCouncil();\\n\\n event Fees(address indexed sender, uint256 amount0, uint256 amount1);\\n event Mint(address indexed sender, uint256 amount0, uint256 amount1);\\n event Burn(address indexed sender, address indexed to, uint256 amount0, uint256 amount1);\\n event Swap(\\n address indexed sender,\\n address indexed to,\\n uint256 amount0In,\\n uint256 amount1In,\\n uint256 amount0Out,\\n uint256 amount1Out\\n );\\n event Sync(uint256 reserve0, uint256 reserve1);\\n event Claim(address indexed sender, address indexed recipient, uint256 amount0, uint256 amount1);\\n\\n // Struct to capture time period obervations every 30 minutes, used for local oracles\\n struct Observation {\\n uint256 timestamp;\\n uint256 reserve0Cumulative;\\n uint256 reserve1Cumulative;\\n }\\n\\n /// @notice Returns the decimal (dec), reserves (r), stable (st), and tokens (t) of token0 and token1\\n function metadata()\\n external\\n view\\n returns (uint256 dec0, uint256 dec1, uint256 r0, uint256 r1, bool st, address t0, address t1);\\n\\n /// @notice Claim accumulated but unclaimed fees (claimable0 and claimable1)\\n function claimFees() external returns (uint256, uint256);\\n\\n /// @notice Returns [token0, token1]\\n function tokens() external view returns (address, address);\\n\\n /// @notice Address of token in the pool with the lower address value\\n function token0() external view returns (address);\\n\\n /// @notice Address of token in the poool with the higher address value\\n function token1() external view returns (address);\\n\\n /// @notice Address of linked PoolFees.sol\\n function poolFees() external view returns (address);\\n\\n /// @notice Address of PoolFactory that created this contract\\n function factory() external view returns (address);\\n\\n /// @notice Capture oracle reading every 30 minutes (1800 seconds)\\n function periodSize() external view returns (uint256);\\n\\n /// @notice Amount of token0 in pool\\n function reserve0() external view returns (uint256);\\n\\n /// @notice Amount of token1 in pool\\n function reserve1() external view returns (uint256);\\n\\n /// @notice Timestamp of last update to pool\\n function blockTimestampLast() external view returns (uint256);\\n\\n /// @notice Cumulative of reserve0 factoring in time elapsed\\n function reserve0CumulativeLast() external view returns (uint256);\\n\\n /// @notice Cumulative of reserve1 factoring in time elapsed\\n function reserve1CumulativeLast() external view returns (uint256);\\n\\n /// @notice Accumulated fees of token0 (global)\\n function index0() external view returns (uint256);\\n\\n /// @notice Accumulated fees of token1 (global)\\n function index1() external view returns (uint256);\\n\\n /// @notice Get an LP's relative index0 to index0\\n function supplyIndex0(address) external view returns (uint256);\\n\\n /// @notice Get an LP's relative index1 to index1\\n function supplyIndex1(address) external view returns (uint256);\\n\\n /// @notice Amount of unclaimed, but claimable tokens from fees of token0 for an LP\\n function claimable0(address) external view returns (uint256);\\n\\n /// @notice Amount of unclaimed, but claimable tokens from fees of token1 for an LP\\n function claimable1(address) external view returns (uint256);\\n\\n function totalSupply() external view returns (uint256);\\n\\n /// @notice Returns the value of K in the Pool, based on its reserves.\\n function getK() external returns (uint256);\\n\\n /// @notice Set pool name\\n /// Only callable by Voter.emergencyCouncil()\\n /// @param __name String of new name\\n function setName(string calldata __name) external;\\n\\n /// @notice Set pool symbol\\n /// Only callable by Voter.emergencyCouncil()\\n /// @param __symbol String of new symbol\\n function setSymbol(string calldata __symbol) external;\\n\\n /// @notice Get the number of observations recorded\\n function observationLength() external view returns (uint256);\\n\\n /// @notice Get the value of the most recent observation\\n function lastObservation() external view returns (Observation memory);\\n\\n /// @notice True if pool is stable, false if volatile\\n function stable() external view returns (bool);\\n\\n /// @notice Produces the cumulative price using counterfactuals to save gas and avoid a call to sync.\\n function currentCumulativePrices()\\n external\\n view\\n returns (uint256 reserve0Cumulative, uint256 reserve1Cumulative, uint256 blockTimestamp);\\n\\n /// @notice Provides twap price with user configured granularity, up to the full window size\\n /// @param tokenIn .\\n /// @param amountIn .\\n /// @param granularity .\\n /// @return amountOut .\\n function quote(address tokenIn, uint256 amountIn, uint256 granularity) external view returns (uint256 amountOut);\\n\\n /// @notice Returns a memory set of TWAP prices\\n /// Same as calling sample(tokenIn, amountIn, points, 1)\\n /// @param tokenIn .\\n /// @param amountIn .\\n /// @param points Number of points to return\\n /// @return Array of TWAP prices\\n function prices(address tokenIn, uint256 amountIn, uint256 points) external view returns (uint256[] memory);\\n\\n /// @notice Same as prices with with an additional window argument.\\n /// Window = 2 means 2 * 30min (or 1 hr) between observations\\n /// @param tokenIn .\\n /// @param amountIn .\\n /// @param points .\\n /// @param window .\\n /// @return Array of TWAP prices\\n function sample(\\n address tokenIn,\\n uint256 amountIn,\\n uint256 points,\\n uint256 window\\n ) external view returns (uint256[] memory);\\n\\n /// @notice This low-level function should be called from a contract which performs important safety checks\\n /// @param amount0Out Amount of token0 to send to `to`\\n /// @param amount1Out Amount of token1 to send to `to`\\n /// @param to Address to recieve the swapped output\\n /// @param data Additional calldata for flashloans\\n function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external;\\n\\n /// @notice This low-level function should be called from a contract which performs important safety checks\\n /// standard uniswap v2 implementation\\n /// @param to Address to receive token0 and token1 from burning the pool token\\n /// @return amount0 Amount of token0 returned\\n /// @return amount1 Amount of token1 returned\\n function burn(address to) external returns (uint256 amount0, uint256 amount1);\\n\\n /// @notice This low-level function should be called by addLiquidity functions in Router.sol, which performs important\\n /// safety checks\\n /// standard uniswap v2 implementation\\n /// @param to Address to receive the minted LP token\\n /// @return liquidity Amount of LP token minted\\n function mint(address to) external returns (uint256 liquidity);\\n\\n /// @notice Update reserves and, on the first call per block, price accumulators\\n /// @return _reserve0 .\\n /// @return _reserve1 .\\n /// @return _blockTimestampLast .\\n function getReserves() external view returns (uint256 _reserve0, uint256 _reserve1, uint256 _blockTimestampLast);\\n\\n /// @notice Get the amount of tokenOut given the amount of tokenIn\\n /// @param amountIn Amount of token in\\n /// @param tokenIn Address of token\\n /// @return Amount out\\n function getAmountOut(uint256 amountIn, address tokenIn) external view returns (uint256);\\n\\n /// @notice Force balances to match reserves\\n /// @param to Address to receive any skimmed rewards\\n function skim(address to) external;\\n\\n /// @notice Force reserves to match balances\\n function sync() external;\\n\\n /// @notice Called on pool creation by PoolFactory\\n /// @param _token0 Address of token0\\n /// @param _token1 Address of token1\\n /// @param _stable True if stable, false if volatile\\n function initialize(address _token0, address _token1, bool _stable) external;\\n}\\n\",\"keccak256\":\"0x33a1b19179d400dccc2a645dfd347d79de77e1a3d8a94bc8c9963a2292d57455\",\"license\":\"GPL-3.0\"},\"contracts/interfaces/periphery/dex/IAerodromeRouter.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\n// \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2554\\u2588\\u2588\\u2588\\u2588\\u2554\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551\\u255a\\u2588\\u2588\\u2554\\u255d\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551 \\u255a\\u2550\\u255d \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\n// \\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\n\\n// Website: https://maha.xyz\\n// Discord: https://discord.gg/mahadao\\n// Twitter: https://twitter.com/mahaxyz_\\n\\npragma solidity 0.8.21;\\n\\ninterface IAerodromeRouter {\\n struct Route {\\n address from;\\n address to;\\n bool stable;\\n address factory;\\n }\\n\\n error ETHTransferFailed();\\n error Expired();\\n error InsufficientAmount();\\n error InsufficientAmountA();\\n error InsufficientAmountB();\\n error InsufficientAmountADesired();\\n error InsufficientAmountBDesired();\\n error InsufficientAmountAOptimal();\\n error InsufficientLiquidity();\\n error InsufficientOutputAmount();\\n error InvalidAmountInForETHDeposit();\\n error InvalidTokenInForETHDeposit();\\n error InvalidPath();\\n error InvalidRouteA();\\n error InvalidRouteB();\\n error OnlyWETH();\\n error PoolDoesNotExist();\\n error PoolFactoryDoesNotExist();\\n error SameAddresses();\\n error ZeroAddress();\\n\\n /// @notice Address of FactoryRegistry.sol\\n function factoryRegistry() external view returns (address);\\n\\n /// @notice Address of Protocol PoolFactory.sol\\n function defaultFactory() external view returns (address);\\n\\n /// @notice Address of Voter.sol\\n function voter() external view returns (address);\\n\\n /// @dev Represents Ether. Used by zapper to determine whether to return assets as ETH/WETH.\\n function ETHER() external view returns (address);\\n\\n /// @dev Struct containing information necessary to zap in and out of pools\\n /// @param tokenA .\\n /// @param tokenB .\\n /// @param stable Stable or volatile pool\\n /// @param factory factory of pool\\n /// @param amountOutMinA Minimum amount expected from swap leg of zap via routesA\\n /// @param amountOutMinB Minimum amount expected from swap leg of zap via routesB\\n /// @param amountAMin Minimum amount of tokenA expected from liquidity leg of zap\\n /// @param amountBMin Minimum amount of tokenB expected from liquidity leg of zap\\n struct Zap {\\n address tokenA;\\n address tokenB;\\n bool stable;\\n address factory;\\n uint256 amountOutMinA;\\n uint256 amountOutMinB;\\n uint256 amountAMin;\\n uint256 amountBMin;\\n }\\n\\n /// @notice Sort two tokens by which address value is less than the other\\n /// @param tokenA Address of token to sort\\n /// @param tokenB Address of token to sort\\n /// @return token0 Lower address value between tokenA and tokenB\\n /// @return token1 Higher address value between tokenA and tokenB\\n function sortTokens(address tokenA, address tokenB) external pure returns (address token0, address token1);\\n\\n /// @notice Calculate the address of a pool by its' factory.\\n /// Used by all Router functions containing a `Route[]` or `_factory` argument.\\n /// Reverts if _factory is not approved by the FactoryRegistry\\n /// @dev Returns a randomly generated address for a nonexistent pool\\n /// @param tokenA Address of token to query\\n /// @param tokenB Address of token to query\\n /// @param stable True if pool is stable, false if volatile\\n /// @param _factory Address of factory which created the pool\\n function poolFor(address tokenA, address tokenB, bool stable, address _factory) external view returns (address pool);\\n\\n /// @notice Fetch and sort the reserves for a pool\\n /// @param tokenA .\\n /// @param tokenB .\\n /// @param stable True if pool is stable, false if volatile\\n /// @param _factory Address of PoolFactory for tokenA and tokenB\\n /// @return reserveA Amount of reserves of the sorted token A\\n /// @return reserveB Amount of reserves of the sorted token B\\n function getReserves(\\n address tokenA,\\n address tokenB,\\n bool stable,\\n address _factory\\n ) external view returns (uint256 reserveA, uint256 reserveB);\\n\\n /// @notice Perform chained getAmountOut calculations on any number of pools\\n function getAmountsOut(uint256 amountIn, Route[] memory routes) external view returns (uint256[] memory amounts);\\n\\n // **** ADD LIQUIDITY ****\\n\\n /// @notice Quote the amount deposited into a Pool\\n /// @param tokenA .\\n /// @param tokenB .\\n /// @param stable True if pool is stable, false if volatile\\n /// @param _factory Address of PoolFactory for tokenA and tokenB\\n /// @param amountADesired Amount of tokenA desired to deposit\\n /// @param amountBDesired Amount of tokenB desired to deposit\\n /// @return amountA Amount of tokenA to actually deposit\\n /// @return amountB Amount of tokenB to actually deposit\\n /// @return liquidity Amount of liquidity token returned from deposit\\n function quoteAddLiquidity(\\n address tokenA,\\n address tokenB,\\n bool stable,\\n address _factory,\\n uint256 amountADesired,\\n uint256 amountBDesired\\n ) external view returns (uint256 amountA, uint256 amountB, uint256 liquidity);\\n\\n /// @notice Quote the amount of liquidity removed from a Pool\\n /// @param tokenA .\\n /// @param tokenB .\\n /// @param stable True if pool is stable, false if volatile\\n /// @param _factory Address of PoolFactory for tokenA and tokenB\\n /// @param liquidity Amount of liquidity to remove\\n /// @return amountA Amount of tokenA received\\n /// @return amountB Amount of tokenB received\\n function quoteRemoveLiquidity(\\n address tokenA,\\n address tokenB,\\n bool stable,\\n address _factory,\\n uint256 liquidity\\n ) external view returns (uint256 amountA, uint256 amountB);\\n\\n /// @notice Add liquidity of two tokens to a Pool\\n /// @param tokenA .\\n /// @param tokenB .\\n /// @param stable True if pool is stable, false if volatile\\n /// @param amountADesired Amount of tokenA desired to deposit\\n /// @param amountBDesired Amount of tokenB desired to deposit\\n /// @param amountAMin Minimum amount of tokenA to deposit\\n /// @param amountBMin Minimum amount of tokenB to deposit\\n /// @param to Recipient of liquidity token\\n /// @param deadline Deadline to receive liquidity\\n /// @return amountA Amount of tokenA to actually deposit\\n /// @return amountB Amount of tokenB to actually deposit\\n /// @return liquidity Amount of liquidity token returned from deposit\\n function addLiquidity(\\n address tokenA,\\n address tokenB,\\n bool stable,\\n uint256 amountADesired,\\n uint256 amountBDesired,\\n uint256 amountAMin,\\n uint256 amountBMin,\\n address to,\\n uint256 deadline\\n ) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);\\n\\n /// @notice Add liquidity of a token and WETH (transferred as ETH) to a Pool\\n /// @param token .\\n /// @param stable True if pool is stable, false if volatile\\n /// @param amountTokenDesired Amount of token desired to deposit\\n /// @param amountTokenMin Minimum amount of token to deposit\\n /// @param amountETHMin Minimum amount of ETH to deposit\\n /// @param to Recipient of liquidity token\\n /// @param deadline Deadline to add liquidity\\n /// @return amountToken Amount of token to actually deposit\\n /// @return amountETH Amount of tokenETH to actually deposit\\n /// @return liquidity Amount of liquidity token returned from deposit\\n function addLiquidityETH(\\n address token,\\n bool stable,\\n uint256 amountTokenDesired,\\n uint256 amountTokenMin,\\n uint256 amountETHMin,\\n address to,\\n uint256 deadline\\n ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);\\n\\n // **** REMOVE LIQUIDITY ****\\n\\n /// @notice Remove liquidity of two tokens from a Pool\\n /// @param tokenA .\\n /// @param tokenB .\\n /// @param stable True if pool is stable, false if volatile\\n /// @param liquidity Amount of liquidity to remove\\n /// @param amountAMin Minimum amount of tokenA to receive\\n /// @param amountBMin Minimum amount of tokenB to receive\\n /// @param to Recipient of tokens received\\n /// @param deadline Deadline to remove liquidity\\n /// @return amountA Amount of tokenA received\\n /// @return amountB Amount of tokenB received\\n function removeLiquidity(\\n address tokenA,\\n address tokenB,\\n bool stable,\\n uint256 liquidity,\\n uint256 amountAMin,\\n uint256 amountBMin,\\n address to,\\n uint256 deadline\\n ) external returns (uint256 amountA, uint256 amountB);\\n\\n /// @notice Remove liquidity of a token and WETH (returned as ETH) from a Pool\\n /// @param token .\\n /// @param stable True if pool is stable, false if volatile\\n /// @param liquidity Amount of liquidity to remove\\n /// @param amountTokenMin Minimum amount of token to receive\\n /// @param amountETHMin Minimum amount of ETH to receive\\n /// @param to Recipient of liquidity token\\n /// @param deadline Deadline to receive liquidity\\n /// @return amountToken Amount of token received\\n /// @return amountETH Amount of ETH received\\n function removeLiquidityETH(\\n address token,\\n bool stable,\\n uint256 liquidity,\\n uint256 amountTokenMin,\\n uint256 amountETHMin,\\n address to,\\n uint256 deadline\\n ) external returns (uint256 amountToken, uint256 amountETH);\\n\\n /// @notice Remove liquidity of a fee-on-transfer token and WETH (returned as ETH) from a Pool\\n /// @param token .\\n /// @param stable True if pool is stable, false if volatile\\n /// @param liquidity Amount of liquidity to remove\\n /// @param amountTokenMin Minimum amount of token to receive\\n /// @param amountETHMin Minimum amount of ETH to receive\\n /// @param to Recipient of liquidity token\\n /// @param deadline Deadline to receive liquidity\\n /// @return amountETH Amount of ETH received\\n function removeLiquidityETHSupportingFeeOnTransferTokens(\\n address token,\\n bool stable,\\n uint256 liquidity,\\n uint256 amountTokenMin,\\n uint256 amountETHMin,\\n address to,\\n uint256 deadline\\n ) external returns (uint256 amountETH);\\n\\n // **** SWAP ****\\n\\n /// @notice Swap one token for another\\n /// @param amountIn Amount of token in\\n /// @param amountOutMin Minimum amount of desired token received\\n /// @param routes Array of trade routes used in the swap\\n /// @param to Recipient of the tokens received\\n /// @param deadline Deadline to receive tokens\\n /// @return amounts Array of amounts returned per route\\n function swapExactTokensForTokens(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n Route[] calldata routes,\\n address to,\\n uint256 deadline\\n ) external returns (uint256[] memory amounts);\\n\\n /// @notice Swap ETH for a token\\n /// @param amountOutMin Minimum amount of desired token received\\n /// @param routes Array of trade routes used in the swap\\n /// @param to Recipient of the tokens received\\n /// @param deadline Deadline to receive tokens\\n /// @return amounts Array of amounts returned per route\\n function swapExactETHForTokens(\\n uint256 amountOutMin,\\n Route[] calldata routes,\\n address to,\\n uint256 deadline\\n ) external payable returns (uint256[] memory amounts);\\n\\n /// @notice Swap a token for WETH (returned as ETH)\\n /// @param amountIn Amount of token in\\n /// @param amountOutMin Minimum amount of desired ETH\\n /// @param routes Array of trade routes used in the swap\\n /// @param to Recipient of the tokens received\\n /// @param deadline Deadline to receive tokens\\n /// @return amounts Array of amounts returned per route\\n function swapExactTokensForETH(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n Route[] calldata routes,\\n address to,\\n uint256 deadline\\n ) external returns (uint256[] memory amounts);\\n\\n /// @notice Swap one token for another without slippage protection\\n /// @return amounts Array of amounts to swap per route\\n /// @param routes Array of trade routes used in the swap\\n /// @param to Recipient of the tokens received\\n /// @param deadline Deadline to receive tokens\\n function UNSAFE_swapExactTokensForTokens(\\n uint256[] memory amounts,\\n Route[] calldata routes,\\n address to,\\n uint256 deadline\\n ) external returns (uint256[] memory);\\n\\n // **** SWAP (supporting fee-on-transfer tokens) ****\\n\\n /// @notice Swap one token for another supporting fee-on-transfer tokens\\n /// @param amountIn Amount of token in\\n /// @param amountOutMin Minimum amount of desired token received\\n /// @param routes Array of trade routes used in the swap\\n /// @param to Recipient of the tokens received\\n /// @param deadline Deadline to receive tokens\\n function swapExactTokensForTokensSupportingFeeOnTransferTokens(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n Route[] calldata routes,\\n address to,\\n uint256 deadline\\n ) external;\\n\\n /// @notice Swap ETH for a token supporting fee-on-transfer tokens\\n /// @param amountOutMin Minimum amount of desired token received\\n /// @param routes Array of trade routes used in the swap\\n /// @param to Recipient of the tokens received\\n /// @param deadline Deadline to receive tokens\\n function swapExactETHForTokensSupportingFeeOnTransferTokens(\\n uint256 amountOutMin,\\n Route[] calldata routes,\\n address to,\\n uint256 deadline\\n ) external payable;\\n\\n /// @notice Swap a token for WETH (returned as ETH) supporting fee-on-transfer tokens\\n /// @param amountIn Amount of token in\\n /// @param amountOutMin Minimum amount of desired ETH\\n /// @param routes Array of trade routes used in the swap\\n /// @param to Recipient of the tokens received\\n /// @param deadline Deadline to receive tokens\\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n Route[] calldata routes,\\n address to,\\n uint256 deadline\\n ) external;\\n\\n /// @notice Zap a token A into a pool (B, C). (A can be equal to B or C).\\n /// Supports standard ERC20 tokens only (i.e. not fee-on-transfer tokens etc).\\n /// Slippage is required for the initial swap.\\n /// Additional slippage may be required when adding liquidity as the\\n /// price of the token may have changed.\\n /// @param tokenIn Token you are zapping in from (i.e. input token).\\n /// @param amountInA Amount of input token you wish to send down routesA\\n /// @param amountInB Amount of input token you wish to send down routesB\\n /// @param zapInPool Contains zap struct information. See Zap struct.\\n /// @param routesA Route used to convert input token to tokenA\\n /// @param routesB Route used to convert input token to tokenB\\n /// @param to Address you wish to mint liquidity to.\\n /// @param stake Auto-stake liquidity in corresponding gauge.\\n /// @return liquidity Amount of LP tokens created from zapping in.\\n function zapIn(\\n address tokenIn,\\n uint256 amountInA,\\n uint256 amountInB,\\n Zap calldata zapInPool,\\n Route[] calldata routesA,\\n Route[] calldata routesB,\\n address to,\\n bool stake\\n ) external payable returns (uint256 liquidity);\\n\\n /// @notice Zap out a pool (B, C) into A.\\n /// Supports standard ERC20 tokens only (i.e. not fee-on-transfer tokens etc).\\n /// Slippage is required for the removal of liquidity.\\n /// Additional slippage may be required on the swap as the\\n /// price of the token may have changed.\\n /// @param tokenOut Token you are zapping out to (i.e. output token).\\n /// @param liquidity Amount of liquidity you wish to remove.\\n /// @param zapOutPool Contains zap struct information. See Zap struct.\\n /// @param routesA Route used to convert tokenA into output token.\\n /// @param routesB Route used to convert tokenB into output token.\\n function zapOut(\\n address tokenOut,\\n uint256 liquidity,\\n Zap calldata zapOutPool,\\n Route[] calldata routesA,\\n Route[] calldata routesB\\n ) external;\\n\\n /// @notice Used to generate params required for zapping in.\\n /// Zap in => remove liquidity then swap.\\n /// Apply slippage to expected swap values to account for changes in reserves in between.\\n /// @dev Output token refers to the token you want to zap in from.\\n /// @param tokenA .\\n /// @param tokenB .\\n /// @param stable .\\n /// @param _factory .\\n /// @param amountInA Amount of input token you wish to send down routesA\\n /// @param amountInB Amount of input token you wish to send down routesB\\n /// @param routesA Route used to convert input token to tokenA\\n /// @param routesB Route used to convert input token to tokenB\\n /// @return amountOutMinA Minimum output expected from swapping input token to tokenA.\\n /// @return amountOutMinB Minimum output expected from swapping input token to tokenB.\\n /// @return amountAMin Minimum amount of tokenA expected from depositing liquidity.\\n /// @return amountBMin Minimum amount of tokenB expected from depositing liquidity.\\n function generateZapInParams(\\n address tokenA,\\n address tokenB,\\n bool stable,\\n address _factory,\\n uint256 amountInA,\\n uint256 amountInB,\\n Route[] calldata routesA,\\n Route[] calldata routesB\\n ) external view returns (uint256 amountOutMinA, uint256 amountOutMinB, uint256 amountAMin, uint256 amountBMin);\\n\\n /// @notice Used to generate params required for zapping out.\\n /// Zap out => swap then add liquidity.\\n /// Apply slippage to expected liquidity values to account for changes in reserves in between.\\n /// @dev Output token refers to the token you want to zap out of.\\n /// @param tokenA .\\n /// @param tokenB .\\n /// @param stable .\\n /// @param _factory .\\n /// @param liquidity Amount of liquidity being zapped out of into a given output token.\\n /// @param routesA Route used to convert tokenA into output token.\\n /// @param routesB Route used to convert tokenB into output token.\\n /// @return amountOutMinA Minimum output expected from swapping tokenA into output token.\\n /// @return amountOutMinB Minimum output expected from swapping tokenB into output token.\\n /// @return amountAMin Minimum amount of tokenA expected from withdrawing liquidity.\\n /// @return amountBMin Minimum amount of tokenB expected from withdrawing liquidity.\\n function generateZapOutParams(\\n address tokenA,\\n address tokenB,\\n bool stable,\\n address _factory,\\n uint256 liquidity,\\n Route[] calldata routesA,\\n Route[] calldata routesB\\n ) external view returns (uint256 amountOutMinA, uint256 amountOutMinB, uint256 amountAMin, uint256 amountBMin);\\n\\n /// @notice Used by zapper to determine appropriate ratio of A to B to deposit liquidity. Assumes stable pool.\\n /// @dev Returns stable liquidity ratio of B to (A + B).\\n /// E.g. if ratio is 0.4, it means there is more of A than there is of B.\\n /// Therefore you should deposit more of token A than B.\\n /// @param tokenA tokenA of stable pool you are zapping into.\\n /// @param tokenB tokenB of stable pool you are zapping into.\\n /// @param factory Factory that created stable pool.\\n /// @return ratio Ratio of token0 to token1 required to deposit into zap.\\n function quoteStableLiquidityRatio(\\n address tokenA,\\n address tokenB,\\n address factory\\n ) external view returns (uint256 ratio);\\n}\\n\",\"keccak256\":\"0x9ec71ce30ff33be579d364102570a46d841dee91ac83f3ff3cb9d3282315d4a5\",\"license\":\"GPL-3.0\"},\"contracts/interfaces/periphery/layerzero/IL2DepositCollateralL0.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\n// \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2554\\u2588\\u2588\\u2588\\u2588\\u2554\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551\\u255a\\u2588\\u2588\\u2554\\u255d\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551 \\u255a\\u2550\\u255d \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\n// \\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\n\\n// Website: https://maha.xyz\\n// Discord: https://discord.gg/mahadao\\n// Twitter: https://twitter.com/mahaxyz_\\n\\npragma solidity 0.8.21;\\n\\nimport {IERC20, IStablecoinOFT} from \\\"../IStablecoinOFT.sol\\\";\\nimport {IStargate} from \\\"./IStargate.sol\\\";\\n\\ninterface IL2DepositCollateralL0 {\\n /// @notice The rate at which the deposit token is converted to OFT\\n function rate() external view returns (uint256);\\n\\n /// @notice The slippage allowed for the bridge\\n function slippage() external view returns (uint256);\\n\\n /// @notice The OFT token address\\n function oft() external view returns (IStablecoinOFT);\\n\\n /// @notice The deposit token address - this is what users will deposit to mint the OFT\\n function depositToken() external view returns (IERC20);\\n\\n /// @notice The address of the stargate bridge\\n function stargate() external view returns (IStargate);\\n\\n /// @notice The contract address where the bridge call should be sent on mainnet ETH\\n function bridgeTargetAddress() external view returns (bytes32);\\n\\n /// @notice The mapping of allowed addresses that can trigger the bridge function\\n // mapping(address => bool) public allowedBridgeSweepers;\\n\\n function allowedBridgeSweepers(address) external view returns (bool);\\n\\n event Deposit(address from, uint256 amountIn, uint256 amountOut);\\n\\n event BridgeSwept(bytes32 bridgeTargetAddress, address caller, uint256 balance);\\n\\n function initialize(\\n IStablecoinOFT _oft,\\n IERC20 _depositToken,\\n IStargate _stargate,\\n bytes32 _bridgeTargetAddress,\\n address _governance,\\n uint256 _rate,\\n uint256 _slippage\\n ) external;\\n\\n function deposit(uint256 _amountIn) external returns (uint256 amountOut);\\n\\n function sweep(uint256 amount) external payable;\\n}\\n\",\"keccak256\":\"0xa13c5e4b6cb667e7ed6ed18523ca0a19b16fdf9cff1821cdbe99fcbc81494918\",\"license\":\"GPL-3.0\"},\"contracts/interfaces/periphery/layerzero/IStargate.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\n// \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2554\\u2588\\u2588\\u2588\\u2588\\u2554\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551\\u255a\\u2588\\u2588\\u2554\\u255d\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551 \\u255a\\u2550\\u255d \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\n// \\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\n\\n// Website: https://maha.xyz\\n// Discord: https://discord.gg/mahadao\\n// Twitter: https://twitter.com/mahaxyz_\\n\\npragma solidity 0.8.21;\\n\\nimport {\\n IOFT,\\n MessagingFee,\\n MessagingReceipt,\\n OFTReceipt,\\n SendParam\\n} from \\\"@layerzerolabs/lz-evm-oapp-v2/contracts/oft/interfaces/IOFT.sol\\\";\\n\\nenum StargateType {\\n Pool,\\n OFT\\n}\\n\\nstruct Ticket {\\n uint56 ticketId;\\n bytes passenger;\\n}\\n\\n/// @title Interface for Stargate.\\n/// @notice Defines an API for sending tokens to destination chains.\\ninterface IStargate is IOFT {\\n /// @dev This function is same as `send` in OFT interface but returns the ticket data if in the bus ride mode,\\n /// which allows the caller to ride and drive the bus in the same transaction.\\n function sendToken(\\n SendParam calldata _sendParam,\\n MessagingFee calldata _fee,\\n address _refundAddress\\n ) external payable returns (MessagingReceipt memory msgReceipt, OFTReceipt memory oftReceipt, Ticket memory ticket);\\n\\n /// @notice Returns the Stargate implementation type.\\n function stargateType() external pure returns (StargateType);\\n}\\n\",\"keccak256\":\"0x47fc2b1949570369a60313ce8d71de7350a3c4f0d7e6b838258d715eaff23ab3\",\"license\":\"GPL-3.0\"},\"contracts/periphery/zaps/ZapBase.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\n// \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2554\\u2588\\u2588\\u2588\\u2588\\u2554\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551\\u255a\\u2588\\u2588\\u2554\\u255d\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551 \\u255a\\u2550\\u255d \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\n// \\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\n\\n// Website: https://maha.xyz\\n// Discord: https://discord.gg/mahadao\\n// Twitter: https://twitter.com/mahaxyz_\\n\\npragma solidity 0.8.21;\\n\\nimport {IERC20Metadata} from \\\"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\\\";\\nimport {IERC4626} from \\\"@openzeppelin/contracts/interfaces/IERC4626.sol\\\";\\n\\n/**\\n * @title ZapBase\\n * @dev This contract allows users to perform a Zap operation by swapping collateral for zai tokens, adding liquidity to\\n * curve LP, and staking the LP tokens.\\n */\\nabstract contract ZapBase {\\n IERC4626 public staking;\\n\\n IERC20Metadata public pool;\\n\\n IERC20Metadata public zai;\\n\\n IERC20Metadata public collateral;\\n\\n uint256 public decimalOffset;\\n\\n address public me;\\n\\n error OdosSwapFailed();\\n error CollateralTransferFailed();\\n error TokenTransferFailed();\\n\\n event Zapped(\\n address indexed user, uint256 indexed collateralAmount, uint256 indexed zaiAmount, uint256 newStakedAmount\\n );\\n\\n /**\\n * @dev Initializes the contract with the required contracts\\n */\\n constructor(address _staking) {\\n staking = IERC4626(_staking);\\n pool = IERC20Metadata(staking.asset());\\n pool.approve(_staking, type(uint256).max);\\n me = address(this);\\n }\\n\\n function _sweep(IERC20Metadata token) internal {\\n uint256 tokenB = token.balanceOf(address(this));\\n if (tokenB > 0 && !token.transfer(msg.sender, tokenB)) {\\n revert TokenTransferFailed();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xbb5a31d035f26b07bc1413382b1c82911b18bdd61dd1c89653ff36cca892431d\",\"license\":\"GPL-3.0\"},\"contracts/periphery/zaps/implementations/base/ZapAerodromeBase.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\n// \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2554\\u2588\\u2588\\u2588\\u2588\\u2554\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551\\u255a\\u2588\\u2588\\u2554\\u255d\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551 \\u255a\\u2550\\u255d \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\n// \\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\n\\n// Website: https://maha.xyz\\n// Discord: https://discord.gg/mahadao\\n// Twitter: https://twitter.com/mahaxyz_\\n\\npragma solidity 0.8.21;\\n\\nimport {IAerodromeRouter} from \\\"../../../../interfaces/periphery/dex/IAerodromeRouter.sol\\\";\\nimport {IAerodromePool} from \\\"../../../../interfaces/periphery/dex/IAerodromePool.sol\\\";\\n\\nimport {IL2DepositCollateralL0} from \\\"../../../../interfaces/periphery/layerzero/IL2DepositCollateralL0.sol\\\";\\nimport {IERC20Metadata, ZapBase} from \\\"../../ZapBase.sol\\\";\\n\\ncontract ZapAerodromeBase is ZapBase {\\n IL2DepositCollateralL0 public bridge;\\n IAerodromeRouter public router;\\n address public factory;\\n\\n constructor(address _staking, address _bridge, address _router) ZapBase(_staking) {\\n bridge = IL2DepositCollateralL0(_bridge);\\n router = IAerodromeRouter(_router);\\n\\n zai = IERC20Metadata(address(bridge.oft()));\\n collateral = IERC20Metadata(address(bridge.depositToken()));\\n\\n // nothing\\n zai.approve(address(pool), type(uint256).max);\\n\\n decimalOffset = 10 ** (18 - collateral.decimals());\\n\\n // give approvals\\n zai.approve(address(router), type(uint256).max);\\n collateral.approve(address(router), type(uint256).max);\\n collateral.approve(address(bridge), type(uint256).max);\\n\\n factory = IAerodromePool(address(pool)).factory();\\n }\\n}\\n\",\"keccak256\":\"0x75858c5d14d228be71da9e2e69496c647164b9498f7b69e442e9f82882a4a09f\",\"license\":\"GPL-3.0\"},\"contracts/periphery/zaps/implementations/base/ZapAerodromePoolUSDC.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\n// \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2588\\u2588\\u2557 \\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2557\\n// \\u2588\\u2588\\u2554\\u2588\\u2588\\u2588\\u2588\\u2554\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551\\u255a\\u2588\\u2588\\u2554\\u255d\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\u2588\\u2588\\u2554\\u2550\\u2550\\u2588\\u2588\\u2551\\n// \\u2588\\u2588\\u2551 \\u255a\\u2550\\u255d \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\u2588\\u2588\\u2551 \\u2588\\u2588\\u2551\\n// \\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\u255a\\u2550\\u255d \\u255a\\u2550\\u255d\\n\\n// Website: https://maha.xyz\\n// Discord: https://discord.gg/mahadao\\n// Twitter: https://twitter.com/mahaxyz_\\n\\npragma solidity 0.8.21;\\n\\nimport {IAerodromePool} from \\\"../../../../interfaces/periphery/dex/IAerodromePool.sol\\\";\\nimport {IAerodromeRouter} from \\\"../../../../interfaces/periphery/dex/IAerodromeRouter.sol\\\";\\nimport {ZapAerodromeBase} from \\\"./ZapAerodromeBase.sol\\\";\\n\\nimport {IERC20Metadata} from \\\"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\\\";\\nimport {IERC20, SafeERC20} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\ncontract ZapAerodromePoolUSDC is ZapAerodromeBase {\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IERC20Metadata;\\n\\n address public odos;\\n\\n constructor(\\n address _staking,\\n address _bridge,\\n address _router,\\n address _odos\\n ) ZapAerodromeBase(_staking, _bridge, _router) {\\n // nothing\\n odos = _odos;\\n }\\n\\n /**\\n * @notice Wrapper function for directly zapping with USDC collateral\\n * @param collateralAmount The amount of USDC to deposit into the LP\\n * @param minLpAmount The minimum LP tokens to receive after zapping\\n */\\n function zapIntoLP(uint256 collateralAmount, uint256 minLpAmount) public {\\n collateral.safeTransferFrom(msg.sender, me, collateralAmount);\\n _zapIntoLP(collateralAmount, minLpAmount);\\n }\\n\\n /**\\n * @notice Internal function to zap collateral into ZAI LP tokens\\n * @dev Decides which zap function to use based on pool price stability\\n * @param collateralAmount The amount of USDC available for LP zapping\\n * @param minLpAmount The minimum LP tokens to receive after zapping\\n */\\n function _zapIntoLP(uint256 collateralAmount, uint256 minLpAmount) internal {\\n uint256 price = (collateral.balanceOf(address(pool)) * 1e30) / zai.balanceOf(address(pool));\\n if (price < 90 * 1e16) {\\n // < 0.99\\n _zapDepegged(collateralAmount, minLpAmount);\\n } else {\\n _zapNormal(collateralAmount, minLpAmount);\\n }\\n }\\n\\n /**\\n * @notice Zaps collateral into ZAI LP tokens with any token by using Odos\\n * @param swapAsset The asset to swap into USDC using Odos\\n * @param swapAmount The amount of `swapAsset` to swap\\n * @param minLpAmount The minimum LP tokens to receive after zapping\\n * @param odosCallData Encoded Odos swap data\\n */\\n function zapIntoLPWithOdos(\\n IERC20 swapAsset,\\n uint256 swapAmount,\\n uint256 minLpAmount,\\n bytes memory odosCallData\\n ) external payable {\\n if (address(swapAsset) != address(0)) {\\n // Transfer swapAsset from user\\n swapAsset.safeTransferFrom(msg.sender, me, swapAmount);\\n // Approve Odos to spend swapAsset and perform the swap\\n swapAsset.approve(odos, swapAmount);\\n }\\n\\n (bool success,) = odos.call{value: msg.value}(odosCallData);\\n require(success, \\\"Odos swap failed\\\");\\n\\n // Now we have USDC in contract, call internal zap function\\n _zapIntoLP(collateral.balanceOf(me), minLpAmount);\\n }\\n\\n function _zapDepegged(uint256 collateralAmount, uint256 minLpAmount) internal {\\n IAerodromeRouter.Route memory route =\\n IAerodromeRouter.Route({from: address(collateral), to: address(zai), stable: true, factory: factory});\\n\\n IAerodromeRouter.Route[] memory routes = new IAerodromeRouter.Route[](1);\\n routes[0] = route;\\n\\n router.swapExactTokensForTokens(\\n collateralAmount / 2, // uint256 amountIn,\\n (collateralAmount / 2) * 1e12, // uint256 amountOutMin,\\n routes, // Route[] calldata routes,\\n me, // address to,\\n block.timestamp // uint256 deadline\\n );\\n\\n router.addLiquidity(\\n address(collateral), address(zai), true, collateralAmount / 2, zai.balanceOf(me), 0, 0, me, block.timestamp\\n );\\n\\n require(pool.balanceOf(me) >= minLpAmount, \\\"!insufficient\\\");\\n\\n // we now have LP tokens; deposit into staking contract for the user\\n staking.deposit(pool.balanceOf(me), msg.sender);\\n\\n // sweep any dust\\n _sweep(collateral);\\n\\n emit Zapped(msg.sender, collateralAmount, 0, pool.balanceOf(msg.sender));\\n }\\n\\n function _zapNormal(uint256 collateralAmount, uint256 minLpAmount) internal {\\n // convert 50% collateral for zai\\n uint256 zaiAmount = bridge.deposit(collateralAmount / 2);\\n\\n router.addLiquidity(\\n address(collateral), address(zai), true, collateralAmount / 2, zaiAmount, 0, 0, me, block.timestamp\\n );\\n\\n require(pool.balanceOf(me) >= minLpAmount, \\\"!insufficient\\\");\\n\\n // we now have LP tokens; deposit into staking contract for the user\\n staking.deposit(pool.balanceOf(me), msg.sender);\\n\\n // sweep any dust\\n _sweep(zai);\\n _sweep(collateral);\\n\\n emit Zapped(msg.sender, collateralAmount / 2, zaiAmount, pool.balanceOf(msg.sender));\\n }\\n\\n function zapOutOfLP(uint256 amount, uint256 minCollateralAmount) external {\\n staking.withdraw(amount, msg.sender, me);\\n\\n IAerodromeRouter(address(pool)).removeLiquidity(\\n address(collateral), address(zai), true, pool.balanceOf(me), 0, 0, me, block.timestamp\\n );\\n\\n IAerodromeRouter.Route memory route = IAerodromeRouter.Route({\\n from: address(zai),\\n to: address(collateral),\\n stable: true,\\n factory: IAerodromeRouter(address(pool)).defaultFactory()\\n });\\n\\n // swap usdc into zai\\n IAerodromeRouter.Route[] memory routes = new IAerodromeRouter.Route[](1);\\n routes[0] = route;\\n router.swapExactTokensForTokens(zai.balanceOf(me), 0, routes, me, block.timestamp);\\n\\n require(collateral.balanceOf(me) >= minCollateralAmount, \\\"!insufficient\\\");\\n\\n // sweep any dust\\n _sweep(zai);\\n _sweep(collateral);\\n }\\n}\\n\",\"keccak256\":\"0x0c6c177a7276c5a265eb54e96c53d60835e221e5007c3eb7a01e7d1be3990f32\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162002343380380620023438339810160408190526200003491620005e4565b600080546001600160a01b0319166001600160a01b038616908117909155604080516338d52e0f60e01b815290518692869286928592916338d52e0f9160048083019260209291908290030181865afa15801562000096573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000bc91906200064c565b600180546001600160a01b0319166001600160a01b0392831690811790915560405163095ea7b360e01b8152918316600483015260001960248301529063095ea7b3906044016020604051808303816000875af115801562000122573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000148919062000673565b505060058054306001600160a01b0319918216179091556006805482166001600160a01b03858116918217909255600780549093169184169190911790915560408051634da90afb60e11b81529051639b5215f6916004808201926020929091908290030181865afa158015620001c3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001e991906200064c565b600280546001600160a01b0319166001600160a01b039283161790556006546040805163c89039c560e01b81529051919092169163c89039c59160048083019260209291908290030181865afa15801562000248573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200026e91906200064c565b600380546001600160a01b0319166001600160a01b0392831617905560025460015460405163095ea7b360e01b81529083166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af1158015620002d9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002ff919062000673565b50600360009054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000354573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200037a919062000697565b62000387906012620006d2565b6200039490600a620007f1565b600490815560025460075460405163095ea7b360e01b81526001600160a01b03918216938101939093526000196024840152169063095ea7b3906044016020604051808303816000875af1158015620003f1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000417919062000673565b5060035460075460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af11580156200046f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000495919062000673565b5060035460065460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af1158015620004ed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000513919062000673565b50600160009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000568573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200058e91906200064c565b600880546001600160a01b039283166001600160a01b03199182161790915560098054969092169516949094179093555062000802945050505050565b6001600160a01b0381168114620005e157600080fd5b50565b60008060008060808587031215620005fb57600080fd5b84516200060881620005cb565b60208601519094506200061b81620005cb565b60408601519093506200062e81620005cb565b60608601519092506200064181620005cb565b939692955090935050565b6000602082840312156200065f57600080fd5b81516200066c81620005cb565b9392505050565b6000602082840312156200068657600080fd5b815180151581146200066c57600080fd5b600060208284031215620006aa57600080fd5b815160ff811681146200066c57600080fd5b634e487b7160e01b600052601160045260246000fd5b60ff8281168282160390811115620006ee57620006ee620006bc565b92915050565b600181815b8085111562000735578160001904821115620007195762000719620006bc565b808516156200072757918102915b93841c9390800290620006f9565b509250929050565b6000826200074e57506001620006ee565b816200075d57506000620006ee565b81600181146200077657600281146200078157620007a1565b6001915050620006ee565b60ff841115620007955762000795620006bc565b50506001821b620006ee565b5060208310610133831016604e8410600b8410161715620007c6575081810a620006ee565b620007d28383620006f4565b8060001904821115620007e957620007e9620006bc565b029392505050565b60006200066c60ff8416836200073d565b611b3180620008126000396000f3fe6080604052600436106100d25760003560e01c8063c69fd06b1161007f578063d8dfeb4511610059578063d8dfeb451461020d578063e78cea921461022d578063f887ea401461024d578063fbbe5a331461026d57600080fd5b8063c69fd06b146101b6578063cb12b48f146101c9578063d1b39ae5146101e957600080fd5b80631eba02ec116100b05780631eba02ec146101565780634cf088d914610176578063c45a01551461019657600080fd5b8063050ad121146100d757806307140b34146100f957806316f0115b14610136575b600080fd5b3480156100e357600080fd5b506100f76100f236600461173f565b61028d565b005b34801561010557600080fd5b50600254610119906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014257600080fd5b50600154610119906001600160a01b031681565b34801561016257600080fd5b50600954610119906001600160a01b031681565b34801561018257600080fd5b50600054610119906001600160a01b031681565b3480156101a257600080fd5b50600854610119906001600160a01b031681565b6100f76101c43660046117bd565b61075e565b3480156101d557600080fd5b50600554610119906001600160a01b031681565b3480156101f557600080fd5b506101ff60045481565b60405190815260200161012d565b34801561021957600080fd5b50600354610119906001600160a01b031681565b34801561023957600080fd5b50600654610119906001600160a01b031681565b34801561025957600080fd5b50600754610119906001600160a01b031681565b34801561027957600080fd5b506100f761028836600461173f565b610951565b6000546005546040517fb460af94000000000000000000000000000000000000000000000000000000008152600481018590523360248201526001600160a01b03918216604482015291169063b460af94906064016020604051808303816000875af1158015610301573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103259190611878565b50600180546003546002546005546040516370a0823160e01b81526001600160a01b03918216600482015293811694630dede6c4949382169391909216919085906370a0823190602401602060405180830381865afa15801561038c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b09190611878565b60055460405160e087901b6001600160e01b03191681526001600160a01b03958616600482015293851660248501529115156044840152606483015260006084830181905260a48301529190911660c48201524260e48201526101040160408051808303816000875af115801561042b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044f9190611891565b5050604080516080810182526002546001600160a01b039081168252600354811660208084019190915260018385018190525484517fd4b6846d00000000000000000000000000000000000000000000000000000000815294516000956060860194929092169263d4b6846d92600480820193918290030181865afa1580156104dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050091906118b5565b6001600160a01b0316905260408051600180825281830190925291925060009190816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816105265790505090508181600081518110610570576105706118d2565b60209081029190910101526007546002546005546040516370a0823160e01b81526001600160a01b0391821660048201529281169263cac88ea99291909116906370a0823190602401602060405180830381865afa1580156105d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105fa9190611878565b6005546040516001600160e01b031960e085901b16815261062f929160009187916001600160a01b0316904290600401611953565b6000604051808303816000875af115801561064e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610676919081019061198f565b506003546005546040516370a0823160e01b81526001600160a01b039182166004820152859291909116906370a0823190602401602060405180830381865afa1580156106c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106eb9190611878565b101561072e5760405162461bcd60e51b815260206004820152600d60248201526c085a5b9cdd59999a58da595b9d609a1b60448201526064015b60405180910390fd5b600254610743906001600160a01b031661097e565b600354610758906001600160a01b031661097e565b50505050565b6001600160a01b0384161561081b57600554610789906001600160a01b038681169133911686610ab9565b6009546040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152602481018590529085169063095ea7b3906044016020604051808303816000875af11580156107f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108199190611a35565b505b6009546040516000916001600160a01b031690349061083b908590611a57565b60006040518083038185875af1925050503d8060008114610878576040519150601f19603f3d011682016040523d82523d6000602084013e61087d565b606091505b50509050806108ce5760405162461bcd60e51b815260206004820152601060248201527f4f646f732073776170206661696c6564000000000000000000000000000000006044820152606401610725565b6003546005546040516370a0823160e01b81526001600160a01b03918216600482015261094a9291909116906370a0823190602401602060405180830381865afa158015610920573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109449190611878565b84610b41565b5050505050565b600554600354610970916001600160a01b039182169133911685610ab9565b61097a8282610b41565b5050565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156109c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e99190611878565b9050600081118015610a8257506040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af1158015610a5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a809190611a35565b155b1561097a576040517f045c4b0200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610758908590610c72565b6002546001546040516370a0823160e01b81526001600160a01b03918216600482015260009291909116906370a0823190602401602060405180830381865afa158015610b92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bb69190611878565b6003546001546040516370a0823160e01b81526001600160a01b0391821660048201529116906370a0823190602401602060405180830381865afa158015610c02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c269190611878565b610c3d906c0c9f2c9cd04674edea40000000611a86565b610c479190611aab565b9050670c7d713b49da0000811015610c6857610c638383610cee565b505050565b610c6383836111e4565b6000610c876001600160a01b038416836115b6565b90508051600014158015610cac575080806020019051810190610caa9190611a35565b155b15610c63576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602401610725565b604080516080810182526003546001600160a01b039081168252600254811660208301526001828401819052600854909116606083015282518181528084019093529091600091816020015b604080516080810182526000808252602080830182905292820181905260608201528252600019909201910181610d3a5790505090508181600081518110610d8457610d846118d2565b60209081029190910101526007546001600160a01b031663cac88ea9610dab600287611aab565b610db6600288611aab565b610dc59064e8d4a51000611a86565b6005546040516001600160e01b031960e086901b168152610dfa93929187916001600160a01b03909116904290600401611953565b6000604051808303816000875af1158015610e19573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610e41919081019061198f565b50600754600354600280546001600160a01b0393841693635a47ddc393811692911690600190610e71908a611aab565b6002546005546040516370a0823160e01b81526001600160a01b0391821660048201529116906370a0823190602401602060405180830381865afa158015610ebd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee19190611878565b60055460405160e088901b6001600160e01b03191681526001600160a01b0396871660048201529486166024860152921515604485015260648401919091526084830152600060a4830181905260c48301529190911660e482015242610104820152610124016060604051808303816000875af1158015610f66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f8a9190611acd565b50506001546005546040516370a0823160e01b81526001600160a01b0391821660048201528693509116906370a0823190602401602060405180830381865afa158015610fdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fff9190611878565b101561103d5760405162461bcd60e51b815260206004820152600d60248201526c085a5b9cdd59999a58da595b9d609a1b6044820152606401610725565b6000546001546005546040516370a0823160e01b81526001600160a01b03918216600482015292811692636e553f659291909116906370a0823190602401602060405180830381865afa158015611098573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110bc9190611878565b6040516001600160e01b031960e084901b16815260048101919091523360248201526044016020604051808303816000875af1158015611100573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111249190611878565b5060035461113a906001600160a01b031661097e565b6001546040516370a0823160e01b8152336004820181905260009287927f8254cb1554a3a4f342e4d6bc29ea29f483d72ec4183e94e4a83410c93af84341916001600160a01b0316906370a0823190602401602060405180830381865afa1580156111a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111cd9190611878565b60405190815260200160405180910390a450505050565b6006546000906001600160a01b031663b6b55f25611203600286611aab565b6040518263ffffffff1660e01b815260040161122191815260200190565b6020604051808303816000875af1158015611240573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112649190611878565b600754600354600280549394506001600160a01b0392831693635a47ddc3939283169216906001906112969089611aab565b60055460405160e087901b6001600160e01b03191681526001600160a01b03958616600482015293851660248501529115156044840152606483015260848201869052600060a4830181905260c48301529190911660e482015242610104820152610124016060604051808303816000875af115801561131a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133e9190611acd565b50506001546005546040516370a0823160e01b81526001600160a01b0391821660048201528593509116906370a0823190602401602060405180830381865afa15801561138f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b39190611878565b10156113f15760405162461bcd60e51b815260206004820152600d60248201526c085a5b9cdd59999a58da595b9d609a1b6044820152606401610725565b6000546001546005546040516370a0823160e01b81526001600160a01b03918216600482015292811692636e553f659291909116906370a0823190602401602060405180830381865afa15801561144c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114709190611878565b6040516001600160e01b031960e084901b16815260048101919091523360248201526044016020604051808303816000875af11580156114b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d89190611878565b506002546114ee906001600160a01b031661097e565b600354611503906001600160a01b031661097e565b8061150f600285611aab565b6001546040516370a0823160e01b81523360048201819052917f8254cb1554a3a4f342e4d6bc29ea29f483d72ec4183e94e4a83410c93af84341916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561157c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a09190611878565b60405190815260200160405180910390a4505050565b60606115c4838360006115cd565b90505b92915050565b60608147101561160b576040517fcd786059000000000000000000000000000000000000000000000000000000008152306004820152602401610725565b600080856001600160a01b031684866040516116279190611a57565b60006040518083038185875af1925050503d8060008114611664576040519150601f19603f3d011682016040523d82523d6000602084013e611669565b606091505b5091509150611679868383611685565b925050505b9392505050565b60608261169a57611695826116fa565b61167e565b81511580156116b157506001600160a01b0384163b155b156116f3576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610725565b508061167e565b80511561170a5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b6000806040838503121561175257600080fd5b50508035926020909101359150565b6001600160a01b038116811461173c57600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156117b5576117b5611776565b604052919050565b600080600080608085870312156117d357600080fd5b84356117de81611761565b9350602085810135935060408601359250606086013567ffffffffffffffff8082111561180a57600080fd5b818801915088601f83011261181e57600080fd5b81358181111561183057611830611776565b611842601f8201601f1916850161178c565b9150808252898482850101111561185857600080fd5b808484018584013760008482840101525080935050505092959194509250565b60006020828403121561188a57600080fd5b5051919050565b600080604083850312156118a457600080fd5b505080516020909101519092909150565b6000602082840312156118c757600080fd5b815161167e81611761565b634e487b7160e01b600052603260045260246000fd5b600081518084526020808501945080840160005b8381101561194857815180516001600160a01b039081168952848201518116858a01526040808301511515908a01526060918201511690880152608090960195908201906001016118fc565b509495945050505050565b85815284602082015260a06040820152600061197260a08301866118e8565b6001600160a01b0394909416606083015250608001529392505050565b600060208083850312156119a257600080fd5b825167ffffffffffffffff808211156119ba57600080fd5b818501915085601f8301126119ce57600080fd5b8151818111156119e0576119e0611776565b8060051b91506119f184830161178c565b8181529183018401918481019088841115611a0b57600080fd5b938501935b83851015611a2957845182529385019390850190611a10565b98975050505050505050565b600060208284031215611a4757600080fd5b8151801515811461167e57600080fd5b6000825160005b81811015611a785760208186018101518583015201611a5e565b506000920191825250919050565b80820281158282048414176115c757634e487b7160e01b600052601160045260246000fd5b600082611ac857634e487b7160e01b600052601260045260246000fd5b500490565b600080600060608486031215611ae257600080fd5b835192506020840151915060408401519050925092509256fea264697066735822122071cdd95f54fc5d9143b130f1d2ca00dec321da6dc317549897436fcbbf39c5e164736f6c63430008150033", + "deployedBytecode": "0x6080604052600436106100d25760003560e01c8063c69fd06b1161007f578063d8dfeb4511610059578063d8dfeb451461020d578063e78cea921461022d578063f887ea401461024d578063fbbe5a331461026d57600080fd5b8063c69fd06b146101b6578063cb12b48f146101c9578063d1b39ae5146101e957600080fd5b80631eba02ec116100b05780631eba02ec146101565780634cf088d914610176578063c45a01551461019657600080fd5b8063050ad121146100d757806307140b34146100f957806316f0115b14610136575b600080fd5b3480156100e357600080fd5b506100f76100f236600461173f565b61028d565b005b34801561010557600080fd5b50600254610119906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014257600080fd5b50600154610119906001600160a01b031681565b34801561016257600080fd5b50600954610119906001600160a01b031681565b34801561018257600080fd5b50600054610119906001600160a01b031681565b3480156101a257600080fd5b50600854610119906001600160a01b031681565b6100f76101c43660046117bd565b61075e565b3480156101d557600080fd5b50600554610119906001600160a01b031681565b3480156101f557600080fd5b506101ff60045481565b60405190815260200161012d565b34801561021957600080fd5b50600354610119906001600160a01b031681565b34801561023957600080fd5b50600654610119906001600160a01b031681565b34801561025957600080fd5b50600754610119906001600160a01b031681565b34801561027957600080fd5b506100f761028836600461173f565b610951565b6000546005546040517fb460af94000000000000000000000000000000000000000000000000000000008152600481018590523360248201526001600160a01b03918216604482015291169063b460af94906064016020604051808303816000875af1158015610301573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103259190611878565b50600180546003546002546005546040516370a0823160e01b81526001600160a01b03918216600482015293811694630dede6c4949382169391909216919085906370a0823190602401602060405180830381865afa15801561038c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b09190611878565b60055460405160e087901b6001600160e01b03191681526001600160a01b03958616600482015293851660248501529115156044840152606483015260006084830181905260a48301529190911660c48201524260e48201526101040160408051808303816000875af115801561042b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044f9190611891565b5050604080516080810182526002546001600160a01b039081168252600354811660208084019190915260018385018190525484517fd4b6846d00000000000000000000000000000000000000000000000000000000815294516000956060860194929092169263d4b6846d92600480820193918290030181865afa1580156104dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050091906118b5565b6001600160a01b0316905260408051600180825281830190925291925060009190816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816105265790505090508181600081518110610570576105706118d2565b60209081029190910101526007546002546005546040516370a0823160e01b81526001600160a01b0391821660048201529281169263cac88ea99291909116906370a0823190602401602060405180830381865afa1580156105d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105fa9190611878565b6005546040516001600160e01b031960e085901b16815261062f929160009187916001600160a01b0316904290600401611953565b6000604051808303816000875af115801561064e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610676919081019061198f565b506003546005546040516370a0823160e01b81526001600160a01b039182166004820152859291909116906370a0823190602401602060405180830381865afa1580156106c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106eb9190611878565b101561072e5760405162461bcd60e51b815260206004820152600d60248201526c085a5b9cdd59999a58da595b9d609a1b60448201526064015b60405180910390fd5b600254610743906001600160a01b031661097e565b600354610758906001600160a01b031661097e565b50505050565b6001600160a01b0384161561081b57600554610789906001600160a01b038681169133911686610ab9565b6009546040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152602481018590529085169063095ea7b3906044016020604051808303816000875af11580156107f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108199190611a35565b505b6009546040516000916001600160a01b031690349061083b908590611a57565b60006040518083038185875af1925050503d8060008114610878576040519150601f19603f3d011682016040523d82523d6000602084013e61087d565b606091505b50509050806108ce5760405162461bcd60e51b815260206004820152601060248201527f4f646f732073776170206661696c6564000000000000000000000000000000006044820152606401610725565b6003546005546040516370a0823160e01b81526001600160a01b03918216600482015261094a9291909116906370a0823190602401602060405180830381865afa158015610920573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109449190611878565b84610b41565b5050505050565b600554600354610970916001600160a01b039182169133911685610ab9565b61097a8282610b41565b5050565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156109c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e99190611878565b9050600081118015610a8257506040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af1158015610a5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a809190611a35565b155b1561097a576040517f045c4b0200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610758908590610c72565b6002546001546040516370a0823160e01b81526001600160a01b03918216600482015260009291909116906370a0823190602401602060405180830381865afa158015610b92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bb69190611878565b6003546001546040516370a0823160e01b81526001600160a01b0391821660048201529116906370a0823190602401602060405180830381865afa158015610c02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c269190611878565b610c3d906c0c9f2c9cd04674edea40000000611a86565b610c479190611aab565b9050670c7d713b49da0000811015610c6857610c638383610cee565b505050565b610c6383836111e4565b6000610c876001600160a01b038416836115b6565b90508051600014158015610cac575080806020019051810190610caa9190611a35565b155b15610c63576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602401610725565b604080516080810182526003546001600160a01b039081168252600254811660208301526001828401819052600854909116606083015282518181528084019093529091600091816020015b604080516080810182526000808252602080830182905292820181905260608201528252600019909201910181610d3a5790505090508181600081518110610d8457610d846118d2565b60209081029190910101526007546001600160a01b031663cac88ea9610dab600287611aab565b610db6600288611aab565b610dc59064e8d4a51000611a86565b6005546040516001600160e01b031960e086901b168152610dfa93929187916001600160a01b03909116904290600401611953565b6000604051808303816000875af1158015610e19573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610e41919081019061198f565b50600754600354600280546001600160a01b0393841693635a47ddc393811692911690600190610e71908a611aab565b6002546005546040516370a0823160e01b81526001600160a01b0391821660048201529116906370a0823190602401602060405180830381865afa158015610ebd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee19190611878565b60055460405160e088901b6001600160e01b03191681526001600160a01b0396871660048201529486166024860152921515604485015260648401919091526084830152600060a4830181905260c48301529190911660e482015242610104820152610124016060604051808303816000875af1158015610f66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f8a9190611acd565b50506001546005546040516370a0823160e01b81526001600160a01b0391821660048201528693509116906370a0823190602401602060405180830381865afa158015610fdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fff9190611878565b101561103d5760405162461bcd60e51b815260206004820152600d60248201526c085a5b9cdd59999a58da595b9d609a1b6044820152606401610725565b6000546001546005546040516370a0823160e01b81526001600160a01b03918216600482015292811692636e553f659291909116906370a0823190602401602060405180830381865afa158015611098573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110bc9190611878565b6040516001600160e01b031960e084901b16815260048101919091523360248201526044016020604051808303816000875af1158015611100573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111249190611878565b5060035461113a906001600160a01b031661097e565b6001546040516370a0823160e01b8152336004820181905260009287927f8254cb1554a3a4f342e4d6bc29ea29f483d72ec4183e94e4a83410c93af84341916001600160a01b0316906370a0823190602401602060405180830381865afa1580156111a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111cd9190611878565b60405190815260200160405180910390a450505050565b6006546000906001600160a01b031663b6b55f25611203600286611aab565b6040518263ffffffff1660e01b815260040161122191815260200190565b6020604051808303816000875af1158015611240573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112649190611878565b600754600354600280549394506001600160a01b0392831693635a47ddc3939283169216906001906112969089611aab565b60055460405160e087901b6001600160e01b03191681526001600160a01b03958616600482015293851660248501529115156044840152606483015260848201869052600060a4830181905260c48301529190911660e482015242610104820152610124016060604051808303816000875af115801561131a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133e9190611acd565b50506001546005546040516370a0823160e01b81526001600160a01b0391821660048201528593509116906370a0823190602401602060405180830381865afa15801561138f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b39190611878565b10156113f15760405162461bcd60e51b815260206004820152600d60248201526c085a5b9cdd59999a58da595b9d609a1b6044820152606401610725565b6000546001546005546040516370a0823160e01b81526001600160a01b03918216600482015292811692636e553f659291909116906370a0823190602401602060405180830381865afa15801561144c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114709190611878565b6040516001600160e01b031960e084901b16815260048101919091523360248201526044016020604051808303816000875af11580156114b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d89190611878565b506002546114ee906001600160a01b031661097e565b600354611503906001600160a01b031661097e565b8061150f600285611aab565b6001546040516370a0823160e01b81523360048201819052917f8254cb1554a3a4f342e4d6bc29ea29f483d72ec4183e94e4a83410c93af84341916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561157c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a09190611878565b60405190815260200160405180910390a4505050565b60606115c4838360006115cd565b90505b92915050565b60608147101561160b576040517fcd786059000000000000000000000000000000000000000000000000000000008152306004820152602401610725565b600080856001600160a01b031684866040516116279190611a57565b60006040518083038185875af1925050503d8060008114611664576040519150601f19603f3d011682016040523d82523d6000602084013e611669565b606091505b5091509150611679868383611685565b925050505b9392505050565b60608261169a57611695826116fa565b61167e565b81511580156116b157506001600160a01b0384163b155b156116f3576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610725565b508061167e565b80511561170a5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b6000806040838503121561175257600080fd5b50508035926020909101359150565b6001600160a01b038116811461173c57600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156117b5576117b5611776565b604052919050565b600080600080608085870312156117d357600080fd5b84356117de81611761565b9350602085810135935060408601359250606086013567ffffffffffffffff8082111561180a57600080fd5b818801915088601f83011261181e57600080fd5b81358181111561183057611830611776565b611842601f8201601f1916850161178c565b9150808252898482850101111561185857600080fd5b808484018584013760008482840101525080935050505092959194509250565b60006020828403121561188a57600080fd5b5051919050565b600080604083850312156118a457600080fd5b505080516020909101519092909150565b6000602082840312156118c757600080fd5b815161167e81611761565b634e487b7160e01b600052603260045260246000fd5b600081518084526020808501945080840160005b8381101561194857815180516001600160a01b039081168952848201518116858a01526040808301511515908a01526060918201511690880152608090960195908201906001016118fc565b509495945050505050565b85815284602082015260a06040820152600061197260a08301866118e8565b6001600160a01b0394909416606083015250608001529392505050565b600060208083850312156119a257600080fd5b825167ffffffffffffffff808211156119ba57600080fd5b818501915085601f8301126119ce57600080fd5b8151818111156119e0576119e0611776565b8060051b91506119f184830161178c565b8181529183018401918481019088841115611a0b57600080fd5b938501935b83851015611a2957845182529385019390850190611a10565b98975050505050505050565b600060208284031215611a4757600080fd5b8151801515811461167e57600080fd5b6000825160005b81811015611a785760208186018101518583015201611a5e565b506000920191825250919050565b80820281158282048414176115c757634e487b7160e01b600052601160045260246000fd5b600082611ac857634e487b7160e01b600052601260045260246000fd5b500490565b600080600060608486031215611ae257600080fd5b835192506020840151915060408401519050925092509256fea264697066735822122071cdd95f54fc5d9143b130f1d2ca00dec321da6dc317549897436fcbbf39c5e164736f6c63430008150033", "devdoc": { + "errors": { + "AddressEmptyCode(address)": [ + { + "details": "There's no code at `target` (it is not a contract)." + } + ], + "AddressInsufficientBalance(address)": [ + { + "details": "The ETH balance of the account is not enough to perform the operation." + } + ], + "FailedInnerCall()": [ + { + "details": "A call to an address target failed. The target may have reverted." + } + ], + "SafeERC20FailedOperation(address)": [ + { + "details": "An operation with an ERC20 token failed." + } + ] + }, "kind": "dev", "methods": { "zapIntoLP(uint256,uint256)": { - "details": "This function is used when the user only has collateral tokens.", "params": { - "collateralAmount": "The amount of collateral to zap", - "minLpAmount": "The minimum amount of LP tokens to stake" + "collateralAmount": "The amount of USDC to deposit into the LP", + "minLpAmount": "The minimum LP tokens to receive after zapping" + } + }, + "zapIntoLPWithOdos(address,uint256,uint256,bytes)": { + "params": { + "minLpAmount": "The minimum LP tokens to receive after zapping", + "odosCallData": "Encoded Odos swap data", + "swapAmount": "The amount of `swapAsset` to swap", + "swapAsset": "The asset to swap into USDC using Odos" } } }, @@ -336,7 +450,10 @@ "kind": "user", "methods": { "zapIntoLP(uint256,uint256)": { - "notice": "Zaps collateral into ZAI LP tokens" + "notice": "Wrapper function for directly zapping with USDC collateral" + }, + "zapIntoLPWithOdos(address,uint256,uint256,bytes)": { + "notice": "Zaps collateral into ZAI LP tokens with any token by using Odos" } }, "version": 1 @@ -344,7 +461,7 @@ "storageLayout": { "storage": [ { - "astId": 44588, + "astId": 44920, "contract": "contracts/periphery/zaps/implementations/base/ZapAerodromePoolUSDC.sol:ZapAerodromePoolUSDC", "label": "staking", "offset": 0, @@ -352,7 +469,7 @@ "type": "t_contract(IERC4626)14130" }, { - "astId": 44591, + "astId": 44923, "contract": "contracts/periphery/zaps/implementations/base/ZapAerodromePoolUSDC.sol:ZapAerodromePoolUSDC", "label": "pool", "offset": 0, @@ -360,7 +477,7 @@ "type": "t_contract(IERC20Metadata)16338" }, { - "astId": 44594, + "astId": 44926, "contract": "contracts/periphery/zaps/implementations/base/ZapAerodromePoolUSDC.sol:ZapAerodromePoolUSDC", "label": "zai", "offset": 0, @@ -368,7 +485,7 @@ "type": "t_contract(IERC20Metadata)16338" }, { - "astId": 44597, + "astId": 44929, "contract": "contracts/periphery/zaps/implementations/base/ZapAerodromePoolUSDC.sol:ZapAerodromePoolUSDC", "label": "collateral", "offset": 0, @@ -376,7 +493,7 @@ "type": "t_contract(IERC20Metadata)16338" }, { - "astId": 44599, + "astId": 44931, "contract": "contracts/periphery/zaps/implementations/base/ZapAerodromePoolUSDC.sol:ZapAerodromePoolUSDC", "label": "decimalOffset", "offset": 0, @@ -384,7 +501,7 @@ "type": "t_uint256" }, { - "astId": 44601, + "astId": 44933, "contract": "contracts/periphery/zaps/implementations/base/ZapAerodromePoolUSDC.sol:ZapAerodromePoolUSDC", "label": "me", "offset": 0, @@ -392,7 +509,7 @@ "type": "t_address" }, { - "astId": 44706, + "astId": 45038, "contract": "contracts/periphery/zaps/implementations/base/ZapAerodromePoolUSDC.sol:ZapAerodromePoolUSDC", "label": "bridge", "offset": 0, @@ -400,7 +517,7 @@ "type": "t_contract(IL2DepositCollateralL0)37518" }, { - "astId": 44709, + "astId": 45041, "contract": "contracts/periphery/zaps/implementations/base/ZapAerodromePoolUSDC.sol:ZapAerodromePoolUSDC", "label": "router", "offset": 0, @@ -408,12 +525,20 @@ "type": "t_contract(IAerodromeRouter)37050" }, { - "astId": 44711, + "astId": 45043, "contract": "contracts/periphery/zaps/implementations/base/ZapAerodromePoolUSDC.sol:ZapAerodromePoolUSDC", "label": "factory", "offset": 0, "slot": "8", "type": "t_address" + }, + { + "astId": 45194, + "contract": "contracts/periphery/zaps/implementations/base/ZapAerodromePoolUSDC.sol:ZapAerodromePoolUSDC", + "label": "odos", + "offset": 0, + "slot": "9", + "type": "t_address" } ], "types": { diff --git a/scripts/governance/deploy-governance-base.ts b/scripts/governance/deploy-governance-base.ts new file mode 100644 index 0000000..807e1f8 --- /dev/null +++ b/scripts/governance/deploy-governance-base.ts @@ -0,0 +1,105 @@ +import { ZeroAddress } from "ethers"; +import { ethers, network, run } from "hardhat"; + +async function main() { + const SAFE = "0x7427E82f5abCbcA2a45cAfE6e65cBC1FADf9ad9D"; + const MAHA_BASE = "0x554bba833518793056CF105E66aBEA330672c0dE"; + const WETH_BASE = "0x4200000000000000000000000000000000000006"; + const REWARD_DURATION = 86400 * 7; // 7 Days + + const TransparentProxy = await ethers.getContractFactory( + "TransparentUpgradeableProxy" + ); + const LockerToken = await ethers.getContractFactory("LockerToken"); + const OmnichainStakingToken = await ethers.getContractFactory( + "OmnichainStakingToken" + ); + + // Deploy the implementations + const omnichainStakingTokenImpl = await OmnichainStakingToken.deploy(); + const lockerTokenImpl = await LockerToken.deploy(); + + await omnichainStakingTokenImpl.waitForDeployment(); + await lockerTokenImpl.waitForDeployment(); + + console.log( + `Omnichain Staking Implementation: ${await omnichainStakingTokenImpl.getAddress()}` + ); + console.log( + `Locker Token Implementation: ${await lockerTokenImpl.getAddress()}` + ); + + // Deploy proxies + const omnichainStakingTokenProxy = await TransparentProxy.deploy( + await omnichainStakingTokenImpl.getAddress(), + SAFE, + "0x" + ); + const lockerTokenProxy = await TransparentProxy.deploy( + await lockerTokenImpl.getAddress(), + SAFE, + "0x" + ); + + await omnichainStakingTokenProxy.waitForDeployment(); + await lockerTokenProxy.waitForDeployment(); + + console.log( + `Omnichain Staking Proxy: ${await omnichainStakingTokenProxy.getAddress()}` + ); + console.log(`Locker Token Proxy: ${await lockerTokenProxy.getAddress()}`); + + // Interacting through proxies + const omnichainStakingToken = await ethers.getContractAt( + "OmnichainStakingToken", + await omnichainStakingTokenProxy.getAddress() + ); + + const lockerToken = await ethers.getContractAt( + "LockerToken", + await lockerTokenProxy.getAddress() + ); + + // Initialize the contracts + await lockerToken.init( + MAHA_BASE, + await omnichainStakingToken.getAddress(), + ZeroAddress + ); + + await omnichainStakingToken.init( + await lockerToken.getAddress(), + WETH_BASE, + MAHA_BASE, + REWARD_DURATION, + SAFE, + ZeroAddress + ); + + if (network.name !== "hardhat") { + // Verify the implementations + await run("verify:verify", { address: await lockerTokenImpl.getAddress() }); + await run("verify:verify", { + address: await omnichainStakingTokenImpl.getAddress(), + }); + + // Verify the proxies + await run("verify:verify", { + address: await lockerTokenProxy.getAddress(), + constructorArguments: [await lockerTokenImpl.getAddress(), SAFE, "0x"], + }); + await run("verify:verify", { + address: await omnichainStakingTokenProxy.getAddress(), + constructorArguments: [ + await omnichainStakingTokenImpl.getAddress(), + SAFE, + "0x", + ], + }); + } +} + +main().catch((err) => { + console.error(err); + process.exitCode = 1; +}); diff --git a/test/foundry/USDCZapForkTest.sol b/test/foundry/USDCZapForkTest.sol new file mode 100644 index 0000000..531e715 --- /dev/null +++ b/test/foundry/USDCZapForkTest.sol @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: SEE LICENSE IN LICENSE +pragma solidity 0.8.21; + +import {ZapAerodromePoolUSDC} from "../../contracts/periphery/zaps/implementations/base/ZapAerodromePoolUSDC.sol"; +import {IERC20} from "@openzeppelin/contracts/interfaces/IERC20.sol"; +import {Test} from "forge-std/Test.sol"; + +contract USDCZapForkTest is Test { + ZapAerodromePoolUSDC public zapOdos; + uint256 public baseMainnetForkId; + string public BASE_RPC_URL = vm.envString("BASE_RPC_URL"); + address staking = 0x1097dFe9539350cb466dF9CA89A5e61195A520B0; + address bridge = 0xA07cf1c081F46524A133c1B6E8eE0B5f96A51255; + address odos = 0x19cEeAd7105607Cd444F5ad10dd51356436095a1; + address router = 0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43; + + function setUp() public { + baseMainnetForkId = vm.createFork(BASE_RPC_URL); + vm.selectFork(baseMainnetForkId); + zapOdos = new ZapAerodromePoolUSDC(staking, bridge, router, address(odos)); + } + + function testInitValues() external view { + assertEq(address(zapOdos.staking()), 0x1097dFe9539350cb466dF9CA89A5e61195A520B0); + assertEq(address(zapOdos.zai()), 0x0A27E060C0406f8Ab7B64e3BEE036a37e5a62853); + assertEq(address(zapOdos.router()), 0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43); + assertEq(zapOdos.odos(), 0x19cEeAd7105607Cd444F5ad10dd51356436095a1); + } + + function testZapIntoLPOdosETH() external { + vm.startPrank(0x1A9CE4fC65b2267bb32d692E17dE54Ff996747D8); + IERC20 swapAsset = IERC20(address(0)); + vm.deal(0x1A9CE4fC65b2267bb32d692E17dE54Ff996747D8, 5 ether); + uint256 swapAmount = 0.0001 ether; + uint256 minLpAmount = 0; + bytes memory odosCall = + hex"83bd37f900000004065af3107a40000304c57b00c49b00017882570840A97A490a37bd8Db9e1aE39165bfBd6000000015615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f000000000301020300040101020a0001010201ff00000000000000000000000000000000001db0d0cb84914d09a92ba11d122bab732ac35fe04200000000000000000000000000000000000006000000000000000000000000000000000000000000000000"; + zapOdos.zapIntoLPWithOdos{value: swapAmount}(swapAsset, swapAmount, minLpAmount, odosCall); + vm.stopPrank(); + } + + function testZapIntoODOSToken() external { + address caller = 0x1A9CE4fC65b2267bb32d692E17dE54Ff996747D8; + address ZRO = 0x6985884C4392D348587B19cb9eAAf157F13271cd; + address ZRO_WHALE = 0xF977814e90dA44bFA03b6295A0616a897441aceC; + vm.startPrank(ZRO_WHALE); + IERC20(ZRO).transfer(caller, 200 ether); + vm.stopPrank(); + vm.startPrank(caller); + IERC20(ZRO).approve(address(zapOdos), 100 ether); + IERC20 swapAsset = IERC20(ZRO); // ZRO + uint256 swapAmount = 100 ether; + uint256 minLpAmount = 0; + bytes memory odosCall = + hex"83bd37f900016985884c4392d348587b19cb9eaaf157f13271cd000409056bc75e2d631000000414fa581400c49b00017882570840A97A490a37bd8Db9e1aE39165bfBd6000000015615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f000000000903030a013d2d88e4340100010102007fffffdd0160ee122c0a0100030200000a0100040200037b5bea170000020a0200050601040a010107080000260101090601ff000000000000000000000000000000000000000000000000000000000000deac3451b21038b89476ea60c8bb21bdfe97995e6985884c4392d348587b19cb9eaaf157f13271cd899cd88db60c1484ceebbf9b0a91a9a6415d485bcaeedd8f1acf55f2df259afc090d519069f72a2bbf371ea62f6464d092f715f6cd359bd22e24ff514200000000000000000000000000000000000006b94b22332abf5f89877a14cc88f2abc48c34b3dfcbb7c0000ab88b473b1f5afd9ef808440eed33bf4cfd5ba4b8e0475d9a3cfa863e0e18ccf9d3eb25000000000000000000000000"; + zapOdos.zapIntoLPWithOdos(swapAsset, swapAmount, minLpAmount, odosCall); + vm.stopPrank(); + } +} diff --git a/test/foundry/periphery/zap/ZapAerodromePoolUSDCTest.sol b/test/foundry/periphery/zap/ZapAerodromePoolUSDCTest.sol index c396232..95f3a9c 100644 --- a/test/foundry/periphery/zap/ZapAerodromePoolUSDCTest.sol +++ b/test/foundry/periphery/zap/ZapAerodromePoolUSDCTest.sol @@ -40,11 +40,13 @@ contract ZapAerodromePoolUSDCTest is BaseZaiTest { IERC20 _staking = IERC20(0x1097dFe9539350cb466dF9CA89A5e61195A520B0); address _restaking = 0xA07cf1c081F46524A133c1B6E8eE0B5f96A51255; address _router = 0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43; + address odos = 0x19cEeAd7105607Cd444F5ad10dd51356436095a1; ZapAerodromePoolUSDC _zap = new ZapAerodromePoolUSDC( address(_staking), // lp staking pool _restaking, // bridge - _router + _router, + odos ); vm.startPrank(user); @@ -74,11 +76,13 @@ contract ZapAerodromePoolUSDCTest is BaseZaiTest { IERC20 _staking = IERC20(0x1097dFe9539350cb466dF9CA89A5e61195A520B0); address _restaking = 0xA07cf1c081F46524A133c1B6E8eE0B5f96A51255; address _router = 0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43; + address odos = 0x19cEeAd7105607Cd444F5ad10dd51356436095a1; ZapAerodromePoolUSDC _zap = new ZapAerodromePoolUSDC( address(_staking), // lp staking pool _restaking, // bridge - _router + _router, + odos ); vm.startPrank(user);