More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
IdleStrategyDAIMainnet
Compiler Version
v0.5.16+commit.9c3226ce
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity 0.5.16; import "./IdleFinanceStrategy.sol"; /** * Adds the mainnet addresses to the PickleStrategy3Pool */ contract IdleStrategyDAIMainnet is IdleFinanceStrategy { // token addresses address constant public __dai = address(0x6B175474E89094C44Da98b954EedeAC495271d0F); address constant public __idleUnderlying= address(0x3fE7940616e5Bc47b0775a0dccf6237893353bB4); address constant public __comp = address(0xc00e94Cb662C3520282E6f5717214004A7f26888); address constant public __idle = address(0x875773784Af8135eA0ef43b5a374AaD105c5D39e); address constant public __stkaave = address(0x4da27a545c0c5B758a6BA100e3a049001de870f5); address constant public __aave = address(0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9); constructor( address _storage, address _vault ) IdleFinanceStrategy( _storage, __dai, __idleUnderlying, _vault, __stkaave ) public { rewardTokens = [__comp, __idle, __aave]; reward2WETH[__comp] = [__comp, weth]; reward2WETH[__idle] = [__idle, weth]; reward2WETH[__aave] = [__aave, weth]; WETH2underlying = [weth, __dai]; sell[__comp] = true; sell[__idle] = true; sell[__aave] = true; useUni[__comp] = false; useUni[__idle] = false; useUni[__aave] = false; useUni[__dai] = false; allowedRewardClaimable = true; } }
pragma solidity 0.5.16; import "@openzeppelin/contracts/math/Math.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "../../base/inheritance/RewardTokenProfitNotifier.sol"; import "../../base/interface/IStrategy.sol"; import "../../base/interface/IVault.sol"; import "../../base/interface/uniswap/IUniswapV2Router02.sol"; import "./interface/IdleToken.sol"; import "./interface/IIdleTokenHelper.sol"; import "./interface/IStakedAave.sol"; contract IdleFinanceStrategy is IStrategy, RewardTokenProfitNotifier { using SafeMath for uint256; using SafeERC20 for IERC20; event ProfitsNotCollected(address); event Liquidating(address, uint256); address public referral; IERC20 public underlying; address public idleUnderlying; uint256 public virtualPrice; IIdleTokenHelper public idleTokenHelper; address public vault; address public stkaave; address[] public rewardTokens; mapping(address => address[]) public reward2WETH; address[] public WETH2underlying; mapping(address => bool) public sell; mapping(address => bool) public useUni; address public constant uniswapRouterV2 = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); address public constant sushiswapRouterV2 = address(0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F); address public constant weth = address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2); bool public claimAllowed; bool public protected; bool public allowedRewardClaimable = false; address public multiSig = address(0xF49440C1F012d041802b25A73e5B0B9166a75c02); // These tokens cannot be claimed by the controller mapping (address => bool) public unsalvagableTokens; modifier restricted() { require(msg.sender == vault || msg.sender == address(controller()) || msg.sender == address(governance()), "The sender has to be the controller or vault or governance"); _; } modifier onlyMultiSigOrGovernance() { require(msg.sender == multiSig || msg.sender == governance(), "The sender has to be multiSig or governance"); _; } modifier updateVirtualPrice() { if (protected) { require(virtualPrice <= idleTokenHelper.getRedeemPrice(idleUnderlying), "virtual price is higher than needed"); } _; virtualPrice = idleTokenHelper.getRedeemPrice(idleUnderlying); } constructor( address _storage, address _underlying, address _idleUnderlying, address _vault, address _stkaave ) RewardTokenProfitNotifier(_storage, weth) public { stkaave = _stkaave; underlying = IERC20(_underlying); idleUnderlying = _idleUnderlying; vault = _vault; protected = true; // set these tokens to be not salvagable unsalvagableTokens[_underlying] = true; unsalvagableTokens[_idleUnderlying] = true; for (uint256 i = 0; i < rewardTokens.length; i++) { address token = rewardTokens[i]; unsalvagableTokens[token] = true; } referral = address(0xf00dD244228F51547f0563e60bCa65a30FBF5f7f); claimAllowed = true; idleTokenHelper = IIdleTokenHelper(0x04Ce60ed10F6D2CfF3AA015fc7b950D13c113be5); virtualPrice = idleTokenHelper.getRedeemPrice(idleUnderlying); } function depositArbCheck() public view returns(bool) { return true; } function setReferral(address _newRef) public onlyGovernance { referral = _newRef; } /** * The strategy invests by supplying the underlying token into IDLE. */ function investAllUnderlying() public restricted updateVirtualPrice { uint256 balance = underlying.balanceOf(address(this)); underlying.safeApprove(address(idleUnderlying), 0); underlying.safeApprove(address(idleUnderlying), balance); IIdleTokenV3_1(idleUnderlying).mintIdleToken(balance, true, referral); } /** * Exits IDLE and transfers everything to the vault. */ function withdrawAllToVault() external restricted updateVirtualPrice { withdrawAll(); IERC20(address(underlying)).safeTransfer(vault, underlying.balanceOf(address(this))); } /** * Withdraws all from IDLE */ function withdrawAll() internal { uint256 balance = IERC20(idleUnderlying).balanceOf(address(this)); // this automatically claims the crops IIdleTokenV3_1(idleUnderlying).redeemIdleToken(balance); liquidateRewards(); } function withdrawToVault(uint256 amountUnderlying) public restricted { // this method is called when the vault is missing funds // we will calculate the proportion of idle LP tokens that matches // the underlying amount requested uint256 balanceBefore = underlying.balanceOf(address(this)); uint256 totalIdleLpTokens = IERC20(idleUnderlying).balanceOf(address(this)); uint256 totalUnderlyingBalance = totalIdleLpTokens.mul(virtualPrice).div(1e18); uint256 ratio = amountUnderlying.mul(1e18).div(totalUnderlyingBalance); uint256 toRedeem = totalIdleLpTokens.mul(ratio).div(1e18); IIdleTokenV3_1(idleUnderlying).redeemIdleToken(toRedeem); uint256 balanceAfter = underlying.balanceOf(address(this)); underlying.safeTransfer(vault, balanceAfter.sub(balanceBefore)); } /** * Withdraws all assets, liquidates COMP, and invests again in the required ratio. */ function doHardWork() public restricted updateVirtualPrice { if (claimAllowed) { claim(); } liquidateRewards(); // this updates the virtual price investAllUnderlying(); // state of supply/loan will be updated by the modifier } /** * Salvages a token. */ function salvage(address recipient, address token, uint256 amount) public onlyGovernance { // To make sure that governance cannot come in and take away the coins require(!unsalvagableTokens[token], "token is defined as not salvagable"); IERC20(token).safeTransfer(recipient, amount); } function claim() internal { IIdleTokenV3_1(idleUnderlying).redeemIdleToken(0); uint256 claimableAave = IStakedAave(stkaave).stakerRewardsToClaim(address(this)); if (claimableAave > 0) { IStakedAave(stkaave).claimRewards(address(this), claimableAave); } } function liquidateRewards() internal { for (uint256 i=0;i<rewardTokens.length;i++) { address token = rewardTokens[i]; if (!sell[token]) { // Profits can be disabled for possible simplified and rapid exit emit ProfitsNotCollected(token); continue; } uint256 balance = IERC20(token).balanceOf(address(this)); if (balance > 0) { emit Liquidating(token, balance); address routerV2; if(useUni[token]) { routerV2 = uniswapRouterV2; } else { routerV2 = sushiswapRouterV2; } IERC20(token).safeApprove(routerV2, 0); IERC20(token).safeApprove(routerV2, balance); // we can accept 1 as the minimum because this will be called only by a trusted worker IUniswapV2Router02(routerV2).swapExactTokensForTokens( balance, 1, reward2WETH[token], address(this), block.timestamp ); } } uint256 wethBalance = IERC20(weth).balanceOf(address(this)); notifyProfitInRewardToken(wethBalance); uint256 remainingWethBalance = IERC20(weth).balanceOf(address(this)); if (remainingWethBalance > 0) { emit Liquidating(weth, remainingWethBalance); address routerV2; if(useUni[address(underlying)]) { routerV2 = uniswapRouterV2; } else { routerV2 = sushiswapRouterV2; } IERC20(weth).safeApprove(routerV2, 0); IERC20(weth).safeApprove(routerV2, remainingWethBalance); // we can accept 1 as the minimum because this will be called only by a trusted worker IUniswapV2Router02(routerV2).swapExactTokensForTokens( remainingWethBalance, 1, WETH2underlying, address(this), block.timestamp ); } uint256 balance = underlying.balanceOf(address(this)); } /** * Returns the current balance. Ignores COMP that was not liquidated and invested. */ function investedUnderlyingBalance() public view returns (uint256) { // NOTE: The use of virtual price is okay for appreciating assets inside IDLE, // but would be wrong and exploitable if funds were lost by IDLE, indicated by // the virtualPrice being greater than the token price. if (protected) { require(virtualPrice <= idleTokenHelper.getRedeemPrice(idleUnderlying), "virtual price is higher than needed"); } uint256 invested = IERC20(idleUnderlying).balanceOf(address(this)).mul(virtualPrice).div(1e18); return invested.add(IERC20(underlying).balanceOf(address(this))); } function setLiquidation(address _token, bool _sell) public onlyGovernance { sell[_token] = _sell; } function setClaimAllowed(bool _claimAllowed) public onlyGovernance { claimAllowed = _claimAllowed; } function setProtected(bool _protected) public onlyGovernance { protected = _protected; } function setMultiSig(address _address) public onlyGovernance { multiSig = _address; } function setRewardClaimable(bool flag) public onlyGovernance { allowedRewardClaimable = flag; } // reward claiming by multiSig. Only the stkAave rewards are claimable! function claimReward() public onlyMultiSigOrGovernance { require(allowedRewardClaimable, "reward claimable is not allowed"); claim(); uint256 stkAaveBalance = IERC20(stkaave).balanceOf(address(this)); if (stkAaveBalance > 0){ IERC20(stkaave).safeTransfer(msg.sender, stkAaveBalance); } } }
pragma solidity ^0.5.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow, so we distribute return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } }
pragma solidity ^0.5.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
pragma solidity ^0.5.0; import "./IERC20.sol"; /** * @dev Optional functions from the ERC20 standard. */ contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of * these values are immutable: they can only be set once during * construction. */ constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view returns (uint8) { return _decimals; } }
pragma solidity ^0.5.0; import "./IERC20.sol"; import "../../math/SafeMath.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 ERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; 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)); } 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' // solhint-disable-next-line max-line-length 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).add(value); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @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. // A Solidity high level call has three parts: // 1. The target address is checked to verify it contains contract code // 2. The call itself is made, and success asserted // 3. The return value is decoded, which in turn checks the size of the returned data. // solhint-disable-next-line max-line-length require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
pragma solidity 0.5.16; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "../interface/IController.sol"; import "../interface/IFeeRewardForwarderV6.sol"; import "./Controllable.sol"; contract RewardTokenProfitNotifier is Controllable { using SafeMath for uint256; using SafeERC20 for IERC20; uint256 public profitSharingNumerator; uint256 public profitSharingDenominator; address public rewardToken; constructor( address _storage, address _rewardToken ) public Controllable(_storage){ rewardToken = _rewardToken; // persist in the state for immutability of the fee profitSharingNumerator = 30; //IController(controller()).profitSharingNumerator(); profitSharingDenominator = 100; //IController(controller()).profitSharingDenominator(); require(profitSharingNumerator < profitSharingDenominator, "invalid profit share"); } event ProfitLogInReward(uint256 profitAmount, uint256 feeAmount, uint256 timestamp); event ProfitAndBuybackLog(uint256 profitAmount, uint256 feeAmount, uint256 timestamp); function notifyProfitInRewardToken(uint256 _rewardBalance) internal { if( _rewardBalance > 0 ){ uint256 feeAmount = _rewardBalance.mul(profitSharingNumerator).div(profitSharingDenominator); emit ProfitLogInReward(_rewardBalance, feeAmount, block.timestamp); IERC20(rewardToken).safeApprove(controller(), 0); IERC20(rewardToken).safeApprove(controller(), feeAmount); IController(controller()).notifyFee( rewardToken, feeAmount ); } else { emit ProfitLogInReward(0, 0, block.timestamp); } } function notifyProfitAndBuybackInRewardToken(uint256 _rewardBalance, address pool, uint256 _buybackRatio) internal { if( _rewardBalance > 0 ){ uint256 feeAmount = _rewardBalance.mul(profitSharingNumerator).div(profitSharingDenominator); address forwarder = IController(controller()).feeRewardForwarder(); emit ProfitAndBuybackLog(_rewardBalance, feeAmount, block.timestamp); IERC20(rewardToken).safeApprove(forwarder, 0); IERC20(rewardToken).safeApprove(forwarder, _rewardBalance); IFeeRewardForwarderV6(forwarder).notifyFeeAndBuybackAmounts( rewardToken, feeAmount, pool, _rewardBalance.sub(feeAmount).mul(_buybackRatio).div(10000) ); } else { emit ProfitAndBuybackLog(0, 0, block.timestamp); } } }
pragma solidity 0.5.16; interface IStrategy { function unsalvagableTokens(address tokens) external view returns (bool); function governance() external view returns (address); function controller() external view returns (address); function underlying() external view returns (address); function vault() external view returns (address); function withdrawAllToVault() external; function withdrawToVault(uint256 amount) external; function investedUnderlyingBalance() external view returns (uint256); // itsNotMuch() // should only be called by controller function salvage(address recipient, address token, uint256 amount) external; function doHardWork() external; function depositArbCheck() external view returns(bool); }
pragma solidity 0.5.16; interface IVault { function initializeVault( address _storage, address _underlying, uint256 _toInvestNumerator, uint256 _toInvestDenominator ) external ; function balanceOf(address) external view returns (uint256); function underlyingBalanceInVault() external view returns (uint256); function underlyingBalanceWithInvestment() external view returns (uint256); // function store() external view returns (address); function governance() external view returns (address); function controller() external view returns (address); function underlying() external view returns (address); function strategy() external view returns (address); function setStrategy(address _strategy) external; function announceStrategyUpdate(address _strategy) external; function setVaultFractionToInvest(uint256 numerator, uint256 denominator) external; function deposit(uint256 amountWei) external; function depositFor(uint256 amountWei, address holder) external; function withdrawAll() external; function withdraw(uint256 numberOfShares) external; function getPricePerFullShare() external view returns (uint256); function underlyingBalanceWithInvestmentForHolder(address holder) view external returns (uint256); // hard work should be callable only by the controller (by the hard worker) or by governance function doHardWork() external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.0; import './IUniswapV2Router01.sol'; interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; }
/** * @title: Idle Token interface * @author: Idle Labs Inc., idle.finance */ pragma solidity 0.5.16; interface IIdleTokenV3_1 { // view /** * IdleToken price calculation, in underlying * * @return : price in underlying token */ function tokenPrice() external view returns (uint256 price); /** * @return : underlying token address */ function token() external view returns (address); /** * Get APR of every ILendingProtocol * * @return addresses: array of token addresses * @return aprs: array of aprs (ordered in respect to the `addresses` array) */ function getAPRs() external view returns (address[] memory addresses, uint256[] memory aprs); // external // We should save the amount one has deposited to calc interests /** * Used to mint IdleTokens, given an underlying amount (eg. DAI). * This method triggers a rebalance of the pools if needed * NOTE: User should 'approve' _amount of tokens before calling mintIdleToken * NOTE 2: this method can be paused * * @param _amount : amount of underlying token to be lended * @param _skipRebalance : flag for skipping rebalance for lower gas price * @param _referral : referral address * @return mintedTokens : amount of IdleTokens minted */ function mintIdleToken(uint256 _amount, bool _skipRebalance, address _referral) external returns (uint256 mintedTokens); /** * Here we calc the pool share one can withdraw given the amount of IdleToken they want to burn * This method triggers a rebalance of the pools if needed * NOTE: If the contract is paused or iToken price has decreased one can still redeem but no rebalance happens. * NOTE 2: If iToken price has decresed one should not redeem (but can do it) otherwise he would capitalize the loss. * Ideally one should wait until the black swan event is terminated * * @param _amount : amount of IdleTokens to be burned * @return redeemedTokens : amount of underlying tokens redeemed */ function redeemIdleToken(uint256 _amount) external returns (uint256 redeemedTokens); /** * Here we calc the pool share one can withdraw given the amount of IdleToken they want to burn * and send interest-bearing tokens (eg. cDAI/iDAI) directly to the user. * Underlying (eg. DAI) is not redeemed here. * * @param _amount : amount of IdleTokens to be burned */ function redeemInterestBearingTokens(uint256 _amount) external; /** * @return : whether has rebalanced or not */ function rebalance() external returns (bool); }
pragma solidity 0.5.16; contract IIdleTokenHelper { function getMintingPrice(address idleYieldToken) view external returns (uint256 mintingPrice); function getRedeemPrice(address idleYieldToken) view external returns (uint256 redeemPrice); function getRedeemPrice(address idleYieldToken, address user) view external returns (uint256 redeemPrice); }
pragma solidity 0.5.16; interface IStakedAave { function stake(address to, uint256 amount) external; function redeem(address to, uint256 amount) external; function cooldown() external; function claimRewards(address to, uint256 amount) external; function COOLDOWN_SECONDS() external view returns(uint256); function UNSTAKE_WINDOW() external view returns(uint256); function stakersCooldowns(address input) external view returns(uint256); function stakerRewardsToClaim(address input) external view returns(uint256); }
pragma solidity ^0.5.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */ interface IERC20 { /** * @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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @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); }
pragma solidity ^0.5.5; /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Converts an `address` into `address payable`. Note that this is * simply a type cast: the actual underlying value is not changed. * * _Available since v2.4.0._ */ function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } /** * @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]. * * _Available since v2.4.0._ */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call.value(amount)(""); require(success, "Address: unable to send value, recipient may have reverted"); } }
pragma solidity 0.5.16; interface IController { event SharePriceChangeLog( address indexed vault, address indexed strategy, uint256 oldSharePrice, uint256 newSharePrice, uint256 timestamp ); // [Grey list] // An EOA can safely interact with the system no matter what. // If you're using Metamask, you're using an EOA. // Only smart contracts may be affected by this grey list. // // This contract will not be able to ban any EOA from the system // even if an EOA is being added to the greyList, he/she will still be able // to interact with the whole system as if nothing happened. // Only smart contracts will be affected by being added to the greyList. // This grey list is only used in Vault.sol, see the code there for reference function greyList(address _target) external view returns(bool); function addVaultAndStrategy(address _vault, address _strategy) external; function doHardWork(address _vault) external; function salvage(address _token, uint256 amount) external; function salvageStrategy(address _strategy, address _token, uint256 amount) external; function notifyFee(address _underlying, uint256 fee) external; function profitSharingNumerator() external view returns (uint256); function profitSharingDenominator() external view returns (uint256); function feeRewardForwarder() external view returns(address); function setFeeRewardForwarder(address _value) external; function addHardWorker(address _worker) external; }
pragma solidity 0.5.16; interface IFeeRewardForwarderV6 { function poolNotifyFixedTarget(address _token, uint256 _amount) external; function notifyFeeAndBuybackAmounts(uint256 _feeAmount, address _pool, uint256 _buybackAmount) external; function notifyFeeAndBuybackAmounts(address _token, uint256 _feeAmount, address _pool, uint256 _buybackAmount) external; function profitSharingPool() external view returns (address); function configureLiquidation(address[] calldata _path, bytes32[] calldata _dexes) external; }
pragma solidity 0.5.16; import "./Governable.sol"; contract Controllable is Governable { constructor(address _storage) Governable(_storage) public { } modifier onlyController() { require(store.isController(msg.sender), "Not a controller"); _; } modifier onlyControllerOrGovernance(){ require((store.isController(msg.sender) || store.isGovernance(msg.sender)), "The caller must be controller or governance"); _; } function controller() public view returns (address) { return store.controller(); } }
pragma solidity 0.5.16; import "./Storage.sol"; contract Governable { Storage public store; constructor(address _store) public { require(_store != address(0), "new storage shouldn't be empty"); store = Storage(_store); } modifier onlyGovernance() { require(store.isGovernance(msg.sender), "Not governance"); _; } function setStorage(address _store) public onlyGovernance { require(_store != address(0), "new storage shouldn't be empty"); store = Storage(_store); } function governance() public view returns (address) { return store.governance(); } }
pragma solidity 0.5.16; contract Storage { address public governance; address public controller; constructor() public { governance = msg.sender; } modifier onlyGovernance() { require(isGovernance(msg.sender), "Not governance"); _; } function setGovernance(address _governance) public onlyGovernance { require(_governance != address(0), "new governance shouldn't be empty"); governance = _governance; } function setController(address _controller) public onlyGovernance { require(_controller != address(0), "new controller shouldn't be empty"); controller = _controller; } function isGovernance(address account) public view returns (bool) { return account == governance; } function isController(address account) public view returns (bool) { return account == controller; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.0; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_storage","type":"address"},{"internalType":"address","name":"_vault","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"Liquidating","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"profitAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feeAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ProfitAndBuybackLog","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"profitAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feeAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ProfitLogInReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"}],"name":"ProfitsNotCollected","type":"event"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"WETH2underlying","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"__aave","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"__comp","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"__dai","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"__idle","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"__idleUnderlying","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"__stkaave","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"allowedRewardClaimable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"claimAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"claimReward","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"controller","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"depositArbCheck","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"doHardWork","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"idleTokenHelper","outputs":[{"internalType":"contract IIdleTokenHelper","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"idleUnderlying","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"investAllUnderlying","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"investedUnderlyingBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"multiSig","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"profitSharingDenominator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"profitSharingNumerator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"protected","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"referral","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"reward2WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardToken","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"salvage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"sell","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bool","name":"_claimAllowed","type":"bool"}],"name":"setClaimAllowed","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_sell","type":"bool"}],"name":"setLiquidation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setMultiSig","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bool","name":"_protected","type":"bool"}],"name":"setProtected","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_newRef","type":"address"}],"name":"setReferral","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bool","name":"flag","type":"bool"}],"name":"setRewardClaimable","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_store","type":"address"}],"name":"setStorage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"stkaave","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"store","outputs":[{"internalType":"contract Storage","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"sushiswapRouterV2","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"underlying","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"uniswapRouterV2","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"unsalvagableTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"useUni","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"virtualPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdrawAllToVault","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amountUnderlying","type":"uint256"}],"name":"withdrawToVault","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526010805462010000600160b81b03191676f49440c1f012d041802b25a73e5b0b9166a75c020000001790553480156200003c57600080fd5b50604051620037c5380380620037c5833981810160405260408110156200006257600080fd5b50805160209091015181736b175474e89094c44da98b954eedeac495271d0f733fe7940616e5bc47b0775a0dccf6237893353bb483734da27a545c0c5b758a6ba100e3a049001de870f584600080516020620037a583398151915281806001600160a01b0381166200011b576040805162461bcd60e51b815260206004820152601e60248201527f6e65772073746f726167652073686f756c646e277420626520656d7074790000604482015290519081900360640190fd5b600080546001600160a01b03199081166001600160a01b0393841617825560038054821695841695909517909455601e60019081556064600255600a8054888516908716179055600580548b85169087168117909155600680548b8616908816811790915560098054958b1695909716949094179095556010805461ff00191661010017905593815260116020526040808220805460ff1990811687179091559282528120805490921690931790555090505b600b5481101562000224576000600b8281548110620001e957fe5b60009182526020808320909101546001600160a01b031682526011905260409020805460ff19166001908117909155919091019050620001ce565b50600480546001600160a01b031990811673f00dd244228f51547f0563e60bca65a30fbf5f7f1782556010805460ff19166001179055600880549091167304ce60ed10f6d2cff3aa015fc7b950d13c113be5179081905560065460408051631b46cf8360e11b81526001600160a01b03928316948101949094525191169163368d9f06916024808301926020929190829003018186803b158015620002c857600080fd5b505afa158015620002dd573d6000803e3d6000fd5b505050506040513d6020811015620002f457600080fd5b505160075550506040805160608101825273c00e94cb662c3520282e6f5717214004a7f26888815273875773784af8135ea0ef43b5a374aad105c5d39e6020820152737fc66500c84a76ad7e9c93437bfc5ac33e2ddae991810191909152620003669350600b92509050600362000665565b506040805180820190915273c00e94cb662c3520282e6f5717214004a7f26888808252600080516020620037a5833981519152602080840191909152600091909152600c9052620003db907fd8388e4766529598dc17608f3575075c51f38ca3fcac0c3c095ddf9c48d145b390600262000665565b506040805180820190915273875773784af8135ea0ef43b5a374aad105c5d39e808252600080516020620037a5833981519152602080840191909152600091909152600c905262000450907f013331b76eda2f661655227dcd87ab7d8ab3513ffa5a214a3db633a30f6ab4c790600262000665565b5060408051808201909152737fc66500c84a76ad7e9c93437bfc5ac33e2ddae9808252600080516020620037a5833981519152602080840191909152600091909152600c9052620004c5907f80696685245d7c11c85d2ef334517db7fa4d4776eb899bd8122425f832299baa90600262000665565b5060408051808201909152600080516020620037a58339815191528152736b175474e89094c44da98b954eedeac495271d0f60208201526200050c90600d90600262000665565b50507f9e2df941629a7eb658bc132c043910ee485c8761ededd0afc5cddf02a2b22668805460ff1990811660019081179092557fe736d8711b21e772effab369c33edbbf2689d7ea251aed56d8f4242fa183008580548216831790557f725a80c5b26c8c7372c80bbc1af4d9ac6761000c21cc3ff52edade9b5ebd794680548216909217909155600f6020527f0f4404ebb5154c85432fc45418faf775cef3539698bb399dff209cbcfe89f7768054821690557fd040eb4a80f3eec797c0e34900e061565e3e2ca40ff1beacae8ccad63b2c13098054821690557f589fef3015f6a2277507edd06418bbc8d5c1c0e6e5391b62b685e037c61b32ff805482169055736b175474e89094c44da98b954eedeac495271d0f6000527f907804fb4f4f34039c621b1a41008798cef5775ce10837f2769fb81032e4d83880549091169055506010805462ff0000191662010000179055620006f9565b828054828255906000526020600020908101928215620006bd579160200282015b82811115620006bd57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000686565b50620006cb929150620006cf565b5090565b620006f691905b80821115620006cb5780546001600160a01b0319168155600101620006d6565b90565b61309c80620007096000396000f3fe608060405234801561001057600080fd5b50600436106102955760003560e01c80638cc8b9fa11610167578063bfd131f1116100ce578063dff2e31511610087578063dff2e315146105b2578063e70a2738146105ba578063ec5a61ae146105c2578063f77c4791146105ee578063f7c618c1146105f6578063fbfa77cf146105fe57610295565b8063bfd131f114610556578063c2a2a07b1461055e578063c6008e0514610566578063ce8c42e81461056e578063d103be701461058b578063db668884146105aa57610295565b806394b6f9d41161012057806394b6f9d4146104c4578063975057e7146104ea5780639e5914da146104f25780639f9c043614610518578063b60f151a14610546578063b88a802f1461054e57610295565b80638cc8b9fa1461044a5780638d0c09c3146104525780638e84c4811461046f5780638ea875f31461048e5780638eab5923146104965780639137c1a71461049e57610295565b806345d01e4a1161020b5780635dbeffe5116101c45780635dbeffe514610405578063693448e31461040d5780636f307dc3146104155780637bb7bed11461041d578063834d81851461043a578063872f0b971461044257610295565b806345d01e4a146103b75780634a8cfa69146103bf5780634fa5d854146103c757806350185946146103cf578063596fa9e3146103f55780635aa6e675146103fd57610295565b8063279f8a171161025d578063279f8a1714610369578063284d30ef146103715780632e1e0462146103975780633332ec0e1461039f57806336e0004a146103a75780633fc8cef3146103af57610295565b8063026a0dd01461029a5780630dff5c31146102b45780631113ef52146102ee5780631441a5a9146103265780631c02bc311461034a575b600080fd5b6102a2610606565b60408051918252519081900360200190f35b6102da600480360360208110156102ca57600080fd5b50356001600160a01b031661060c565b604080519115158252519081900360200190f35b6103246004803603606081101561030457600080fd5b506001600160a01b03813581169160208101359091169060400135610621565b005b61032e610751565b604080516001600160a01b039092168252519081900360200190f35b6103246004803603602081101561036057600080fd5b50351515610760565b61032e610833565b6103246004803603602081101561038757600080fd5b50356001600160a01b031661084b565b61032e610930565b61032e610948565b61032e610957565b61032e61096d565b6102a2610985565b610324610b8c565b610324610eb5565b6102da600480360360208110156103e557600080fd5b50356001600160a01b0316611083565b61032e611098565b61032e6110b0565b61032e611130565b61032e611148565b61032e611157565b61032e6004803603602081101561043357600080fd5b5035611166565b6102da61118d565b6102da61119b565b61032e6111a4565b61032e6004803603602081101561046857600080fd5b50356111bc565b6103246004803603602081101561048557600080fd5b503515156111c9565b6102a2611295565b6102da61129b565b610324600480360360208110156104b457600080fd5b50356001600160a01b03166112aa565b6102da600480360360208110156104da57600080fd5b50356001600160a01b03166113e0565b61032e6113f5565b6103246004803603602081101561050857600080fd5b50356001600160a01b0316611404565b6103246004803603604081101561052e57600080fd5b506001600160a01b03813516906020013515156114df565b6102a26115c3565b6103246115c9565b610324611740565b6102da61193b565b61032e611940565b6103246004803603602081101561058457600080fd5b5035611958565b610324600480360360208110156105a157600080fd5b50351515611c7c565b61032e611d51565b61032e611d69565b61032e611d81565b61032e600480360360408110156105d857600080fd5b506001600160a01b038135169060200135611d90565b61032e611dc5565b61032e611e14565b61032e611e23565b60025481565b600f6020526000908152604090205460ff1681565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b15801561066c57600080fd5b505afa158015610680573d6000803e3d6000fd5b505050506040513d602081101561069657600080fd5b50516106da576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b6001600160a01b03821660009081526011602052604090205460ff16156107325760405162461bcd60e51b8152600401808060200182810382526022815260200180612f3d6022913960400191505060405180910390fd5b61074c6001600160a01b038316848363ffffffff611e3216565b505050565b6004546001600160a01b031681565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b1580156107ab57600080fd5b505afa1580156107bf573d6000803e3d6000fd5b505050506040513d60208110156107d557600080fd5b5051610819576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b601080549115156101000261ff0019909216919091179055565b737fc66500c84a76ad7e9c93437bfc5ac33e2ddae981565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b15801561089657600080fd5b505afa1580156108aa573d6000803e3d6000fd5b505050506040513d60208110156108c057600080fd5b5051610904576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b601080546001600160a01b039092166301000000026301000000600160b81b0319909216919091179055565b73d9e1ce17f2641f24ae83637ab66a2cca9c378b9f81565b6008546001600160a01b031681565b601054630100000090046001600160a01b031681565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b601054600090610100900460ff1615610a545760085460065460408051631b46cf8360e11b81526001600160a01b0392831660048201529051919092169163368d9f06916024808301926020929190829003018186803b1580156109e857600080fd5b505afa1580156109fc573d6000803e3d6000fd5b505050506040513d6020811015610a1257600080fd5b50516007541115610a545760405162461bcd60e51b815260040180806020018281038252602381526020018061300f6023913960400191505060405180910390fd5b600754600654604080516370a0823160e01b81523060048201529051600093610afb93670de0b6b3a764000093610aef936001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610ab757600080fd5b505afa158015610acb573d6000803e3d6000fd5b505050506040513d6020811015610ae157600080fd5b50519063ffffffff611e8416565b9063ffffffff611ee616565b600554604080516370a0823160e01b81523060048201529051929350610b86926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610b4d57600080fd5b505afa158015610b61573d6000803e3d6000fd5b505050506040513d6020811015610b7757600080fd5b5051829063ffffffff611f2816565b91505090565b6009546001600160a01b0316331480610bbd5750610ba8611dc5565b6001600160a01b0316336001600160a01b0316145b80610be05750610bcb6110b0565b6001600160a01b0316336001600160a01b0316145b610c1b5760405162461bcd60e51b815260040180806020018281038252603a815260200180612f8a603a913960400191505060405180910390fd5b601054610100900460ff1615610ce75760085460065460408051631b46cf8360e11b81526001600160a01b0392831660048201529051919092169163368d9f06916024808301926020929190829003018186803b158015610c7b57600080fd5b505afa158015610c8f573d6000803e3d6000fd5b505050506040513d6020811015610ca557600080fd5b50516007541115610ce75760405162461bcd60e51b815260040180806020018281038252602381526020018061300f6023913960400191505060405180910390fd5b600554604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610d3257600080fd5b505afa158015610d46573d6000803e3d6000fd5b505050506040513d6020811015610d5c57600080fd5b5051600654600554919250610d85916001600160a01b039081169116600063ffffffff611f8216565b600654600554610da8916001600160a01b0391821691168363ffffffff611f8216565b6006546004805460408051632befabbf60e01b8152928301859052600160248401526001600160a01b03918216604484015251921691632befabbf916064808201926020929091908290030181600087803b158015610e0657600080fd5b505af1158015610e1a573d6000803e3d6000fd5b505050506040513d6020811015610e3057600080fd5b505060085460065460408051631b46cf8360e11b81526001600160a01b039283166004820152905191909216925063368d9f0691602480820192602092909190829003018186803b158015610e8457600080fd5b505afa158015610e98573d6000803e3d6000fd5b505050506040513d6020811015610eae57600080fd5b5051600755565b6009546001600160a01b0316331480610ee65750610ed1611dc5565b6001600160a01b0316336001600160a01b0316145b80610f095750610ef46110b0565b6001600160a01b0316336001600160a01b0316145b610f445760405162461bcd60e51b815260040180806020018281038252603a815260200180612f8a603a913960400191505060405180910390fd5b601054610100900460ff16156110105760085460065460408051631b46cf8360e11b81526001600160a01b0392831660048201529051919092169163368d9f06916024808301926020929190829003018186803b158015610fa457600080fd5b505afa158015610fb8573d6000803e3d6000fd5b505050506040513d6020811015610fce57600080fd5b505160075411156110105760405162461bcd60e51b815260040180806020018281038252602381526020018061300f6023913960400191505060405180910390fd5b60105460ff161561102357611023612095565b61102b6121ff565b611033610b8c565b60085460065460408051631b46cf8360e11b81526001600160a01b0392831660048201529051919092169163368d9f06916024808301926020929190829003018186803b158015610e8457600080fd5b60116020526000908152604090205460ff1681565b737a250d5630b4cf539739df2c5dacb4c659f2488d81565b60008060009054906101000a90046001600160a01b03166001600160a01b0316635aa6e6756040518163ffffffff1660e01b815260040160206040518083038186803b1580156110ff57600080fd5b505afa158015611113573d6000803e3d6000fd5b505050506040513d602081101561112957600080fd5b5051905090565b73c00e94cb662c3520282e6f5717214004a7f2688881565b600a546001600160a01b031681565b6005546001600160a01b031681565b600b818154811061117357fe5b6000918252602090912001546001600160a01b0316905081565b601054610100900460ff1681565b60105460ff1681565b736b175474e89094c44da98b954eedeac495271d0f81565b600d818154811061117357fe5b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b15801561121457600080fd5b505afa158015611228573d6000803e3d6000fd5b505050506040513d602081101561123e57600080fd5b5051611282576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b6010805460ff1916911515919091179055565b60075481565b60105462010000900460ff1681565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b1580156112f557600080fd5b505afa158015611309573d6000803e3d6000fd5b505050506040513d602081101561131f57600080fd5b5051611363576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b6001600160a01b0381166113be576040805162461bcd60e51b815260206004820152601e60248201527f6e65772073746f726167652073686f756c646e277420626520656d7074790000604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600e6020526000908152604090205460ff1681565b6000546001600160a01b031681565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b15801561144f57600080fd5b505afa158015611463573d6000803e3d6000fd5b505050506040513d602081101561147957600080fd5b50516114bd576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b15801561152a57600080fd5b505afa15801561153e573d6000803e3d6000fd5b505050506040513d602081101561155457600080fd5b5051611598576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b6001600160a01b03919091166000908152600e60205260409020805460ff1916911515919091179055565b60015481565b601054630100000090046001600160a01b031633148061160157506115ec6110b0565b6001600160a01b0316336001600160a01b0316145b61163c5760405162461bcd60e51b815260040180806020018281038252602b815260200180612f5f602b913960400191505060405180910390fd5b60105462010000900460ff16611699576040805162461bcd60e51b815260206004820152601f60248201527f72657761726420636c61696d61626c65206973206e6f7420616c6c6f77656400604482015290519081900360640190fd5b6116a1612095565b600a54604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156116ec57600080fd5b505afa158015611700573d6000803e3d6000fd5b505050506040513d602081101561171657600080fd5b50519050801561173d57600a5461173d906001600160a01b0316338363ffffffff611e3216565b50565b6009546001600160a01b0316331480611771575061175c611dc5565b6001600160a01b0316336001600160a01b0316145b80611794575061177f6110b0565b6001600160a01b0316336001600160a01b0316145b6117cf5760405162461bcd60e51b815260040180806020018281038252603a815260200180612f8a603a913960400191505060405180910390fd5b601054610100900460ff161561189b5760085460065460408051631b46cf8360e11b81526001600160a01b0392831660048201529051919092169163368d9f06916024808301926020929190829003018186803b15801561182f57600080fd5b505afa158015611843573d6000803e3d6000fd5b505050506040513d602081101561185957600080fd5b5051600754111561189b5760405162461bcd60e51b815260040180806020018281038252602381526020018061300f6023913960400191505060405180910390fd5b6118a361299a565b600954600554604080516370a0823160e01b81523060048201529051611033936001600160a01b039081169316916370a08231916024808301926020929190829003018186803b1580156118f657600080fd5b505afa15801561190a573d6000803e3d6000fd5b505050506040513d602081101561192057600080fd5b50516005546001600160a01b0316919063ffffffff611e3216565b600190565b73875773784af8135ea0ef43b5a374aad105c5d39e81565b6009546001600160a01b03163314806119895750611974611dc5565b6001600160a01b0316336001600160a01b0316145b806119ac57506119976110b0565b6001600160a01b0316336001600160a01b0316145b6119e75760405162461bcd60e51b815260040180806020018281038252603a815260200180612f8a603a913960400191505060405180910390fd5b600554604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611a3257600080fd5b505afa158015611a46573d6000803e3d6000fd5b505050506040513d6020811015611a5c57600080fd5b5051600654604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015611aaf57600080fd5b505afa158015611ac3573d6000803e3d6000fd5b505050506040513d6020811015611ad957600080fd5b5051600754909150600090611b0390670de0b6b3a764000090610aef90859063ffffffff611e8416565b90506000611b2382610aef87670de0b6b3a764000063ffffffff611e8416565b90506000611b43670de0b6b3a7640000610aef868563ffffffff611e8416565b600654604080516345985a8b60e11b81526004810184905290519293506001600160a01b0390911691638b30b516916024808201926020929091908290030181600087803b158015611b9457600080fd5b505af1158015611ba8573d6000803e3d6000fd5b505050506040513d6020811015611bbe57600080fd5b5050600554604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611c0b57600080fd5b505afa158015611c1f573d6000803e3d6000fd5b505050506040513d6020811015611c3557600080fd5b5051600954909150611c73906001600160a01b0316611c5a838963ffffffff612a9716565b6005546001600160a01b0316919063ffffffff611e3216565b50505050505050565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b158015611cc757600080fd5b505afa158015611cdb573d6000803e3d6000fd5b505050506040513d6020811015611cf157600080fd5b5051611d35576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b60108054911515620100000262ff000019909216919091179055565b734da27a545c0c5b758a6ba100e3a049001de870f581565b733fe7940616e5bc47b0775a0dccf6237893353bb481565b6006546001600160a01b031681565b600c6020528160005260406000208181548110611da957fe5b6000918252602090912001546001600160a01b03169150829050565b60008060009054906101000a90046001600160a01b03166001600160a01b031663f77c47916040518163ffffffff1660e01b815260040160206040518083038186803b1580156110ff57600080fd5b6003546001600160a01b031681565b6009546001600160a01b031681565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261074c908490612ad9565b600082611e9357506000611ee0565b82820282848281611ea057fe5b0414611edd5760405162461bcd60e51b8152600401808060200182810382526021815260200180612fc46021913960400191505060405180910390fd5b90505b92915050565b6000611edd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612c97565b600082820183811015611edd576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b801580612008575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015611fda57600080fd5b505afa158015611fee573d6000803e3d6000fd5b505050506040513d602081101561200457600080fd5b5051155b6120435760405162461bcd60e51b81526004018080602001828103825260368152602001806130326036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261074c908490612ad9565b600654604080516345985a8b60e11b815260006004820181905291516001600160a01b0390931692638b30b51692602480840193602093929083900390910190829087803b1580156120e657600080fd5b505af11580156120fa573d6000803e3d6000fd5b505050506040513d602081101561211057600080fd5b5050600a5460408051637e90d7ef60e01b815230600482015290516000926001600160a01b031691637e90d7ef916024808301926020929190829003018186803b15801561215d57600080fd5b505afa158015612171573d6000803e3d6000fd5b505050506040513d602081101561218757600080fd5b50519050801561173d57600a54604080516309a99b4f60e41b81523060048201526024810184905290516001600160a01b0390921691639a99b4f09160448082019260009290919082900301818387803b1580156121e457600080fd5b505af11580156121f8573d6000803e3d6000fd5b5050505050565b60005b600b54811015612592576000600b828154811061221b57fe5b60009182526020808320909101546001600160a01b0316808352600e90915260409091205490915060ff1661228c57604080516001600160a01b038316815290517fa109254e13e832bfd64172d2e42d884bf04105edcc0aea7671ca399638b838699181900360200190a15061258a565b604080516370a0823160e01b815230600482015290516000916001600160a01b038416916370a0823191602480820192602092909190829003018186803b1580156122d657600080fd5b505afa1580156122ea573d6000803e3d6000fd5b505050506040513d602081101561230057600080fd5b50519050801561258757604080516001600160a01b03841681526020810183905281517f3299e7c5a7981ab82269eda64d376314fb882cfe0f6ba4d1ff5a277211dbb334929181900390910190a16001600160a01b0382166000908152600f602052604081205460ff161561238a5750737a250d5630b4cf539739df2c5dacb4c659f2488d6123a1565b5073d9e1ce17f2641f24ae83637ab66a2cca9c378b9f5b6123bc6001600160a01b03841682600063ffffffff611f8216565b6123d66001600160a01b038416828463ffffffff611f8216565b806001600160a01b03166338ed1739836001600c6000886001600160a01b03166001600160a01b0316815260200190815260200160002030426040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03166001600160a01b03168152602001838152602001828103825285818154815260200191508054801561249757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612479575b50509650505050505050600060405180830381600087803b1580156124bb57600080fd5b505af11580156124cf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156124f857600080fd5b810190808051604051939291908464010000000082111561251857600080fd5b90830190602082018581111561252d57600080fd5b825186602082028301116401000000008211171561254a57600080fd5b82525081516020918201928201910280838360005b8381101561257757818101518382015260200161255f565b5050505090500160405250505050505b50505b600101612202565b50604080516370a0823160e01b8152306004820152905160009173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2916370a0823191602480820192602092909190829003018186803b1580156125e857600080fd5b505afa1580156125fc573d6000803e3d6000fd5b505050506040513d602081101561261257600080fd5b5051905061261f81612d39565b604080516370a0823160e01b8152306004820152905160009173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2916370a0823191602480820192602092909190829003018186803b15801561267457600080fd5b505afa158015612688573d6000803e3d6000fd5b505050506040513d602081101561269e57600080fd5b505190508015612925576040805173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281526020810183905281517f3299e7c5a7981ab82269eda64d376314fb882cfe0f6ba4d1ff5a277211dbb334929181900390910190a16005546001600160a01b03166000908152600f602052604081205460ff16156127355750737a250d5630b4cf539739df2c5dacb4c659f2488d61274c565b5073d9e1ce17f2641f24ae83637ab66a2cca9c378b9f5b61277273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc282600063ffffffff611f8216565b61279773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2828463ffffffff611f8216565b806001600160a01b03166338ed1739836001600d30426040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03166001600160a01b03168152602001838152602001828103825285818154815260200191508054801561283557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612817575b50509650505050505050600060405180830381600087803b15801561285957600080fd5b505af115801561286d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561289657600080fd5b81019080805160405193929190846401000000008211156128b657600080fd5b9083019060208201858111156128cb57600080fd5b82518660208202830111640100000000821117156128e857600080fd5b82525081516020918201928201910280838360005b838110156129155781810151838201526020016128fd565b5050505090500160405250505050505b600554604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561297057600080fd5b505afa158015612984573d6000803e3d6000fd5b505050506040513d60208110156121f857600080fd5b600654604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156129e557600080fd5b505afa1580156129f9573d6000803e3d6000fd5b505050506040513d6020811015612a0f57600080fd5b5051600654604080516345985a8b60e11b81526004810184905290519293506001600160a01b0390911691638b30b516916024808201926020929091908290030181600087803b158015612a6257600080fd5b505af1158015612a76573d6000803e3d6000fd5b505050506040513d6020811015612a8c57600080fd5b5061173d90506121ff565b6000611edd83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612ea6565b612aeb826001600160a01b0316612f00565b612b3c576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310612b7a5780518252601f199092019160209182019101612b5b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612bdc576040519150601f19603f3d011682016040523d82523d6000602084013e612be1565b606091505b509150915081612c38576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115612c9157808060200190516020811015612c5457600080fd5b5051612c915760405162461bcd60e51b815260040180806020018281038252602a815260200180612fe5602a913960400191505060405180910390fd5b50505050565b60008183612d235760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612ce8578181015183820152602001612cd0565b50505050905090810190601f168015612d155780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581612d2f57fe5b0495945050505050565b8015612e64576000612d5c600254610aef60015485611e8490919063ffffffff16565b6040805184815260208101839052428183015290519192507f33fd2845a0f10293482de360244dd4ad31ddbb4b8c4a1ded3875cf8ebfba184b919081900360600190a1612dc4612daa611dc5565b6003546001600160a01b031690600063ffffffff611f8216565b612de8612dcf611dc5565b6003546001600160a01b0316908363ffffffff611f8216565b612df0611dc5565b60035460408051631ee0d7e560e31b81526001600160a01b039283166004820152602481018590529051929091169163f706bf289160448082019260009290919082900301818387803b158015612e4657600080fd5b505af1158015612e5a573d6000803e3d6000fd5b505050505061173d565b6040805160008082526020820152428183015290517f33fd2845a0f10293482de360244dd4ad31ddbb4b8c4a1ded3875cf8ebfba184b9181900360600190a150565b60008184841115612ef85760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612ce8578181015183820152602001612cd0565b505050900390565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590612f3457508115155b94935050505056fe746f6b656e20697320646566696e6564206173206e6f742073616c76616761626c655468652073656e6465722068617320746f206265206d756c7469536967206f7220676f7665726e616e63655468652073656e6465722068617320746f2062652074686520636f6e74726f6c6c6572206f72207661756c74206f7220676f7665726e616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565647669727475616c20707269636520697320686967686572207468616e206e65656465645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a265627a7a72315820d986fe011097ab65b782b50480465b705a51567ea7adb2d6cba2e4fb5727730c64736f6c63430005100032000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000c95cbe4ca30055c787cb784be99d6a8494d0d197000000000000000000000000ab7fa2b2985bccfc13c6d86b1d5a17486ab1e04c
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102955760003560e01c80638cc8b9fa11610167578063bfd131f1116100ce578063dff2e31511610087578063dff2e315146105b2578063e70a2738146105ba578063ec5a61ae146105c2578063f77c4791146105ee578063f7c618c1146105f6578063fbfa77cf146105fe57610295565b8063bfd131f114610556578063c2a2a07b1461055e578063c6008e0514610566578063ce8c42e81461056e578063d103be701461058b578063db668884146105aa57610295565b806394b6f9d41161012057806394b6f9d4146104c4578063975057e7146104ea5780639e5914da146104f25780639f9c043614610518578063b60f151a14610546578063b88a802f1461054e57610295565b80638cc8b9fa1461044a5780638d0c09c3146104525780638e84c4811461046f5780638ea875f31461048e5780638eab5923146104965780639137c1a71461049e57610295565b806345d01e4a1161020b5780635dbeffe5116101c45780635dbeffe514610405578063693448e31461040d5780636f307dc3146104155780637bb7bed11461041d578063834d81851461043a578063872f0b971461044257610295565b806345d01e4a146103b75780634a8cfa69146103bf5780634fa5d854146103c757806350185946146103cf578063596fa9e3146103f55780635aa6e675146103fd57610295565b8063279f8a171161025d578063279f8a1714610369578063284d30ef146103715780632e1e0462146103975780633332ec0e1461039f57806336e0004a146103a75780633fc8cef3146103af57610295565b8063026a0dd01461029a5780630dff5c31146102b45780631113ef52146102ee5780631441a5a9146103265780631c02bc311461034a575b600080fd5b6102a2610606565b60408051918252519081900360200190f35b6102da600480360360208110156102ca57600080fd5b50356001600160a01b031661060c565b604080519115158252519081900360200190f35b6103246004803603606081101561030457600080fd5b506001600160a01b03813581169160208101359091169060400135610621565b005b61032e610751565b604080516001600160a01b039092168252519081900360200190f35b6103246004803603602081101561036057600080fd5b50351515610760565b61032e610833565b6103246004803603602081101561038757600080fd5b50356001600160a01b031661084b565b61032e610930565b61032e610948565b61032e610957565b61032e61096d565b6102a2610985565b610324610b8c565b610324610eb5565b6102da600480360360208110156103e557600080fd5b50356001600160a01b0316611083565b61032e611098565b61032e6110b0565b61032e611130565b61032e611148565b61032e611157565b61032e6004803603602081101561043357600080fd5b5035611166565b6102da61118d565b6102da61119b565b61032e6111a4565b61032e6004803603602081101561046857600080fd5b50356111bc565b6103246004803603602081101561048557600080fd5b503515156111c9565b6102a2611295565b6102da61129b565b610324600480360360208110156104b457600080fd5b50356001600160a01b03166112aa565b6102da600480360360208110156104da57600080fd5b50356001600160a01b03166113e0565b61032e6113f5565b6103246004803603602081101561050857600080fd5b50356001600160a01b0316611404565b6103246004803603604081101561052e57600080fd5b506001600160a01b03813516906020013515156114df565b6102a26115c3565b6103246115c9565b610324611740565b6102da61193b565b61032e611940565b6103246004803603602081101561058457600080fd5b5035611958565b610324600480360360208110156105a157600080fd5b50351515611c7c565b61032e611d51565b61032e611d69565b61032e611d81565b61032e600480360360408110156105d857600080fd5b506001600160a01b038135169060200135611d90565b61032e611dc5565b61032e611e14565b61032e611e23565b60025481565b600f6020526000908152604090205460ff1681565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b15801561066c57600080fd5b505afa158015610680573d6000803e3d6000fd5b505050506040513d602081101561069657600080fd5b50516106da576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b6001600160a01b03821660009081526011602052604090205460ff16156107325760405162461bcd60e51b8152600401808060200182810382526022815260200180612f3d6022913960400191505060405180910390fd5b61074c6001600160a01b038316848363ffffffff611e3216565b505050565b6004546001600160a01b031681565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b1580156107ab57600080fd5b505afa1580156107bf573d6000803e3d6000fd5b505050506040513d60208110156107d557600080fd5b5051610819576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b601080549115156101000261ff0019909216919091179055565b737fc66500c84a76ad7e9c93437bfc5ac33e2ddae981565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b15801561089657600080fd5b505afa1580156108aa573d6000803e3d6000fd5b505050506040513d60208110156108c057600080fd5b5051610904576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b601080546001600160a01b039092166301000000026301000000600160b81b0319909216919091179055565b73d9e1ce17f2641f24ae83637ab66a2cca9c378b9f81565b6008546001600160a01b031681565b601054630100000090046001600160a01b031681565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b601054600090610100900460ff1615610a545760085460065460408051631b46cf8360e11b81526001600160a01b0392831660048201529051919092169163368d9f06916024808301926020929190829003018186803b1580156109e857600080fd5b505afa1580156109fc573d6000803e3d6000fd5b505050506040513d6020811015610a1257600080fd5b50516007541115610a545760405162461bcd60e51b815260040180806020018281038252602381526020018061300f6023913960400191505060405180910390fd5b600754600654604080516370a0823160e01b81523060048201529051600093610afb93670de0b6b3a764000093610aef936001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610ab757600080fd5b505afa158015610acb573d6000803e3d6000fd5b505050506040513d6020811015610ae157600080fd5b50519063ffffffff611e8416565b9063ffffffff611ee616565b600554604080516370a0823160e01b81523060048201529051929350610b86926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610b4d57600080fd5b505afa158015610b61573d6000803e3d6000fd5b505050506040513d6020811015610b7757600080fd5b5051829063ffffffff611f2816565b91505090565b6009546001600160a01b0316331480610bbd5750610ba8611dc5565b6001600160a01b0316336001600160a01b0316145b80610be05750610bcb6110b0565b6001600160a01b0316336001600160a01b0316145b610c1b5760405162461bcd60e51b815260040180806020018281038252603a815260200180612f8a603a913960400191505060405180910390fd5b601054610100900460ff1615610ce75760085460065460408051631b46cf8360e11b81526001600160a01b0392831660048201529051919092169163368d9f06916024808301926020929190829003018186803b158015610c7b57600080fd5b505afa158015610c8f573d6000803e3d6000fd5b505050506040513d6020811015610ca557600080fd5b50516007541115610ce75760405162461bcd60e51b815260040180806020018281038252602381526020018061300f6023913960400191505060405180910390fd5b600554604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610d3257600080fd5b505afa158015610d46573d6000803e3d6000fd5b505050506040513d6020811015610d5c57600080fd5b5051600654600554919250610d85916001600160a01b039081169116600063ffffffff611f8216565b600654600554610da8916001600160a01b0391821691168363ffffffff611f8216565b6006546004805460408051632befabbf60e01b8152928301859052600160248401526001600160a01b03918216604484015251921691632befabbf916064808201926020929091908290030181600087803b158015610e0657600080fd5b505af1158015610e1a573d6000803e3d6000fd5b505050506040513d6020811015610e3057600080fd5b505060085460065460408051631b46cf8360e11b81526001600160a01b039283166004820152905191909216925063368d9f0691602480820192602092909190829003018186803b158015610e8457600080fd5b505afa158015610e98573d6000803e3d6000fd5b505050506040513d6020811015610eae57600080fd5b5051600755565b6009546001600160a01b0316331480610ee65750610ed1611dc5565b6001600160a01b0316336001600160a01b0316145b80610f095750610ef46110b0565b6001600160a01b0316336001600160a01b0316145b610f445760405162461bcd60e51b815260040180806020018281038252603a815260200180612f8a603a913960400191505060405180910390fd5b601054610100900460ff16156110105760085460065460408051631b46cf8360e11b81526001600160a01b0392831660048201529051919092169163368d9f06916024808301926020929190829003018186803b158015610fa457600080fd5b505afa158015610fb8573d6000803e3d6000fd5b505050506040513d6020811015610fce57600080fd5b505160075411156110105760405162461bcd60e51b815260040180806020018281038252602381526020018061300f6023913960400191505060405180910390fd5b60105460ff161561102357611023612095565b61102b6121ff565b611033610b8c565b60085460065460408051631b46cf8360e11b81526001600160a01b0392831660048201529051919092169163368d9f06916024808301926020929190829003018186803b158015610e8457600080fd5b60116020526000908152604090205460ff1681565b737a250d5630b4cf539739df2c5dacb4c659f2488d81565b60008060009054906101000a90046001600160a01b03166001600160a01b0316635aa6e6756040518163ffffffff1660e01b815260040160206040518083038186803b1580156110ff57600080fd5b505afa158015611113573d6000803e3d6000fd5b505050506040513d602081101561112957600080fd5b5051905090565b73c00e94cb662c3520282e6f5717214004a7f2688881565b600a546001600160a01b031681565b6005546001600160a01b031681565b600b818154811061117357fe5b6000918252602090912001546001600160a01b0316905081565b601054610100900460ff1681565b60105460ff1681565b736b175474e89094c44da98b954eedeac495271d0f81565b600d818154811061117357fe5b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b15801561121457600080fd5b505afa158015611228573d6000803e3d6000fd5b505050506040513d602081101561123e57600080fd5b5051611282576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b6010805460ff1916911515919091179055565b60075481565b60105462010000900460ff1681565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b1580156112f557600080fd5b505afa158015611309573d6000803e3d6000fd5b505050506040513d602081101561131f57600080fd5b5051611363576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b6001600160a01b0381166113be576040805162461bcd60e51b815260206004820152601e60248201527f6e65772073746f726167652073686f756c646e277420626520656d7074790000604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600e6020526000908152604090205460ff1681565b6000546001600160a01b031681565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b15801561144f57600080fd5b505afa158015611463573d6000803e3d6000fd5b505050506040513d602081101561147957600080fd5b50516114bd576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b15801561152a57600080fd5b505afa15801561153e573d6000803e3d6000fd5b505050506040513d602081101561155457600080fd5b5051611598576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b6001600160a01b03919091166000908152600e60205260409020805460ff1916911515919091179055565b60015481565b601054630100000090046001600160a01b031633148061160157506115ec6110b0565b6001600160a01b0316336001600160a01b0316145b61163c5760405162461bcd60e51b815260040180806020018281038252602b815260200180612f5f602b913960400191505060405180910390fd5b60105462010000900460ff16611699576040805162461bcd60e51b815260206004820152601f60248201527f72657761726420636c61696d61626c65206973206e6f7420616c6c6f77656400604482015290519081900360640190fd5b6116a1612095565b600a54604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156116ec57600080fd5b505afa158015611700573d6000803e3d6000fd5b505050506040513d602081101561171657600080fd5b50519050801561173d57600a5461173d906001600160a01b0316338363ffffffff611e3216565b50565b6009546001600160a01b0316331480611771575061175c611dc5565b6001600160a01b0316336001600160a01b0316145b80611794575061177f6110b0565b6001600160a01b0316336001600160a01b0316145b6117cf5760405162461bcd60e51b815260040180806020018281038252603a815260200180612f8a603a913960400191505060405180910390fd5b601054610100900460ff161561189b5760085460065460408051631b46cf8360e11b81526001600160a01b0392831660048201529051919092169163368d9f06916024808301926020929190829003018186803b15801561182f57600080fd5b505afa158015611843573d6000803e3d6000fd5b505050506040513d602081101561185957600080fd5b5051600754111561189b5760405162461bcd60e51b815260040180806020018281038252602381526020018061300f6023913960400191505060405180910390fd5b6118a361299a565b600954600554604080516370a0823160e01b81523060048201529051611033936001600160a01b039081169316916370a08231916024808301926020929190829003018186803b1580156118f657600080fd5b505afa15801561190a573d6000803e3d6000fd5b505050506040513d602081101561192057600080fd5b50516005546001600160a01b0316919063ffffffff611e3216565b600190565b73875773784af8135ea0ef43b5a374aad105c5d39e81565b6009546001600160a01b03163314806119895750611974611dc5565b6001600160a01b0316336001600160a01b0316145b806119ac57506119976110b0565b6001600160a01b0316336001600160a01b0316145b6119e75760405162461bcd60e51b815260040180806020018281038252603a815260200180612f8a603a913960400191505060405180910390fd5b600554604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611a3257600080fd5b505afa158015611a46573d6000803e3d6000fd5b505050506040513d6020811015611a5c57600080fd5b5051600654604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015611aaf57600080fd5b505afa158015611ac3573d6000803e3d6000fd5b505050506040513d6020811015611ad957600080fd5b5051600754909150600090611b0390670de0b6b3a764000090610aef90859063ffffffff611e8416565b90506000611b2382610aef87670de0b6b3a764000063ffffffff611e8416565b90506000611b43670de0b6b3a7640000610aef868563ffffffff611e8416565b600654604080516345985a8b60e11b81526004810184905290519293506001600160a01b0390911691638b30b516916024808201926020929091908290030181600087803b158015611b9457600080fd5b505af1158015611ba8573d6000803e3d6000fd5b505050506040513d6020811015611bbe57600080fd5b5050600554604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611c0b57600080fd5b505afa158015611c1f573d6000803e3d6000fd5b505050506040513d6020811015611c3557600080fd5b5051600954909150611c73906001600160a01b0316611c5a838963ffffffff612a9716565b6005546001600160a01b0316919063ffffffff611e3216565b50505050505050565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b158015611cc757600080fd5b505afa158015611cdb573d6000803e3d6000fd5b505050506040513d6020811015611cf157600080fd5b5051611d35576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b60108054911515620100000262ff000019909216919091179055565b734da27a545c0c5b758a6ba100e3a049001de870f581565b733fe7940616e5bc47b0775a0dccf6237893353bb481565b6006546001600160a01b031681565b600c6020528160005260406000208181548110611da957fe5b6000918252602090912001546001600160a01b03169150829050565b60008060009054906101000a90046001600160a01b03166001600160a01b031663f77c47916040518163ffffffff1660e01b815260040160206040518083038186803b1580156110ff57600080fd5b6003546001600160a01b031681565b6009546001600160a01b031681565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261074c908490612ad9565b600082611e9357506000611ee0565b82820282848281611ea057fe5b0414611edd5760405162461bcd60e51b8152600401808060200182810382526021815260200180612fc46021913960400191505060405180910390fd5b90505b92915050565b6000611edd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612c97565b600082820183811015611edd576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b801580612008575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015611fda57600080fd5b505afa158015611fee573d6000803e3d6000fd5b505050506040513d602081101561200457600080fd5b5051155b6120435760405162461bcd60e51b81526004018080602001828103825260368152602001806130326036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261074c908490612ad9565b600654604080516345985a8b60e11b815260006004820181905291516001600160a01b0390931692638b30b51692602480840193602093929083900390910190829087803b1580156120e657600080fd5b505af11580156120fa573d6000803e3d6000fd5b505050506040513d602081101561211057600080fd5b5050600a5460408051637e90d7ef60e01b815230600482015290516000926001600160a01b031691637e90d7ef916024808301926020929190829003018186803b15801561215d57600080fd5b505afa158015612171573d6000803e3d6000fd5b505050506040513d602081101561218757600080fd5b50519050801561173d57600a54604080516309a99b4f60e41b81523060048201526024810184905290516001600160a01b0390921691639a99b4f09160448082019260009290919082900301818387803b1580156121e457600080fd5b505af11580156121f8573d6000803e3d6000fd5b5050505050565b60005b600b54811015612592576000600b828154811061221b57fe5b60009182526020808320909101546001600160a01b0316808352600e90915260409091205490915060ff1661228c57604080516001600160a01b038316815290517fa109254e13e832bfd64172d2e42d884bf04105edcc0aea7671ca399638b838699181900360200190a15061258a565b604080516370a0823160e01b815230600482015290516000916001600160a01b038416916370a0823191602480820192602092909190829003018186803b1580156122d657600080fd5b505afa1580156122ea573d6000803e3d6000fd5b505050506040513d602081101561230057600080fd5b50519050801561258757604080516001600160a01b03841681526020810183905281517f3299e7c5a7981ab82269eda64d376314fb882cfe0f6ba4d1ff5a277211dbb334929181900390910190a16001600160a01b0382166000908152600f602052604081205460ff161561238a5750737a250d5630b4cf539739df2c5dacb4c659f2488d6123a1565b5073d9e1ce17f2641f24ae83637ab66a2cca9c378b9f5b6123bc6001600160a01b03841682600063ffffffff611f8216565b6123d66001600160a01b038416828463ffffffff611f8216565b806001600160a01b03166338ed1739836001600c6000886001600160a01b03166001600160a01b0316815260200190815260200160002030426040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03166001600160a01b03168152602001838152602001828103825285818154815260200191508054801561249757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612479575b50509650505050505050600060405180830381600087803b1580156124bb57600080fd5b505af11580156124cf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156124f857600080fd5b810190808051604051939291908464010000000082111561251857600080fd5b90830190602082018581111561252d57600080fd5b825186602082028301116401000000008211171561254a57600080fd5b82525081516020918201928201910280838360005b8381101561257757818101518382015260200161255f565b5050505090500160405250505050505b50505b600101612202565b50604080516370a0823160e01b8152306004820152905160009173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2916370a0823191602480820192602092909190829003018186803b1580156125e857600080fd5b505afa1580156125fc573d6000803e3d6000fd5b505050506040513d602081101561261257600080fd5b5051905061261f81612d39565b604080516370a0823160e01b8152306004820152905160009173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2916370a0823191602480820192602092909190829003018186803b15801561267457600080fd5b505afa158015612688573d6000803e3d6000fd5b505050506040513d602081101561269e57600080fd5b505190508015612925576040805173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281526020810183905281517f3299e7c5a7981ab82269eda64d376314fb882cfe0f6ba4d1ff5a277211dbb334929181900390910190a16005546001600160a01b03166000908152600f602052604081205460ff16156127355750737a250d5630b4cf539739df2c5dacb4c659f2488d61274c565b5073d9e1ce17f2641f24ae83637ab66a2cca9c378b9f5b61277273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc282600063ffffffff611f8216565b61279773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2828463ffffffff611f8216565b806001600160a01b03166338ed1739836001600d30426040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03166001600160a01b03168152602001838152602001828103825285818154815260200191508054801561283557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612817575b50509650505050505050600060405180830381600087803b15801561285957600080fd5b505af115801561286d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561289657600080fd5b81019080805160405193929190846401000000008211156128b657600080fd5b9083019060208201858111156128cb57600080fd5b82518660208202830111640100000000821117156128e857600080fd5b82525081516020918201928201910280838360005b838110156129155781810151838201526020016128fd565b5050505090500160405250505050505b600554604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561297057600080fd5b505afa158015612984573d6000803e3d6000fd5b505050506040513d60208110156121f857600080fd5b600654604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156129e557600080fd5b505afa1580156129f9573d6000803e3d6000fd5b505050506040513d6020811015612a0f57600080fd5b5051600654604080516345985a8b60e11b81526004810184905290519293506001600160a01b0390911691638b30b516916024808201926020929091908290030181600087803b158015612a6257600080fd5b505af1158015612a76573d6000803e3d6000fd5b505050506040513d6020811015612a8c57600080fd5b5061173d90506121ff565b6000611edd83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612ea6565b612aeb826001600160a01b0316612f00565b612b3c576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310612b7a5780518252601f199092019160209182019101612b5b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612bdc576040519150601f19603f3d011682016040523d82523d6000602084013e612be1565b606091505b509150915081612c38576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115612c9157808060200190516020811015612c5457600080fd5b5051612c915760405162461bcd60e51b815260040180806020018281038252602a815260200180612fe5602a913960400191505060405180910390fd5b50505050565b60008183612d235760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612ce8578181015183820152602001612cd0565b50505050905090810190601f168015612d155780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581612d2f57fe5b0495945050505050565b8015612e64576000612d5c600254610aef60015485611e8490919063ffffffff16565b6040805184815260208101839052428183015290519192507f33fd2845a0f10293482de360244dd4ad31ddbb4b8c4a1ded3875cf8ebfba184b919081900360600190a1612dc4612daa611dc5565b6003546001600160a01b031690600063ffffffff611f8216565b612de8612dcf611dc5565b6003546001600160a01b0316908363ffffffff611f8216565b612df0611dc5565b60035460408051631ee0d7e560e31b81526001600160a01b039283166004820152602481018590529051929091169163f706bf289160448082019260009290919082900301818387803b158015612e4657600080fd5b505af1158015612e5a573d6000803e3d6000fd5b505050505061173d565b6040805160008082526020820152428183015290517f33fd2845a0f10293482de360244dd4ad31ddbb4b8c4a1ded3875cf8ebfba184b9181900360600190a150565b60008184841115612ef85760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612ce8578181015183820152602001612cd0565b505050900390565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590612f3457508115155b94935050505056fe746f6b656e20697320646566696e6564206173206e6f742073616c76616761626c655468652073656e6465722068617320746f206265206d756c7469536967206f7220676f7665726e616e63655468652073656e6465722068617320746f2062652074686520636f6e74726f6c6c6572206f72207661756c74206f7220676f7665726e616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565647669727475616c20707269636520697320686967686572207468616e206e65656465645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a265627a7a72315820d986fe011097ab65b782b50480465b705a51567ea7adb2d6cba2e4fb5727730c64736f6c63430005100032
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c95cbe4ca30055c787cb784be99d6a8494d0d197000000000000000000000000ab7fa2b2985bccfc13c6d86b1d5a17486ab1e04c
-----Decoded View---------------
Arg [0] : _storage (address): 0xc95CbE4ca30055c787CB784BE99D6a8494d0d197
Arg [1] : _vault (address): 0xab7FA2B2985BCcfC13c6D86b1D5A17486ab1e04C
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000c95cbe4ca30055c787cb784be99d6a8494d0d197
Arg [1] : 000000000000000000000000ab7fa2b2985bccfc13c6d86b1d5a17486ab1e04c
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 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.