Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
ConvexLevSwapper3CRV
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.17; import "../CurveLevSwapper3CRV.sol"; /// @title ConvexLevSwapper3CRV /// @author Angle Labs, Inc. /// @notice Implements CurveLevSwapper3CRV with a Convex staker contract ConvexLevSwapper3CRV is CurveLevSwapper3CRV { constructor( ICoreBorrow _core, IUniswapV3Router _uniV3Router, address _oneInch, IAngleRouterSidechain _angleRouter ) CurveLevSwapper3CRV(_core, _uniV3Router, _oneInch, _angleRouter) {} /// @inheritdoc BaseLevSwapper function angleStaker() public pure override returns (IBorrowStaker) { return IBorrowStaker(0xbff202E3Cb58aB0A09b2Eb1D9a50352B9aAf196c); } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IBorrowStakerCheckpoint { function checkpointFromVaultManager( address from, uint256 amount, bool add ) external; } interface IBorrowStaker is IBorrowStakerCheckpoint, IERC20 { function asset() external returns (IERC20 stakingToken); function deposit(uint256 amount, address to) external; function withdraw( uint256 amount, address from, address to ) external; //solhint-disable-next-line function claim_rewards(address user) external returns (uint256[] memory); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.17; import "./IMetaPoolBase.sol"; uint256 constant N_COINS = 3; //solhint-disable interface IMetaPool3 is IMetaPoolBase { function coins() external view returns (uint256[N_COINS] memory); function balances(uint256) external view returns (uint256); function get_balances() external view returns (uint256[N_COINS] memory); function get_previous_balances() external view returns (uint256[N_COINS] memory); function get_price_cumulative_last() external view returns (uint256[N_COINS] memory); function get_twap_balances( uint256[N_COINS] memory _first_balances, uint256[N_COINS] memory _last_balances, uint256 _time_elapsed ) external view returns (uint256[N_COINS] memory); function calc_token_amount(uint256[N_COINS] memory _amounts, bool _is_deposit) external view returns (uint256); function calc_token_amount( uint256[N_COINS] memory _amounts, bool _is_deposit, bool _previous ) external view returns (uint256); function add_liquidity(uint256[N_COINS] memory _amounts, uint256 _min_mint_amount) external; function add_liquidity( uint256[N_COINS] memory _amounts, uint256 _min_mint_amount, address _receiver ) external returns (uint256); function get_dy( int128 i, int128 j, uint256 dx, uint256[N_COINS] memory _balances ) external view returns (uint256); function get_dy_underlying( int128 i, int128 j, uint256 dx, uint256[N_COINS] memory _balances ) external view returns (uint256); function exchange( uint256 i, uint256 j, uint256 dx, uint256 min_dy ) external; function remove_liquidity_one_coin( uint256 _burn_amount, int128 i, uint256 _min_received ) external; function remove_liquidity(uint256 _burn_amount, uint256[N_COINS] memory _min_amounts) external; function remove_liquidity( uint256 _burn_amount, uint256[N_COINS] memory _min_amounts, address _receiver ) external; function remove_liquidity_imbalance(uint256[N_COINS] memory _amounts, uint256 _max_burn_amount) external; function remove_liquidity_imbalance( uint256[N_COINS] memory _amounts, uint256 _max_burn_amount, address _receiver ) external; // overload functions because some pools requires i to be an int128 or an uint256 function calc_withdraw_one_coin(uint256 _burn_amount, uint256 i) external view returns (uint256); function remove_liquidity_one_coin( uint256 _burn_amount, uint256 i, uint256 _min_received ) external; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.17; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; //solhint-disable interface IMetaPoolBase is IERC20 { function admin_fee() external view returns (uint256); function A() external view returns (uint256); function A_precise() external view returns (uint256); function get_virtual_price() external view returns (uint256); function get_dy( int128 i, int128 j, uint256 dx ) external view returns (uint256); function get_dy_underlying( int128 i, int128 j, uint256 dx ) external view returns (uint256); function exchange( int128 i, int128 j, uint256 dx, uint256 min_dy ) external; function exchange( int128 i, int128 j, uint256 dx, uint256 min_dy, address _receiver ) external; function exchange_underlying( int128 i, int128 j, uint256 dx, uint256 min_dy ) external returns (uint256); function exchange_underlying( int128 i, int128 j, uint256 dx, uint256 min_dy, address _receiver ) external returns (uint256); function calc_withdraw_one_coin(uint256 _burn_amount, int128 i) external view returns (uint256); function calc_withdraw_one_coin( uint256 _burn_amount, int128 i, bool _previous ) external view returns (uint256); function remove_liquidity_one_coin( uint256 _burn_amount, int128 i, uint256 _min_received, address _receiver ) external; function admin_balances(uint256 i) external view returns (uint256); function withdraw_admin_fees() external; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.17; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "borrow/interfaces/IAngleRouterSidechain.sol"; import "borrow/interfaces/ICoreBorrow.sol"; import "borrow/interfaces/external/uniswap/IUniswapRouter.sol"; import "../../interfaces/IBorrowStaker.sol"; import "borrow/swapper/Swapper.sol"; /// @title BaseLevSwapper /// @author Angle Labs, Inc. /// @notice Swapper contract facilitating interactions with Angle VaultManager contracts, notably /// liquidation and leverage transactions /// @dev This base implementation is for tokens like LP tokens which are not natively supported by 1inch /// and need some wrapping/unwrapping abstract contract BaseLevSwapper is Swapper { using SafeERC20 for IERC20; constructor( ICoreBorrow _core, IUniswapV3Router _uniV3Router, address _oneInch, IAngleRouterSidechain _angleRouter ) Swapper(_core, _uniV3Router, _oneInch, _angleRouter) { if (address(angleStaker()) != address(0)) angleStaker().asset().safeIncreaseAllowance(address(angleStaker()), type(uint256).max); } // ============================= INTERNAL FUNCTIONS ============================ /// @inheritdoc Swapper /// @param data Encoded data giving specific instruction to the bundle tx /// @dev The amountOut is unused so left as 0 in the case of a deleverage transaction /// @dev All token transfers must have been done beforehand /// @dev This function can support multiple swaps to get a desired token function _swapLeverage(bytes memory data) internal override returns (uint256 amountOut) { bool leverage; address to; bytes[] memory oneInchPayloads; (leverage, to, data) = abi.decode(data, (bool, address, bytes)); if (leverage) { (oneInchPayloads, data) = abi.decode(data, (bytes[], bytes)); // After sending all your tokens you have the possibility to swap them through 1inch // For instance when borrowing on Angle you receive agEUR, but may want to be LP on // the 3Pool, you can then swap 1/3 of the agEUR to USDC, 1/3 to USDT and 1/3 to DAI // before providing liquidity // These swaps are easy to anticipate as you know how many tokens have been sent when querying the 1inch API _multiSwap1inch(oneInchPayloads); // Hook to add liquidity to the underlying protocol amountOut = _add(data); // Deposit into the AngleStaker angleStaker().deposit(amountOut, to); } else { uint256 toUnstake; uint256 toRemove; IERC20[] memory sweepTokens; (toUnstake, toRemove, sweepTokens, oneInchPayloads, data) = abi.decode( data, (uint256, uint256, IERC20[], bytes[], bytes) ); // Should transfer the token to the contract this will claim the rewards for the current owner of the wrapper angleStaker().withdraw(toUnstake, address(this), address(this)); _remove(toRemove, data); // Taking the same example as in the `leverage` side, you can withdraw USDC, DAI and USDT while wanting to // to repay a debt in agEUR so you need to do a multiswap. // These swaps are not easy to anticipate the amounts received depend on the deleverage action which can be chaotic // Very often, it's better to swap a lower bound and then sweep the tokens, even though it's not the most efficient // thing to do _multiSwap1inch(oneInchPayloads); // After the swaps and/or the deleverage we can end up with useless tokens for repaying a debt and therefore let the // possibility to send it wherever _sweep(sweepTokens, to); } } /// @notice Allows to do an arbitrary number of swaps using 1inch API /// @param data Encoded info to execute the swaps from `_swapOn1inch` function _multiSwap1inch(bytes[] memory data) internal { uint256 dataLength = data.length; for (uint256 i; i < dataLength; ++i) { (address inToken, uint256 minAmount, bytes memory payload) = abi.decode(data[i], (address, uint256, bytes)); uint256 amountOut = _swapOn1inch(IERC20(inToken), payload); // We check the slippage in this case as `swap()` will only check it for the `outToken` if (amountOut < minAmount) revert TooSmallAmountOut(); } } /// @notice Sweeps tokens from the contract /// @param tokensOut Token to sweep /// @param to Address to which tokens should be sent function _sweep(IERC20[] memory tokensOut, address to) internal { uint256 tokensOutLength = tokensOut.length; for (uint256 i; i < tokensOutLength; ++i) { uint256 balanceToken = tokensOut[i].balanceOf(address(this)); if (balanceToken != 0) { tokensOut[i].safeTransfer(to, balanceToken); } } } // ========================= EXTERNAL VIRTUAL FUNCTIONS ======================== /// @notice Token used as collateral on the borrow module, which wraps the `true` collateral function angleStaker() public view virtual returns (IBorrowStaker); // ========================= INTERNAL VIRTUAL FUNCTIONS ======================== /// @notice Implements the bundle transaction to increase exposure to a token /// @param data Encoded data giving specific instruction to the bundle tx function _add(bytes memory data) internal virtual returns (uint256 amountOut); /// @notice Implements the bundle transaction to decrease exposure to a token /// @param toRemove Amount of tokens to remove /// @param data Encoded data giving specific instruction to the bundle tx function _remove(uint256 toRemove, bytes memory data) internal virtual; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.17; import "../BaseLevSwapper.sol"; import { IMetaPool3 } from "../../../interfaces/external/curve/IMetaPool3.sol"; import "../../../utils/Enums.sol"; /// @title CurveLevSwapper3Tokens /// @author Angle Labs, Inc. /// @dev Leverage swapper on Curve LP tokens /// @dev This implementation is for Curve pools with 3 tokens abstract contract CurveLevSwapper3Tokens is BaseLevSwapper { using SafeERC20 for IERC20; constructor( ICoreBorrow _core, IUniswapV3Router _uniV3Router, address _oneInch, IAngleRouterSidechain _angleRouter ) BaseLevSwapper(_core, _uniV3Router, _oneInch, _angleRouter) { if (address(metapool()) != address(0)) { tokens()[0].safeIncreaseAllowance(address(metapool()), type(uint256).max); tokens()[1].safeIncreaseAllowance(address(metapool()), type(uint256).max); tokens()[2].safeIncreaseAllowance(address(metapool()), type(uint256).max); } } // =============================== MAIN FUNCTIONS ============================== /// @inheritdoc BaseLevSwapper function _add(bytes memory) internal override returns (uint256 amountOut) { // Instead of doing sweeps at the end just use the full balance to add liquidity uint256 amountToken1 = tokens()[0].balanceOf(address(this)); uint256 amountToken2 = tokens()[1].balanceOf(address(this)); uint256 amountToken3 = tokens()[2].balanceOf(address(this)); // Slippage is checked at the very end of the `swap` function if (amountToken1 != 0 || amountToken2 != 0 || amountToken3 != 0) metapool().add_liquidity([amountToken1, amountToken2, amountToken3], 0); // Other solution is also to let the user specify how many tokens have been sent + get // the return value from `add_liquidity`: it's more gas efficient but adds more verbose amountOut = lpToken().balanceOf(address(this)); } /// @inheritdoc BaseLevSwapper function _remove(uint256 burnAmount, bytes memory data) internal override { CurveRemovalType removalType; (removalType, data) = abi.decode(data, (CurveRemovalType, bytes)); if (removalType == CurveRemovalType.oneCoin) { (int128 whichCoin, uint256 minAmountOut) = abi.decode(data, (int128, uint256)); metapool().remove_liquidity_one_coin(burnAmount, whichCoin, minAmountOut); } else if (removalType == CurveRemovalType.balance) { uint256[3] memory minAmountOuts = abi.decode(data, (uint256[3])); metapool().remove_liquidity(burnAmount, minAmountOuts); } else if (removalType == CurveRemovalType.imbalance) { (address to, uint256[3] memory amountOuts) = abi.decode(data, (address, uint256[3])); metapool().remove_liquidity_imbalance(amountOuts, burnAmount); uint256 keptAmount = lpToken().balanceOf(address(this)); // We may have withdrawn more than needed: maybe not optimal because a user may not want to have // lp tokens staked. Solution is to do a sweep on all tokens in the `BaseLevSwapper` contract if (keptAmount > 0) angleStaker().deposit(keptAmount, to); } } // ============================= VIRTUAL FUNCTIONS ============================= /// @notice Reference to the native `tokens` of the Curve pool function tokens() public pure virtual returns (IERC20[3] memory); /// @notice Reference to the Curve Pool contract function metapool() public pure virtual returns (IMetaPool3); /// @notice Reference to the actual collateral contract /// @dev Most of the time this is the same address as the `metapool` function lpToken() public pure virtual returns (IERC20); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.17; import "../../CurveLevSwapper3Tokens.sol"; /// @title CurveLevSwapper3CRV /// @author Angle Labs, Inc. /// @dev Implementation of `CurveLevSwapper3Tokens` for the 3CRV pool contract CurveLevSwapper3CRV is CurveLevSwapper3Tokens { constructor( ICoreBorrow _core, IUniswapV3Router _uniV3Router, address _oneInch, IAngleRouterSidechain _angleRouter ) CurveLevSwapper3Tokens(_core, _uniV3Router, _oneInch, _angleRouter) {} /// @inheritdoc BaseLevSwapper function angleStaker() public view virtual override returns (IBorrowStaker) { return IBorrowStaker(address(0)); } /// @inheritdoc CurveLevSwapper3Tokens function tokens() public pure override returns (IERC20[3] memory) { return [ IERC20(0x6B175474E89094C44Da98b954EedeAC495271d0F), IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48), IERC20(0xdAC17F958D2ee523a2206206994597C13D831ec7) ]; } /// @inheritdoc CurveLevSwapper3Tokens function metapool() public pure override returns (IMetaPool3) { return IMetaPool3(0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7); } /// @inheritdoc CurveLevSwapper3Tokens function lpToken() public pure override returns (IERC20) { return IERC20(0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490); } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.17; /// @notice All possible removals on Curve enum CurveRemovalType { oneCoin, balance, imbalance, none }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.12; /// @notice Action types enum ActionType { transfer, wrap, wrapNative, sweep, sweepNative, unwrap, unwrapNative, swapIn, swapOut, uniswapV3, oneInch, claimRewards, gaugeDeposit, borrower } /// @notice Data needed to get permits struct PermitType { address token; address owner; uint256 value; uint256 deadline; uint8 v; bytes32 r; bytes32 s; } /// @title IAngleRouterSidechain /// @author Angle Labs, Inc. /// @notice Interface for the `AngleRouter` contract on other chains interface IAngleRouterSidechain { function mixer( PermitType[] memory paramsPermit, ActionType[] memory actions, bytes[] calldata data ) external; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.12; /// @title ICoreBorrow /// @author Angle Labs, Inc. /// @notice Interface for the `CoreBorrow` contract /// @dev This interface only contains functions of the `CoreBorrow` contract which are called by other contracts /// of this module interface ICoreBorrow { /// @notice Checks if an address corresponds to a treasury of a stablecoin with a flash loan /// module initialized on it /// @param treasury Address to check /// @return Whether the address has the `FLASHLOANER_TREASURY_ROLE` or not function isFlashLoanerTreasury(address treasury) external view returns (bool); /// @notice Checks whether an address is governor of the Angle Protocol or not /// @param admin Address to check /// @return Whether the address has the `GOVERNOR_ROLE` or not function isGovernor(address admin) external view returns (bool); /// @notice Checks whether an address is governor or a guardian of the Angle Protocol or not /// @param admin Address to check /// @return Whether the address has the `GUARDIAN_ROLE` or not /// @dev Governance should make sure when adding a governor to also give this governor the guardian /// role by calling the `addGovernor` function function isGovernorOrGuardian(address admin) external view returns (bool); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.12; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /// @title ISwapper /// @author Angle Labs, Inc. /// @notice Interface for Swapper contracts /// @dev This interface defines the key functions `Swapper` contracts should have when interacting with /// Angle interface ISwapper { /// @notice Notifies a contract that an address should be given `outToken` from `inToken` /// @param inToken Address of the token received /// @param outToken Address of the token to obtain /// @param outTokenRecipient Address to which the outToken should be sent /// @param outTokenOwed Minimum amount of outToken the `outTokenRecipient` address should have at the end of the call /// @param inTokenObtained Amount of collateral obtained by a related address prior /// to the call to this function /// @param data Extra data needed (to encode Uniswap swaps for instance) function swap( IERC20 inToken, IERC20 outToken, address outTokenRecipient, uint256 outTokenOwed, uint256 inTokenObtained, bytes calldata data ) external; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.12; /// @title IWStETH /// @author Angle Labs, Inc. /// @notice Interface for the `WStETH` contract /// @dev This interface only contains functions of the `WStETH` which are called by other contracts /// of this module interface IWStETH { function wrap(uint256 _stETHAmount) external returns (uint256); function stETH() external view returns (address); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.12; struct ExactInputParams { bytes path; address recipient; uint256 deadline; uint256 amountIn; uint256 amountOutMinimum; } /// @title Router token swapping functionality /// @notice Functions for swapping tokens via Uniswap V3 interface IUniswapV3Router { /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata /// @return amountOut The amount of the received token function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut); } /// @title Router for price estimation functionality /// @notice Functions for getting the price of one token with respect to another using Uniswap V2 /// @dev This interface is only used for non critical elements of the protocol interface IUniswapV2Router { /// @notice Given an input asset amount, returns the maximum output amount of the /// other asset (accounting for fees) given reserves. /// @param path Addresses of the pools used to get prices function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts); function swapExactTokensForTokens( uint256 swapAmount, uint256 minExpected, address[] calldata path, address receiver, uint256 swapDeadline ) external; }
// SPDX-License-Identifier: GPL-3.0 /* * █ ***** ▓▓▓ * ▓▓▓▓▓▓▓ * ///. ▓▓▓▓▓▓▓▓▓▓▓▓▓ ***** //////// ▓▓▓▓▓▓▓ * ///////////// ▓▓▓ ▓▓ ////////////////// █ ▓▓ ▓▓ ▓▓ /////////////////////// ▓▓ ▓▓ ▓▓ ▓▓ //////////////////////////// ▓▓ ▓▓ ▓▓ ▓▓ /////////▓▓▓///////▓▓▓///////// ▓▓ ▓▓ ▓▓ ,////////////////////////////////////// ▓▓ ▓▓ ▓▓ ////////////////////////////////////////// ▓▓ ▓▓ //////////////////////▓▓▓▓///////////////////// ,//////////////////////////////////////////////////// .////////////////////////////////////////////////////////// .//////////////////////////██.,//////////////////////////█ .//////////////////////████..,./////////////////////██ ...////////////////███████.....,.////////////////███ ,.,////////////████████ ........,///////////████ .,.,//////█████████ ,.......///////████ ,..//████████ ........./████ ..,██████ .....,███ .██ ,.,█ ▓▓ ▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓ ▓▓▓ ▓▓▓ ▓▓▓ ▓▓ ▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓ ▓▓▓ ▓▓▓ ▓▓▓ ▓▓▓ ▓▓ ▓▓▓▓▓ ▓▓▓ ▓▓ ▓▓▓ ▓▓▓ ▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓ */ pragma solidity ^0.8.12; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../interfaces/IAngleRouterSidechain.sol"; import "../interfaces/ICoreBorrow.sol"; import "../interfaces/ISwapper.sol"; import "../interfaces/external/lido/IWStETH.sol"; import "../interfaces/external/uniswap/IUniswapRouter.sol"; // ==================================== ENUM =================================== /// @notice All possible swaps enum SwapType { UniswapV3, oneInch, AngleRouter, Leverage, None } /// @title Swapper /// @author Angle Labs, Inc. /// @notice Swapper contract facilitating interactions with Angle VaultManager contracts, notably /// liquidation and leverage transactions contract Swapper is ISwapper { using SafeERC20 for IERC20; // ===================== CONSTANTS AND IMMUTABLE VARIABLES ===================== /// @notice Reference to the `CoreBorrow` contract of the module which handles all AccessControl logic ICoreBorrow public immutable core; /// @notice Uniswap Router contract IUniswapV3Router public immutable uniV3Router; /// @notice 1inch Router address public immutable oneInch; /// @notice AngleRouter IAngleRouterSidechain public immutable angleRouter; // =================================== ERRORS ================================== error EmptyReturnMessage(); error IncompatibleLengths(); error NotGovernorOrGuardian(); error TooSmallAmountOut(); error ZeroAddress(); /// @notice Constructor of the contract /// @param _core Core address /// @param _uniV3Router UniswapV3 Router address /// @param _oneInch 1inch Router address /// @param _angleRouter AngleRouter contract address constructor( ICoreBorrow _core, IUniswapV3Router _uniV3Router, address _oneInch, IAngleRouterSidechain _angleRouter ) { if (address(_core) == address(0) || _oneInch == address(0) || address(_angleRouter) == address(0)) revert ZeroAddress(); core = _core; uniV3Router = _uniV3Router; oneInch = _oneInch; angleRouter = _angleRouter; } // ========================= EXTERNAL ACCESS FUNCTIONS ========================= /// @inheritdoc ISwapper /// @dev This function swaps the `inToken` to the `outToken` by doing a UniV3 swap, a 1inch swap or by interacting /// with the `AngleRouter` contract /// @dev One slippage check is performed at the end of the call /// @dev In this implementation, the function tries to make sure that the `outTokenRecipient` address has at the end /// of the call `outTokenOwed`, leftover tokens are sent to a `to` address which by default is the `outTokenRecipient` function swap( IERC20 inToken, IERC20 outToken, address outTokenRecipient, uint256 outTokenOwed, uint256 inTokenObtained, bytes memory data ) external { // Address to receive the surplus amount of token at the end of the call address to; // For slippage protection, it is checked at the end of the call uint256 minAmountOut; // Type of the swap to execute: if `swapType == 4`, then it is optional to swap uint256 swapType; // We're reusing the `data` variable (it can be `path` on UniswapV3, a payload for 1inch or like encoded actions // for a router call) (to, minAmountOut, swapType, data) = abi.decode(data, (address, uint256, uint256, bytes)); to = (to == address(0)) ? outTokenRecipient : to; _swap(inToken, inTokenObtained, SwapType(swapType), data); // A final slippage check is performed after the swaps uint256 outTokenBalance = outToken.balanceOf(address(this)); if (outTokenBalance < minAmountOut) revert TooSmallAmountOut(); // The `outTokenRecipient` may already have enough in balance, in which case there's no need to transfer // to this address the token and everything can be given to the `to` address uint256 outTokenBalanceRecipient = outToken.balanceOf(outTokenRecipient); if (outTokenBalanceRecipient >= outTokenOwed || to == outTokenRecipient) outToken.safeTransfer(to, outTokenBalance); else { // The `outTokenRecipient` should receive the delta to make sure its end balance is equal to `outTokenOwed` // Any leftover in this case is sent to the `to` address // The function reverts if it did not obtain more than `outTokenOwed - outTokenBalanceRecipient` from the swap outToken.safeTransfer(outTokenRecipient, outTokenOwed - outTokenBalanceRecipient); outToken.safeTransfer(to, outTokenBalanceRecipient + outTokenBalance - outTokenOwed); } // Reusing the `inTokenObtained` variable for the `inToken` balance // Sending back the remaining amount of inTokens to the `to` address: it is possible that not the full `inTokenObtained` // is swapped to `outToken` if we're using the `1inch` payload inTokenObtained = inToken.balanceOf(address(this)); if (inTokenObtained != 0) inToken.safeTransfer(to, inTokenObtained); } // ============================ GOVERNANCE FUNCTION ============================ /// @notice Changes allowances of this contract for different tokens /// @param tokens Addresses of the tokens to allow /// @param spenders Addresses to allow transfer /// @param amounts Amounts to allow function changeAllowance( IERC20[] calldata tokens, address[] calldata spenders, uint256[] calldata amounts ) external { if (!core.isGovernorOrGuardian(msg.sender)) revert NotGovernorOrGuardian(); uint256 tokensLength = tokens.length; if (tokensLength != spenders.length || tokensLength != amounts.length) revert IncompatibleLengths(); for (uint256 i; i < tokensLength; ++i) { _changeAllowance(tokens[i], spenders[i], amounts[i]); } } // ========================= INTERNAL UTILITY FUNCTIONS ======================== /// @notice Internal version of the `_changeAllowance` function function _changeAllowance( IERC20 token, address spender, uint256 amount ) internal { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < amount) { token.safeIncreaseAllowance(spender, amount - currentAllowance); } else if (currentAllowance > amount) { token.safeDecreaseAllowance(spender, currentAllowance - amount); } } /// @notice Checks the allowance for a contract and updates it to the max if it is not big enough /// @param token Token for which allowance should be checked /// @param spender Address to grant allowance to /// @param amount Minimum amount of tokens needed for the allowance function _checkAllowance( IERC20 token, address spender, uint256 amount ) internal { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < amount) token.safeIncreaseAllowance(spender, type(uint256).max - currentAllowance); } /// @notice Performs a swap using either Uniswap, 1inch. This function can also stake stETH to wstETH /// @param inToken Token to swap /// @param amount Amount of tokens to swap /// @param swapType Type of the swap to perform /// @param args Extra args for the swap: in the case of Uniswap it should be a path, for 1inch it should be /// a payload /// @dev This function does nothing if `swapType` is None and it simply passes on the `amount` it received /// @dev No slippage is specified in the actions given here as a final slippage check is performed /// after the call to this function function _swap( IERC20 inToken, uint256 amount, SwapType swapType, bytes memory args ) internal { if (swapType == SwapType.UniswapV3) _swapOnUniswapV3(inToken, amount, args); else if (swapType == SwapType.oneInch) _swapOn1inch(inToken, args); else if (swapType == SwapType.AngleRouter) _angleRouterActions(inToken, args); else if (swapType == SwapType.Leverage) _swapLeverage(args); } /// @notice Performs a UniswapV3 swap /// @param inToken Token to swap /// @param amount Amount of tokens to swap /// @param path Path for the UniswapV3 swap: this encodes the out token that is going to be obtained /// @dev This function does not check the out token obtained here: if it is wrongly specified, either /// the `swap` function could fail or these tokens could stay on the contract function _swapOnUniswapV3( IERC20 inToken, uint256 amount, bytes memory path ) internal returns (uint256 amountOut) { // We need more than `amount` of allowance to the contract _checkAllowance(inToken, address(uniV3Router), amount); amountOut = uniV3Router.exactInput(ExactInputParams(path, address(this), block.timestamp, amount, 0)); } /// @notice Allows to swap any token to an accepted collateral via 1inch API /// @param inToken Token received for the 1inch swap /// @param payload Bytes needed for 1inch API function _swapOn1inch(IERC20 inToken, bytes memory payload) internal returns (uint256 amountOut) { _changeAllowance(inToken, oneInch, type(uint256).max); //solhint-disable-next-line (bool success, bytes memory result) = oneInch.call(payload); if (!success) _revertBytes(result); amountOut = abi.decode(result, (uint256)); } /// @notice Performs actions with the router contract of the protocol on the corresponding chain /// @param inToken Token concerned by the action and for which function _angleRouterActions(IERC20 inToken, bytes memory args) internal { (ActionType[] memory actions, bytes[] memory actionData) = abi.decode(args, (ActionType[], bytes[])); _changeAllowance(inToken, address(angleRouter), type(uint256).max); PermitType[] memory permits; angleRouter.mixer(permits, actions, actionData); } /// @notice Allows to take leverage or deleverage via a specific contract /// @param payload Bytes needed for 1inch API /// @dev This function is to be implemented if the swapper concerns a token that requires some actions /// not supported by 1inch or UniV3 function _swapLeverage(bytes memory payload) internal virtual returns (uint256 amountOut) {} /// @notice Internal function used for error handling /// @param errMsg Error message received function _revertBytes(bytes memory errMsg) internal pure { if (errMsg.length != 0) { //solhint-disable-next-line assembly { revert(add(32, errMsg), mload(errMsg)) } } revert EmptyReturnMessage(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
{ "remappings": [ "@chainlink/=node_modules/@chainlink/", "@ensdomains/=lib/borrow-contracts/node_modules/@ensdomains/", "@openzeppelin/=node_modules/@openzeppelin/", "@uniswap/=lib/borrow-contracts/node_modules/@uniswap/", "borrow-contracts/=lib/borrow-contracts/", "borrow/=lib/borrow-contracts/contracts/", "ds-test/=lib/forge-std/lib/ds-test/src/", "eth-gas-reporter/=node_modules/eth-gas-reporter/", "forge-std/=lib/forge-std/src/", "hardhat-deploy/=node_modules/hardhat-deploy/", "hardhat/=node_modules/hardhat/" ], "optimizer": { "enabled": true, "runs": 1000000 }, "metadata": { "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract ICoreBorrow","name":"_core","type":"address"},{"internalType":"contract IUniswapV3Router","name":"_uniV3Router","type":"address"},{"internalType":"address","name":"_oneInch","type":"address"},{"internalType":"contract IAngleRouterSidechain","name":"_angleRouter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"EmptyReturnMessage","type":"error"},{"inputs":[],"name":"IncompatibleLengths","type":"error"},{"inputs":[],"name":"NotGovernorOrGuardian","type":"error"},{"inputs":[],"name":"TooSmallAmountOut","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"inputs":[],"name":"angleRouter","outputs":[{"internalType":"contract IAngleRouterSidechain","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"angleStaker","outputs":[{"internalType":"contract IBorrowStaker","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"contract IERC20[]","name":"tokens","type":"address[]"},{"internalType":"address[]","name":"spenders","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"changeAllowance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"core","outputs":[{"internalType":"contract ICoreBorrow","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"metapool","outputs":[{"internalType":"contract IMetaPool3","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"oneInch","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"inToken","type":"address"},{"internalType":"contract IERC20","name":"outToken","type":"address"},{"internalType":"address","name":"outTokenRecipient","type":"address"},{"internalType":"uint256","name":"outTokenOwed","type":"uint256"},{"internalType":"uint256","name":"inTokenObtained","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokens","outputs":[{"internalType":"contract IERC20[3]","name":"","type":"address[3]"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"uniV3Router","outputs":[{"internalType":"contract IUniswapV3Router","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6101006040523480156200001257600080fd5b506040516200332738038062003327833981016040819052620000359162000652565b838383838383838383838383838383836001600160a01b03841615806200006357506001600160a01b038216155b806200007657506001600160a01b038116155b15620000955760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b0393841660805291831660a052821660c0521660e0526200016773bff202e3cb58ab0a09b2eb1d9a50352b9aaf196c60001973bff202e3cb58ab0a09b2eb1d9a50352b9aaf196c6001600160a01b03166338d52e0f6040518163ffffffff1660e01b81526004016020604051808303816000875af115801562000123573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001499190620006ba565b6001600160a01b03166200025460201b6200076c179092919060201c565b50600092506200018b91505073bebc44782c7db0a1a60cb6fe97d0b483032ff1c790565b6001600160a01b0316146200024257620001e673bebc44782c7db0a1a60cb6fe97d0b483032ff1c7600019620001c06200033a565b60005b60200201516001600160a01b03166200025460201b6200076c179092919060201c565b6200021473bebc44782c7db0a1a60cb6fe97d0b483032ff1c76000196200020c6200033a565b6001620001c3565b6200024273bebc44782c7db0a1a60cb6fe97d0b483032ff1c76000196200023a6200033a565b6002620001c3565b505050505050505050505050620007b9565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015620002a6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002cc9190620006da565b620002d89190620006f4565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b1790915291925062000334918691906200039f16565b50505050565b620003446200061b565b5060408051606081018252736b175474e89094c44da98b954eedeac495271d0f815273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48602082015273dac17f958d2ee523a2206206994597c13d831ec79181019190915290565b6000620003fb826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166200048660201b620008ee179092919060201c565b8051909150156200048157808060200190518101906200041c91906200071c565b620004815760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084015b60405180910390fd5b505050565b6060620004978484600085620004a1565b90505b9392505050565b606082471015620005045760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840162000478565b6001600160a01b0385163b6200055d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000478565b600080866001600160a01b031685876040516200057b919062000766565b60006040518083038185875af1925050503d8060008114620005ba576040519150601f19603f3d011682016040523d82523d6000602084013e620005bf565b606091505b509092509050620005d2828286620005dd565b979650505050505050565b60608315620005ee5750816200049a565b825115620005ff5782518084602001fd5b8160405162461bcd60e51b815260040162000478919062000784565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200064f57600080fd5b50565b600080600080608085870312156200066957600080fd5b8451620006768162000639565b6020860151909450620006898162000639565b60408601519093506200069c8162000639565b6060860151909250620006af8162000639565b939692955090935050565b600060208284031215620006cd57600080fd5b81516200049a8162000639565b600060208284031215620006ed57600080fd5b5051919050565b808201808211156200071657634e487b7160e01b600052601160045260246000fd5b92915050565b6000602082840312156200072f57600080fd5b815180151581146200049a57600080fd5b60005b838110156200075d57818101518382015260200162000743565b50506000910152565b600082516200077a81846020870162000740565b9190910192915050565b6020815260008251806020840152620007a581604085016020870162000740565b601f01601f19169190910160400192915050565b60805160a05160c05160e051612b04620008236000396000818161011901528181610fd9015261105e01526000818160c801528181610eb90152610f0301526000818161014001528181610db30152610e3a0152600081816101f201526105db0152612b046000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c8063990d60d211610076578063a5d4096b1161005b578063a5d4096b146101c5578063b82c4dc1146101da578063f2f4eb26146101ed57600080fd5b8063990d60d2146101965780639d63848a146101b057600080fd5b80635fafa589116100a75780635fafa5891461013b5780635fcbd285146101625780638a971d911461017c57600080fd5b8063045c08d5146100c35780630b6942c214610114575b600080fd5b6100ea7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100ea7f000000000000000000000000000000000000000000000000000000000000000081565b6100ea7f000000000000000000000000000000000000000000000000000000000000000081565b736c3f90f043a72fa612cbac8115ee7e52bde6e4906100ea565b73bff202e3cb58ab0a09b2eb1d9a50352b9aaf196c6100ea565b73bebc44782c7db0a1a60cb6fe97d0b483032ff1c76100ea565b6101b8610214565b60405161010b9190611e53565b6101d86101d3366004611f83565b610277565b005b6101d86101e8366004612099565b6105ad565b6100ea7f000000000000000000000000000000000000000000000000000000000000000081565b61021c611e35565b5060408051606081018252736b175474e89094c44da98b954eedeac495271d0f815273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48602082015273dac17f958d2ee523a2206206994597c13d831ec79181019190915290565b60008060008380602001905181019061029091906121a4565b96509194509250905073ffffffffffffffffffffffffffffffffffffffff8316156102bb57826102bd565b865b92506102dc89868360048111156102d6576102d6612209565b87610907565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8a16906370a0823190602401602060405180830381865afa158015610349573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036d9190612238565b9050828110156103a9576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8981166004830152600091908b16906370a0823190602401602060405180830381865afa158015610419573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043d9190612238565b9050878110158061047957508873ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b156104a45761049f73ffffffffffffffffffffffffffffffffffffffff8b1686846109a5565b6104e9565b6104d0896104b2838b612280565b73ffffffffffffffffffffffffffffffffffffffff8d1691906109a5565b6104e985896104df8585612299565b6104b29190612280565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8c16906370a0823190602401602060405180830381865afa158015610553573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105779190612238565b965086156105a0576105a073ffffffffffffffffffffffffffffffffffffffff8c1686896109a5565b5050505050505050505050565b6040517f521d4de90000000000000000000000000000000000000000000000000000000081523360048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063521d4de990602401602060405180830381865afa158015610637573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065b91906122c1565b610691576040517f99e120bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8483811415806106a15750808214155b156106d8576040517f46282e8d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b81811015610762576107528888838181106106f8576106f86122dc565b905060200201602081019061070d919061230b565b87878481811061071f5761071f6122dc565b9050602002016020810190610734919061230b565b868685818110610746576107466122dc565b90506020020135610a00565b61075b81612328565b90506106db565b5050505050505050565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa1580156107e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108079190612238565b6108119190612299565b60405173ffffffffffffffffffffffffffffffffffffffff85166024820152604481018290529091506108e89085907f095ea7b300000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610b04565b50505050565b60606108fd8484600085610c15565b90505b9392505050565b600082600481111561091b5761091b612209565b036109315761092b848483610dab565b506108e8565b600182600481111561094557610945612209565b036109545761092b8482610eb1565b600282600481111561096857610968612209565b0361097c576109778482610fb8565b6108e8565b600382600481111561099057610990612209565b036108e85761099e816110d0565b5050505050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526109fb9084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401610866565b505050565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff83811660248301526000919085169063dd62ed3e90604401602060405180830381865afa158015610a76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9a9190612238565b905081811015610ad05761097783610ab28385612280565b73ffffffffffffffffffffffffffffffffffffffff8716919061076c565b818111156108e8576108e883610ae68484612280565b73ffffffffffffffffffffffffffffffffffffffff871691906112b9565b6000610b66826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166108ee9092919063ffffffff16565b8051909150156109fb5780806020019051810190610b8491906122c1565b6109fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b606082471015610ca7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610c0c565b73ffffffffffffffffffffffffffffffffffffffff85163b610d25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c0c565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610d4e9190612360565b60006040518083038185875af1925050503d8060008114610d8b576040519150601f19603f3d011682016040523d82523d6000602084013e610d90565b606091505b5091509150610da082828661143f565b979650505050505050565b6000610dd8847f000000000000000000000000000000000000000000000000000000000000000085611492565b6040805160a0810182528381523060208201524281830152606081018590526000608082015290517fc04b8d5900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169163c04b8d5991610e6e91906004016123c6565b6020604051808303816000875af1158015610e8d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108fd9190612238565b6000610efe837f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610a00565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1684604051610f469190612360565b6000604051808303816000865af19150503d8060008114610f83576040519150601f19603f3d011682016040523d82523d6000602084013e610f88565b606091505b509150915081610f9b57610f9b81611564565b80806020019051810190610faf9190612238565b95945050505050565b60008082806020019051810190610fcf91906124db565b9150915061101e847f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610a00565b6040517f848c48da00000000000000000000000000000000000000000000000000000000815260609073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063848c48da9061109790849087908790600401612669565b600060405180830381600087803b1580156110b157600080fd5b505af11580156110c5573d6000803e3d6000fd5b505050505050505050565b60008060006060848060200190518101906110eb919061272e565b9650909350915082156111c8578480602001905181019061110c919061278f565b95509050611119816115a5565b61112285611647565b935073bff202e3cb58ab0a09b2eb1d9a50352b9aaf196c6040517f6e553f650000000000000000000000000000000000000000000000000000000081526004810186905273ffffffffffffffffffffffffffffffffffffffff84811660248301529190911690636e553f6590604401600060405180830381600087803b1580156111ab57600080fd5b505af11580156111bf573d6000803e3d6000fd5b505050506112b1565b6000806060878060200190518101906111e191906127e9565b9b5096509194509250905073bff202e3cb58ab0a09b2eb1d9a50352b9aaf196c6040517fb460af94000000000000000000000000000000000000000000000000000000008152600481018590523060248201819052604482015273ffffffffffffffffffffffffffffffffffffffff919091169063b460af9490606401600060405180830381600087803b15801561127857600080fd5b505af115801561128c573d6000803e3d6000fd5b5050505061129a8289611984565b6112a3846115a5565b6112ad8186611d1d565b5050505b505050919050565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff83811660248301526000919085169063dd62ed3e90604401602060405180830381865afa15801561132f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113539190612238565b9050818110156113e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f5361666545524332303a2064656372656173656420616c6c6f77616e6365206260448201527f656c6f77207a65726f00000000000000000000000000000000000000000000006064820152608401610c0c565b60405173ffffffffffffffffffffffffffffffffffffffff84166024820152828203604482018190529061099e9086907f095ea7b30000000000000000000000000000000000000000000000000000000090606401610866565b6060831561144e575081610900565b82511561145e5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0c91906128e6565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff83811660248301526000919085169063dd62ed3e90604401602060405180830381865afa158015611508573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061152c9190612238565b9050818110156108e8576108e883610ab2837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff612280565b80511561157357805181602001fd5b6040517f6a8df6a800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805160005b818110156109fb5760008060008584815181106115c9576115c96122dc565b60200260200101518060200190518101906115e491906128f9565b92509250925060006115f68483610eb1565b905082811015611632576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050508061164090612328565b90506115aa565b600080611652610214565b516040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190602401602060405180830381865afa1580156116be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e29190612238565b905060006116ee610214565b602001516040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190602401602060405180830381865afa15801561175d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117819190612238565b9050600061178d610214565b600260200201516040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190602401602060405180830381865afa1580156117ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118239190612238565b90508215158061183257508115155b8061183c57508015155b156118df57604080516060810182528481526020810184905280820183905290517f4515cef300000000000000000000000000000000000000000000000000000000815273bebc44782c7db0a1a60cb6fe97d0b483032ff1c791634515cef3916118ac9190600090600401612960565b600060405180830381600087803b1580156118c657600080fd5b505af11580156118da573d6000803e3d6000fd5b505050505b736c3f90f043a72fa612cbac8115ee7e52bde6e4906040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91909116906370a0823190602401602060405180830381865afa158015611960573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610faf9190612238565b60008180602001905181019061199a919061297b565b9250905060008160038111156119b2576119b2612209565b03611a5357600080838060200190518101906119ce91906129c6565b915091506119ed73bebc44782c7db0a1a60cb6fe97d0b483032ff1c790565b6040517f1a4d01d200000000000000000000000000000000000000000000000000000000815260048101879052600f84900b60248201526044810183905273ffffffffffffffffffffffffffffffffffffffff9190911690631a4d01d290606401611097565b6001816003811115611a6757611a67612209565b03611b0557600082806020019051810190611a829190612a68565b6040517fecb586a500000000000000000000000000000000000000000000000000000000815290915073bebc44782c7db0a1a60cb6fe97d0b483032ff1c79063ecb586a590611ad79087908590600401612a84565b600060405180830381600087803b158015611af157600080fd5b505af1158015610762573d6000803e3d6000fd5b6002816003811115611b1957611b19612209565b036109fb5760008083806020019051810190611b359190612a98565b91509150611b5473bebc44782c7db0a1a60cb6fe97d0b483032ff1c790565b73ffffffffffffffffffffffffffffffffffffffff16639fdaea0c82876040518363ffffffff1660e01b8152600401611b8e929190612960565b600060405180830381600087803b158015611ba857600080fd5b505af1158015611bbc573d6000803e3d6000fd5b505050506000611bdd736c3f90f043a72fa612cbac8115ee7e52bde6e49090565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91909116906370a0823190602401602060405180830381865afa158015611c49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6d9190612238565b90508015611d155773bff202e3cb58ab0a09b2eb1d9a50352b9aaf196c6040517f6e553f650000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff85811660248301529190911690636e553f6590604401600060405180830381600087803b158015611cfc57600080fd5b505af1158015611d10573d6000803e3d6000fd5b505050505b505050505050565b815160005b818110156108e8576000848281518110611d3e57611d3e6122dc565b60209081029190910101516040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190602401602060405180830381865afa158015611db4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dd89190612238565b90508015611e2457611e248482878581518110611df757611df76122dc565b602002602001015173ffffffffffffffffffffffffffffffffffffffff166109a59092919063ffffffff16565b50611e2e81612328565b9050611d22565b60405180606001604052806003906020820280368337509192915050565b60608101818360005b6003811015611e9157815173ffffffffffffffffffffffffffffffffffffffff16835260209283019290910190600101611e5c565b50505092915050565b73ffffffffffffffffffffffffffffffffffffffff81168114611ebc57600080fd5b50565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611f3557611f35611ebf565b604052919050565b600067ffffffffffffffff821115611f5757611f57611ebf565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60008060008060008060c08789031215611f9c57600080fd5b8635611fa781611e9a565b95506020870135611fb781611e9a565b94506040870135611fc781611e9a565b9350606087013592506080870135915060a087013567ffffffffffffffff811115611ff157600080fd5b8701601f8101891361200257600080fd5b803561201561201082611f3d565b611eee565b8181528a602083850101111561202a57600080fd5b816020840160208301376000602083830101528093505050509295509295509295565b60008083601f84011261205f57600080fd5b50813567ffffffffffffffff81111561207757600080fd5b6020830191508360208260051b850101111561209257600080fd5b9250929050565b600080600080600080606087890312156120b257600080fd5b863567ffffffffffffffff808211156120ca57600080fd5b6120d68a838b0161204d565b909850965060208901359150808211156120ef57600080fd5b6120fb8a838b0161204d565b9096509450604089013591508082111561211457600080fd5b5061212189828a0161204d565b979a9699509497509295939492505050565b60005b8381101561214e578181015183820152602001612136565b50506000910152565b600082601f83011261216857600080fd5b815161217661201082611f3d565b81815284602083860101111561218b57600080fd5b61219c826020830160208701612133565b949350505050565b600080600080608085870312156121ba57600080fd5b84516121c581611e9a565b809450506020850151925060408501519150606085015167ffffffffffffffff8111156121f157600080fd5b6121fd87828801612157565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60006020828403121561224a57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561229357612293612251565b92915050565b8082018082111561229357612293612251565b805180151581146122bc57600080fd5b919050565b6000602082840312156122d357600080fd5b610900826122ac565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561231d57600080fd5b813561090081611e9a565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361235957612359612251565b5060010190565b60008251612372818460208701612133565b9190910192915050565b60008151808452612394816020860160208601612133565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000825160a060208401526123e260c084018261237c565b905073ffffffffffffffffffffffffffffffffffffffff60208501511660408401526040840151606084015260608401516080840152608084015160a08401528091505092915050565b600067ffffffffffffffff82111561244657612446611ebf565b5060051b60200190565b600082601f83011261246157600080fd5b815160206124716120108361242c565b82815260059290921b8401810191818101908684111561249057600080fd5b8286015b848110156124d057805167ffffffffffffffff8111156124b45760008081fd5b6124c28986838b0101612157565b845250918301918301612494565b509695505050505050565b600080604083850312156124ee57600080fd5b825167ffffffffffffffff8082111561250657600080fd5b818501915085601f83011261251a57600080fd5b8151602061252a6120108361242c565b82815260059290921b8401810191818101908984111561254957600080fd5b948201945b83861015612575578551600e81106125665760008081fd5b8252948201949082019061254e565b9188015191965090935050508082111561258e57600080fd5b5061259b85828601612450565b9150509250929050565b60008151808452602080850194508084016000805b8481101561260b578251600e81106125f9577f4e487b710000000000000000000000000000000000000000000000000000000083526021600452602483fd5b885296830196918301916001016125ba565b50959695505050505050565b6000815180845260208085019450848260051b860182860160005b8581101561265c57838303895261264a83835161237c565b98850198925090840190600101612632565b5090979650505050505050565b6060808252845182820181905260009190608090818501906020808a01865b838110156126fa578151805173ffffffffffffffffffffffffffffffffffffffff90811687528482015116848701526040808201519087015287810151888701528681015160ff168787015260a0808201519087015260c0908101519086015260e09094019390820190600101612688565b5050868303908701525061270e81886125a5565b9250505082810360408401526127248185612617565b9695505050505050565b60008060006060848603121561274357600080fd5b61274c846122ac565b9250602084015161275c81611e9a565b604085015190925067ffffffffffffffff81111561277957600080fd5b61278586828701612157565b9150509250925092565b600080604083850312156127a257600080fd5b825167ffffffffffffffff808211156127ba57600080fd5b6127c686838701612450565b935060208501519150808211156127dc57600080fd5b5061259b85828601612157565b600080600080600060a0868803121561280157600080fd5b855194506020808701519450604087015167ffffffffffffffff8082111561282857600080fd5b818901915089601f83011261283c57600080fd5b815161284a6120108261242c565b81815260059190911b8301840190848101908c83111561286957600080fd5b938501935b8285101561289057845161288181611e9a565b8252938501939085019061286e565b60608c015190985094505050808311156128a957600080fd5b6128b58a848b01612450565b945060808901519250808311156128cb57600080fd5b50506128d988828901612157565b9150509295509295909350565b602081526000610900602083018461237c565b60008060006060848603121561290e57600080fd5b835161291981611e9a565b60208501516040860151919450925067ffffffffffffffff81111561277957600080fd5b8060005b60038110156108e8578151845260209384019390910190600101612941565b6080810161296e828561293d565b8260608301529392505050565b6000806040838503121561298e57600080fd5b82516004811061299d57600080fd5b602084015190925067ffffffffffffffff8111156129ba57600080fd5b61259b85828601612157565b600080604083850312156129d957600080fd5b825180600f0b81146129ea57600080fd5b6020939093015192949293505050565b600082601f830112612a0b57600080fd5b6040516060810181811067ffffffffffffffff82111715612a2e57612a2e611ebf565b604052806060840185811115612a4357600080fd5b845b81811015612a5d578051835260209283019201612a45565b509195945050505050565b600060608284031215612a7a57600080fd5b61090083836129fa565b82815260808101610900602083018461293d565b60008060808385031215612aab57600080fd5b8251612ab681611e9a565b9150612ac584602085016129fa565b9050925092905056fea2646970667358221220fa802e721303a34fe6b9d7228f42989e9d2571b2baccdae3c504ccbcc761f7fd64736f6c634300081100330000000000000000000000005bc6bef80da563ebf6df6d6913513fa9a7ec89be000000000000000000000000e592427a0aece92de3edee1f18e0157c058615640000000000000000000000001111111254eeb25477b68fb85ed929f73a9605820000000000000000000000004579709627ca36bce92f51ac975746f431890930
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100be5760003560e01c8063990d60d211610076578063a5d4096b1161005b578063a5d4096b146101c5578063b82c4dc1146101da578063f2f4eb26146101ed57600080fd5b8063990d60d2146101965780639d63848a146101b057600080fd5b80635fafa589116100a75780635fafa5891461013b5780635fcbd285146101625780638a971d911461017c57600080fd5b8063045c08d5146100c35780630b6942c214610114575b600080fd5b6100ea7f0000000000000000000000001111111254eeb25477b68fb85ed929f73a96058281565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100ea7f0000000000000000000000004579709627ca36bce92f51ac975746f43189093081565b6100ea7f000000000000000000000000e592427a0aece92de3edee1f18e0157c0586156481565b736c3f90f043a72fa612cbac8115ee7e52bde6e4906100ea565b73bff202e3cb58ab0a09b2eb1d9a50352b9aaf196c6100ea565b73bebc44782c7db0a1a60cb6fe97d0b483032ff1c76100ea565b6101b8610214565b60405161010b9190611e53565b6101d86101d3366004611f83565b610277565b005b6101d86101e8366004612099565b6105ad565b6100ea7f0000000000000000000000005bc6bef80da563ebf6df6d6913513fa9a7ec89be81565b61021c611e35565b5060408051606081018252736b175474e89094c44da98b954eedeac495271d0f815273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48602082015273dac17f958d2ee523a2206206994597c13d831ec79181019190915290565b60008060008380602001905181019061029091906121a4565b96509194509250905073ffffffffffffffffffffffffffffffffffffffff8316156102bb57826102bd565b865b92506102dc89868360048111156102d6576102d6612209565b87610907565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8a16906370a0823190602401602060405180830381865afa158015610349573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036d9190612238565b9050828110156103a9576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8981166004830152600091908b16906370a0823190602401602060405180830381865afa158015610419573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043d9190612238565b9050878110158061047957508873ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b156104a45761049f73ffffffffffffffffffffffffffffffffffffffff8b1686846109a5565b6104e9565b6104d0896104b2838b612280565b73ffffffffffffffffffffffffffffffffffffffff8d1691906109a5565b6104e985896104df8585612299565b6104b29190612280565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8c16906370a0823190602401602060405180830381865afa158015610553573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105779190612238565b965086156105a0576105a073ffffffffffffffffffffffffffffffffffffffff8c1686896109a5565b5050505050505050505050565b6040517f521d4de90000000000000000000000000000000000000000000000000000000081523360048201527f0000000000000000000000005bc6bef80da563ebf6df6d6913513fa9a7ec89be73ffffffffffffffffffffffffffffffffffffffff169063521d4de990602401602060405180830381865afa158015610637573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065b91906122c1565b610691576040517f99e120bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8483811415806106a15750808214155b156106d8576040517f46282e8d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b81811015610762576107528888838181106106f8576106f86122dc565b905060200201602081019061070d919061230b565b87878481811061071f5761071f6122dc565b9050602002016020810190610734919061230b565b868685818110610746576107466122dc565b90506020020135610a00565b61075b81612328565b90506106db565b5050505050505050565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa1580156107e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108079190612238565b6108119190612299565b60405173ffffffffffffffffffffffffffffffffffffffff85166024820152604481018290529091506108e89085907f095ea7b300000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610b04565b50505050565b60606108fd8484600085610c15565b90505b9392505050565b600082600481111561091b5761091b612209565b036109315761092b848483610dab565b506108e8565b600182600481111561094557610945612209565b036109545761092b8482610eb1565b600282600481111561096857610968612209565b0361097c576109778482610fb8565b6108e8565b600382600481111561099057610990612209565b036108e85761099e816110d0565b5050505050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526109fb9084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401610866565b505050565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff83811660248301526000919085169063dd62ed3e90604401602060405180830381865afa158015610a76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9a9190612238565b905081811015610ad05761097783610ab28385612280565b73ffffffffffffffffffffffffffffffffffffffff8716919061076c565b818111156108e8576108e883610ae68484612280565b73ffffffffffffffffffffffffffffffffffffffff871691906112b9565b6000610b66826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166108ee9092919063ffffffff16565b8051909150156109fb5780806020019051810190610b8491906122c1565b6109fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b606082471015610ca7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610c0c565b73ffffffffffffffffffffffffffffffffffffffff85163b610d25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c0c565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610d4e9190612360565b60006040518083038185875af1925050503d8060008114610d8b576040519150601f19603f3d011682016040523d82523d6000602084013e610d90565b606091505b5091509150610da082828661143f565b979650505050505050565b6000610dd8847f000000000000000000000000e592427a0aece92de3edee1f18e0157c0586156485611492565b6040805160a0810182528381523060208201524281830152606081018590526000608082015290517fc04b8d5900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564169163c04b8d5991610e6e91906004016123c6565b6020604051808303816000875af1158015610e8d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108fd9190612238565b6000610efe837f0000000000000000000000001111111254eeb25477b68fb85ed929f73a9605827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610a00565b6000807f0000000000000000000000001111111254eeb25477b68fb85ed929f73a96058273ffffffffffffffffffffffffffffffffffffffff1684604051610f469190612360565b6000604051808303816000865af19150503d8060008114610f83576040519150601f19603f3d011682016040523d82523d6000602084013e610f88565b606091505b509150915081610f9b57610f9b81611564565b80806020019051810190610faf9190612238565b95945050505050565b60008082806020019051810190610fcf91906124db565b9150915061101e847f0000000000000000000000004579709627ca36bce92f51ac975746f4318909307fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610a00565b6040517f848c48da00000000000000000000000000000000000000000000000000000000815260609073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004579709627ca36bce92f51ac975746f431890930169063848c48da9061109790849087908790600401612669565b600060405180830381600087803b1580156110b157600080fd5b505af11580156110c5573d6000803e3d6000fd5b505050505050505050565b60008060006060848060200190518101906110eb919061272e565b9650909350915082156111c8578480602001905181019061110c919061278f565b95509050611119816115a5565b61112285611647565b935073bff202e3cb58ab0a09b2eb1d9a50352b9aaf196c6040517f6e553f650000000000000000000000000000000000000000000000000000000081526004810186905273ffffffffffffffffffffffffffffffffffffffff84811660248301529190911690636e553f6590604401600060405180830381600087803b1580156111ab57600080fd5b505af11580156111bf573d6000803e3d6000fd5b505050506112b1565b6000806060878060200190518101906111e191906127e9565b9b5096509194509250905073bff202e3cb58ab0a09b2eb1d9a50352b9aaf196c6040517fb460af94000000000000000000000000000000000000000000000000000000008152600481018590523060248201819052604482015273ffffffffffffffffffffffffffffffffffffffff919091169063b460af9490606401600060405180830381600087803b15801561127857600080fd5b505af115801561128c573d6000803e3d6000fd5b5050505061129a8289611984565b6112a3846115a5565b6112ad8186611d1d565b5050505b505050919050565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff83811660248301526000919085169063dd62ed3e90604401602060405180830381865afa15801561132f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113539190612238565b9050818110156113e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f5361666545524332303a2064656372656173656420616c6c6f77616e6365206260448201527f656c6f77207a65726f00000000000000000000000000000000000000000000006064820152608401610c0c565b60405173ffffffffffffffffffffffffffffffffffffffff84166024820152828203604482018190529061099e9086907f095ea7b30000000000000000000000000000000000000000000000000000000090606401610866565b6060831561144e575081610900565b82511561145e5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0c91906128e6565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff83811660248301526000919085169063dd62ed3e90604401602060405180830381865afa158015611508573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061152c9190612238565b9050818110156108e8576108e883610ab2837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff612280565b80511561157357805181602001fd5b6040517f6a8df6a800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805160005b818110156109fb5760008060008584815181106115c9576115c96122dc565b60200260200101518060200190518101906115e491906128f9565b92509250925060006115f68483610eb1565b905082811015611632576040517fa1aabbe100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050508061164090612328565b90506115aa565b600080611652610214565b516040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190602401602060405180830381865afa1580156116be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e29190612238565b905060006116ee610214565b602001516040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190602401602060405180830381865afa15801561175d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117819190612238565b9050600061178d610214565b600260200201516040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190602401602060405180830381865afa1580156117ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118239190612238565b90508215158061183257508115155b8061183c57508015155b156118df57604080516060810182528481526020810184905280820183905290517f4515cef300000000000000000000000000000000000000000000000000000000815273bebc44782c7db0a1a60cb6fe97d0b483032ff1c791634515cef3916118ac9190600090600401612960565b600060405180830381600087803b1580156118c657600080fd5b505af11580156118da573d6000803e3d6000fd5b505050505b736c3f90f043a72fa612cbac8115ee7e52bde6e4906040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91909116906370a0823190602401602060405180830381865afa158015611960573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610faf9190612238565b60008180602001905181019061199a919061297b565b9250905060008160038111156119b2576119b2612209565b03611a5357600080838060200190518101906119ce91906129c6565b915091506119ed73bebc44782c7db0a1a60cb6fe97d0b483032ff1c790565b6040517f1a4d01d200000000000000000000000000000000000000000000000000000000815260048101879052600f84900b60248201526044810183905273ffffffffffffffffffffffffffffffffffffffff9190911690631a4d01d290606401611097565b6001816003811115611a6757611a67612209565b03611b0557600082806020019051810190611a829190612a68565b6040517fecb586a500000000000000000000000000000000000000000000000000000000815290915073bebc44782c7db0a1a60cb6fe97d0b483032ff1c79063ecb586a590611ad79087908590600401612a84565b600060405180830381600087803b158015611af157600080fd5b505af1158015610762573d6000803e3d6000fd5b6002816003811115611b1957611b19612209565b036109fb5760008083806020019051810190611b359190612a98565b91509150611b5473bebc44782c7db0a1a60cb6fe97d0b483032ff1c790565b73ffffffffffffffffffffffffffffffffffffffff16639fdaea0c82876040518363ffffffff1660e01b8152600401611b8e929190612960565b600060405180830381600087803b158015611ba857600080fd5b505af1158015611bbc573d6000803e3d6000fd5b505050506000611bdd736c3f90f043a72fa612cbac8115ee7e52bde6e49090565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91909116906370a0823190602401602060405180830381865afa158015611c49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6d9190612238565b90508015611d155773bff202e3cb58ab0a09b2eb1d9a50352b9aaf196c6040517f6e553f650000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff85811660248301529190911690636e553f6590604401600060405180830381600087803b158015611cfc57600080fd5b505af1158015611d10573d6000803e3d6000fd5b505050505b505050505050565b815160005b818110156108e8576000848281518110611d3e57611d3e6122dc565b60209081029190910101516040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff909116906370a0823190602401602060405180830381865afa158015611db4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dd89190612238565b90508015611e2457611e248482878581518110611df757611df76122dc565b602002602001015173ffffffffffffffffffffffffffffffffffffffff166109a59092919063ffffffff16565b50611e2e81612328565b9050611d22565b60405180606001604052806003906020820280368337509192915050565b60608101818360005b6003811015611e9157815173ffffffffffffffffffffffffffffffffffffffff16835260209283019290910190600101611e5c565b50505092915050565b73ffffffffffffffffffffffffffffffffffffffff81168114611ebc57600080fd5b50565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611f3557611f35611ebf565b604052919050565b600067ffffffffffffffff821115611f5757611f57611ebf565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60008060008060008060c08789031215611f9c57600080fd5b8635611fa781611e9a565b95506020870135611fb781611e9a565b94506040870135611fc781611e9a565b9350606087013592506080870135915060a087013567ffffffffffffffff811115611ff157600080fd5b8701601f8101891361200257600080fd5b803561201561201082611f3d565b611eee565b8181528a602083850101111561202a57600080fd5b816020840160208301376000602083830101528093505050509295509295509295565b60008083601f84011261205f57600080fd5b50813567ffffffffffffffff81111561207757600080fd5b6020830191508360208260051b850101111561209257600080fd5b9250929050565b600080600080600080606087890312156120b257600080fd5b863567ffffffffffffffff808211156120ca57600080fd5b6120d68a838b0161204d565b909850965060208901359150808211156120ef57600080fd5b6120fb8a838b0161204d565b9096509450604089013591508082111561211457600080fd5b5061212189828a0161204d565b979a9699509497509295939492505050565b60005b8381101561214e578181015183820152602001612136565b50506000910152565b600082601f83011261216857600080fd5b815161217661201082611f3d565b81815284602083860101111561218b57600080fd5b61219c826020830160208701612133565b949350505050565b600080600080608085870312156121ba57600080fd5b84516121c581611e9a565b809450506020850151925060408501519150606085015167ffffffffffffffff8111156121f157600080fd5b6121fd87828801612157565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60006020828403121561224a57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561229357612293612251565b92915050565b8082018082111561229357612293612251565b805180151581146122bc57600080fd5b919050565b6000602082840312156122d357600080fd5b610900826122ac565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561231d57600080fd5b813561090081611e9a565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361235957612359612251565b5060010190565b60008251612372818460208701612133565b9190910192915050565b60008151808452612394816020860160208601612133565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000825160a060208401526123e260c084018261237c565b905073ffffffffffffffffffffffffffffffffffffffff60208501511660408401526040840151606084015260608401516080840152608084015160a08401528091505092915050565b600067ffffffffffffffff82111561244657612446611ebf565b5060051b60200190565b600082601f83011261246157600080fd5b815160206124716120108361242c565b82815260059290921b8401810191818101908684111561249057600080fd5b8286015b848110156124d057805167ffffffffffffffff8111156124b45760008081fd5b6124c28986838b0101612157565b845250918301918301612494565b509695505050505050565b600080604083850312156124ee57600080fd5b825167ffffffffffffffff8082111561250657600080fd5b818501915085601f83011261251a57600080fd5b8151602061252a6120108361242c565b82815260059290921b8401810191818101908984111561254957600080fd5b948201945b83861015612575578551600e81106125665760008081fd5b8252948201949082019061254e565b9188015191965090935050508082111561258e57600080fd5b5061259b85828601612450565b9150509250929050565b60008151808452602080850194508084016000805b8481101561260b578251600e81106125f9577f4e487b710000000000000000000000000000000000000000000000000000000083526021600452602483fd5b885296830196918301916001016125ba565b50959695505050505050565b6000815180845260208085019450848260051b860182860160005b8581101561265c57838303895261264a83835161237c565b98850198925090840190600101612632565b5090979650505050505050565b6060808252845182820181905260009190608090818501906020808a01865b838110156126fa578151805173ffffffffffffffffffffffffffffffffffffffff90811687528482015116848701526040808201519087015287810151888701528681015160ff168787015260a0808201519087015260c0908101519086015260e09094019390820190600101612688565b5050868303908701525061270e81886125a5565b9250505082810360408401526127248185612617565b9695505050505050565b60008060006060848603121561274357600080fd5b61274c846122ac565b9250602084015161275c81611e9a565b604085015190925067ffffffffffffffff81111561277957600080fd5b61278586828701612157565b9150509250925092565b600080604083850312156127a257600080fd5b825167ffffffffffffffff808211156127ba57600080fd5b6127c686838701612450565b935060208501519150808211156127dc57600080fd5b5061259b85828601612157565b600080600080600060a0868803121561280157600080fd5b855194506020808701519450604087015167ffffffffffffffff8082111561282857600080fd5b818901915089601f83011261283c57600080fd5b815161284a6120108261242c565b81815260059190911b8301840190848101908c83111561286957600080fd5b938501935b8285101561289057845161288181611e9a565b8252938501939085019061286e565b60608c015190985094505050808311156128a957600080fd5b6128b58a848b01612450565b945060808901519250808311156128cb57600080fd5b50506128d988828901612157565b9150509295509295909350565b602081526000610900602083018461237c565b60008060006060848603121561290e57600080fd5b835161291981611e9a565b60208501516040860151919450925067ffffffffffffffff81111561277957600080fd5b8060005b60038110156108e8578151845260209384019390910190600101612941565b6080810161296e828561293d565b8260608301529392505050565b6000806040838503121561298e57600080fd5b82516004811061299d57600080fd5b602084015190925067ffffffffffffffff8111156129ba57600080fd5b61259b85828601612157565b600080604083850312156129d957600080fd5b825180600f0b81146129ea57600080fd5b6020939093015192949293505050565b600082601f830112612a0b57600080fd5b6040516060810181811067ffffffffffffffff82111715612a2e57612a2e611ebf565b604052806060840185811115612a4357600080fd5b845b81811015612a5d578051835260209283019201612a45565b509195945050505050565b600060608284031215612a7a57600080fd5b61090083836129fa565b82815260808101610900602083018461293d565b60008060808385031215612aab57600080fd5b8251612ab681611e9a565b9150612ac584602085016129fa565b9050925092905056fea2646970667358221220fa802e721303a34fe6b9d7228f42989e9d2571b2baccdae3c504ccbcc761f7fd64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000005bc6bef80da563ebf6df6d6913513fa9a7ec89be000000000000000000000000e592427a0aece92de3edee1f18e0157c058615640000000000000000000000001111111254eeb25477b68fb85ed929f73a9605820000000000000000000000004579709627ca36bce92f51ac975746f431890930
-----Decoded View---------------
Arg [0] : _core (address): 0x5bc6BEf80DA563EBf6Df6D6913513fa9A7ec89BE
Arg [1] : _uniV3Router (address): 0xE592427A0AEce92De3Edee1F18E0157C05861564
Arg [2] : _oneInch (address): 0x1111111254EEB25477B68fb85Ed929f73A960582
Arg [3] : _angleRouter (address): 0x4579709627CA36BCe92f51ac975746f431890930
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000005bc6bef80da563ebf6df6d6913513fa9a7ec89be
Arg [1] : 000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564
Arg [2] : 0000000000000000000000001111111254eeb25477b68fb85ed929f73a960582
Arg [3] : 0000000000000000000000004579709627ca36bce92f51ac975746f431890930
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.