Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 58 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Sweep ERC20 | 15582596 | 858 days ago | IN | 0 ETH | 0.00387175 | ||||
Rebalance | 15576703 | 859 days ago | IN | 0 ETH | 0.00442742 | ||||
Rebalance | 15475347 | 874 days ago | IN | 0 ETH | 0.00224968 | ||||
Rebalance | 15382824 | 889 days ago | IN | 0 ETH | 0.00342261 | ||||
Rebalance | 15284150 | 905 days ago | IN | 0 ETH | 0.00608296 | ||||
Rebalance | 15250615 | 910 days ago | IN | 0 ETH | 0.00199059 | ||||
Rebalance | 14970419 | 956 days ago | IN | 0 ETH | 0.00737247 | ||||
Rebalance | 14713442 | 998 days ago | IN | 0 ETH | 0.01555104 | ||||
Rebalance | 14710325 | 998 days ago | IN | 0 ETH | 0.01191293 | ||||
Rebalance | 14710057 | 998 days ago | IN | 0 ETH | 0.01611404 | ||||
Rebalance | 14696401 | 1000 days ago | IN | 0 ETH | 0.02385895 | ||||
Rebalance | 14694140 | 1001 days ago | IN | 0 ETH | 0.02044701 | ||||
Rebalance | 14693206 | 1001 days ago | IN | 0 ETH | 0.02503279 | ||||
Rebalance | 14693169 | 1001 days ago | IN | 0 ETH | 0.01645502 | ||||
Rebalance | 14692909 | 1001 days ago | IN | 0 ETH | 0.02673169 | ||||
Rebalance | 14687499 | 1002 days ago | IN | 0 ETH | 0.01775924 | ||||
Rebalance | 14687408 | 1002 days ago | IN | 0 ETH | 0.01398228 | ||||
Rebalance | 14687364 | 1002 days ago | IN | 0 ETH | 0.02249596 | ||||
Rebalance | 14687234 | 1002 days ago | IN | 0 ETH | 0.01710011 | ||||
Rebalance | 14686730 | 1002 days ago | IN | 0 ETH | 0.02517635 | ||||
Rebalance | 14684627 | 1002 days ago | IN | 0 ETH | 0.00881473 | ||||
Rebalance | 14665431 | 1005 days ago | IN | 0 ETH | 0.01053186 | ||||
Rebalance | 14645978 | 1008 days ago | IN | 0 ETH | 0.0057688 | ||||
Rebalance | 14627221 | 1011 days ago | IN | 0 ETH | 0.01139939 | ||||
Rebalance | 14614828 | 1013 days ago | IN | 0 ETH | 0.01307863 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
15576703 | 859 days ago | 0.2001127 ETH | ||||
15576703 | 859 days ago | 0.2001127 ETH | ||||
15576703 | 859 days ago | 0.33795911 ETH | ||||
15576703 | 859 days ago | 0.33795911 ETH | ||||
15475347 | 874 days ago | 1.05981021 ETH | ||||
15475347 | 874 days ago | 1.05981021 ETH | ||||
15475347 | 874 days ago | 0.30934743 ETH | ||||
15475347 | 874 days ago | 0.30934743 ETH | ||||
15382824 | 889 days ago | 30.02447233 ETH | ||||
15382824 | 889 days ago | 30.02447233 ETH | ||||
15382824 | 889 days ago | 0.36018688 ETH | ||||
15382824 | 889 days ago | 0.36018688 ETH | ||||
15284150 | 905 days ago | 0.11261894 ETH | ||||
15284150 | 905 days ago | 0.11261894 ETH | ||||
15284150 | 905 days ago | 0.13738105 ETH | ||||
15284150 | 905 days ago | 0.13738105 ETH | ||||
15250615 | 910 days ago | 136.56211971 ETH | ||||
15250615 | 910 days ago | 136.56211971 ETH | ||||
15250615 | 910 days ago | 2.59523477 ETH | ||||
15250615 | 910 days ago | 2.59523477 ETH | ||||
14713442 | 998 days ago | 0.80206769 ETH | ||||
14713442 | 998 days ago | 0.80206769 ETH | ||||
14713442 | 998 days ago | 0.01487881 ETH | ||||
14713442 | 998 days ago | 0.01487881 ETH | ||||
14710325 | 998 days ago | 3.16261802 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
RariFuseStrategyETH
Compiler Version
v0.8.3+commit.8d00100c
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; import "./RariFuseStrategy.sol"; import "../../interfaces/token/IToken.sol"; // solhint-disable no-empty-blocks /// @title Deposit ETH in a Rari Fuse Pool and earn interest. contract RariFuseStrategyETH is RariFuseStrategy { constructor( address _pool, address _swapManager, uint256 _fusePoolId ) RariFuseStrategy(_pool, _swapManager, _fusePoolId) {} /// @dev Only receive ETH from either cToken or WETH receive() external payable { require(msg.sender == address(cToken) || msg.sender == WETH, "not-allowed-to-send-ether"); } function migrateFusePool(uint256 _newPoolId) external override onlyKeeper { address _newCToken = _cTokenByUnderlying(_newPoolId, address(0)); require(address(cToken) != _newCToken, "same-fuse-pool"); require(cToken.redeem(cToken.balanceOf(address(this))) == 0, "withdraw-from-fuse-pool-failed"); CToken(_newCToken).mint{value: address(this).balance}(); emit FusePoolChanged(_newPoolId, address(cToken), _newCToken); cToken = CToken(_newCToken); receiptToken = _newCToken; } /** * @dev This hook get called after collateral is redeemed from a Rari Fuse Pool * Vesper deals in WETH as collateral so convert ETH to WETH */ function _afterRedeem() internal override { TokenLike(WETH).deposit{value: address(this).balance}(); } /** * @dev During reinvest we have WETH as collateral but Rari Fuse accepts ETH. * Withdraw ETH from WETH before calling mint in Rari Fuse Pool. */ function _reinvest() internal override { uint256 _collateralBalance = collateralToken.balanceOf(address(this)); if (_collateralBalance != 0) { TokenLike(WETH).withdraw(_collateralBalance); cToken.mint{value: _collateralBalance}(); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ 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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // 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) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @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) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
pragma solidity >=0.6.2; 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); }
pragma solidity >=0.6.2; import './IUniswapV2Router01.sol'; interface IUniswapV2Router02 is IUniswapV2Router01 { 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; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; interface IAddressList { function add(address a) external returns (bool); function remove(address a) external returns (bool); function get(address a) external view returns (uint256); function contains(address a) external view returns (bool); function length() external view returns (uint256); function grantRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; interface IAddressListFactory { function ours(address a) external view returns (bool); function listCount() external view returns (uint256); function listAt(uint256 idx) external view returns (address); function createList() external returns (address listaddr); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; /* solhint-disable func-name-mixedcase */ import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; interface ISwapManager { event OracleCreated(address indexed _sender, address indexed _newOracle, uint256 _period); function N_DEX() external view returns (uint256); function ROUTERS(uint256 i) external view returns (IUniswapV2Router02); function bestOutputFixedInput( address _from, address _to, uint256 _amountIn ) external view returns ( address[] memory path, uint256 amountOut, uint256 rIdx ); function bestPathFixedInput( address _from, address _to, uint256 _amountIn, uint256 _i ) external view returns (address[] memory path, uint256 amountOut); function bestInputFixedOutput( address _from, address _to, uint256 _amountOut ) external view returns ( address[] memory path, uint256 amountIn, uint256 rIdx ); function bestPathFixedOutput( address _from, address _to, uint256 _amountOut, uint256 _i ) external view returns (address[] memory path, uint256 amountIn); function safeGetAmountsOut( uint256 _amountIn, address[] memory _path, uint256 _i ) external view returns (uint256[] memory result); function unsafeGetAmountsOut( uint256 _amountIn, address[] memory _path, uint256 _i ) external view returns (uint256[] memory result); function safeGetAmountsIn( uint256 _amountOut, address[] memory _path, uint256 _i ) external view returns (uint256[] memory result); function unsafeGetAmountsIn( uint256 _amountOut, address[] memory _path, uint256 _i ) external view returns (uint256[] memory result); function comparePathsFixedInput( address[] memory pathA, address[] memory pathB, uint256 _amountIn, uint256 _i ) external view returns (address[] memory path, uint256 amountOut); function comparePathsFixedOutput( address[] memory pathA, address[] memory pathB, uint256 _amountOut, uint256 _i ) external view returns (address[] memory path, uint256 amountIn); function ours(address a) external view returns (bool); function oracleCount() external view returns (uint256); function oracleAt(uint256 idx) external view returns (address); function getOracle( address _tokenA, address _tokenB, uint256 _period, uint256 _i ) external view returns (address); function createOrUpdateOracle( address _tokenA, address _tokenB, uint256 _period, uint256 _i ) external returns (address oracleAddr); function consultForFree( address _from, address _to, uint256 _amountIn, uint256 _period, uint256 _i ) external view returns (uint256 amountOut, uint256 lastUpdatedAt); /// get the data we want and pay the gas to update function consult( address _from, address _to, uint256 _amountIn, uint256 _period, uint256 _i ) external returns ( uint256 amountOut, uint256 lastUpdatedAt, bool updated ); function updateOracles() external returns (uint256 updated, uint256 expected); function updateOracles(address[] memory _oracleAddrs) external returns (uint256 updated, uint256 expected); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; interface CToken { function accrueInterest() external returns (uint256); function balanceOf(address owner) external view returns (uint256); function balanceOfUnderlying(address owner) external returns (uint256); function borrowBalanceCurrent(address account) external returns (uint256); function borrowBalanceStored(address account) external view returns (uint256); function exchangeRateCurrent() external returns (uint256); function exchangeRateStored() external view returns (uint256); function getAccountSnapshot(address account) external view returns ( uint256, uint256, uint256, uint256 ); function borrow(uint256 borrowAmount) external returns (uint256); function mint() external payable; // For ETH function mint(uint256 mintAmount) external returns (uint256); // For ERC20 function redeem(uint256 redeemTokens) external returns (uint256); function redeemUnderlying(uint256 redeemAmount) external returns (uint256); function repayBorrow() external payable; // For ETH function repayBorrow(uint256 repayAmount) external returns (uint256); // For ERC20 function transfer(address user, uint256 amount) external returns (bool); function getCash() external view returns (uint256); function transferFrom( address owner, address user, uint256 amount ) external returns (bool); function underlying() external view returns (address); } interface Comptroller { function claimComp(address holder, address[] memory) external; function enterMarkets(address[] memory cTokens) external returns (uint256[] memory); function exitMarket(address cToken) external returns (uint256); function compAccrued(address holder) external view returns (uint256); function getAccountLiquidity(address account) external view returns ( uint256, uint256, uint256 ); function markets(address market) external view returns ( bool isListed, uint256 collateralFactorMantissa, bool isCompted ); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; interface IComptroller { function cTokensByUnderlying(address) external view returns (address cToken); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; interface IFusePoolDirectory { function pools(uint256) external view returns ( string memory name, address creator, address comptroller, uint256 blockPosted, uint256 timestampPosted ); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface TokenLike is IERC20 { function deposit() external payable; function withdraw(uint256) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; interface IStrategy { function rebalance() external; function sweepERC20(address _fromToken) external; function withdraw(uint256 _amount) external; function feeCollector() external view returns (address); function isReservedToken(address _token) external view returns (bool); function migrate(address _newStrategy) external; function token() external view returns (address); function totalValue() external view returns (uint256); function totalValueCurrent() external returns (uint256); function pool() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../bloq/IAddressList.sol"; interface IVesperPool is IERC20 { function deposit() external payable; function deposit(uint256 _share) external; function multiTransfer(address[] memory _recipients, uint256[] memory _amounts) external returns (bool); function excessDebt(address _strategy) external view returns (uint256); function permit( address, address, uint256, uint256, uint8, bytes32, bytes32 ) external; function poolRewards() external returns (address); function reportEarning( uint256 _profit, uint256 _loss, uint256 _payback ) external; function reportLoss(uint256 _loss) external; function resetApproval() external; function sweepERC20(address _fromToken) external; function withdraw(uint256 _amount) external; function withdrawETH(uint256 _amount) external; function whitelistedWithdraw(uint256 _amount) external; function governor() external view returns (address); function keepers() external view returns (IAddressList); function maintainers() external view returns (IAddressList); function feeCollector() external view returns (address); function pricePerShare() external view returns (uint256); function strategy(address _strategy) external view returns ( bool _active, uint256 _interestFee, uint256 _debtRate, uint256 _lastRebalance, uint256 _totalDebt, uint256 _totalLoss, uint256 _totalProfit, uint256 _debtRatio ); function stopEverything() external view returns (bool); function token() external view returns (IERC20); function tokensHere() external view returns (uint256); function totalDebtOf(address _strategy) external view returns (uint256); function totalValue() external view returns (uint256); function withdrawFee() external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "../interfaces/bloq/ISwapManager.sol"; import "../interfaces/bloq/IAddressList.sol"; import "../interfaces/bloq/IAddressListFactory.sol"; import "../interfaces/vesper/IStrategy.sol"; import "../interfaces/vesper/IVesperPool.sol"; abstract contract Strategy is IStrategy, Context { using SafeERC20 for IERC20; IERC20 public immutable collateralToken; address public receiptToken; address public immutable override pool; IAddressList public keepers; address public override feeCollector; ISwapManager public swapManager; uint256 public oraclePeriod = 3600; // 1h uint256 public oracleRouterIdx = 0; // Uniswap V2 uint256 public swapSlippage = 10000; // 100% Don't use oracles by default address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; address internal constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 internal constant MAX_UINT_VALUE = type(uint256).max; event UpdatedFeeCollector(address indexed previousFeeCollector, address indexed newFeeCollector); event UpdatedSwapManager(address indexed previousSwapManager, address indexed newSwapManager); event UpdatedSwapSlippage(uint256 oldSwapSlippage, uint256 newSwapSlippage); event UpdatedOracleConfig(uint256 oldPeriod, uint256 newPeriod, uint256 oldRouterIdx, uint256 newRouterIdx); constructor( address _pool, address _swapManager, address _receiptToken ) { require(_pool != address(0), "pool-address-is-zero"); require(_swapManager != address(0), "sm-address-is-zero"); swapManager = ISwapManager(_swapManager); pool = _pool; collateralToken = IVesperPool(_pool).token(); receiptToken = _receiptToken; } modifier onlyGovernor { require(_msgSender() == IVesperPool(pool).governor(), "caller-is-not-the-governor"); _; } modifier onlyKeeper() { require(keepers.contains(_msgSender()), "caller-is-not-a-keeper"); _; } modifier onlyPool() { require(_msgSender() == pool, "caller-is-not-vesper-pool"); _; } /** * @notice Add given address in keepers list. * @param _keeperAddress keeper address to add. */ function addKeeper(address _keeperAddress) external onlyGovernor { require(keepers.add(_keeperAddress), "add-keeper-failed"); } /** * @notice Create keeper list * NOTE: Any function with onlyKeeper modifier will not work until this function is called. * NOTE: Due to gas constraint this function cannot be called in constructor. * @param _addressListFactory To support same code in eth side chain, user _addressListFactory as param * ethereum- 0xded8217De022706A191eE7Ee0Dc9df1185Fb5dA3 * polygon-0xD10D5696A350D65A9AA15FE8B258caB4ab1bF291 */ function init(address _addressListFactory) external onlyGovernor { require(address(keepers) == address(0), "keeper-list-already-created"); // Prepare keeper list IAddressListFactory _factory = IAddressListFactory(_addressListFactory); keepers = IAddressList(_factory.createList()); require(keepers.add(_msgSender()), "add-keeper-failed"); } /** * @notice Migrate all asset and vault ownership,if any, to new strategy * @dev _beforeMigration hook can be implemented in child strategy to do extra steps. * @param _newStrategy Address of new strategy */ function migrate(address _newStrategy) external virtual override onlyPool { require(_newStrategy != address(0), "new-strategy-address-is-zero"); require(IStrategy(_newStrategy).pool() == pool, "not-valid-new-strategy"); _beforeMigration(_newStrategy); IERC20(receiptToken).safeTransfer(_newStrategy, IERC20(receiptToken).balanceOf(address(this))); collateralToken.safeTransfer(_newStrategy, collateralToken.balanceOf(address(this))); } /** * @notice Remove given address from keepers list. * @param _keeperAddress keeper address to remove. */ function removeKeeper(address _keeperAddress) external onlyGovernor { require(keepers.remove(_keeperAddress), "remove-keeper-failed"); } /** * @notice Update fee collector * @param _feeCollector fee collector address */ function updateFeeCollector(address _feeCollector) external onlyGovernor { require(_feeCollector != address(0), "fee-collector-address-is-zero"); require(_feeCollector != feeCollector, "fee-collector-is-same"); emit UpdatedFeeCollector(feeCollector, _feeCollector); feeCollector = _feeCollector; } /** * @notice Update swap manager address * @param _swapManager swap manager address */ function updateSwapManager(address _swapManager) external onlyGovernor { require(_swapManager != address(0), "sm-address-is-zero"); require(_swapManager != address(swapManager), "sm-is-same"); emit UpdatedSwapManager(address(swapManager), _swapManager); swapManager = ISwapManager(_swapManager); } function updateSwapSlippage(uint256 _newSwapSlippage) external onlyGovernor { require(_newSwapSlippage <= 10000, "invalid-slippage-value"); emit UpdatedSwapSlippage(swapSlippage, _newSwapSlippage); swapSlippage = _newSwapSlippage; } function updateOracleConfig(uint256 _newPeriod, uint256 _newRouterIdx) external onlyGovernor { require(_newRouterIdx < swapManager.N_DEX(), "invalid-router-index"); if (_newPeriod == 0) _newPeriod = oraclePeriod; require(_newPeriod > 59, "invalid-oracle-period"); emit UpdatedOracleConfig(oraclePeriod, _newPeriod, oracleRouterIdx, _newRouterIdx); oraclePeriod = _newPeriod; oracleRouterIdx = _newRouterIdx; } /// @dev Approve all required tokens function approveToken() external onlyKeeper { _approveToken(0); _approveToken(MAX_UINT_VALUE); } function setupOracles() external onlyKeeper { _setupOracles(); } /** * @dev Withdraw collateral token from lending pool. * @param _amount Amount of collateral token */ function withdraw(uint256 _amount) external override onlyPool { _withdraw(_amount); } /** * @dev Rebalance profit, loss and investment of this strategy */ function rebalance() external virtual override onlyKeeper { (uint256 _profit, uint256 _loss, uint256 _payback) = _generateReport(); IVesperPool(pool).reportEarning(_profit, _loss, _payback); _reinvest(); } /** * @dev sweep given token to feeCollector of strategy * @param _fromToken token address to sweep */ function sweepERC20(address _fromToken) external override onlyKeeper { require(feeCollector != address(0), "fee-collector-not-set"); require(_fromToken != address(collateralToken), "not-allowed-to-sweep-collateral"); require(!isReservedToken(_fromToken), "not-allowed-to-sweep"); if (_fromToken == ETH) { Address.sendValue(payable(feeCollector), address(this).balance); } else { uint256 _amount = IERC20(_fromToken).balanceOf(address(this)); IERC20(_fromToken).safeTransfer(feeCollector, _amount); } } /// @notice Returns address of token correspond to collateral token function token() external view override returns (address) { return receiptToken; } /// @dev Convert from 18 decimals to token defined decimals. Default no conversion. function convertFrom18(uint256 amount) public pure virtual returns (uint256) { return amount; } /** * @notice Calculate total value of asset under management * @dev Report total value in collateral token */ function totalValue() public view virtual override returns (uint256 _value); /** * @notice Calculate total value of asset under management (in real-time) * @dev Report total value in collateral token */ function totalValueCurrent() external virtual override returns (uint256) { return totalValue(); } /// @notice Check whether given token is reserved or not. Reserved tokens are not allowed to sweep. function isReservedToken(address _token) public view virtual override returns (bool); /** * @notice some strategy may want to prepare before doing migration. Example In Maker old strategy want to give vault ownership to new strategy * @param _newStrategy . */ function _beforeMigration(address _newStrategy) internal virtual; /** * @notice Generate report for current profit and loss. Also liquidate asset to payback * excess debt, if any. * @return _profit Calculate any realized profit and convert it to collateral, if not already. * @return _loss Calculate any loss that strategy has made on investment. Convert into collateral token. * @return _payback If strategy has any excess debt, we have to liquidate asset to payback excess debt. */ function _generateReport() internal virtual returns ( uint256 _profit, uint256 _loss, uint256 _payback ) { uint256 _excessDebt = IVesperPool(pool).excessDebt(address(this)); uint256 _totalDebt = IVesperPool(pool).totalDebtOf(address(this)); _profit = _realizeProfit(_totalDebt); _loss = _realizeLoss(_totalDebt); _payback = _liquidate(_excessDebt); } function _calcAmtOutAfterSlippage(uint256 _amount, uint256 _slippage) internal pure returns (uint256) { return (_amount * (10000 - _slippage)) / (10000); } function _simpleOraclePath(address _from, address _to) internal pure returns (address[] memory path) { if (_from == WETH || _to == WETH) { path = new address[](2); path[0] = _from; path[1] = _to; } else { path = new address[](3); path[0] = _from; path[1] = WETH; path[2] = _to; } } function _consultOracle( address _from, address _to, uint256 _amt ) internal returns (uint256, bool) { // from, to, amountIn, period, router (uint256 rate, uint256 lastUpdate, ) = swapManager.consult(_from, _to, _amt, oraclePeriod, oracleRouterIdx); // We're looking at a TWAP ORACLE with a 1 hr Period that has been updated within the last hour if ((lastUpdate > (block.timestamp - oraclePeriod)) && (rate != 0)) return (rate, true); return (0, false); } function _getOracleRate(address[] memory path, uint256 _amountIn) internal returns (uint256 amountOut) { require(path.length > 1, "invalid-oracle-path"); amountOut = _amountIn; bool isValid; for (uint256 i = 0; i < path.length - 1; i++) { (amountOut, isValid) = _consultOracle(path[i], path[i + 1], amountOut); require(isValid, "invalid-oracle-rate"); } } /** * @notice Safe swap via Uniswap / Sushiswap (better rate of the two) * @dev There are many scenarios when token swap via Uniswap can fail, so this * method will wrap Uniswap call in a 'try catch' to make it fail safe. * however, this method will throw minAmountOut is not met * @param _from address of from token * @param _to address of to token * @param _amountIn Amount to be swapped * @param _minAmountOut minimum amount out */ function _safeSwap( address _from, address _to, uint256 _amountIn, uint256 _minAmountOut ) internal { (address[] memory path, uint256 amountOut, uint256 rIdx) = swapManager.bestOutputFixedInput(_from, _to, _amountIn); if (_minAmountOut == 0) _minAmountOut = 1; if (amountOut != 0) { swapManager.ROUTERS(rIdx).swapExactTokensForTokens( _amountIn, _minAmountOut, path, address(this), block.timestamp ); } } // These methods can be implemented by the inheriting strategy. /* solhint-disable no-empty-blocks */ function _claimRewardsAndConvertTo(address _toToken) internal virtual {} /** * @notice Set up any oracles that are needed for this strategy. */ function _setupOracles() internal virtual {} /* solhint-enable */ // These methods must be implemented by the inheriting strategy function _withdraw(uint256 _amount) internal virtual; function _approveToken(uint256 _amount) internal virtual; /** * @notice Withdraw collateral to payback excess debt in pool. * @param _excessDebt Excess debt of strategy in collateral token * @return _payback amount in collateral token. Usually it is equal to excess debt. */ function _liquidate(uint256 _excessDebt) internal virtual returns (uint256 _payback); /** * @notice Calculate earning and withdraw/convert it into collateral token. * @param _totalDebt Total collateral debt of this strategy * @return _profit Profit in collateral token */ function _realizeProfit(uint256 _totalDebt) internal virtual returns (uint256 _profit); /** * @notice Calculate loss * @param _totalDebt Total collateral debt of this strategy * @return _loss Realized loss in collateral token */ function _realizeLoss(uint256 _totalDebt) internal virtual returns (uint256 _loss); /** * @notice Reinvest collateral. * @dev Once we file report back in pool, we might have some collateral in hand * which we want to reinvest aka deposit in lender/provider. */ function _reinvest() internal virtual; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; import "../Strategy.sol"; import "../../interfaces/compound/ICompound.sol"; /// @title This strategy will deposit collateral token in Compound and earn interest. abstract contract CompoundStrategy is Strategy { using SafeERC20 for IERC20; CToken internal cToken; address internal constant COMP = 0xc00e94Cb662C3520282E6f5717214004A7f26888; Comptroller internal constant COMPTROLLER = Comptroller(0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B); constructor( address _pool, address _swapManager, address _receiptToken ) Strategy(_pool, _swapManager, _receiptToken) { require(_receiptToken != address(0), "cToken-address-is-zero"); cToken = CToken(_receiptToken); swapSlippage = 10000; // disable oracles on reward swaps by default } /** * @notice Calculate total value using COMP accrued and cToken * @dev Report total value in collateral token */ function totalValue() public view virtual override returns (uint256 _totalValue) { _totalValue = _calculateTotalValue(COMPTROLLER.compAccrued(address(this))); } function totalValueCurrent() external virtual override returns (uint256 _totalValue) { _claimComp(); _totalValue = _calculateTotalValue(IERC20(COMP).balanceOf(address(this))); } function _calculateTotalValue(uint256 _compAccrued) internal view returns (uint256 _totalValue) { if (_compAccrued != 0) { (, _totalValue) = swapManager.bestPathFixedInput(COMP, address(collateralToken), _compAccrued, 0); } _totalValue += _convertToCollateral(cToken.balanceOf(address(this))); } function isReservedToken(address _token) public view virtual override returns (bool) { return _token == address(cToken) || _token == COMP; } /// @notice Approve all required tokens function _approveToken(uint256 _amount) internal virtual override { collateralToken.safeApprove(pool, _amount); collateralToken.safeApprove(address(cToken), _amount); for (uint256 i = 0; i < swapManager.N_DEX(); i++) { IERC20(COMP).safeApprove(address(swapManager.ROUTERS(i)), _amount); } } /** * @notice Claim COMP and transfer to new strategy * @param _newStrategy Address of new strategy. */ function _beforeMigration(address _newStrategy) internal virtual override { _claimComp(); IERC20(COMP).safeTransfer(_newStrategy, IERC20(COMP).balanceOf(address(this))); } /// @notice Claim comp function _claimComp() internal { address[] memory _markets = new address[](1); _markets[0] = address(cToken); COMPTROLLER.claimComp(address(this), _markets); } /// @notice Claim COMP and convert COMP into collateral token. function _claimRewardsAndConvertTo(address _toToken) internal virtual override { _claimComp(); uint256 _compAmount = IERC20(COMP).balanceOf(address(this)); if (_compAmount != 0) { uint256 minAmtOut = (swapSlippage != 10000) ? _calcAmtOutAfterSlippage( _getOracleRate(_simpleOraclePath(COMP, _toToken), _compAmount), swapSlippage ) : 1; _safeSwap(COMP, _toToken, _compAmount, minAmtOut); } } /// @notice Withdraw collateral to payback excess debt function _liquidate(uint256 _excessDebt) internal override returns (uint256 _payback) { if (_excessDebt != 0) { _payback = _safeWithdraw(_excessDebt); } } /** * @notice Calculate earning and withdraw it from Compound. * @dev Claim COMP and convert into collateral * @dev If somehow we got some collateral token in strategy then we want to * include those in profit. That's why we used 'return' outside 'if' condition. * @param _totalDebt Total collateral debt of this strategy * @return profit in collateral token */ function _realizeProfit(uint256 _totalDebt) internal virtual override returns (uint256) { _claimRewardsAndConvertTo(address(collateralToken)); uint256 _collateralBalance = _convertToCollateral(cToken.balanceOf(address(this))); if (_collateralBalance > _totalDebt) { _withdrawHere(_collateralBalance - _totalDebt); } return collateralToken.balanceOf(address(this)); } /** * @notice Calculate realized loss. * @return _loss Realized loss in collateral token */ function _realizeLoss(uint256 _totalDebt) internal view override returns (uint256 _loss) { uint256 _collateralBalance = _convertToCollateral(cToken.balanceOf(address(this))); if (_collateralBalance < _totalDebt) { _loss = _totalDebt - _collateralBalance; } } /// @notice Deposit collateral in Compound function _reinvest() internal virtual override { uint256 _collateralBalance = collateralToken.balanceOf(address(this)); if (_collateralBalance != 0) { require(cToken.mint(_collateralBalance) == 0, "deposit-to-compound-failed"); } } /// @dev Withdraw collateral and transfer it to pool function _withdraw(uint256 _amount) internal override { _safeWithdraw(_amount); collateralToken.safeTransfer(pool, collateralToken.balanceOf(address(this))); } /** * @notice Safe withdraw will make sure to check asking amount against available amount. * @param _amount Amount of collateral to withdraw. * @return Actual collateral withdrawn */ function _safeWithdraw(uint256 _amount) internal returns (uint256) { uint256 _collateralBalance = _convertToCollateral(cToken.balanceOf(address(this))); // Get available liquidity from Compound uint256 _availableLiquidity = cToken.getCash(); // Get minimum of _amount and _avaialbleLiquidity uint256 _withdrawAmount = _amount < _availableLiquidity ? _amount : _availableLiquidity; // Get minimum of _withdrawAmount and _collateralBalance return _withdrawHere(_withdrawAmount < _collateralBalance ? _withdrawAmount : _collateralBalance); } /// @dev Withdraw collateral here. Do not transfer to pool function _withdrawHere(uint256 _amount) internal returns (uint256) { if (_amount != 0) { require(cToken.redeemUnderlying(_amount) == 0, "withdraw-from-compound-failed"); _afterRedeem(); } return _amount; } function _setupOracles() internal virtual override { swapManager.createOrUpdateOracle(COMP, WETH, oraclePeriod, oracleRouterIdx); if (address(collateralToken) != WETH) { swapManager.createOrUpdateOracle(WETH, address(collateralToken), oraclePeriod, oracleRouterIdx); } } /** * @dev Compound support ETH as collateral not WETH. This hook will take * care of conversion from WETH to ETH and vice versa. * @dev This will be used in ETH strategy only, hence empty implementation */ //solhint-disable-next-line no-empty-blocks function _afterRedeem() internal virtual {} function _convertToCollateral(uint256 _cTokenAmount) internal view returns (uint256) { return (_cTokenAmount * cToken.exchangeRateStored()) / 1e18; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; import "../compound/CompoundStrategy.sol"; import "../../interfaces/rari-fuse/IComptroller.sol"; import "../../interfaces/rari-fuse/IFusePoolDirectory.sol"; /// @title This strategy will deposit collateral token in a Rari Fuse Pool and earn interest. contract RariFuseStrategy is CompoundStrategy { using SafeERC20 for IERC20; string public constant NAME = "RariFuse-Strategy"; string public constant VERSION = "3.0.13"; uint256 public immutable fusePoolId; address private constant FUSE_POOL_DIRECTORY = 0x835482FE0532f169024d5E9410199369aAD5C77E; event FusePoolChanged(uint256 indexed newFusePoolId, address indexed oldCToken, address indexed newCToken); // solhint-disable no-empty-blocks constructor( address _pool, address _swapManager, uint256 _fusePoolId ) CompoundStrategy(_pool, _swapManager, _cTokenByUnderlying(_fusePoolId, address(IVesperPool(_pool).token()))) { fusePoolId = _fusePoolId; } // solhint-enable no-empty-blocks /** * @notice Calculate total value using underlying token * @dev Report total value in collateral token */ function totalValue() public view override returns (uint256 _totalValue) { _totalValue = _convertToCollateral(cToken.balanceOf(address(this))); } /** * @notice Changes the underlying Fuse Pool to a new one * @dev Redeems cTokens from current fuse pool and mints cTokens of new Fuse Pool * @param _newPoolId Fuse Pool ID */ function migrateFusePool(uint256 _newPoolId) external virtual onlyGovernor { address _newCToken = _cTokenByUnderlying(_newPoolId, address(collateralToken)); require(address(cToken) != _newCToken, "same-fuse-pool"); require(cToken.redeem(cToken.balanceOf(address(this))) == 0, "withdraw-from-fuse-pool-failed"); uint256 _collateralBalance = collateralToken.balanceOf(address(this)); collateralToken.safeApprove(_newCToken, _collateralBalance); require(CToken(_newCToken).mint(_collateralBalance) == 0, "deposit-to-fuse-pool-failed"); emit FusePoolChanged(_newPoolId, address(cToken), _newCToken); cToken = CToken(_newCToken); receiptToken = _newCToken; } function isReservedToken(address _token) public view override returns (bool) { return _token == address(cToken); } /** * @notice Gets the cToken to mint for a Fuse Pool * @param _poolId Fuse Pool ID * @param _collateralToken address of the collateralToken */ function _cTokenByUnderlying(uint256 _poolId, address _collateralToken) internal view returns (address) { (, , address _comptroller, , ) = IFusePoolDirectory(FUSE_POOL_DIRECTORY).pools(_poolId); require(_comptroller != address(0), "rari-fuse-invalid-comptroller"); if (_collateralToken == WETH) { // cETH is mapped with 0x0 _collateralToken = address(0x0); } address _cToken = IComptroller(_comptroller).cTokensByUnderlying(_collateralToken); require(_cToken != address(0), "rari-fuse-invalid-ctoken"); return _cToken; } // solhint-disable-next-line function _beforeMigration(address _newStrategy) internal override {} /** * @notice Calculate earning and withdraw it from Rari Fuse * @dev If somehow we got some collateral token in strategy then we want to * include those in profit. That's why we used 'return' outside 'if' condition. * @param _totalDebt Total collateral debt of this strategy * @return profit in collateral token */ function _realizeProfit(uint256 _totalDebt) internal override returns (uint256) { uint256 _collateralBalance = _convertToCollateral(cToken.balanceOf(address(this))); if (_collateralBalance > _totalDebt) { _withdrawHere(_collateralBalance - _totalDebt); } return collateralToken.balanceOf(address(this)); } }
{ "evmVersion": "istanbul", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_pool","type":"address"},{"internalType":"address","name":"_swapManager","type":"address"},{"internalType":"uint256","name":"_fusePoolId","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"newFusePoolId","type":"uint256"},{"indexed":true,"internalType":"address","name":"oldCToken","type":"address"},{"indexed":true,"internalType":"address","name":"newCToken","type":"address"}],"name":"FusePoolChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousFeeCollector","type":"address"},{"indexed":true,"internalType":"address","name":"newFeeCollector","type":"address"}],"name":"UpdatedFeeCollector","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldPeriod","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newPeriod","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldRouterIdx","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newRouterIdx","type":"uint256"}],"name":"UpdatedOracleConfig","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousSwapManager","type":"address"},{"indexed":true,"internalType":"address","name":"newSwapManager","type":"address"}],"name":"UpdatedSwapManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldSwapSlippage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newSwapSlippage","type":"uint256"}],"name":"UpdatedSwapSlippage","type":"event"},{"inputs":[],"name":"NAME","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_keeperAddress","type":"address"}],"name":"addKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"approveToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collateralToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"convertFrom18","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"feeCollector","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fusePoolId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addressListFactory","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"isReservedToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"keepers","outputs":[{"internalType":"contract IAddressList","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newStrategy","type":"address"}],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPoolId","type":"uint256"}],"name":"migrateFusePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"oraclePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracleRouterIdx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rebalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"receiptToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_keeperAddress","type":"address"}],"name":"removeKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setupOracles","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapManager","outputs":[{"internalType":"contract ISwapManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapSlippage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_fromToken","type":"address"}],"name":"sweepERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalValue","outputs":[{"internalType":"uint256","name":"_totalValue","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalValueCurrent","outputs":[{"internalType":"uint256","name":"_totalValue","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeCollector","type":"address"}],"name":"updateFeeCollector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPeriod","type":"uint256"},{"internalType":"uint256","name":"_newRouterIdx","type":"uint256"}],"name":"updateOracleConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_swapManager","type":"address"}],"name":"updateSwapManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newSwapSlippage","type":"uint256"}],"name":"updateSwapSlippage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60e0604052610e1060045560006005556127106006553480156200002257600080fd5b50604051620040363803806200403683398101604081905262000045916200050c565b8282828282620000ca83866001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200008957600080fd5b505afa1580156200009e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000c49190620004e6565b620002d7565b8282826001600160a01b038316620001295760405162461bcd60e51b815260206004820152601460248201527f706f6f6c2d616464726573732d69732d7a65726f00000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b038216620001765760405162461bcd60e51b8152602060048201526012602482015271736d2d616464726573732d69732d7a65726f60701b604482015260640162000120565b600380546001600160a01b0319166001600160a01b0384811691909117909155606084901b6001600160601b03191660a05260408051637e062a3560e11b815290519185169163fc0c546a91600480820192602092909190829003018186803b158015620001e357600080fd5b505afa158015620001f8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200021e9190620004e6565b60601b6001600160601b031916608052600080546001600160a01b0319166001600160a01b03928316179055831615159150620002a090505760405162461bcd60e51b815260206004820152601660248201527f63546f6b656e2d616464726573732d69732d7a65726f00000000000000000000604482015260640162000120565b600780546001600160a01b0319166001600160a01b0392909216919091179055505061271060065560c05250620006929350505050565b6040516315895f4760e31b815260048101839052600090819073835482fe0532f169024d5e9410199369aad5c77e9063ac4afa389060240160006040518083038186803b1580156200032857600080fd5b505afa1580156200033d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000367919081019062000553565b509093505050506001600160a01b038116620003c65760405162461bcd60e51b815260206004820152601d60248201527f726172692d667573652d696e76616c69642d636f6d7074726f6c6c6572000000604482015260640162000120565b6001600160a01b03831673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21415620003f157600092505b6040516318ffa3fd60e11b81526001600160a01b038481166004830152600091908316906331ff47fa9060240160206040518083038186803b1580156200043757600080fd5b505afa1580156200044c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004729190620004e6565b90506001600160a01b038116620004cc5760405162461bcd60e51b815260206004820152601860248201527f726172692d667573652d696e76616c69642d63746f6b656e0000000000000000604482015260640162000120565b949350505050565b8051620004e18162000679565b919050565b600060208284031215620004f8578081fd5b8151620005058162000679565b9392505050565b60008060006060848603121562000521578182fd5b83516200052e8162000679565b6020850151909350620005418162000679565b80925050604084015190509250925092565b600080600080600060a086880312156200056b578081fd5b85516001600160401b038082111562000582578283fd5b818801915088601f83011262000596578283fd5b815181811115620005ab57620005ab62000663565b604051601f8201601f19908116603f01168101908382118183101715620005d657620005d662000663565b81604052828152602093508b84848701011115620005f2578586fd5b8591505b82821015620006155784820184015181830185015290830190620005f6565b828211156200062657858484830101525b985062000638915050888201620004d4565b955050506200064a60408701620004d4565b6060870151608090970151959894975095949392505050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146200068f57600080fd5b50565b60805160601c60a05160601c60c0516138b86200077e600039600061047c015260008181610297015281816106a10152818161082701528181610aa201528181610b1e01528181610cb50152818161116b0152818161139b015281816114c2015281816117a50152818161186e01528181611abb01528181612062015281816122d10152818161236e01526125b401526000818161052f01528181611a0d01528181611a9201528181611e060152818161208c0152818161242a01528181612592015281816125ea015281816128070152818161288e01528181612c4c0152612e6801526138b86000f3fe6080604052600436106101dc5760003560e01c80639b0db5d011610102578063d2c35ce811610095578063ec78e83211610064578063ec78e83214610611578063fb589de214610631578063fc0c546a1461064f578063ffa1ad741461066d57610260565b8063d2c35ce8146105a7578063d4c3eea0146105c7578063e00af4a7146105dc578063e645c202146105fc57610260565b8063b2016bd4116100d1578063b2016bd41461051d578063c415b95c14610551578063cd2d7ebe14610571578063ce5494bb1461058757610260565b80639b0db5d01461046a578063a3f4df7e1461049e578063a923b2a6146104e8578063aa1018861461050857610260565b8063440d72481161017a578063709d039d11610149578063709d039d146104005780637d7c2a1c14610420578063951dc22c1461043557806399b71d5c1461045557610260565b8063440d7248146103705780634c36fad7146103a05780634dda5222146103c057806367f5e4b8146103e057610260565b80631aedeabe116101b65780631aedeabe146102f65780632e1a7d4d1461031a5780634032b72b1461033a57806342189c8f1461035a57610260565b806314ae9f2e1461026557806316f0115b1461028557806319ab453c146102d657610260565b36610260576007546001600160a01b031633148061020d57503373c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2145b61025e5760405162461bcd60e51b815260206004820152601960248201527f6e6f742d616c6c6f7765642d746f2d73656e642d65746865720000000000000060448201526064015b60405180910390fd5b005b600080fd5b34801561027157600080fd5b5061025e6102803660046133f2565b61069f565b34801561029157600080fd5b506102b97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156102e257600080fd5b5061025e6102f13660046133f2565b610825565b34801561030257600080fd5b5061030c60065481565b6040519081526020016102cd565b34801561032657600080fd5b5061025e6103353660046135cb565b610a9f565b34801561034657600080fd5b5061025e6103553660046133f2565b610b1c565b34801561036657600080fd5b5061030c60045481565b34801561037c57600080fd5b5061039061038b3660046133f2565b610c9c565b60405190151581526020016102cd565b3480156103ac57600080fd5b5061025e6103bb3660046133f2565b610cb3565b3480156103cc57600080fd5b5061025e6103db3660046135cb565b610e66565b3480156103ec57600080fd5b5061025e6103fb3660046135cb565b611169565b34801561040c57600080fd5b506003546102b9906001600160a01b031681565b34801561042c57600080fd5b5061025e6112b5565b34801561044157600080fd5b506001546102b9906001600160a01b031681565b34801561046157600080fd5b5061025e611404565b34801561047657600080fd5b5061030c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104aa57600080fd5b506104db6040518060400160405280601181526020017052617269467573652d537472617465677960781b81525081565b6040516102cd91906136bd565b3480156104f457600080fd5b5061025e6105033660046135fb565b6114c0565b34801561051457600080fd5b5061025e6116f5565b34801561052957600080fd5b506102b97f000000000000000000000000000000000000000000000000000000000000000081565b34801561055d57600080fd5b506002546102b9906001600160a01b031681565b34801561057d57600080fd5b5061030c60055481565b34801561059357600080fd5b5061025e6105a23660046133f2565b6117a2565b3480156105b357600080fd5b5061025e6105c23660046133f2565b611ab9565b3480156105d357600080fd5b5061030c611c82565b3480156105e857600080fd5b5061025e6105f73660046133f2565b611d0f565b34801561060857600080fd5b5061030c611faa565b34801561061d57600080fd5b506000546102b9906001600160a01b031681565b34801561063d57600080fd5b5061030c61064c3660046135cb565b90565b34801561065b57600080fd5b506000546001600160a01b03166102b9565b34801561067957600080fd5b506104db60405180604001604052806006815260200165332e302e313360d01b81525081565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156106f857600080fd5b505afa15801561070c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610730919061340e565b6001600160a01b0316336001600160a01b0316146107605760405162461bcd60e51b815260040161025590613720565b600154604051631484968760e11b81526001600160a01b038381166004830152909116906329092d0e90602401602060405180830381600087803b1580156107a757600080fd5b505af11580156107bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107df91906134e6565b6108225760405162461bcd60e51b81526020600482015260146024820152731c995b5bdd994b5ad9595c195c8b59985a5b195960621b6044820152606401610255565b50565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561087e57600080fd5b505afa158015610892573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b6919061340e565b6001600160a01b0316336001600160a01b0316146108e65760405162461bcd60e51b815260040161025590613720565b6001546001600160a01b03161561093f5760405162461bcd60e51b815260206004820152601b60248201527f6b65657065722d6c6973742d616c72656164792d6372656174656400000000006044820152606401610255565b6000819050806001600160a01b0316630fab4d256040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561097f57600080fd5b505af1158015610993573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b7919061340e565b600180546001600160a01b0319166001600160a01b03929092169182179055630a3b0a4f6109e23390565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381600087803b158015610a2357600080fd5b505af1158015610a37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5b91906134e6565b610a9b5760405162461bcd60e51b81526020600482015260116024820152701859190b5ad9595c195c8b59985a5b1959607a1b6044820152606401610255565b5050565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b135760405162461bcd60e51b815260206004820152601960248201527818d85b1b195c8b5a5ccb5b9bdd0b5d995cdc195c8b5c1bdbdb603a1b6044820152606401610255565b6108228161203f565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015610b7557600080fd5b505afa158015610b89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bad919061340e565b6001600160a01b0316336001600160a01b031614610bdd5760405162461bcd60e51b815260040161025590613720565b600154604051630a3b0a4f60e01b81526001600160a01b03838116600483015290911690630a3b0a4f90602401602060405180830381600087803b158015610c2457600080fd5b505af1158015610c38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5c91906134e6565b6108225760405162461bcd60e51b81526020600482015260116024820152701859190b5ad9595c195c8b59985a5b1959607a1b6044820152606401610255565b6007546001600160a01b038281169116145b919050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015610d0c57600080fd5b505afa158015610d20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d44919061340e565b6001600160a01b0316336001600160a01b031614610d745760405162461bcd60e51b815260040161025590613720565b6001600160a01b038116610dbf5760405162461bcd60e51b8152602060048201526012602482015271736d2d616464726573732d69732d7a65726f60701b6044820152606401610255565b6003546001600160a01b0382811691161415610e0a5760405162461bcd60e51b815260206004820152600a602482015269736d2d69732d73616d6560b01b6044820152606401610255565b6003546040516001600160a01b038084169216907f2d19927e7cac08ceb98b38898a4fdff6da6a27295b9a2d62fe250408ebe044e190600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b0316635dbe47e8336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b158015610eb757600080fd5b505afa158015610ecb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eef91906134e6565b610f0b5760405162461bcd60e51b8152600401610255906136f0565b6000610f188260006120bb565b6007549091506001600160a01b0380831691161415610f6a5760405162461bcd60e51b815260206004820152600e60248201526d1cd85b594b599d5cd94b5c1bdbdb60921b6044820152606401610255565b6007546040516370a0823160e01b81523060048201526001600160a01b039091169063db006a759082906370a082319060240160206040518083038186803b158015610fb557600080fd5b505afa158015610fc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fed91906135e3565b6040518263ffffffff1660e01b815260040161100b91815260200190565b602060405180830381600087803b15801561102557600080fd5b505af1158015611039573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105d91906135e3565b156110aa5760405162461bcd60e51b815260206004820152601e60248201527f77697468647261772d66726f6d2d667573652d706f6f6c2d6661696c656400006044820152606401610255565b806001600160a01b0316631249c58b476040518263ffffffff1660e01b81526004016000604051808303818588803b1580156110e557600080fd5b505af11580156110f9573d6000803e3d6000fd5b50506007546040516001600160a01b03868116955090911692508591507f7725294be69fa7d941c001b388e2086daa9acdf58fbbc7aef3fd8cce3c316b6e90600090a4600780546001600160a01b039092166001600160a01b031992831681179091556000805490921617905550565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156111c257600080fd5b505afa1580156111d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111fa919061340e565b6001600160a01b0316336001600160a01b03161461122a5760405162461bcd60e51b815260040161025590613720565b6127108111156112755760405162461bcd60e51b8152602060048201526016602482015275696e76616c69642d736c6970706167652d76616c756560501b6044820152606401610255565b60065460408051918252602082018390527ef1c5db862c7598b3b6765552ca951f498611e06412c2d57f8d0b58f82e7f82910160405180910390a1600655565b6001546001600160a01b0316635dbe47e8336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561130657600080fd5b505afa15801561131a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133e91906134e6565b61135a5760405162461bcd60e51b8152600401610255906136f0565b60008060006113676122ab565b6040516302df682360e11b815260048101849052602481018390526044810182905292955090935091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906305bed04690606401600060405180830381600087803b1580156113df57600080fd5b505af11580156113f3573d6000803e3d6000fd5b505050506113ff612412565b505050565b6001546001600160a01b0316635dbe47e8336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561145557600080fd5b505afa158015611469573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061148d91906134e6565b6114a95760405162461bcd60e51b8152600401610255906136f0565b6114b36000612585565b6114be600019612585565b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561151957600080fd5b505afa15801561152d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611551919061340e565b6001600160a01b0316336001600160a01b0316146115815760405162461bcd60e51b815260040161025590613720565b600360009054906101000a90046001600160a01b03166001600160a01b031663c2fba6676040518163ffffffff1660e01b815260040160206040518083038186803b1580156115cf57600080fd5b505afa1580156115e3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061160791906135e3565b811061164c5760405162461bcd60e51b81526020600482015260146024820152730d2dcecc2d8d2c85ae4deeae8cae45ad2dcc8caf60631b6044820152606401610255565b816116575760045491505b603b821161169f5760405162461bcd60e51b81526020600482015260156024820152741a5b9d985b1a590b5bdc9858db194b5c195c9a5bd9605a1b6044820152606401610255565b6004546005546040805192835260208301859052820152606081018290527f83bc5ab8030537fcf1d29c2334f6d22c26c82dcbe5ff03923d2cff5c692c0a7f9060800160405180910390a1600491909155600555565b6001546001600160a01b0316635dbe47e8336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561174657600080fd5b505afa15801561175a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061177e91906134e6565b61179a5760405162461bcd60e51b8152600401610255906136f0565b6114be61274f565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146118165760405162461bcd60e51b815260206004820152601960248201527818d85b1b195c8b5a5ccb5b9bdd0b5d995cdc195c8b5c1bdbdb603a1b6044820152606401610255565b6001600160a01b03811661186c5760405162461bcd60e51b815260206004820152601c60248201527f6e65772d73747261746567792d616464726573732d69732d7a65726f000000006044820152606401610255565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03166316f0115b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118cf57600080fd5b505afa1580156118e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611907919061340e565b6001600160a01b0316146119565760405162461bcd60e51b81526020600482015260166024820152756e6f742d76616c69642d6e65772d737472617465677960501b6044820152606401610255565b6000546040516370a0823160e01b81523060048201526119ea9183916001600160a01b03909116906370a082319060240160206040518083038186803b15801561199f57600080fd5b505afa1580156119b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d791906135e3565b6000546001600160a01b0316919061290a565b6040516370a0823160e01b81523060048201526108229082906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906024015b60206040518083038186803b158015611a5057600080fd5b505afa158015611a64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a8891906135e3565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016919061290a565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015611b1257600080fd5b505afa158015611b26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b4a919061340e565b6001600160a01b0316336001600160a01b031614611b7a5760405162461bcd60e51b815260040161025590613720565b6001600160a01b038116611bd05760405162461bcd60e51b815260206004820152601d60248201527f6665652d636f6c6c6563746f722d616464726573732d69732d7a65726f0000006044820152606401610255565b6002546001600160a01b0382811691161415611c265760405162461bcd60e51b81526020600482015260156024820152746665652d636f6c6c6563746f722d69732d73616d6560581b6044820152606401610255565b6002546040516001600160a01b038084169216907f0f06062680f9bd68e786e9980d9bb03d73d5620fc3b345e417b6eacb310b970690600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b6007546040516370a0823160e01b8152306004820152600091611d0a916001600160a01b03909116906370a08231906024015b60206040518083038186803b158015611ccd57600080fd5b505afa158015611ce1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d0591906135e3565b61296d565b905090565b6001546001600160a01b0316635dbe47e8336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b158015611d6057600080fd5b505afa158015611d74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9891906134e6565b611db45760405162461bcd60e51b8152600401610255906136f0565b6002546001600160a01b0316611e045760405162461bcd60e51b81526020600482015260156024820152741999594b58dbdb1b1958dd1bdc8b5b9bdd0b5cd95d605a1b6044820152606401610255565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03161415611e865760405162461bcd60e51b815260206004820152601f60248201527f6e6f742d616c6c6f7765642d746f2d73776565702d636f6c6c61746572616c006044820152606401610255565b611e8f81610c9c565b15611ed35760405162461bcd60e51b815260206004820152601460248201527306e6f742d616c6c6f7765642d746f2d73776565760641b6044820152606401610255565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415611f1357600254611f0e906001600160a01b031647612a18565b610822565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b158015611f5557600080fd5b505afa158015611f69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f8d91906135e3565b600254909150610a9b906001600160a01b0384811691168361290a565b6000611fb4612b31565b6040516370a0823160e01b8152306004820152611d0a9073c00e94cb662c3520282e6f5717214004a7f26888906370a082319060240160206040518083038186803b15801561200257600080fd5b505afa158015612016573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203a91906135e3565b612c06565b61204881612d0d565b506040516370a0823160e01b8152306004820152610822907f0000000000000000000000000000000000000000000000000000000000000000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401611a38565b6040516315895f4760e31b815260048101839052600090819073835482fe0532f169024d5e9410199369aad5c77e9063ac4afa389060240160006040518083038186803b15801561210b57600080fd5b505afa15801561211f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526121479190810190613506565b509093505050506001600160a01b0381166121a45760405162461bcd60e51b815260206004820152601d60248201527f726172692d667573652d696e76616c69642d636f6d7074726f6c6c65720000006044820152606401610255565b6001600160a01b03831673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214156121ce57600092505b6040516318ffa3fd60e11b81526001600160a01b038481166004830152600091908316906331ff47fa9060240160206040518083038186803b15801561221357600080fd5b505afa158015612227573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061224b919061340e565b90506001600160a01b0381166122a35760405162461bcd60e51b815260206004820152601860248201527f726172692d667573652d696e76616c69642d63746f6b656e00000000000000006044820152606401610255565b949350505050565b604051636a9eee1360e11b81523060048201526000908190819081906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d53ddc269060240160206040518083038186803b15801561231357600080fd5b505afa158015612327573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061234b91906135e3565b604051639f2b283360e01b81523060048201529091506000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639f2b28339060240160206040518083038186803b1580156123b057600080fd5b505afa1580156123c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123e891906135e3565b90506123f381612e03565b94506123fe81612ef1565b935061240982612f42565b92505050909192565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561247457600080fd5b505afa158015612488573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ac91906135e3565b9050801561082257604051632e1a7d4d60e01b81526004810182905273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290632e1a7d4d90602401600060405180830381600087803b15801561250157600080fd5b505af1158015612515573d6000803e3d6000fd5b50505050600760009054906101000a90046001600160a01b03166001600160a01b0316631249c58b826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561256957600080fd5b505af115801561257d573d6000803e3d6000fd5b505050505050565b6125d96001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000083612f53565b600754612613906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612f53565b60005b600360009054906101000a90046001600160a01b03166001600160a01b031663c2fba6676040518163ffffffff1660e01b815260040160206040518083038186803b15801561266457600080fd5b505afa158015612678573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061269c91906135e3565b811015610a9b57600354604051636e74a6f760e01b81526004810183905261273d916001600160a01b031690636e74a6f79060240160206040518083038186803b1580156126e957600080fd5b505afa1580156126fd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612721919061340e565b73c00e94cb662c3520282e6f5717214004a7f268889084612f53565b8061274781613826565b915050612616565b60035460048054600554604051630f30f2d360e21b81526001600160a01b0390941693633cc3cb4c936127b29373c00e94cb662c3520282e6f5717214004a7f268889373c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2939192909101613638565b602060405180830381600087803b1580156127cc57600080fd5b505af11580156127e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612804919061340e565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2146114be5760035460048054600554604051630f30f2d360e21b81526001600160a01b0390941693633cc3cb4c936128b89373c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2937f0000000000000000000000000000000000000000000000000000000000000000939192909101613638565b602060405180830381600087803b1580156128d257600080fd5b505af11580156128e6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610822919061340e565b6040516001600160a01b0383166024820152604481018290526113ff90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613077565b6000670de0b6b3a7640000600760009054906101000a90046001600160a01b03166001600160a01b031663182df0f56040518163ffffffff1660e01b815260040160206040518083038186803b1580156129c657600080fd5b505afa1580156129da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129fe91906135e3565b612a0890846137c0565b612a1291906137a0565b92915050565b80471015612a685760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610255565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612ab5576040519150601f19603f3d011682016040523d82523d6000602084013e612aba565b606091505b50509050806113ff5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610255565b60408051600180825281830190925260009160208083019080368337505060075482519293506001600160a01b031691839150600090612b8157634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015260405162e1ed9760e51b8152733d9819210a31b4961b30ef54be2aed79b9c9cd3b90631c3db2e090612bd19030908590600401613661565b600060405180830381600087803b158015612beb57600080fd5b505af1158015612bff573d6000803e3d6000fd5b5050505050565b60008115612cd1576003546040516340b4c54560e11b81526001600160a01b03909116906381698a8a90612c799073c00e94cb662c3520282e6f5717214004a7f26888907f0000000000000000000000000000000000000000000000000000000000000000908790600090600401613638565b60006040518083038186803b158015612c9157600080fd5b505afa158015612ca5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612ccd919081019061342a565b9150505b6007546040516370a0823160e01b8152306004820152612d03916001600160a01b0316906370a0823190602401611cb5565b612a129082613788565b6007546040516370a0823160e01b81523060048201526000918291612d44916001600160a01b0316906370a0823190602401611cb5565b90506000600760009054906101000a90046001600160a01b03166001600160a01b0316633b1d21a26040518163ffffffff1660e01b815260040160206040518083038186803b158015612d9657600080fd5b505afa158015612daa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dce91906135e3565b90506000818510612ddf5781612de1565b845b9050612dfa838210612df35783612df5565b815b613149565b95945050505050565b6007546040516370a0823160e01b81523060048201526000918291612e3a916001600160a01b0316906370a0823190602401611cb5565b905082811115612e5357612e51612df584836137df565b505b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b158015612eb257600080fd5b505afa158015612ec6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612eea91906135e3565b9392505050565b6007546040516370a0823160e01b81523060048201526000918291612f28916001600160a01b0316906370a0823190602401611cb5565b905082811015612f3c57612eea81846137df565b50919050565b60008115610cae57612a1282612d0d565b801580612fdc5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015612fa257600080fd5b505afa158015612fb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fda91906135e3565b155b6130475760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610255565b6040516001600160a01b0383166024820152604481018290526113ff90849063095ea7b360e01b90606401612936565b60006130cc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166132289092919063ffffffff16565b8051909150156113ff57808060200190518101906130ea91906134e6565b6113ff5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610255565b600081156132245760075460405163852a12e360e01b8152600481018490526001600160a01b039091169063852a12e390602401602060405180830381600087803b15801561319757600080fd5b505af11580156131ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131cf91906135e3565b1561321c5760405162461bcd60e51b815260206004820152601d60248201527f77697468647261772d66726f6d2d636f6d706f756e642d6661696c65640000006044820152606401610255565b613224613237565b5090565b60606122a38484600085613286565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b158015612beb57600080fd5b6060824710156132e75760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610255565b843b6133355760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610255565b600080866001600160a01b03168587604051613351919061361c565b60006040518083038185875af1925050503d806000811461338e576040519150601f19603f3d011682016040523d82523d6000602084013e613393565b606091505b50915091506133a38282866133ae565b979650505050505050565b606083156133bd575081612eea565b8251156133cd5782518084602001fd5b8160405162461bcd60e51b815260040161025591906136bd565b8051610cae8161386d565b600060208284031215613403578081fd5b8135612eea8161386d565b60006020828403121561341f578081fd5b8151612eea8161386d565b6000806040838503121561343c578081fd5b825167ffffffffffffffff80821115613453578283fd5b818501915085601f830112613466578283fd5b815160208282111561347a5761347a613857565b8160051b925061348b818401613757565b8281528181019085830185870184018b10156134a5578788fd5b8796505b848710156134d357805195506134be8661386d565b858352600196909601959183019183016134a9565b5097909101519698969750505050505050565b6000602082840312156134f7578081fd5b81518015158114612eea578182fd5b600080600080600060a0868803121561351d578081fd5b855167ffffffffffffffff80821115613534578283fd5b818801915088601f830112613547578283fd5b81518181111561355957613559613857565b61356c601f8201601f1916602001613757565b9150808252896020828501011115613582578384fd5b6135938160208401602086016137f6565b5095506135a49050602087016133e7565b93506135b2604087016133e7565b6060870151608090970151959894975095949392505050565b6000602082840312156135dc578081fd5b5035919050565b6000602082840312156135f4578081fd5b5051919050565b6000806040838503121561360d578182fd5b50508035926020909101359150565b6000825161362e8184602087016137f6565b9190910192915050565b6001600160a01b0394851681529290931660208301526040820152606081019190915260800190565b6001600160a01b038381168252604060208084018290528451918401829052600092858201929091906060860190855b818110156136af578551851683529483019491830191600101613691565b509098975050505050505050565b60006020825282518060208401526136dc8160408501602087016137f6565b601f01601f19169190910160400192915050565b60208082526016908201527531b0b63632b916b4b996b737ba16b096b5b2b2b832b960511b604082015260600190565b6020808252601a908201527f63616c6c65722d69732d6e6f742d7468652d676f7665726e6f72000000000000604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561378057613780613857565b604052919050565b6000821982111561379b5761379b613841565b500190565b6000826137bb57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156137da576137da613841565b500290565b6000828210156137f1576137f1613841565b500390565b60005b838110156138115781810151838201526020016137f9565b83811115613820576000848401525b50505050565b600060001982141561383a5761383a613841565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461082257600080fdfea2646970667358221220ba784f13e56d674de8cbecda4dd2e5006864194085b42e77334f22cc5a5f27e864736f6c63430008030033000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f2000000000000000000000000e382d9f2394a359b01006faa8a1864b8a60d27100000000000000000000000000000000000000000000000000000000000000017
Deployed Bytecode
0x6080604052600436106101dc5760003560e01c80639b0db5d011610102578063d2c35ce811610095578063ec78e83211610064578063ec78e83214610611578063fb589de214610631578063fc0c546a1461064f578063ffa1ad741461066d57610260565b8063d2c35ce8146105a7578063d4c3eea0146105c7578063e00af4a7146105dc578063e645c202146105fc57610260565b8063b2016bd4116100d1578063b2016bd41461051d578063c415b95c14610551578063cd2d7ebe14610571578063ce5494bb1461058757610260565b80639b0db5d01461046a578063a3f4df7e1461049e578063a923b2a6146104e8578063aa1018861461050857610260565b8063440d72481161017a578063709d039d11610149578063709d039d146104005780637d7c2a1c14610420578063951dc22c1461043557806399b71d5c1461045557610260565b8063440d7248146103705780634c36fad7146103a05780634dda5222146103c057806367f5e4b8146103e057610260565b80631aedeabe116101b65780631aedeabe146102f65780632e1a7d4d1461031a5780634032b72b1461033a57806342189c8f1461035a57610260565b806314ae9f2e1461026557806316f0115b1461028557806319ab453c146102d657610260565b36610260576007546001600160a01b031633148061020d57503373c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2145b61025e5760405162461bcd60e51b815260206004820152601960248201527f6e6f742d616c6c6f7765642d746f2d73656e642d65746865720000000000000060448201526064015b60405180910390fd5b005b600080fd5b34801561027157600080fd5b5061025e6102803660046133f2565b61069f565b34801561029157600080fd5b506102b97f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f281565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156102e257600080fd5b5061025e6102f13660046133f2565b610825565b34801561030257600080fd5b5061030c60065481565b6040519081526020016102cd565b34801561032657600080fd5b5061025e6103353660046135cb565b610a9f565b34801561034657600080fd5b5061025e6103553660046133f2565b610b1c565b34801561036657600080fd5b5061030c60045481565b34801561037c57600080fd5b5061039061038b3660046133f2565b610c9c565b60405190151581526020016102cd565b3480156103ac57600080fd5b5061025e6103bb3660046133f2565b610cb3565b3480156103cc57600080fd5b5061025e6103db3660046135cb565b610e66565b3480156103ec57600080fd5b5061025e6103fb3660046135cb565b611169565b34801561040c57600080fd5b506003546102b9906001600160a01b031681565b34801561042c57600080fd5b5061025e6112b5565b34801561044157600080fd5b506001546102b9906001600160a01b031681565b34801561046157600080fd5b5061025e611404565b34801561047657600080fd5b5061030c7f000000000000000000000000000000000000000000000000000000000000001781565b3480156104aa57600080fd5b506104db6040518060400160405280601181526020017052617269467573652d537472617465677960781b81525081565b6040516102cd91906136bd565b3480156104f457600080fd5b5061025e6105033660046135fb565b6114c0565b34801561051457600080fd5b5061025e6116f5565b34801561052957600080fd5b506102b97f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b34801561055d57600080fd5b506002546102b9906001600160a01b031681565b34801561057d57600080fd5b5061030c60055481565b34801561059357600080fd5b5061025e6105a23660046133f2565b6117a2565b3480156105b357600080fd5b5061025e6105c23660046133f2565b611ab9565b3480156105d357600080fd5b5061030c611c82565b3480156105e857600080fd5b5061025e6105f73660046133f2565b611d0f565b34801561060857600080fd5b5061030c611faa565b34801561061d57600080fd5b506000546102b9906001600160a01b031681565b34801561063d57600080fd5b5061030c61064c3660046135cb565b90565b34801561065b57600080fd5b506000546001600160a01b03166102b9565b34801561067957600080fd5b506104db60405180604001604052806006815260200165332e302e313360d01b81525081565b7f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f26001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156106f857600080fd5b505afa15801561070c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610730919061340e565b6001600160a01b0316336001600160a01b0316146107605760405162461bcd60e51b815260040161025590613720565b600154604051631484968760e11b81526001600160a01b038381166004830152909116906329092d0e90602401602060405180830381600087803b1580156107a757600080fd5b505af11580156107bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107df91906134e6565b6108225760405162461bcd60e51b81526020600482015260146024820152731c995b5bdd994b5ad9595c195c8b59985a5b195960621b6044820152606401610255565b50565b7f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f26001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561087e57600080fd5b505afa158015610892573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b6919061340e565b6001600160a01b0316336001600160a01b0316146108e65760405162461bcd60e51b815260040161025590613720565b6001546001600160a01b03161561093f5760405162461bcd60e51b815260206004820152601b60248201527f6b65657065722d6c6973742d616c72656164792d6372656174656400000000006044820152606401610255565b6000819050806001600160a01b0316630fab4d256040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561097f57600080fd5b505af1158015610993573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b7919061340e565b600180546001600160a01b0319166001600160a01b03929092169182179055630a3b0a4f6109e23390565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381600087803b158015610a2357600080fd5b505af1158015610a37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5b91906134e6565b610a9b5760405162461bcd60e51b81526020600482015260116024820152701859190b5ad9595c195c8b59985a5b1959607a1b6044820152606401610255565b5050565b337f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f26001600160a01b031614610b135760405162461bcd60e51b815260206004820152601960248201527818d85b1b195c8b5a5ccb5b9bdd0b5d995cdc195c8b5c1bdbdb603a1b6044820152606401610255565b6108228161203f565b7f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f26001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015610b7557600080fd5b505afa158015610b89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bad919061340e565b6001600160a01b0316336001600160a01b031614610bdd5760405162461bcd60e51b815260040161025590613720565b600154604051630a3b0a4f60e01b81526001600160a01b03838116600483015290911690630a3b0a4f90602401602060405180830381600087803b158015610c2457600080fd5b505af1158015610c38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5c91906134e6565b6108225760405162461bcd60e51b81526020600482015260116024820152701859190b5ad9595c195c8b59985a5b1959607a1b6044820152606401610255565b6007546001600160a01b038281169116145b919050565b7f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f26001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015610d0c57600080fd5b505afa158015610d20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d44919061340e565b6001600160a01b0316336001600160a01b031614610d745760405162461bcd60e51b815260040161025590613720565b6001600160a01b038116610dbf5760405162461bcd60e51b8152602060048201526012602482015271736d2d616464726573732d69732d7a65726f60701b6044820152606401610255565b6003546001600160a01b0382811691161415610e0a5760405162461bcd60e51b815260206004820152600a602482015269736d2d69732d73616d6560b01b6044820152606401610255565b6003546040516001600160a01b038084169216907f2d19927e7cac08ceb98b38898a4fdff6da6a27295b9a2d62fe250408ebe044e190600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b0316635dbe47e8336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b158015610eb757600080fd5b505afa158015610ecb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eef91906134e6565b610f0b5760405162461bcd60e51b8152600401610255906136f0565b6000610f188260006120bb565b6007549091506001600160a01b0380831691161415610f6a5760405162461bcd60e51b815260206004820152600e60248201526d1cd85b594b599d5cd94b5c1bdbdb60921b6044820152606401610255565b6007546040516370a0823160e01b81523060048201526001600160a01b039091169063db006a759082906370a082319060240160206040518083038186803b158015610fb557600080fd5b505afa158015610fc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fed91906135e3565b6040518263ffffffff1660e01b815260040161100b91815260200190565b602060405180830381600087803b15801561102557600080fd5b505af1158015611039573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105d91906135e3565b156110aa5760405162461bcd60e51b815260206004820152601e60248201527f77697468647261772d66726f6d2d667573652d706f6f6c2d6661696c656400006044820152606401610255565b806001600160a01b0316631249c58b476040518263ffffffff1660e01b81526004016000604051808303818588803b1580156110e557600080fd5b505af11580156110f9573d6000803e3d6000fd5b50506007546040516001600160a01b03868116955090911692508591507f7725294be69fa7d941c001b388e2086daa9acdf58fbbc7aef3fd8cce3c316b6e90600090a4600780546001600160a01b039092166001600160a01b031992831681179091556000805490921617905550565b7f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f26001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156111c257600080fd5b505afa1580156111d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111fa919061340e565b6001600160a01b0316336001600160a01b03161461122a5760405162461bcd60e51b815260040161025590613720565b6127108111156112755760405162461bcd60e51b8152602060048201526016602482015275696e76616c69642d736c6970706167652d76616c756560501b6044820152606401610255565b60065460408051918252602082018390527ef1c5db862c7598b3b6765552ca951f498611e06412c2d57f8d0b58f82e7f82910160405180910390a1600655565b6001546001600160a01b0316635dbe47e8336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561130657600080fd5b505afa15801561131a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133e91906134e6565b61135a5760405162461bcd60e51b8152600401610255906136f0565b60008060006113676122ab565b6040516302df682360e11b815260048101849052602481018390526044810182905292955090935091506001600160a01b037f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f216906305bed04690606401600060405180830381600087803b1580156113df57600080fd5b505af11580156113f3573d6000803e3d6000fd5b505050506113ff612412565b505050565b6001546001600160a01b0316635dbe47e8336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561145557600080fd5b505afa158015611469573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061148d91906134e6565b6114a95760405162461bcd60e51b8152600401610255906136f0565b6114b36000612585565b6114be600019612585565b565b7f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f26001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561151957600080fd5b505afa15801561152d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611551919061340e565b6001600160a01b0316336001600160a01b0316146115815760405162461bcd60e51b815260040161025590613720565b600360009054906101000a90046001600160a01b03166001600160a01b031663c2fba6676040518163ffffffff1660e01b815260040160206040518083038186803b1580156115cf57600080fd5b505afa1580156115e3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061160791906135e3565b811061164c5760405162461bcd60e51b81526020600482015260146024820152730d2dcecc2d8d2c85ae4deeae8cae45ad2dcc8caf60631b6044820152606401610255565b816116575760045491505b603b821161169f5760405162461bcd60e51b81526020600482015260156024820152741a5b9d985b1a590b5bdc9858db194b5c195c9a5bd9605a1b6044820152606401610255565b6004546005546040805192835260208301859052820152606081018290527f83bc5ab8030537fcf1d29c2334f6d22c26c82dcbe5ff03923d2cff5c692c0a7f9060800160405180910390a1600491909155600555565b6001546001600160a01b0316635dbe47e8336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561174657600080fd5b505afa15801561175a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061177e91906134e6565b61179a5760405162461bcd60e51b8152600401610255906136f0565b6114be61274f565b337f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f26001600160a01b0316146118165760405162461bcd60e51b815260206004820152601960248201527818d85b1b195c8b5a5ccb5b9bdd0b5d995cdc195c8b5c1bdbdb603a1b6044820152606401610255565b6001600160a01b03811661186c5760405162461bcd60e51b815260206004820152601c60248201527f6e65772d73747261746567792d616464726573732d69732d7a65726f000000006044820152606401610255565b7f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f26001600160a01b0316816001600160a01b03166316f0115b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118cf57600080fd5b505afa1580156118e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611907919061340e565b6001600160a01b0316146119565760405162461bcd60e51b81526020600482015260166024820152756e6f742d76616c69642d6e65772d737472617465677960501b6044820152606401610255565b6000546040516370a0823160e01b81523060048201526119ea9183916001600160a01b03909116906370a082319060240160206040518083038186803b15801561199f57600080fd5b505afa1580156119b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d791906135e3565b6000546001600160a01b0316919061290a565b6040516370a0823160e01b81523060048201526108229082906001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216906370a08231906024015b60206040518083038186803b158015611a5057600080fd5b505afa158015611a64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a8891906135e3565b6001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216919061290a565b7f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f26001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015611b1257600080fd5b505afa158015611b26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b4a919061340e565b6001600160a01b0316336001600160a01b031614611b7a5760405162461bcd60e51b815260040161025590613720565b6001600160a01b038116611bd05760405162461bcd60e51b815260206004820152601d60248201527f6665652d636f6c6c6563746f722d616464726573732d69732d7a65726f0000006044820152606401610255565b6002546001600160a01b0382811691161415611c265760405162461bcd60e51b81526020600482015260156024820152746665652d636f6c6c6563746f722d69732d73616d6560581b6044820152606401610255565b6002546040516001600160a01b038084169216907f0f06062680f9bd68e786e9980d9bb03d73d5620fc3b345e417b6eacb310b970690600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b6007546040516370a0823160e01b8152306004820152600091611d0a916001600160a01b03909116906370a08231906024015b60206040518083038186803b158015611ccd57600080fd5b505afa158015611ce1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d0591906135e3565b61296d565b905090565b6001546001600160a01b0316635dbe47e8336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b158015611d6057600080fd5b505afa158015611d74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9891906134e6565b611db45760405162461bcd60e51b8152600401610255906136f0565b6002546001600160a01b0316611e045760405162461bcd60e51b81526020600482015260156024820152741999594b58dbdb1b1958dd1bdc8b5b9bdd0b5cd95d605a1b6044820152606401610255565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b0316816001600160a01b03161415611e865760405162461bcd60e51b815260206004820152601f60248201527f6e6f742d616c6c6f7765642d746f2d73776565702d636f6c6c61746572616c006044820152606401610255565b611e8f81610c9c565b15611ed35760405162461bcd60e51b815260206004820152601460248201527306e6f742d616c6c6f7765642d746f2d73776565760641b6044820152606401610255565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415611f1357600254611f0e906001600160a01b031647612a18565b610822565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b158015611f5557600080fd5b505afa158015611f69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f8d91906135e3565b600254909150610a9b906001600160a01b0384811691168361290a565b6000611fb4612b31565b6040516370a0823160e01b8152306004820152611d0a9073c00e94cb662c3520282e6f5717214004a7f26888906370a082319060240160206040518083038186803b15801561200257600080fd5b505afa158015612016573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203a91906135e3565b612c06565b61204881612d0d565b506040516370a0823160e01b8152306004820152610822907f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f2906001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216906370a0823190602401611a38565b6040516315895f4760e31b815260048101839052600090819073835482fe0532f169024d5e9410199369aad5c77e9063ac4afa389060240160006040518083038186803b15801561210b57600080fd5b505afa15801561211f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526121479190810190613506565b509093505050506001600160a01b0381166121a45760405162461bcd60e51b815260206004820152601d60248201527f726172692d667573652d696e76616c69642d636f6d7074726f6c6c65720000006044820152606401610255565b6001600160a01b03831673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214156121ce57600092505b6040516318ffa3fd60e11b81526001600160a01b038481166004830152600091908316906331ff47fa9060240160206040518083038186803b15801561221357600080fd5b505afa158015612227573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061224b919061340e565b90506001600160a01b0381166122a35760405162461bcd60e51b815260206004820152601860248201527f726172692d667573652d696e76616c69642d63746f6b656e00000000000000006044820152606401610255565b949350505050565b604051636a9eee1360e11b81523060048201526000908190819081906001600160a01b037f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f2169063d53ddc269060240160206040518083038186803b15801561231357600080fd5b505afa158015612327573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061234b91906135e3565b604051639f2b283360e01b81523060048201529091506000906001600160a01b037f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f21690639f2b28339060240160206040518083038186803b1580156123b057600080fd5b505afa1580156123c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123e891906135e3565b90506123f381612e03565b94506123fe81612ef1565b935061240982612f42565b92505050909192565b6040516370a0823160e01b81523060048201526000907f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b0316906370a082319060240160206040518083038186803b15801561247457600080fd5b505afa158015612488573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ac91906135e3565b9050801561082257604051632e1a7d4d60e01b81526004810182905273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290632e1a7d4d90602401600060405180830381600087803b15801561250157600080fd5b505af1158015612515573d6000803e3d6000fd5b50505050600760009054906101000a90046001600160a01b03166001600160a01b0316631249c58b826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561256957600080fd5b505af115801561257d573d6000803e3d6000fd5b505050505050565b6125d96001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2167f000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f283612f53565b600754612613906001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28116911683612f53565b60005b600360009054906101000a90046001600160a01b03166001600160a01b031663c2fba6676040518163ffffffff1660e01b815260040160206040518083038186803b15801561266457600080fd5b505afa158015612678573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061269c91906135e3565b811015610a9b57600354604051636e74a6f760e01b81526004810183905261273d916001600160a01b031690636e74a6f79060240160206040518083038186803b1580156126e957600080fd5b505afa1580156126fd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612721919061340e565b73c00e94cb662c3520282e6f5717214004a7f268889084612f53565b8061274781613826565b915050612616565b60035460048054600554604051630f30f2d360e21b81526001600160a01b0390941693633cc3cb4c936127b29373c00e94cb662c3520282e6f5717214004a7f268889373c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2939192909101613638565b602060405180830381600087803b1580156127cc57600080fd5b505af11580156127e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612804919061340e565b507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2146114be5760035460048054600554604051630f30f2d360e21b81526001600160a01b0390941693633cc3cb4c936128b89373c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2937f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2939192909101613638565b602060405180830381600087803b1580156128d257600080fd5b505af11580156128e6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610822919061340e565b6040516001600160a01b0383166024820152604481018290526113ff90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613077565b6000670de0b6b3a7640000600760009054906101000a90046001600160a01b03166001600160a01b031663182df0f56040518163ffffffff1660e01b815260040160206040518083038186803b1580156129c657600080fd5b505afa1580156129da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129fe91906135e3565b612a0890846137c0565b612a1291906137a0565b92915050565b80471015612a685760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610255565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612ab5576040519150601f19603f3d011682016040523d82523d6000602084013e612aba565b606091505b50509050806113ff5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610255565b60408051600180825281830190925260009160208083019080368337505060075482519293506001600160a01b031691839150600090612b8157634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015260405162e1ed9760e51b8152733d9819210a31b4961b30ef54be2aed79b9c9cd3b90631c3db2e090612bd19030908590600401613661565b600060405180830381600087803b158015612beb57600080fd5b505af1158015612bff573d6000803e3d6000fd5b5050505050565b60008115612cd1576003546040516340b4c54560e11b81526001600160a01b03909116906381698a8a90612c799073c00e94cb662c3520282e6f5717214004a7f26888907f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2908790600090600401613638565b60006040518083038186803b158015612c9157600080fd5b505afa158015612ca5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612ccd919081019061342a565b9150505b6007546040516370a0823160e01b8152306004820152612d03916001600160a01b0316906370a0823190602401611cb5565b612a129082613788565b6007546040516370a0823160e01b81523060048201526000918291612d44916001600160a01b0316906370a0823190602401611cb5565b90506000600760009054906101000a90046001600160a01b03166001600160a01b0316633b1d21a26040518163ffffffff1660e01b815260040160206040518083038186803b158015612d9657600080fd5b505afa158015612daa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dce91906135e3565b90506000818510612ddf5781612de1565b845b9050612dfa838210612df35783612df5565b815b613149565b95945050505050565b6007546040516370a0823160e01b81523060048201526000918291612e3a916001600160a01b0316906370a0823190602401611cb5565b905082811115612e5357612e51612df584836137df565b505b6040516370a0823160e01b81523060048201527f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b0316906370a082319060240160206040518083038186803b158015612eb257600080fd5b505afa158015612ec6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612eea91906135e3565b9392505050565b6007546040516370a0823160e01b81523060048201526000918291612f28916001600160a01b0316906370a0823190602401611cb5565b905082811015612f3c57612eea81846137df565b50919050565b60008115610cae57612a1282612d0d565b801580612fdc5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015612fa257600080fd5b505afa158015612fb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fda91906135e3565b155b6130475760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610255565b6040516001600160a01b0383166024820152604481018290526113ff90849063095ea7b360e01b90606401612936565b60006130cc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166132289092919063ffffffff16565b8051909150156113ff57808060200190518101906130ea91906134e6565b6113ff5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610255565b600081156132245760075460405163852a12e360e01b8152600481018490526001600160a01b039091169063852a12e390602401602060405180830381600087803b15801561319757600080fd5b505af11580156131ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131cf91906135e3565b1561321c5760405162461bcd60e51b815260206004820152601d60248201527f77697468647261772d66726f6d2d636f6d706f756e642d6661696c65640000006044820152606401610255565b613224613237565b5090565b60606122a38484600085613286565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b158015612beb57600080fd5b6060824710156132e75760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610255565b843b6133355760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610255565b600080866001600160a01b03168587604051613351919061361c565b60006040518083038185875af1925050503d806000811461338e576040519150601f19603f3d011682016040523d82523d6000602084013e613393565b606091505b50915091506133a38282866133ae565b979650505050505050565b606083156133bd575081612eea565b8251156133cd5782518084602001fd5b8160405162461bcd60e51b815260040161025591906136bd565b8051610cae8161386d565b600060208284031215613403578081fd5b8135612eea8161386d565b60006020828403121561341f578081fd5b8151612eea8161386d565b6000806040838503121561343c578081fd5b825167ffffffffffffffff80821115613453578283fd5b818501915085601f830112613466578283fd5b815160208282111561347a5761347a613857565b8160051b925061348b818401613757565b8281528181019085830185870184018b10156134a5578788fd5b8796505b848710156134d357805195506134be8661386d565b858352600196909601959183019183016134a9565b5097909101519698969750505050505050565b6000602082840312156134f7578081fd5b81518015158114612eea578182fd5b600080600080600060a0868803121561351d578081fd5b855167ffffffffffffffff80821115613534578283fd5b818801915088601f830112613547578283fd5b81518181111561355957613559613857565b61356c601f8201601f1916602001613757565b9150808252896020828501011115613582578384fd5b6135938160208401602086016137f6565b5095506135a49050602087016133e7565b93506135b2604087016133e7565b6060870151608090970151959894975095949392505050565b6000602082840312156135dc578081fd5b5035919050565b6000602082840312156135f4578081fd5b5051919050565b6000806040838503121561360d578182fd5b50508035926020909101359150565b6000825161362e8184602087016137f6565b9190910192915050565b6001600160a01b0394851681529290931660208301526040820152606081019190915260800190565b6001600160a01b038381168252604060208084018290528451918401829052600092858201929091906060860190855b818110156136af578551851683529483019491830191600101613691565b509098975050505050505050565b60006020825282518060208401526136dc8160408501602087016137f6565b601f01601f19169190910160400192915050565b60208082526016908201527531b0b63632b916b4b996b737ba16b096b5b2b2b832b960511b604082015260600190565b6020808252601a908201527f63616c6c65722d69732d6e6f742d7468652d676f7665726e6f72000000000000604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561378057613780613857565b604052919050565b6000821982111561379b5761379b613841565b500190565b6000826137bb57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156137da576137da613841565b500290565b6000828210156137f1576137f1613841565b500390565b60005b838110156138115781810151838201526020016137f9565b83811115613820576000848401525b50505050565b600060001982141561383a5761383a613841565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461082257600080fdfea2646970667358221220ba784f13e56d674de8cbecda4dd2e5006864194085b42e77334f22cc5a5f27e864736f6c63430008030033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f2000000000000000000000000e382d9f2394a359b01006faa8a1864b8a60d27100000000000000000000000000000000000000000000000000000000000000017
-----Decoded View---------------
Arg [0] : _pool (address): 0xd1C117319B3595fbc39b471AB1fd485629eb05F2
Arg [1] : _swapManager (address): 0xe382d9f2394A359B01006faa8A1864b8a60d2710
Arg [2] : _fusePoolId (uint256): 23
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000d1c117319b3595fbc39b471ab1fd485629eb05f2
Arg [1] : 000000000000000000000000e382d9f2394a359b01006faa8a1864b8a60d2710
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000017
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ 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.