More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 13449622 | 1110 days ago | IN | 0 ETH | 0.27343108 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
IdleStrategyWETHMainnet
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 IdleStrategyWETHMainnet is IdleFinanceStrategy { // token addresses address constant public __idleUnderlying= address(0xC8E6CA6E96a326dC448307A5fDE90a0b21fd7f80); 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, weth, __idleUnderlying, _vault, __stkaave ) public { rewardTokens = [__comp, __idle, __aave]; reward2WETH[__comp] = [__comp, weth]; reward2WETH[__idle] = [__idle, weth]; reward2WETH[__aave] = [__aave, weth]; sell[__comp] = true; sell[__idle] = true; sell[__aave] = true; useUni[__comp] = false; useUni[__idle] = false; useUni[__aave] = false; useUni[weth] = 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 { uint256 startingWethBalance = IERC20(weth).balanceOf(address(this)); 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)); if (address(underlying) == weth) { wethBalance = wethBalance.sub(startingWethBalance); } notifyProfitInRewardToken(wethBalance); uint256 remainingWethBalance = IERC20(weth).balanceOf(address(this)); if (remainingWethBalance > 0 && address(underlying) != weth) { 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 ); } } /** * 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; function addToWhitelist(address _target) 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", "devdoc", "userdoc", "metadata", "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":"__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
60806040526010805462010000600160b81b03191676f49440c1f012d041802b25a73e5b0b9166a75c020000001790553480156200003c57600080fd5b50604051620037b4380380620037b4833981810160405260408110156200006257600080fd5b508051602090910151816000805160206200379483398151915273c8e6ca6e96a326dc448307a5fde90a0b21fd7f8083734da27a545c0c5b758a6ba100e3a049001de870f5848481806001600160a01b03811662000107576040805162461bcd60e51b815260206004820152601e60248201527f6e65772073746f726167652073686f756c646e277420626520656d7074790000604482015290519081900360640190fd5b600080546001600160a01b03199081166001600160a01b0393841617825560038054821695841695909517909455601e60019081556064600255600a8054888516908716179055600580548b85169087168117909155600680548b8616908816811790915560098054958b1695909716949094179095556010805461ff00191661010017905593815260116020526040808220805460ff1990811687179091559282528120805490921690931790555090505b600b5481101562000210576000600b8281548110620001d557fe5b60009182526020808320909101546001600160a01b031682526011905260409020805460ff19166001908117909155919091019050620001ba565b50600480546001600160a01b031990811673f00dd244228f51547f0563e60bca65a30fbf5f7f1782556010805460ff19166001179055600880549091167304ce60ed10f6d2cff3aa015fc7b950d13c113be5179081905560065460408051631b46cf8360e11b81526001600160a01b03928316948101949094525191169163368d9f06916024808301926020929190829003018186803b158015620002b457600080fd5b505afa158015620002c9573d6000803e3d6000fd5b505050506040513d6020811015620002e057600080fd5b505160075550506040805160608101825273c00e94cb662c3520282e6f5717214004a7f26888815273875773784af8135ea0ef43b5a374aad105c5d39e6020820152737fc66500c84a76ad7e9c93437bfc5ac33e2ddae991810191909152620003529350600b92509050600362000605565b506040805180820190915273c00e94cb662c3520282e6f5717214004a7f2688880825260008051602062003794833981519152602080840191909152600091909152600c9052620003c7907fd8388e4766529598dc17608f3575075c51f38ca3fcac0c3c095ddf9c48d145b390600262000605565b506040805180820190915273875773784af8135ea0ef43b5a374aad105c5d39e80825260008051602062003794833981519152602080840191909152600091909152600c90526200043c907f013331b76eda2f661655227dcd87ab7d8ab3513ffa5a214a3db633a30f6ab4c790600262000605565b5060408051808201909152737fc66500c84a76ad7e9c93437bfc5ac33e2ddae980825260008051602062003794833981519152602080840191909152600091909152600c9052620004b1907f80696685245d7c11c85d2ef334517db7fa4d4776eb899bd8122425f832299baa90600262000605565b50507f9e2df941629a7eb658bc132c043910ee485c8761ededd0afc5cddf02a2b22668805460ff1990811660019081179092557fe736d8711b21e772effab369c33edbbf2689d7ea251aed56d8f4242fa183008580548216831790557f725a80c5b26c8c7372c80bbc1af4d9ac6761000c21cc3ff52edade9b5ebd794680548216909217909155600f6020527f0f4404ebb5154c85432fc45418faf775cef3539698bb399dff209cbcfe89f7768054821690557fd040eb4a80f3eec797c0e34900e061565e3e2ca40ff1beacae8ccad63b2c13098054821690557f589fef3015f6a2277507edd06418bbc8d5c1c0e6e5391b62b685e037c61b32ff805482169055600080516020620037948339815191526000527f754d79a9e203e79a44b92bb75c764a817f4f89d44731b38107922e09532bb0cb80549091169055506010805462ff000019166201000017905562000699565b8280548282559060005260206000209081019282156200065d579160200282015b828111156200065d57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000626565b506200066b9291506200066f565b5090565b6200069691905b808211156200066b5780546001600160a01b031916815560010162000676565b90565b6130eb80620006a96000396000f3fe608060405234801561001057600080fd5b506004361061028a5760003560e01c80638d0c09c31161015c578063bfd131f1116100ce578063dff2e31511610087578063dff2e3151461059f578063e70a2738146105a7578063ec5a61ae146105af578063f77c4791146105db578063f7c618c1146105e3578063fbfa77cf146105eb5761028a565b8063bfd131f114610543578063c2a2a07b1461054b578063c6008e0514610553578063ce8c42e81461055b578063d103be7014610578578063db668884146105975761028a565b806394b6f9d41161012057806394b6f9d4146104b1578063975057e7146104d75780639e5914da146104df5780639f9c043614610505578063b60f151a14610533578063b88a802f1461053b5761028a565b80638d0c09c31461043f5780638e84c4811461045c5780638ea875f31461047b5780638eab5923146104835780639137c1a71461048b5761028a565b806345d01e4a116102005780635dbeffe5116101b95780635dbeffe5146103fa578063693448e3146104025780636f307dc31461040a5780637bb7bed114610412578063834d81851461042f578063872f0b97146104375761028a565b806345d01e4a146103ac5780634a8cfa69146103b45780634fa5d854146103bc57806350185946146103c4578063596fa9e3146103ea5780635aa6e675146103f25761028a565b8063279f8a1711610252578063279f8a171461035e578063284d30ef146103665780632e1e04621461038c5780633332ec0e1461039457806336e0004a1461039c5780633fc8cef3146103a45761028a565b8063026a0dd01461028f5780630dff5c31146102a95780631113ef52146102e35780631441a5a91461031b5780631c02bc311461033f575b600080fd5b6102976105f3565b60408051918252519081900360200190f35b6102cf600480360360208110156102bf57600080fd5b50356001600160a01b03166105f9565b604080519115158252519081900360200190f35b610319600480360360608110156102f957600080fd5b506001600160a01b0381358116916020810135909116906040013561060e565b005b61032361073e565b604080516001600160a01b039092168252519081900360200190f35b6103196004803603602081101561035557600080fd5b5035151561074d565b610323610820565b6103196004803603602081101561037c57600080fd5b50356001600160a01b0316610838565b61032361091d565b610323610935565b610323610944565b61032361095a565b610297610972565b610319610b79565b610319610ea2565b6102cf600480360360208110156103da57600080fd5b50356001600160a01b0316611070565b610323611085565b61032361109d565b61032361111d565b610323611135565b610323611144565b6103236004803603602081101561042857600080fd5b5035611153565b6102cf61117a565b6102cf611188565b6103236004803603602081101561045557600080fd5b5035611191565b6103196004803603602081101561047257600080fd5b5035151561119e565b61029761126a565b6102cf611270565b610319600480360360208110156104a157600080fd5b50356001600160a01b031661127f565b6102cf600480360360208110156104c757600080fd5b50356001600160a01b03166113b5565b6103236113ca565b610319600480360360208110156104f557600080fd5b50356001600160a01b03166113d9565b6103196004803603604081101561051b57600080fd5b506001600160a01b03813516906020013515156114b4565b610297611598565b61031961159e565b610319611715565b6102cf611910565b610323611915565b6103196004803603602081101561057157600080fd5b503561192d565b6103196004803603602081101561058e57600080fd5b50351515611c51565b610323611d26565b610323611d3e565b610323611d56565b610323600480360360408110156105c557600080fd5b506001600160a01b038135169060200135611d65565b610323611d9a565b610323611de9565b610323611df8565b60025481565b600f6020526000908152604090205460ff1681565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b15801561065957600080fd5b505afa15801561066d573d6000803e3d6000fd5b505050506040513d602081101561068357600080fd5b50516106c7576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b6001600160a01b03821660009081526011602052604090205460ff161561071f5760405162461bcd60e51b8152600401808060200182810382526022815260200180612f8c6022913960400191505060405180910390fd5b6107396001600160a01b038316848363ffffffff611e0716565b505050565b6004546001600160a01b031681565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b15801561079857600080fd5b505afa1580156107ac573d6000803e3d6000fd5b505050506040513d60208110156107c257600080fd5b5051610806576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b601080549115156101000261ff0019909216919091179055565b737fc66500c84a76ad7e9c93437bfc5ac33e2ddae981565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b15801561088357600080fd5b505afa158015610897573d6000803e3d6000fd5b505050506040513d60208110156108ad57600080fd5b50516108f1576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b601080546001600160a01b039092166301000000026301000000600160b81b0319909216919091179055565b73d9e1ce17f2641f24ae83637ab66a2cca9c378b9f81565b6008546001600160a01b031681565b601054630100000090046001600160a01b031681565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b601054600090610100900460ff1615610a415760085460065460408051631b46cf8360e11b81526001600160a01b0392831660048201529051919092169163368d9f06916024808301926020929190829003018186803b1580156109d557600080fd5b505afa1580156109e9573d6000803e3d6000fd5b505050506040513d60208110156109ff57600080fd5b50516007541115610a415760405162461bcd60e51b815260040180806020018281038252602381526020018061305e6023913960400191505060405180910390fd5b600754600654604080516370a0823160e01b81523060048201529051600093610ae893670de0b6b3a764000093610adc936001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610aa457600080fd5b505afa158015610ab8573d6000803e3d6000fd5b505050506040513d6020811015610ace57600080fd5b50519063ffffffff611e5916565b9063ffffffff611ebb16565b600554604080516370a0823160e01b81523060048201529051929350610b73926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610b3a57600080fd5b505afa158015610b4e573d6000803e3d6000fd5b505050506040513d6020811015610b6457600080fd5b5051829063ffffffff611efd16565b91505090565b6009546001600160a01b0316331480610baa5750610b95611d9a565b6001600160a01b0316336001600160a01b0316145b80610bcd5750610bb861109d565b6001600160a01b0316336001600160a01b0316145b610c085760405162461bcd60e51b815260040180806020018281038252603a815260200180612fd9603a913960400191505060405180910390fd5b601054610100900460ff1615610cd45760085460065460408051631b46cf8360e11b81526001600160a01b0392831660048201529051919092169163368d9f06916024808301926020929190829003018186803b158015610c6857600080fd5b505afa158015610c7c573d6000803e3d6000fd5b505050506040513d6020811015610c9257600080fd5b50516007541115610cd45760405162461bcd60e51b815260040180806020018281038252602381526020018061305e6023913960400191505060405180910390fd5b600554604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610d1f57600080fd5b505afa158015610d33573d6000803e3d6000fd5b505050506040513d6020811015610d4957600080fd5b5051600654600554919250610d72916001600160a01b039081169116600063ffffffff611f5716565b600654600554610d95916001600160a01b0391821691168363ffffffff611f5716565b6006546004805460408051632befabbf60e01b8152928301859052600160248401526001600160a01b03918216604484015251921691632befabbf916064808201926020929091908290030181600087803b158015610df357600080fd5b505af1158015610e07573d6000803e3d6000fd5b505050506040513d6020811015610e1d57600080fd5b505060085460065460408051631b46cf8360e11b81526001600160a01b039283166004820152905191909216925063368d9f0691602480820192602092909190829003018186803b158015610e7157600080fd5b505afa158015610e85573d6000803e3d6000fd5b505050506040513d6020811015610e9b57600080fd5b5051600755565b6009546001600160a01b0316331480610ed35750610ebe611d9a565b6001600160a01b0316336001600160a01b0316145b80610ef65750610ee161109d565b6001600160a01b0316336001600160a01b0316145b610f315760405162461bcd60e51b815260040180806020018281038252603a815260200180612fd9603a913960400191505060405180910390fd5b601054610100900460ff1615610ffd5760085460065460408051631b46cf8360e11b81526001600160a01b0392831660048201529051919092169163368d9f06916024808301926020929190829003018186803b158015610f9157600080fd5b505afa158015610fa5573d6000803e3d6000fd5b505050506040513d6020811015610fbb57600080fd5b50516007541115610ffd5760405162461bcd60e51b815260040180806020018281038252602381526020018061305e6023913960400191505060405180910390fd5b60105460ff16156110105761101061206a565b6110186121d4565b611020610b79565b60085460065460408051631b46cf8360e11b81526001600160a01b0392831660048201529051919092169163368d9f06916024808301926020929190829003018186803b158015610e7157600080fd5b60116020526000908152604090205460ff1681565b737a250d5630b4cf539739df2c5dacb4c659f2488d81565b60008060009054906101000a90046001600160a01b03166001600160a01b0316635aa6e6756040518163ffffffff1660e01b815260040160206040518083038186803b1580156110ec57600080fd5b505afa158015611100573d6000803e3d6000fd5b505050506040513d602081101561111657600080fd5b5051905090565b73c00e94cb662c3520282e6f5717214004a7f2688881565b600a546001600160a01b031681565b6005546001600160a01b031681565b600b818154811061116057fe5b6000918252602090912001546001600160a01b0316905081565b601054610100900460ff1681565b60105460ff1681565b600d818154811061116057fe5b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b1580156111e957600080fd5b505afa1580156111fd573d6000803e3d6000fd5b505050506040513d602081101561121357600080fd5b5051611257576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b6010805460ff1916911515919091179055565b60075481565b60105462010000900460ff1681565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b1580156112ca57600080fd5b505afa1580156112de573d6000803e3d6000fd5b505050506040513d60208110156112f457600080fd5b5051611338576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b6001600160a01b038116611393576040805162461bcd60e51b815260206004820152601e60248201527f6e65772073746f726167652073686f756c646e277420626520656d7074790000604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600e6020526000908152604090205460ff1681565b6000546001600160a01b031681565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b15801561142457600080fd5b505afa158015611438573d6000803e3d6000fd5b505050506040513d602081101561144e57600080fd5b5051611492576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b1580156114ff57600080fd5b505afa158015611513573d6000803e3d6000fd5b505050506040513d602081101561152957600080fd5b505161156d576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b6001600160a01b03919091166000908152600e60205260409020805460ff1916911515919091179055565b60015481565b601054630100000090046001600160a01b03163314806115d657506115c161109d565b6001600160a01b0316336001600160a01b0316145b6116115760405162461bcd60e51b815260040180806020018281038252602b815260200180612fae602b913960400191505060405180910390fd5b60105462010000900460ff1661166e576040805162461bcd60e51b815260206004820152601f60248201527f72657761726420636c61696d61626c65206973206e6f7420616c6c6f77656400604482015290519081900360640190fd5b61167661206a565b600a54604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156116c157600080fd5b505afa1580156116d5573d6000803e3d6000fd5b505050506040513d60208110156116eb57600080fd5b50519050801561171257600a54611712906001600160a01b0316338363ffffffff611e0716565b50565b6009546001600160a01b03163314806117465750611731611d9a565b6001600160a01b0316336001600160a01b0316145b80611769575061175461109d565b6001600160a01b0316336001600160a01b0316145b6117a45760405162461bcd60e51b815260040180806020018281038252603a815260200180612fd9603a913960400191505060405180910390fd5b601054610100900460ff16156118705760085460065460408051631b46cf8360e11b81526001600160a01b0392831660048201529051919092169163368d9f06916024808301926020929190829003018186803b15801561180457600080fd5b505afa158015611818573d6000803e3d6000fd5b505050506040513d602081101561182e57600080fd5b505160075411156118705760405162461bcd60e51b815260040180806020018281038252602381526020018061305e6023913960400191505060405180910390fd5b6118786129e9565b600954600554604080516370a0823160e01b81523060048201529051611020936001600160a01b039081169316916370a08231916024808301926020929190829003018186803b1580156118cb57600080fd5b505afa1580156118df573d6000803e3d6000fd5b505050506040513d60208110156118f557600080fd5b50516005546001600160a01b0316919063ffffffff611e0716565b600190565b73875773784af8135ea0ef43b5a374aad105c5d39e81565b6009546001600160a01b031633148061195e5750611949611d9a565b6001600160a01b0316336001600160a01b0316145b80611981575061196c61109d565b6001600160a01b0316336001600160a01b0316145b6119bc5760405162461bcd60e51b815260040180806020018281038252603a815260200180612fd9603a913960400191505060405180910390fd5b600554604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611a0757600080fd5b505afa158015611a1b573d6000803e3d6000fd5b505050506040513d6020811015611a3157600080fd5b5051600654604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015611a8457600080fd5b505afa158015611a98573d6000803e3d6000fd5b505050506040513d6020811015611aae57600080fd5b5051600754909150600090611ad890670de0b6b3a764000090610adc90859063ffffffff611e5916565b90506000611af882610adc87670de0b6b3a764000063ffffffff611e5916565b90506000611b18670de0b6b3a7640000610adc868563ffffffff611e5916565b600654604080516345985a8b60e11b81526004810184905290519293506001600160a01b0390911691638b30b516916024808201926020929091908290030181600087803b158015611b6957600080fd5b505af1158015611b7d573d6000803e3d6000fd5b505050506040513d6020811015611b9357600080fd5b5050600554604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611be057600080fd5b505afa158015611bf4573d6000803e3d6000fd5b505050506040513d6020811015611c0a57600080fd5b5051600954909150611c48906001600160a01b0316611c2f838963ffffffff612ae616565b6005546001600160a01b0316919063ffffffff611e0716565b50505050505050565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b158015611c9c57600080fd5b505afa158015611cb0573d6000803e3d6000fd5b505050506040513d6020811015611cc657600080fd5b5051611d0a576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b60108054911515620100000262ff000019909216919091179055565b734da27a545c0c5b758a6ba100e3a049001de870f581565b73c8e6ca6e96a326dc448307a5fde90a0b21fd7f8081565b6006546001600160a01b031681565b600c6020528160005260406000208181548110611d7e57fe5b6000918252602090912001546001600160a01b03169150829050565b60008060009054906101000a90046001600160a01b03166001600160a01b031663f77c47916040518163ffffffff1660e01b815260040160206040518083038186803b1580156110ec57600080fd5b6003546001600160a01b031681565b6009546001600160a01b031681565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610739908490612b28565b600082611e6857506000611eb5565b82820282848281611e7557fe5b0414611eb25760405162461bcd60e51b81526004018080602001828103825260218152602001806130136021913960400191505060405180910390fd5b90505b92915050565b6000611eb283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612ce6565b600082820183811015611eb2576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b801580611fdd575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015611faf57600080fd5b505afa158015611fc3573d6000803e3d6000fd5b505050506040513d6020811015611fd957600080fd5b5051155b6120185760405162461bcd60e51b81526004018080602001828103825260368152602001806130816036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610739908490612b28565b600654604080516345985a8b60e11b815260006004820181905291516001600160a01b0390931692638b30b51692602480840193602093929083900390910190829087803b1580156120bb57600080fd5b505af11580156120cf573d6000803e3d6000fd5b505050506040513d60208110156120e557600080fd5b5050600a5460408051637e90d7ef60e01b815230600482015290516000926001600160a01b031691637e90d7ef916024808301926020929190829003018186803b15801561213257600080fd5b505afa158015612146573d6000803e3d6000fd5b505050506040513d602081101561215c57600080fd5b50519050801561171257600a54604080516309a99b4f60e41b81523060048201526024810184905290516001600160a01b0390921691639a99b4f09160448082019260009290919082900301818387803b1580156121b957600080fd5b505af11580156121cd573d6000803e3d6000fd5b5050505050565b604080516370a0823160e01b8152306004820152905160009173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2916370a0823191602480820192602092909190829003018186803b15801561222957600080fd5b505afa15801561223d573d6000803e3d6000fd5b505050506040513d602081101561225357600080fd5b5051905060005b600b548110156125ea576000600b828154811061227357fe5b60009182526020808320909101546001600160a01b0316808352600e90915260409091205490915060ff166122e457604080516001600160a01b038316815290517fa109254e13e832bfd64172d2e42d884bf04105edcc0aea7671ca399638b838699181900360200190a1506125e2565b604080516370a0823160e01b815230600482015290516000916001600160a01b038416916370a0823191602480820192602092909190829003018186803b15801561232e57600080fd5b505afa158015612342573d6000803e3d6000fd5b505050506040513d602081101561235857600080fd5b5051905080156125df57604080516001600160a01b03841681526020810183905281517f3299e7c5a7981ab82269eda64d376314fb882cfe0f6ba4d1ff5a277211dbb334929181900390910190a16001600160a01b0382166000908152600f602052604081205460ff16156123e25750737a250d5630b4cf539739df2c5dacb4c659f2488d6123f9565b5073d9e1ce17f2641f24ae83637ab66a2cca9c378b9f5b6124146001600160a01b03841682600063ffffffff611f5716565b61242e6001600160a01b038416828463ffffffff611f5716565b806001600160a01b03166338ed1739836001600c6000886001600160a01b03166001600160a01b0316815260200190815260200160002030426040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03166001600160a01b0316815260200183815260200182810382528581815481526020019150805480156124ef57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116124d1575b50509650505050505050600060405180830381600087803b15801561251357600080fd5b505af1158015612527573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561255057600080fd5b810190808051604051939291908464010000000082111561257057600080fd5b90830190602082018581111561258557600080fd5b82518660208202830111640100000000821117156125a257600080fd5b82525081516020918201928201910280838360005b838110156125cf5781810151838201526020016125b7565b5050505090500160405250505050505b50505b60010161225a565b50604080516370a0823160e01b8152306004820152905160009173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2916370a0823191602480820192602092909190829003018186803b15801561264057600080fd5b505afa158015612654573d6000803e3d6000fd5b505050506040513d602081101561266a57600080fd5b50516005549091506001600160a01b031673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214156126a9576126a6818363ffffffff612ae616565b90505b6126b281612d88565b604080516370a0823160e01b8152306004820152905160009173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2916370a0823191602480820192602092909190829003018186803b15801561270757600080fd5b505afa15801561271b573d6000803e3d6000fd5b505050506040513d602081101561273157600080fd5b50519050801580159061276357506005546001600160a01b031673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214155b15610739576040805173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281526020810183905281517f3299e7c5a7981ab82269eda64d376314fb882cfe0f6ba4d1ff5a277211dbb334929181900390910190a16005546001600160a01b03166000908152600f602052604081205460ff16156127f55750737a250d5630b4cf539739df2c5dacb4c659f2488d61280c565b5073d9e1ce17f2641f24ae83637ab66a2cca9c378b9f5b61283273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc282600063ffffffff611f5716565b61285773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2828463ffffffff611f5716565b806001600160a01b03166338ed1739836001600d30426040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03166001600160a01b0316815260200183815260200182810382528581815481526020019150805480156128f557602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116128d7575b50509650505050505050600060405180830381600087803b15801561291957600080fd5b505af115801561292d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561295657600080fd5b810190808051604051939291908464010000000082111561297657600080fd5b90830190602082018581111561298b57600080fd5b82518660208202830111640100000000821117156129a857600080fd5b82525081516020918201928201910280838360005b838110156129d55781810151838201526020016129bd565b505050509050016040525050505050505050565b600654604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015612a3457600080fd5b505afa158015612a48573d6000803e3d6000fd5b505050506040513d6020811015612a5e57600080fd5b5051600654604080516345985a8b60e11b81526004810184905290519293506001600160a01b0390911691638b30b516916024808201926020929091908290030181600087803b158015612ab157600080fd5b505af1158015612ac5573d6000803e3d6000fd5b505050506040513d6020811015612adb57600080fd5b5061171290506121d4565b6000611eb283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612ef5565b612b3a826001600160a01b0316612f4f565b612b8b576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310612bc95780518252601f199092019160209182019101612baa565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612c2b576040519150601f19603f3d011682016040523d82523d6000602084013e612c30565b606091505b509150915081612c87576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115612ce057808060200190516020811015612ca357600080fd5b5051612ce05760405162461bcd60e51b815260040180806020018281038252602a815260200180613034602a913960400191505060405180910390fd5b50505050565b60008183612d725760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612d37578181015183820152602001612d1f565b50505050905090810190601f168015612d645780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581612d7e57fe5b0495945050505050565b8015612eb3576000612dab600254610adc60015485611e5990919063ffffffff16565b6040805184815260208101839052428183015290519192507f33fd2845a0f10293482de360244dd4ad31ddbb4b8c4a1ded3875cf8ebfba184b919081900360600190a1612e13612df9611d9a565b6003546001600160a01b031690600063ffffffff611f5716565b612e37612e1e611d9a565b6003546001600160a01b0316908363ffffffff611f5716565b612e3f611d9a565b60035460408051631ee0d7e560e31b81526001600160a01b039283166004820152602481018590529051929091169163f706bf289160448082019260009290919082900301818387803b158015612e9557600080fd5b505af1158015612ea9573d6000803e3d6000fd5b5050505050611712565b6040805160008082526020820152428183015290517f33fd2845a0f10293482de360244dd4ad31ddbb4b8c4a1ded3875cf8ebfba184b9181900360600190a150565b60008184841115612f475760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612d37578181015183820152602001612d1f565b505050900390565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590612f8357508115155b94935050505056fe746f6b656e20697320646566696e6564206173206e6f742073616c76616761626c655468652073656e6465722068617320746f206265206d756c7469536967206f7220676f7665726e616e63655468652073656e6465722068617320746f2062652074686520636f6e74726f6c6c6572206f72207661756c74206f7220676f7665726e616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565647669727475616c20707269636520697320686967686572207468616e206e65656465645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a265627a7a72315820f958a28cdde8a047eef04f2b11260b78d7f3a05c436aac477088c54dbaac3a7764736f6c63430005100032000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000c95cbe4ca30055c787cb784be99d6a8494d0d197000000000000000000000000fe09e53a81fe2808bc493ea64319109b5baa573e
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061028a5760003560e01c80638d0c09c31161015c578063bfd131f1116100ce578063dff2e31511610087578063dff2e3151461059f578063e70a2738146105a7578063ec5a61ae146105af578063f77c4791146105db578063f7c618c1146105e3578063fbfa77cf146105eb5761028a565b8063bfd131f114610543578063c2a2a07b1461054b578063c6008e0514610553578063ce8c42e81461055b578063d103be7014610578578063db668884146105975761028a565b806394b6f9d41161012057806394b6f9d4146104b1578063975057e7146104d75780639e5914da146104df5780639f9c043614610505578063b60f151a14610533578063b88a802f1461053b5761028a565b80638d0c09c31461043f5780638e84c4811461045c5780638ea875f31461047b5780638eab5923146104835780639137c1a71461048b5761028a565b806345d01e4a116102005780635dbeffe5116101b95780635dbeffe5146103fa578063693448e3146104025780636f307dc31461040a5780637bb7bed114610412578063834d81851461042f578063872f0b97146104375761028a565b806345d01e4a146103ac5780634a8cfa69146103b45780634fa5d854146103bc57806350185946146103c4578063596fa9e3146103ea5780635aa6e675146103f25761028a565b8063279f8a1711610252578063279f8a171461035e578063284d30ef146103665780632e1e04621461038c5780633332ec0e1461039457806336e0004a1461039c5780633fc8cef3146103a45761028a565b8063026a0dd01461028f5780630dff5c31146102a95780631113ef52146102e35780631441a5a91461031b5780631c02bc311461033f575b600080fd5b6102976105f3565b60408051918252519081900360200190f35b6102cf600480360360208110156102bf57600080fd5b50356001600160a01b03166105f9565b604080519115158252519081900360200190f35b610319600480360360608110156102f957600080fd5b506001600160a01b0381358116916020810135909116906040013561060e565b005b61032361073e565b604080516001600160a01b039092168252519081900360200190f35b6103196004803603602081101561035557600080fd5b5035151561074d565b610323610820565b6103196004803603602081101561037c57600080fd5b50356001600160a01b0316610838565b61032361091d565b610323610935565b610323610944565b61032361095a565b610297610972565b610319610b79565b610319610ea2565b6102cf600480360360208110156103da57600080fd5b50356001600160a01b0316611070565b610323611085565b61032361109d565b61032361111d565b610323611135565b610323611144565b6103236004803603602081101561042857600080fd5b5035611153565b6102cf61117a565b6102cf611188565b6103236004803603602081101561045557600080fd5b5035611191565b6103196004803603602081101561047257600080fd5b5035151561119e565b61029761126a565b6102cf611270565b610319600480360360208110156104a157600080fd5b50356001600160a01b031661127f565b6102cf600480360360208110156104c757600080fd5b50356001600160a01b03166113b5565b6103236113ca565b610319600480360360208110156104f557600080fd5b50356001600160a01b03166113d9565b6103196004803603604081101561051b57600080fd5b506001600160a01b03813516906020013515156114b4565b610297611598565b61031961159e565b610319611715565b6102cf611910565b610323611915565b6103196004803603602081101561057157600080fd5b503561192d565b6103196004803603602081101561058e57600080fd5b50351515611c51565b610323611d26565b610323611d3e565b610323611d56565b610323600480360360408110156105c557600080fd5b506001600160a01b038135169060200135611d65565b610323611d9a565b610323611de9565b610323611df8565b60025481565b600f6020526000908152604090205460ff1681565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b15801561065957600080fd5b505afa15801561066d573d6000803e3d6000fd5b505050506040513d602081101561068357600080fd5b50516106c7576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b6001600160a01b03821660009081526011602052604090205460ff161561071f5760405162461bcd60e51b8152600401808060200182810382526022815260200180612f8c6022913960400191505060405180910390fd5b6107396001600160a01b038316848363ffffffff611e0716565b505050565b6004546001600160a01b031681565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b15801561079857600080fd5b505afa1580156107ac573d6000803e3d6000fd5b505050506040513d60208110156107c257600080fd5b5051610806576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b601080549115156101000261ff0019909216919091179055565b737fc66500c84a76ad7e9c93437bfc5ac33e2ddae981565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b15801561088357600080fd5b505afa158015610897573d6000803e3d6000fd5b505050506040513d60208110156108ad57600080fd5b50516108f1576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b601080546001600160a01b039092166301000000026301000000600160b81b0319909216919091179055565b73d9e1ce17f2641f24ae83637ab66a2cca9c378b9f81565b6008546001600160a01b031681565b601054630100000090046001600160a01b031681565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b601054600090610100900460ff1615610a415760085460065460408051631b46cf8360e11b81526001600160a01b0392831660048201529051919092169163368d9f06916024808301926020929190829003018186803b1580156109d557600080fd5b505afa1580156109e9573d6000803e3d6000fd5b505050506040513d60208110156109ff57600080fd5b50516007541115610a415760405162461bcd60e51b815260040180806020018281038252602381526020018061305e6023913960400191505060405180910390fd5b600754600654604080516370a0823160e01b81523060048201529051600093610ae893670de0b6b3a764000093610adc936001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610aa457600080fd5b505afa158015610ab8573d6000803e3d6000fd5b505050506040513d6020811015610ace57600080fd5b50519063ffffffff611e5916565b9063ffffffff611ebb16565b600554604080516370a0823160e01b81523060048201529051929350610b73926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610b3a57600080fd5b505afa158015610b4e573d6000803e3d6000fd5b505050506040513d6020811015610b6457600080fd5b5051829063ffffffff611efd16565b91505090565b6009546001600160a01b0316331480610baa5750610b95611d9a565b6001600160a01b0316336001600160a01b0316145b80610bcd5750610bb861109d565b6001600160a01b0316336001600160a01b0316145b610c085760405162461bcd60e51b815260040180806020018281038252603a815260200180612fd9603a913960400191505060405180910390fd5b601054610100900460ff1615610cd45760085460065460408051631b46cf8360e11b81526001600160a01b0392831660048201529051919092169163368d9f06916024808301926020929190829003018186803b158015610c6857600080fd5b505afa158015610c7c573d6000803e3d6000fd5b505050506040513d6020811015610c9257600080fd5b50516007541115610cd45760405162461bcd60e51b815260040180806020018281038252602381526020018061305e6023913960400191505060405180910390fd5b600554604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610d1f57600080fd5b505afa158015610d33573d6000803e3d6000fd5b505050506040513d6020811015610d4957600080fd5b5051600654600554919250610d72916001600160a01b039081169116600063ffffffff611f5716565b600654600554610d95916001600160a01b0391821691168363ffffffff611f5716565b6006546004805460408051632befabbf60e01b8152928301859052600160248401526001600160a01b03918216604484015251921691632befabbf916064808201926020929091908290030181600087803b158015610df357600080fd5b505af1158015610e07573d6000803e3d6000fd5b505050506040513d6020811015610e1d57600080fd5b505060085460065460408051631b46cf8360e11b81526001600160a01b039283166004820152905191909216925063368d9f0691602480820192602092909190829003018186803b158015610e7157600080fd5b505afa158015610e85573d6000803e3d6000fd5b505050506040513d6020811015610e9b57600080fd5b5051600755565b6009546001600160a01b0316331480610ed35750610ebe611d9a565b6001600160a01b0316336001600160a01b0316145b80610ef65750610ee161109d565b6001600160a01b0316336001600160a01b0316145b610f315760405162461bcd60e51b815260040180806020018281038252603a815260200180612fd9603a913960400191505060405180910390fd5b601054610100900460ff1615610ffd5760085460065460408051631b46cf8360e11b81526001600160a01b0392831660048201529051919092169163368d9f06916024808301926020929190829003018186803b158015610f9157600080fd5b505afa158015610fa5573d6000803e3d6000fd5b505050506040513d6020811015610fbb57600080fd5b50516007541115610ffd5760405162461bcd60e51b815260040180806020018281038252602381526020018061305e6023913960400191505060405180910390fd5b60105460ff16156110105761101061206a565b6110186121d4565b611020610b79565b60085460065460408051631b46cf8360e11b81526001600160a01b0392831660048201529051919092169163368d9f06916024808301926020929190829003018186803b158015610e7157600080fd5b60116020526000908152604090205460ff1681565b737a250d5630b4cf539739df2c5dacb4c659f2488d81565b60008060009054906101000a90046001600160a01b03166001600160a01b0316635aa6e6756040518163ffffffff1660e01b815260040160206040518083038186803b1580156110ec57600080fd5b505afa158015611100573d6000803e3d6000fd5b505050506040513d602081101561111657600080fd5b5051905090565b73c00e94cb662c3520282e6f5717214004a7f2688881565b600a546001600160a01b031681565b6005546001600160a01b031681565b600b818154811061116057fe5b6000918252602090912001546001600160a01b0316905081565b601054610100900460ff1681565b60105460ff1681565b600d818154811061116057fe5b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b1580156111e957600080fd5b505afa1580156111fd573d6000803e3d6000fd5b505050506040513d602081101561121357600080fd5b5051611257576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b6010805460ff1916911515919091179055565b60075481565b60105462010000900460ff1681565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b1580156112ca57600080fd5b505afa1580156112de573d6000803e3d6000fd5b505050506040513d60208110156112f457600080fd5b5051611338576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b6001600160a01b038116611393576040805162461bcd60e51b815260206004820152601e60248201527f6e65772073746f726167652073686f756c646e277420626520656d7074790000604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600e6020526000908152604090205460ff1681565b6000546001600160a01b031681565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b15801561142457600080fd5b505afa158015611438573d6000803e3d6000fd5b505050506040513d602081101561144e57600080fd5b5051611492576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b1580156114ff57600080fd5b505afa158015611513573d6000803e3d6000fd5b505050506040513d602081101561152957600080fd5b505161156d576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b6001600160a01b03919091166000908152600e60205260409020805460ff1916911515919091179055565b60015481565b601054630100000090046001600160a01b03163314806115d657506115c161109d565b6001600160a01b0316336001600160a01b0316145b6116115760405162461bcd60e51b815260040180806020018281038252602b815260200180612fae602b913960400191505060405180910390fd5b60105462010000900460ff1661166e576040805162461bcd60e51b815260206004820152601f60248201527f72657761726420636c61696d61626c65206973206e6f7420616c6c6f77656400604482015290519081900360640190fd5b61167661206a565b600a54604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156116c157600080fd5b505afa1580156116d5573d6000803e3d6000fd5b505050506040513d60208110156116eb57600080fd5b50519050801561171257600a54611712906001600160a01b0316338363ffffffff611e0716565b50565b6009546001600160a01b03163314806117465750611731611d9a565b6001600160a01b0316336001600160a01b0316145b80611769575061175461109d565b6001600160a01b0316336001600160a01b0316145b6117a45760405162461bcd60e51b815260040180806020018281038252603a815260200180612fd9603a913960400191505060405180910390fd5b601054610100900460ff16156118705760085460065460408051631b46cf8360e11b81526001600160a01b0392831660048201529051919092169163368d9f06916024808301926020929190829003018186803b15801561180457600080fd5b505afa158015611818573d6000803e3d6000fd5b505050506040513d602081101561182e57600080fd5b505160075411156118705760405162461bcd60e51b815260040180806020018281038252602381526020018061305e6023913960400191505060405180910390fd5b6118786129e9565b600954600554604080516370a0823160e01b81523060048201529051611020936001600160a01b039081169316916370a08231916024808301926020929190829003018186803b1580156118cb57600080fd5b505afa1580156118df573d6000803e3d6000fd5b505050506040513d60208110156118f557600080fd5b50516005546001600160a01b0316919063ffffffff611e0716565b600190565b73875773784af8135ea0ef43b5a374aad105c5d39e81565b6009546001600160a01b031633148061195e5750611949611d9a565b6001600160a01b0316336001600160a01b0316145b80611981575061196c61109d565b6001600160a01b0316336001600160a01b0316145b6119bc5760405162461bcd60e51b815260040180806020018281038252603a815260200180612fd9603a913960400191505060405180910390fd5b600554604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611a0757600080fd5b505afa158015611a1b573d6000803e3d6000fd5b505050506040513d6020811015611a3157600080fd5b5051600654604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015611a8457600080fd5b505afa158015611a98573d6000803e3d6000fd5b505050506040513d6020811015611aae57600080fd5b5051600754909150600090611ad890670de0b6b3a764000090610adc90859063ffffffff611e5916565b90506000611af882610adc87670de0b6b3a764000063ffffffff611e5916565b90506000611b18670de0b6b3a7640000610adc868563ffffffff611e5916565b600654604080516345985a8b60e11b81526004810184905290519293506001600160a01b0390911691638b30b516916024808201926020929091908290030181600087803b158015611b6957600080fd5b505af1158015611b7d573d6000803e3d6000fd5b505050506040513d6020811015611b9357600080fd5b5050600554604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611be057600080fd5b505afa158015611bf4573d6000803e3d6000fd5b505050506040513d6020811015611c0a57600080fd5b5051600954909150611c48906001600160a01b0316611c2f838963ffffffff612ae616565b6005546001600160a01b0316919063ffffffff611e0716565b50505050505050565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b158015611c9c57600080fd5b505afa158015611cb0573d6000803e3d6000fd5b505050506040513d6020811015611cc657600080fd5b5051611d0a576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b60108054911515620100000262ff000019909216919091179055565b734da27a545c0c5b758a6ba100e3a049001de870f581565b73c8e6ca6e96a326dc448307a5fde90a0b21fd7f8081565b6006546001600160a01b031681565b600c6020528160005260406000208181548110611d7e57fe5b6000918252602090912001546001600160a01b03169150829050565b60008060009054906101000a90046001600160a01b03166001600160a01b031663f77c47916040518163ffffffff1660e01b815260040160206040518083038186803b1580156110ec57600080fd5b6003546001600160a01b031681565b6009546001600160a01b031681565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610739908490612b28565b600082611e6857506000611eb5565b82820282848281611e7557fe5b0414611eb25760405162461bcd60e51b81526004018080602001828103825260218152602001806130136021913960400191505060405180910390fd5b90505b92915050565b6000611eb283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612ce6565b600082820183811015611eb2576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b801580611fdd575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015611faf57600080fd5b505afa158015611fc3573d6000803e3d6000fd5b505050506040513d6020811015611fd957600080fd5b5051155b6120185760405162461bcd60e51b81526004018080602001828103825260368152602001806130816036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610739908490612b28565b600654604080516345985a8b60e11b815260006004820181905291516001600160a01b0390931692638b30b51692602480840193602093929083900390910190829087803b1580156120bb57600080fd5b505af11580156120cf573d6000803e3d6000fd5b505050506040513d60208110156120e557600080fd5b5050600a5460408051637e90d7ef60e01b815230600482015290516000926001600160a01b031691637e90d7ef916024808301926020929190829003018186803b15801561213257600080fd5b505afa158015612146573d6000803e3d6000fd5b505050506040513d602081101561215c57600080fd5b50519050801561171257600a54604080516309a99b4f60e41b81523060048201526024810184905290516001600160a01b0390921691639a99b4f09160448082019260009290919082900301818387803b1580156121b957600080fd5b505af11580156121cd573d6000803e3d6000fd5b5050505050565b604080516370a0823160e01b8152306004820152905160009173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2916370a0823191602480820192602092909190829003018186803b15801561222957600080fd5b505afa15801561223d573d6000803e3d6000fd5b505050506040513d602081101561225357600080fd5b5051905060005b600b548110156125ea576000600b828154811061227357fe5b60009182526020808320909101546001600160a01b0316808352600e90915260409091205490915060ff166122e457604080516001600160a01b038316815290517fa109254e13e832bfd64172d2e42d884bf04105edcc0aea7671ca399638b838699181900360200190a1506125e2565b604080516370a0823160e01b815230600482015290516000916001600160a01b038416916370a0823191602480820192602092909190829003018186803b15801561232e57600080fd5b505afa158015612342573d6000803e3d6000fd5b505050506040513d602081101561235857600080fd5b5051905080156125df57604080516001600160a01b03841681526020810183905281517f3299e7c5a7981ab82269eda64d376314fb882cfe0f6ba4d1ff5a277211dbb334929181900390910190a16001600160a01b0382166000908152600f602052604081205460ff16156123e25750737a250d5630b4cf539739df2c5dacb4c659f2488d6123f9565b5073d9e1ce17f2641f24ae83637ab66a2cca9c378b9f5b6124146001600160a01b03841682600063ffffffff611f5716565b61242e6001600160a01b038416828463ffffffff611f5716565b806001600160a01b03166338ed1739836001600c6000886001600160a01b03166001600160a01b0316815260200190815260200160002030426040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03166001600160a01b0316815260200183815260200182810382528581815481526020019150805480156124ef57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116124d1575b50509650505050505050600060405180830381600087803b15801561251357600080fd5b505af1158015612527573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561255057600080fd5b810190808051604051939291908464010000000082111561257057600080fd5b90830190602082018581111561258557600080fd5b82518660208202830111640100000000821117156125a257600080fd5b82525081516020918201928201910280838360005b838110156125cf5781810151838201526020016125b7565b5050505090500160405250505050505b50505b60010161225a565b50604080516370a0823160e01b8152306004820152905160009173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2916370a0823191602480820192602092909190829003018186803b15801561264057600080fd5b505afa158015612654573d6000803e3d6000fd5b505050506040513d602081101561266a57600080fd5b50516005549091506001600160a01b031673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214156126a9576126a6818363ffffffff612ae616565b90505b6126b281612d88565b604080516370a0823160e01b8152306004820152905160009173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2916370a0823191602480820192602092909190829003018186803b15801561270757600080fd5b505afa15801561271b573d6000803e3d6000fd5b505050506040513d602081101561273157600080fd5b50519050801580159061276357506005546001600160a01b031673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214155b15610739576040805173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281526020810183905281517f3299e7c5a7981ab82269eda64d376314fb882cfe0f6ba4d1ff5a277211dbb334929181900390910190a16005546001600160a01b03166000908152600f602052604081205460ff16156127f55750737a250d5630b4cf539739df2c5dacb4c659f2488d61280c565b5073d9e1ce17f2641f24ae83637ab66a2cca9c378b9f5b61283273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc282600063ffffffff611f5716565b61285773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2828463ffffffff611f5716565b806001600160a01b03166338ed1739836001600d30426040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03166001600160a01b0316815260200183815260200182810382528581815481526020019150805480156128f557602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116128d7575b50509650505050505050600060405180830381600087803b15801561291957600080fd5b505af115801561292d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561295657600080fd5b810190808051604051939291908464010000000082111561297657600080fd5b90830190602082018581111561298b57600080fd5b82518660208202830111640100000000821117156129a857600080fd5b82525081516020918201928201910280838360005b838110156129d55781810151838201526020016129bd565b505050509050016040525050505050505050565b600654604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015612a3457600080fd5b505afa158015612a48573d6000803e3d6000fd5b505050506040513d6020811015612a5e57600080fd5b5051600654604080516345985a8b60e11b81526004810184905290519293506001600160a01b0390911691638b30b516916024808201926020929091908290030181600087803b158015612ab157600080fd5b505af1158015612ac5573d6000803e3d6000fd5b505050506040513d6020811015612adb57600080fd5b5061171290506121d4565b6000611eb283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612ef5565b612b3a826001600160a01b0316612f4f565b612b8b576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310612bc95780518252601f199092019160209182019101612baa565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612c2b576040519150601f19603f3d011682016040523d82523d6000602084013e612c30565b606091505b509150915081612c87576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115612ce057808060200190516020811015612ca357600080fd5b5051612ce05760405162461bcd60e51b815260040180806020018281038252602a815260200180613034602a913960400191505060405180910390fd5b50505050565b60008183612d725760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612d37578181015183820152602001612d1f565b50505050905090810190601f168015612d645780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581612d7e57fe5b0495945050505050565b8015612eb3576000612dab600254610adc60015485611e5990919063ffffffff16565b6040805184815260208101839052428183015290519192507f33fd2845a0f10293482de360244dd4ad31ddbb4b8c4a1ded3875cf8ebfba184b919081900360600190a1612e13612df9611d9a565b6003546001600160a01b031690600063ffffffff611f5716565b612e37612e1e611d9a565b6003546001600160a01b0316908363ffffffff611f5716565b612e3f611d9a565b60035460408051631ee0d7e560e31b81526001600160a01b039283166004820152602481018590529051929091169163f706bf289160448082019260009290919082900301818387803b158015612e9557600080fd5b505af1158015612ea9573d6000803e3d6000fd5b5050505050611712565b6040805160008082526020820152428183015290517f33fd2845a0f10293482de360244dd4ad31ddbb4b8c4a1ded3875cf8ebfba184b9181900360600190a150565b60008184841115612f475760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612d37578181015183820152602001612d1f565b505050900390565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590612f8357508115155b94935050505056fe746f6b656e20697320646566696e6564206173206e6f742073616c76616761626c655468652073656e6465722068617320746f206265206d756c7469536967206f7220676f7665726e616e63655468652073656e6465722068617320746f2062652074686520636f6e74726f6c6c6572206f72207661756c74206f7220676f7665726e616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565647669727475616c20707269636520697320686967686572207468616e206e65656465645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a265627a7a72315820f958a28cdde8a047eef04f2b11260b78d7f3a05c436aac477088c54dbaac3a7764736f6c63430005100032
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c95cbe4ca30055c787cb784be99d6a8494d0d197000000000000000000000000fe09e53a81fe2808bc493ea64319109b5baa573e
-----Decoded View---------------
Arg [0] : _storage (address): 0xc95CbE4ca30055c787CB784BE99D6a8494d0d197
Arg [1] : _vault (address): 0xFE09e53A81Fe2808bc493ea64319109B5bAa573e
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000c95cbe4ca30055c787cb784be99d6a8494d0d197
Arg [1] : 000000000000000000000000fe09e53a81fe2808bc493ea64319109b5baa573e
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
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.