Contract 0xcff0f501C6eFa5cAB2FE26dC025ead5505E9317C

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x53872498d1083071287cb1ed27f7bef592cabbaf2236bd20cb7166775aa9833bDeploy To Strate...20150562022-06-13 16:19:12355 days 12 hrs ago0x931250786dfd106b1e63c7fd8f0d854876a45200 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.000148119844
0x9bcd3cbfdb0dc8d9443c19a6bcc0b9a9148b11b03b1077a4fb7c6cbf1c566a1cDeposit To Vault20150512022-06-13 16:18:06355 days 12 hrs ago0x931250786dfd106b1e63c7fd8f0d854876a45200 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.00012100923
0xaffd15dc6c1d7d1f53e5180fef1d904b71f4839a39f3731c93e349cbcd450741Deposit To Vault20150142022-06-13 16:08:54355 days 12 hrs ago0x931250786dfd106b1e63c7fd8f0d854876a45200 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.000053249865
0x74bdfba4055e503ecafd1ec7756228cc517814190120d691d038a9c36cfe5677Deposit To Vault20149552022-06-13 15:55:18355 days 12 hrs ago0x931250786dfd106b1e63c7fd8f0d854876a45200 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.00012100923
0xa45a3d941cf3ef335ff94373ae23a0dc0d93ff75574d1686dc0fea4a330527acDeposit To Vault20149102022-06-13 15:45:18355 days 12 hrs ago0x931250786dfd106b1e63c7fd8f0d854876a45200 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.00012100923
0x697b6dea080d46076e2404a346338b76f9d622de148f87418d445c09fecae9faDeposit To Vault20148932022-06-13 15:40:54355 days 12 hrs ago0x931250786dfd106b1e63c7fd8f0d854876a45200 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.000068265
0x8bc16f71c69d905e101b65607c007adcc675abe33183f27e05d50706b6173fcfAdjust Deployed ...19712212022-06-06 16:05:36362 days 12 hrs ago0x931250786dfd106b1e63c7fd8f0d854876a45200 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.000043808375
0xe6fcd05d0a27229776bc2259f555df91612c9b54d441b24da80bb1e92e48377aEmergency Withdr...19711962022-06-06 16:00:12362 days 12 hrs ago0x931250786dfd106b1e63c7fd8f0d854876a45200 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.0000716275
0x0f1ac4eba87efddfa5cb438b7cc6ed6f2205c23ba3ab1593fbeba2e99ae1f237Deposit To Vault19711022022-06-06 15:39:12362 days 13 hrs ago0x931250786dfd106b1e63c7fd8f0d854876a45200 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.0001706625
0xfa1cda7b0afcea00befddf39454c001a3602db095ca05c46e0537b3ed67dd5d8Adjust Deployed ...19346712022-05-31 20:15:00368 days 8 hrs ago0x931250786dfd106b1e63c7fd8f0d854876a45200 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.0000673975
0x1b71ad93d23d8a4f9db6ed7f647bb127188409377b56b0f42139d791a32402f8Deploy To Strate...18722772022-05-21 21:36:18378 days 7 hrs ago0x931250786dfd106b1e63c7fd8f0d854876a45200 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.0001081931
0x18ec6fe09e63345eefcb91ef39ec02a24430e767a51ddc14875bbbf01c235a3aDeposit To Vault18722602022-05-21 21:32:00378 days 7 hrs ago0x931250786dfd106b1e63c7fd8f0d854876a45200 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.0001706925
0x614de4d8e6491507ac94d98e68275aa824d2a4486f984a5cd17b644048ea1820Adjust Deployed ...18543212022-05-18 23:55:30381 days 4 hrs ago0x931250786dfd106b1e63c7fd8f0d854876a45200 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.0000943565
0xf8d647102a09a782ec0e561326cda9d28f6f4fb908def92e6bb02559d52ffec1Deploy To Strate...18542502022-05-18 23:38:36381 days 5 hrs ago0x931250786dfd106b1e63c7fd8f0d854876a45200 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.00042861
0x087d8a44f3836e2e31d4a664b0a174bb677d28fed90e9b6dee8bf0fd80417edcWithdraw From St...18542302022-05-18 23:34:24381 days 5 hrs ago0x931250786dfd106b1e63c7fd8f0d854876a45200 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.0006541545
0xb312e5f08b25fbb096075e7ec40b7fedadd68619283bc615853b4b944350b10eDeploy To Strate...18541762022-05-18 23:21:30381 days 5 hrs ago0x931250786dfd106b1e63c7fd8f0d854876a45200 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.0003001495
0xf0c26c24b04561983f4efa2606cb188227cc942403d4fdf4bb7352aee1abeea8Deposit To Vault18541642022-05-18 23:18:42381 days 5 hrs ago0x931250786dfd106b1e63c7fd8f0d854876a45200 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.0002799357
0xd222352cf4c39e04de657276ee5db8e2037c19770fa54f25d45d97d7e1f3554dEmergency Withdr...18533932022-05-18 20:18:36381 days 8 hrs ago0x931250786dfd106b1e63c7fd8f0d854876a45200 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.0000490281
0x92fd2a10e5bbff05334cb4a9f648e191148a0aeddccd22b8cbf8c70b551d0a66Deploy To Strate...18401752022-05-16 17:23:42383 days 11 hrs ago0x931250786dfd106b1e63c7fd8f0d854876a45200 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.000254105
0xe053baa93b382bb06e674cd00ff66e4a0a8d5bcedb51012080f98899baaa2350Adjust Deployed ...18401692022-05-16 17:22:12383 days 11 hrs ago0x931250786dfd106b1e63c7fd8f0d854876a45200 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.0000538
0x6706c0ca5677b2afc99b8bbaaddc9cbf63119d8949a65fbca2529e256cfc5764Transfer Ownersh...18223892022-05-13 20:47:00386 days 7 hrs ago0xc692d583567cda0fde14cd3d6136c2623202ed68 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.000051462
0xb6d326f42abcac23fa97901aa663ea6d4f40e18360ac0582ff0a904c7378090fAdjust Deployed ...18102002022-05-11 20:08:00388 days 8 hrs ago0xc692d583567cda0fde14cd3d6136c2623202ed68 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.000053918
0x1756b21a357917278c6a2bf0630fbb81b50009644379f682ef9e7255cf8a7c01Deposit To Vault18101952022-05-11 20:07:00388 days 8 hrs ago0xc692d583567cda0fde14cd3d6136c2623202ed68 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.000109264
0xd963364bb9edd5530535baf1194610fbef91204a5768e7f2f6d71b7e91ea9162Adjust Deployed ...18032422022-05-10 13:09:06389 days 15 hrs ago0xc692d583567cda0fde14cd3d6136c2623202ed68 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.000053918
0x3fe65c8029a0fd9bbe006c5c3c90d0e3a2b31d6bd5be37e66cd34473a28e62a5Deploy To Strate...17996012022-05-09 17:46:36390 days 10 hrs ago0xc692d583567cda0fde14cd3d6136c2623202ed68 IN  0xcff0f501c6efa5cab2fe26dc025ead5505e9317c0 MOVR0.000171444
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FractVaultMOVR

Compiler Version
v0.8.3+commit.8d00100c

Optimization Enabled:
Yes with 999 runs

Other Settings:
default evmVersion
File 1 of 13 : FractVaultMOVR.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.3;

import "./FractVaultV1.sol";
import "./interfaces/IAnyswapV5ERC20.sol";

contract FractVaultMOVR is FractVaultV1 {
    
    IAnyswapV5ERC20 public anySwapToken;

    /**
     * @notice This event is fired when the anyswap token address is set.
     * @param token Specifies the anyswap token addres.
     */
    event SetAnySwapToken(address token);

    /**
     * @notice This event is fired when the vault swaps to a layer one address.
     * @param amount Specifies the withdrawal amount
     * @param toAddress Specified the address to send withdraw funds to
     */
    event SwapToLayerOne(uint256 amount, address toAddress);
    
    /**
     * @notice Constructor
     * @param _depositToken The address of the deposit token that the vault accepts. Uses the IERC20 Interface
     */
    constructor (address _depositToken) FractVaultV1(_depositToken) {
        depositToken = IERC20(_depositToken);
    }

    /**
     * @notice Owner method for setting the anyswap token address for crosschain withdrawals.
     * @param token The address of the anyswap anyswap token.
     */
    function setAnySwapToken(address token) external onlyOwner {
        require(token != address(0), "0 address");
        anySwapToken = IAnyswapV5ERC20(token);
        emit SetAnySwapToken(token);
    }

    /**
     * @notice Swap tokens to layer one via anyswap token.
     * @param amount The amount of tokens to send to layer one.
     * @param toAddress The address on layer one to send tokens to. 
     */  
    function swapToLayerOne(uint256 amount, address toAddress) public onlyOwner {
        require(amount > 0, "0 amount");
        require(toAddress != address(0), "0 address");

        depositToken.approve(address(anySwapToken), amount);

        anySwapToken.Swapout(amount, toAddress);

        emit SwapToLayerOne(amount, toAddress);

    }

    /**
     * @notice Owner method for removing funds from strategy.
     * @param strategy address of strategy to withdraw from. 
     */
    function withdrawFromStrategy(address strategy) external override onlyOwner {
        require(strategy != address(0), "0 address");
        require(supportedStrategiesMapping[strategy], "Strategy not supported");

        uint256 withdrawalAmount = depositToken.balanceOf(strategy);

        require(withdrawalAmount > 0, "0 amount");

        emit WithdrawFromStrategy(strategy, withdrawalAmount);

        FractStrategyV1(strategy).withdraw(withdrawalAmount);
    }

    /**
     * @notice Owner method for removing percentage of funds from strategy.
     * @param strategy address of strategy to withdraw percentage from.
     * @param withdrawPercentageBips percentage of funds to withdraw. Use 10000 to withdraw full amount.
     */
    function withdrawPercentageFromStrategy(address strategy, uint256 withdrawPercentageBips) external override onlyOwner {
        require(withdrawPercentageBips > 0 && withdrawPercentageBips <= BIPS_DIVISOR, "Percentage Required");
        uint256 amount = depositToken.balanceOf(strategy);
        uint256 withdrawalAmount = amount * withdrawPercentageBips / BIPS_DIVISOR;

        require(amount > 0, "0 amount");
        require(withdrawalAmount > 0, "0 amount");

        emit WithdrawFromStrategy(strategy, withdrawalAmount);

        FractStrategyV1(strategy).withdraw(withdrawalAmount);
    }
}

File 2 of 13 : FractVaultV1.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.3;

import "./standards/Ownable.sol";
import "./standards/ReentrancyGuard.sol";
import "./lib/SafeERC20.sol";
import "./interfaces/IERC20.sol";
import "./interfaces/IAnyswapV5Router.sol";
import "./FractStrategyV1.sol";

/**
 * @notice FractVault is a managed vault for `deposit tokens`. 
 */
contract FractVaultV1 is Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    // Array of addresses of supported strategies.
    address[] public supportedStrategies;

    // Constant used as a bips divisor.       
    uint256 internal constant BIPS_DIVISOR = 10000;

    // Total capital deployed across strategies.
    uint256 public deployedCapital;

    // Deposit token that the vault manages.
    IERC20 public depositToken;

    IAnyswapV5Router public anySwapRouter;

    // Mapping to check supportedStrategies array.
    mapping(address => bool) public supportedStrategiesMapping;

    /**
     * @notice This event is fired when the vault receives a deposit.
     * @param account Specifies the depositor address.
     * @param amount Specifies the deposit amount.
     */
    event Deposit(address indexed account, uint256 amount);

    /**
     * @notice This event is fired when the vault receives a withdrawal.
     * @param account Specifies the withdrawer address.
     * @param amount Specifies the withdrawal amount,
     */
    event Withdraw(address indexed account, uint256 amount);

    /**
     * @notice This event is fired when the vault withdraws to a layer one address.
     * @param account Specifies the withdrawer address.
     * @param amount Specifies the withdrawal amount,
     */
    event WithdrawToLayerOne(address indexed account, uint256 amount);

    /**
     * @notice This event is fired when a strategy is added to supportedStrategies.
     * @param strategy The address of the strategy.
     */
    event AddStrategy(address indexed strategy);

    /**
     * @notice This event is fired when a strategy is removed from supportedStrategies.
     * @param strategy The address of the strategy.
     */
    event RemoveStrategy(address indexed strategy);

    /**
     * @notice This event is fired when funds are deployed to a strategy.
     * @param strategy The address of the strategy.
     * @param amount The amount deployed to the strategy.
     */
    event DeployToStrategy(address indexed strategy, uint256 amount);

     /**
     * @notice This event is fired when funds are withdrawn from a strategy.
     * @param strategy The address of the strategy.
     * @param amount The amount withdrawn from the strategy.
     */
    event WithdrawFromStrategy(address indexed strategy, uint256 amount);

    /**
     * @notice This event is fired when tokens are recovered from the strategy contract.
     * @param token Specifies the token that was recovered.
     * @param amount Specifies the amount that was recovered.
     */
    event EmergencyWithdrawal(address token, uint amount);

    /**
     * @notice This event is fired when the anyswap router address is set.
     * @param routerAddress Specifies the anyswap router address.
     */
    event SetRouterAddress(address routerAddress);

    /**
     * @notice This event is fired when the deployedCapital is adjusted.
     * @param newAmount Specifies the new amount of deployedCapital.
     */
    event AdjustDeployedCapital(uint256 newAmount);

    /**
     * @notice Constructor
     * @param _depositToken The address of the deposit token that the vault accepts. Uses the IERC20 Interface
     */
    constructor (address _depositToken) Ownable(msg.sender) {
        depositToken = IERC20(_depositToken);
    }

    /**
     * @notice Owner method for setting the anyswap router address for crosschain withdrawals.
     * @param routerAddress The address of the anyswap router.
     */
    function setAnySwapRouter(address routerAddress) external onlyOwner {
        require(routerAddress != address(0), "Router address cannot be a 0 address");
        anySwapRouter = IAnyswapV5Router(routerAddress);
        emit SetRouterAddress(routerAddress);
    }

    /**
     * @notice Owner method for depositing to the vault, without deploying to a strategy.
     * @notice In order to deploy deposit amount to strategy, you must call deployToStrategy()
     * @notice Add the nonReentrant modifer to mitigate re-entry attacks.
     * @param amount amount
     */
    function depositToVault(uint256 amount) public onlyOwner nonReentrant {
        require(amount > 0, "Amount must be greater than 0");

        uint256 currentBalance = getCurrentBalance();
        uint256 expectedBalance = currentBalance + amount;

        emit Deposit(msg.sender, amount);

        depositToken.safeTransferFrom(msg.sender, address(this), amount);

        uint256 updatedBalance = getCurrentBalance();
        require(updatedBalance >= expectedBalance, "Balance verification failed");

    }

    /**
     * @notice Owner method for deploying entire deposit token amount to a single strategy.
     * @param strategy strategy address.
     */
    function deployToStrategy(address strategy) external onlyOwner {
        require(strategy != address(0), "FractVault::no active strategy");
        require(supportedStrategiesMapping[strategy], "Strategy is not in supported strategies.");
        uint256 depositTokenBalance = 0;
        depositTokenBalance = depositToken.balanceOf(address(this));
        require(depositTokenBalance > 0, "Cannot deploy balance, amount must be greater than 0");

        deployedCapital += depositTokenBalance;

        emit DeployToStrategy(strategy, depositTokenBalance);

        depositToken.safeIncreaseAllowance(strategy, depositTokenBalance);
        FractStrategyV1(strategy).deposit(depositTokenBalance);
        require(depositToken.approve(strategy, 0), "Deployment Failed");
    }

    /**
     * @notice Owner method for deploying percentage amount of deposit tokens to a single strategy.
     * @param strategy strategy address.
     * @param depositPercentageBips percentage of deposit token amount to deploy. Use 10000 to deploy full amount.
     */
    function deployPercentageToStrategy(address strategy, uint256 depositPercentageBips) external onlyOwner {
        require(depositPercentageBips > 0 && depositPercentageBips <= BIPS_DIVISOR, "Invalid Percentage");
        require(supportedStrategiesMapping[strategy], "Strategy is not in supported strategies");
        uint256 depositTokenBalance = 0;
        depositTokenBalance = depositToken.balanceOf(address(this));
        require(depositTokenBalance != 0, "Deposit token balance must be greater than  0");
        uint256 amount = (depositTokenBalance * depositPercentageBips) / BIPS_DIVISOR;

        deployedCapital = deployedCapital + amount;

        emit DeployToStrategy(strategy, amount);

        depositToken.safeIncreaseAllowance(strategy, amount);
        FractStrategyV1(strategy).deposit(amount);
        require(depositToken.approve(strategy, 0), "Deployment Failed");
        
    }

    /**
     * @notice Owner method for withdrawing from the vault.
     * @notice Add the nonReentrant modifer to mitigate re-entry attacks.
     * @param amount receipt tokens held by msg.sender. 
     */
    function withdraw(uint256 amount) public onlyOwner nonReentrant {
        require(amount > 0, "Must withdraw more than 0");

        emit Withdraw(msg.sender, amount);

        depositToken.safeTransfer(msg.sender, amount);
    }

    /**
     * @notice Owner method for withdrawing from the vault to layer one.
     * @param token address of token
     * @param toAddress address of toAddress on destination chain.
     * @param amount amount to withdraw to layer one via anyswap router.
     * @param chainId destination chain id to withdraw to.
     */
    function withdrawToLayerOne(
        address token, 
        address toAddress, 
        uint256 amount, 
        uint256 chainId) public onlyOwner {
        require(token != address(0), "token cannot be a 0 address");
        require(toAddress != address(0), "toAddress cannot be a 0 address");
        require(amount > 0, "Must withdraw more than 0");
        //add approval for anyswaprouter to spend anytoken
        IERC20(token).approve(address(anySwapRouter), amount);

        emit WithdrawToLayerOne(msg.sender, amount);

        anySwapRouter.anySwapOutUnderlying(token, toAddress, amount, chainId);
    }

    /**
     * @notice Owner method for removing funds from strategy.
     * @param strategy address of strategy to withdraw from. 
     */
    function withdrawFromStrategy(address strategy) external virtual onlyOwner {
        require(strategy != address(0), "Strategy cannot be a 0 address");
        require(supportedStrategiesMapping[strategy], "Strategy is not supported, cannot remove.");
        uint256 balanceBefore = getCurrentBalance();
        uint256 strategyBalanceShares = 0;
        uint256 withdrawnAmount = 0;
        strategyBalanceShares = FractStrategyV1(strategy).balanceOf(address(this));
        withdrawnAmount = FractStrategyV1(strategy).getDepositTokensForShares(strategyBalanceShares);
        require(withdrawnAmount + balanceBefore > balanceBefore, "Withdrawal failed");

        emit WithdrawFromStrategy(strategy, withdrawnAmount);

        FractStrategyV1(strategy).withdraw(strategyBalanceShares);

    }

    /**
     * @notice Owner method for removing percentage of funds from strategy.
     * @param strategy address of strategy to withdraw percentage from.
     * @param withdrawPercentageBips percentage of funds to withdraw. Use 10000 to withdraw full amount.
     */
    function withdrawPercentageFromStrategy(address strategy, uint256 withdrawPercentageBips) external virtual onlyOwner {
        require(withdrawPercentageBips > 0 && withdrawPercentageBips <= BIPS_DIVISOR, "Percentage Required");
        uint256 balanceBefore = getCurrentBalance();
        uint256 shareBalance = 0;
        uint256 withdrawalAmount = 0;
        uint256 withdrawnAmount = 0;
        shareBalance = FractStrategyV1(strategy).balanceOf(address(this));
        withdrawalAmount = shareBalance * withdrawPercentageBips / BIPS_DIVISOR;
        withdrawnAmount = FractStrategyV1(strategy).getDepositTokensForShares(withdrawalAmount);
        require(withdrawnAmount > balanceBefore, "Withdrawal failed");

        emit WithdrawFromStrategy(strategy, withdrawnAmount);

        FractStrategyV1(strategy).withdraw(withdrawalAmount);
    }

    /**
     * @notice Owner method for adding supported strategy.
     * @param strategy address for new strategy
     */
    function addStrategy(address strategy) external onlyOwner {
        require(strategy != address(0), "Strategy is a 0 address");
        require(depositToken == FractStrategyV1(strategy).depositToken(), "FractVault::addStrategy, not compatible");
        supportedStrategiesMapping[strategy] = true;
        supportedStrategies.push(strategy);
        
        emit AddStrategy(strategy);
    }

    /**
     * @notice Owner method for removing strategy. 
     * @param strategy address for new strategy
     */
    function removeStrategy(address strategy) external onlyOwner {
        address[] storage strategiesToRemove = supportedStrategies;
        require(strategy != address(0), "Strategy is a 0 address");
        require(supportedStrategiesMapping[strategy], "Strategy is not supported, cannot remove.");
        for (uint256 i = 0; i < strategiesToRemove.length; i++) {
            if (strategy == strategiesToRemove[i]) {
                strategiesToRemove[i] = strategiesToRemove[strategiesToRemove.length - 1];
                strategiesToRemove.pop();
                break;
            }
        }
        supportedStrategies = strategiesToRemove;
        emit RemoveStrategy(strategy);
    }

    /**
     * @notice Returns current balance of deposit tokens in the vault. 
     */
    function getCurrentBalance() public view returns (uint256) {
        return depositToken.balanceOf(address(this));
    }

    /**
     * @notice Checks if strategy is a supported strategy.
     * @param strategy Address of strategy.
     */
    function checkStrategy(address strategy) external view returns (bool) {
        return supportedStrategiesMapping[strategy];
    }

    /**
     * @notice Recover ERC20 from contract
     * @param tokenAddress token address
     * @param tokenAmount amount to recover
     */
    function emergencyWithdrawal(address tokenAddress, uint256 tokenAmount) external onlyOwner {
        require(tokenAmount > 0, "Recovery amount must be greater than 0");
        //rename this function and emitted event to EmergencyWithdrawal
        emit EmergencyWithdrawal(tokenAddress, tokenAmount);
        require(IERC20(tokenAddress).transfer(msg.sender, tokenAmount), "Recovery Failed");
        
    }

    function adjustDeployedCapital(uint256 newAmount) external onlyOwner {
        deployedCapital = newAmount;
        emit AdjustDeployedCapital(newAmount);
    }
}

File 3 of 13 : IAnyswapV5ERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IAnyswapV5ERC20 {
  function DOMAIN_SEPARATOR() external view returns (bytes32);
  function PERMIT_TYPEHASH() external view returns (bytes32);
  function Swapin(bytes32 txhash, address account, uint256 amount) external returns (bool);
  function Swapout(uint256 amount, address bindaddr) external returns (bool);
  function TRANSFER_TYPEHASH() external view returns (bytes32);
  function allowance(address, address) external view returns (uint256);
  function applyMinter() external;
  function applyVault() external;
  function approve(address spender, uint256 value) external returns (bool);
  function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
  function balanceOf(address) external view returns (uint256);
  function burn(address from, uint256 amount) external returns (bool);
  function changeMPCOwner(address newVault) external returns (bool);
  function changeVault(address newVault) external returns (bool);
  function decimals() external view returns (uint8);
  function delay() external view returns (uint256);
  function delayDelay() external view returns (uint256);
  function delayMinter() external view returns (uint256);
  function delayVault() external view returns (uint256);
  function deposit(uint256 amount, address to) external returns (uint256);
  function deposit(uint256 amount) external returns (uint256);
  function deposit() external returns (uint256);
  function depositVault(uint256 amount, address to) external returns (uint256);
  function depositWithPermit(address target, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s, address to) external returns (uint256);
  function depositWithTransferPermit(address target, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s, address to) external returns (uint256);
  function getAllMinters() external view returns (address[] memory);
  function initVault(address _vault) external;
  function isMinter(address) external view returns (bool);
  function mint(address to, uint256 amount) external returns (bool);
  function minters(uint256) external view returns (address);
  function mpc() external view returns (address);
  function name() external view returns (string memory);
  function nonces(address) external view returns (uint256);
  function owner() external view returns (address);
  function pendingDelay() external view returns (uint256);
  function pendingMinter() external view returns (address);
  function pendingVault() external view returns (address);
  function permit(address target, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external;
  function revokeMinter(address _auth) external;
  function setMinter(address _auth) external;
  function setVault(address _vault) external;
  function setVaultOnly(bool enabled) external;
  function symbol() external view returns (string memory);
  function totalSupply() external view returns (uint256);
  function transfer(address to, uint256 value) external returns (bool);
  function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);
  function transferFrom(address from, address to, uint256 value) external returns (bool);
  function transferWithPermit(address target, address to, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external returns (bool);
  function underlying() external view returns (address);
  function vault() external view returns (address);
  function withdraw(uint256 amount, address to) external returns (uint256);
  function withdraw(uint256 amount) external returns (uint256);
  function withdraw() external returns (uint256);
  function withdrawVault(address from, uint256 amount, address to) external returns (uint256);
}

File 4 of 13 : Ownable.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.3;

/**
 * @title Represents an ownable resource.
 */
contract Ownable {
    address private _owner;

    event OwnershipTransferred(address previousOwner, address newOwner);
    
    /**
     * Constructor
     * @param addr The owner of the smart contract
     */
    constructor (address addr) {
        require(addr != address(0), "The address of the owner cannot be the zero address");
        require(addr != address(1), "The address of the owner cannot be the ecrecover address");
        _owner = addr;
        emit OwnershipTransferred(address(0), addr);
    }

    /**
     * @notice This modifier indicates that the function can only be called by the owner.
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner(msg.sender), "Only the owner of the smart contract is allowed to call this function.");
        _;
    }

    /**
     * @notice Transfers ownership to the address specified.
     * @param addr Specifies the address of the new owner.
     * @dev Throws if called by any account other than the owner.
     */
    function transferOwnership (address addr) public onlyOwner {
        require(addr != address(0), "The target address cannot be the zero address");
        emit OwnershipTransferred(_owner, addr);
        _owner = addr;
    }

    /**
     * @notice Destroys the smart contract.
     * @param addr The payable address of the recipient.
     */
    function destroy(address payable addr) external virtual onlyOwner {
        require(addr != address(0), "The target address cannot be the zero address");
        require(addr != address(1), "The target address cannot be the ecrecover address");
        selfdestruct(addr);
    }

    /**
     * @notice Gets the address of the owner.
     * @return the address of the owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @notice Indicates if the address specified is the owner of the resource.
     * @return true if `msg.sender` is the owner of the contract.
     */
    function isOwner(address addr) public view returns (bool) {
        return addr == _owner;
    }
}

File 5 of 13 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity 0.8.3;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 6 of 13 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity 0.8.3;

import "../interfaces/IERC20.sol";
import "./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));
    }

    /**
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */

    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
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 7 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity 0.8.3;

/**
 * @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);
}

File 8 of 13 : IAnyswapV5Router.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.3;

interface IAnyswapV5Router {
    function anySwapOutUnderlying(address token, address to, uint amount, uint toChainID) external;
}

File 9 of 13 : FractStrategyV1.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.3;

import "./standards/Ownable.sol";
import "./interfaces/IERC20.sol";
import "./FractERC20.sol";
import "./lib/DexLibrary.sol";

/**
 * @notice FractStrategyV1 should be inherited by new strategies.
 */

abstract contract FractStrategyV1 is FractERC20, Ownable {

    // Deposit token that the strategy accepts.
    IERC20 public depositToken;

    // Reward token that the strategy receives from protocol it interacts with.
    IERC20 public rewardToken;

    // Fractal Vault address;
    address public fractVault;
    
    // Developer Address
    address public devAddr;

    // Minimum amount of token rewards to harvest into the strategy.
    uint256 public minTokensToHarvest;

    // Minimum amount of tokens to deposit into strategy without harvesting.
    uint256 public maxTokensToDepositWithoutHarvest;

    // Total deposits in the strategy.
    uint256 public totalDeposits;

    // Bool value to enable or disable deposits.
    bool public depositsEnabled;

    // Fee that is given to EOA that calls harvest() function.
    uint256 public harvestRewardBips;

    // Fee that is sent to owner address.
    uint256 public adminFeeBips;

    // Constant used as a bips divisor. 
    uint256 constant internal BIPS_DIVISOR = 10000;

    // Constant for scaling values.
    uint256 public constant ONE_ETHER = 10**18;

    /**
     * @notice This event is fired when the strategy receives a deposit.
     * @param account Specifies the depositor address.
     * @param amount Specifies the deposit amount.
     */
    event Deposit(address indexed account, uint amount);

    /**
     * @notice This event is fired when the strategy receives a withdrawal.
     * @param account Specifies the withdrawer address.
     * @param amount Specifies the withdrawal amount,
     */
    event Withdraw(address indexed account, uint amount);

    /**
     * @notice This event is fired when the strategy harvest its earned rewards.
     * @param newTotalDeposits Specifies the total amount of deposits in the strategy.
     * @param newTotalSupply Specifies the total supply of receipt tokens the strategy has minted.
     */
    event Harvest(uint newTotalDeposits, uint newTotalSupply);

    /**
     * @notice This event is fired when tokens are recovered from the strategy contract.
     * @param token Specifies the token that was recovered.
     * @param amount Specifies the amount that was recovered.
     */
    event EmergencyWithdrawal(address token, uint amount);

    /**
     * @notice This event is fired when the admin fee is updated.
     * @param oldValue Old admin fee.
     * @param newValue New admin fee.
     */
    event UpdateAdminFee(uint oldValue, uint newValue);

    /**
     * @notice This event is fired when the harvest fee is updated.
     * @param oldValue Old harvest fee.
     * @param newValue New harvest fee.
     */
    event UpdateHarvestReward(uint oldValue, uint newValue);

    /**
     * @notice This event is fired when the min tokens to harvest is updated.
     * @param oldValue Old min tokens to harvest amount.
     * @param newValue New min tokens to harvest amount.
     */
    event UpdateMinTokensToHarvest(uint oldValue, uint newValue);

    /**
     * @notice This event is fired when the max tokens to deposit without harvest is updated.
     * @param oldValue Old max tokens to harvest without deposit.
     * @param newValue New max tokens to harvest without deposit.
     */
    event UpdateMaxTokensToDepositWithoutHarvest(uint oldValue, uint newValue);

     /**
     * @notice This event is fired when the developer address is updated.
     * @param oldValue Old developer address.
     * @param newValue New developer address.
     */
    event UpdateDevAddr(address oldValue, address newValue);

    /**
     * @notice This event is fired when deposits are enabled or disabled.
     * @param newValue Bool for enabling or disabling deposits.
     */
    event DepositsEnabled(bool newValue);

    /**
     * @notice This event is fired when the vault contract address is set. 
     * @param vaultAddress Specifies the address of the fractVault. 
     */
    event SetVault(address indexed vaultAddress);


    /**
     * @notice This event is fired when funds (interest) are withdrawn from a strategy.
     * @param amount The amount (interest) withdrawn from the strategy.
     */
    event WithdrawInterest(uint256 amount);

    /**
     * @notice This event is fired when the deposit token is altered. 
     * @param newTokenAddress The address of the new deposit token.  
     */
    event ChangeDepositToken(address indexed newTokenAddress);
    
    /**
     * @notice Only called by dev
     */
    modifier onlyDev() {
        require(msg.sender == devAddr, "Only Developer can call this function");
        _;
    }

    /**
     * @notice Only called by vault
     */
    modifier onlyVault() {
        require(msg.sender == fractVault, "Only the fractVault can call this function.");
        _;
    }

    /**
     * @notice Initialized the different strategy settings after the contract has been deployed.
     * @param minHarvestTokens The minimum amount of pending reward tokens needed to call the harvest function.
     * @param adminFee The admin fee, charged when calling harvest function.
     * @param harvestReward The harvest fee, charged when calling the harvest function, given to EOA.
     */
    function initializeStrategySettings(uint256 minHarvestTokens, uint256 adminFee, uint256 harvestReward) 
    external onlyOwner {
        minTokensToHarvest = minHarvestTokens;
        adminFeeBips = adminFee;
        harvestRewardBips = harvestReward;

        updateMinTokensToHarvest(minTokensToHarvest);
        updateAdminFee(adminFeeBips);
        updateHarvestReward(harvestRewardBips);
    }

    /**
     * @notice Sets the vault address the strategy will receive deposits from. 
     * @param vaultAddress Specifies the address of the poolContract. 
     */
    function setVaultAddress(address vaultAddress) external onlyOwner {
        require(vaultAddress != address(0), "Address cannot be a 0 address");
        fractVault = vaultAddress;

        emit SetVault(fractVault);

    }
    
    /**
     * @notice Revoke token allowance
     * @param token address
     * @param spender address
     */
    function revokeAllowance(address token, address spender) external onlyOwner {
        require(IERC20(token).approve(spender, 0), "Revoke Failed");
    }

    /**
     * @notice Set a new deposit token, and swap current deposit tokens to new deposit tokens via lp pool.
     * @param oldDeposit The address of the old depositToken for the strategy.
     * @param newDeposit The address of the new depositToken for the strategy.
     * @param swapContract The address of the lp pool to swap old deposit token to new deposit token.
     * @param minAmountOut minimum amount out, calculated offchain. 
     */
    function changeDepositToken(address oldDeposit, address newDeposit, address swapContract, uint256 minAmountOut) external onlyOwner {
        require(oldDeposit != address(0), "Address cannot be a 0 address");
        require(newDeposit != address(0), "Address cannot be a 0 address");
        require(swapContract != address(0), "Address cannot be a 0 address");

        uint256 depositTokenBalance = depositToken.balanceOf(address(this));
        uint256 newDepositTokenBalance = 0;
        
        depositToken = IERC20(newDeposit);
        
        emit ChangeDepositToken(newDeposit);

        newDepositTokenBalance = DexLibrary.swap(
            depositTokenBalance,
            oldDeposit,
            newDeposit,
            IPair(swapContract),
            minAmountOut
        );
    }

    /**
     * @notice Deposit and deploy deposits tokens to the strategy
     * @dev Must mint receipt tokens to `msg.sender`
     * @param amount deposit tokens
     */
    function deposit(uint256 amount) external virtual;

    /**
     * @notice Redeem receipt tokens for deposit tokens
     * @param amount receipt tokens
     */
    function withdraw(uint256 amount) external virtual;
    
    /**
     * @notice Calculate receipt tokens for a given amount of deposit tokens
     * @dev If contract is empty, use 1:1 ratio
     * @dev Could return zero shares for very low amounts of deposit tokens
     * @param amount deposit tokens
     * @return receipt tokens
     */
    function getSharesForDepositTokens(uint256 amount) public view returns (uint) {
        if (totalSupply * totalDeposits > 0) {
            return (amount * totalSupply) / totalDeposits;
        }
        return amount;
    }

    /**
     * @notice Calculate deposit tokens for a given amount of receipt tokens
     * @param amount receipt tokens
     * @return deposit tokens
     */
    function getDepositTokensForShares(uint256 amount) public view returns (uint) {
        if (totalSupply * totalDeposits > 0) {
            return (amount * totalDeposits) / totalSupply;
        }
        return 0;
    }

    /**
     * @notice Update harvest min threshold
     * @param newValue threshold
     */
    function updateMinTokensToHarvest(uint256 newValue) public onlyOwner {
        emit UpdateMinTokensToHarvest(minTokensToHarvest, newValue);
        minTokensToHarvest = newValue;
    }

    /**
     * @notice Update harvest max threshold before a deposit
     * @param newValue threshold
     */
    function updateMaxTokensToDepositWithoutHarvest(uint256 newValue) external onlyOwner {
        emit UpdateMaxTokensToDepositWithoutHarvest(maxTokensToDepositWithoutHarvest,newValue);
        maxTokensToDepositWithoutHarvest = newValue;
    }

    /**
     * @notice Update admin fee
     * @param newValue fee in BIPS
     */
    function updateAdminFee(uint256 newValue) public onlyOwner {
        require(newValue + harvestRewardBips <= BIPS_DIVISOR, "Updated Failed");
        emit UpdateAdminFee(adminFeeBips, newValue);
        adminFeeBips = newValue;
    }

    /**
     * @notice Update harvest reward
     * @param newValue fee in BIPS
     */
    function updateHarvestReward(uint256 newValue) public onlyOwner {
        require(newValue + adminFeeBips <= BIPS_DIVISOR, "Update Failed");
        emit UpdateHarvestReward(harvestRewardBips, newValue);
        harvestRewardBips = newValue;
    }

    /**
     * @notice Enable/disable deposits
     * @param newValue bool
     */
    function updateDepositsEnabled(bool newValue) external onlyOwner {
        require(depositsEnabled != newValue, "Update Failed");
        depositsEnabled = newValue;
        emit DepositsEnabled(newValue);
    }

    /**
     * @notice Update devAddr
     * @param newValue address
     */
    function updateDevAddr(address newValue) external onlyDev {
        require(newValue != address(0), "Address is a 0 address");
        emit UpdateDevAddr(devAddr, newValue);
        devAddr = newValue;
    }

    /**
     * @notice Recover ERC20 from contract
     * @param tokenAddress token address
     * @param tokenAmount amount to recover
     */
    function emergencyWithdrawal(address tokenAddress, uint256 tokenAmount) external onlyOwner {
        require(tokenAmount > 0, "Recovery amount must be greater than 0");
        emit EmergencyWithdrawal(tokenAddress, tokenAmount);
        require(IERC20(tokenAddress).transfer(msg.sender, tokenAmount), "Recovery Failed");
        
    }
}

File 10 of 13 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity 0.8.3;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev 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-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 11 of 13 : FractERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.3;

/**
 * @notice FractERC20 adapts from Rari Capital's Solmate ERC20.
 */
abstract contract FractERC20 {

    string public name;
    string public symbol;
    uint8 public decimals;
    uint256 internal totalSupply;

    mapping(address => uint256) public balances;
    mapping(address => mapping(address => uint256)) public allowances;

    constructor(
        string memory _name,
        string memory _symbol,
        uint8 _decimals
    ) {
        name = _name;
        symbol = _symbol;
        decimals = _decimals;
    }

    event Transfer(address indexed from, address indexed to, uint256 amount);
    event Approval(address indexed owner, address indexed spender, uint256 amount);

        
    function balanceOf(address account) external view returns (uint) {
        return balances[account];
    }

    function allowance(address owner, address spender) external virtual returns (uint256) {
        return allowances[owner][spender];
    }

    function totalTokenSupply() external view returns (uint256) {
        return totalSupply;
    }

    function approve(address spender, uint256 amount) external virtual returns (bool) {
        require(spender != address(0), "ERC20: approve to the zero address");
        allowances[msg.sender][spender] = amount;

        emit Approval(msg.sender, spender, amount);

        return true;
    }

    function transfer(address to, uint256 amount) external virtual returns (bool) {
        balances[msg.sender] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balances[to] += amount;
        }

        emit Transfer(msg.sender, to, amount);

        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external virtual returns (bool) {
        uint256 allowed = allowances[from][msg.sender]; // Saves gas for limited approvals.

        if (allowed != type(uint256).max) allowances[from][msg.sender] = allowed - amount;

        balances[from] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balances[to] += amount;
        }

        emit Transfer(from, to, amount);

        return true;
    }


    function _mint(address to, uint256 amount) internal virtual {
        totalSupply += amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balances[to] += amount;
        }

        emit Transfer(address(0), to, amount);
    }

    function _burn(address from, uint256 amount) internal virtual {
        balances[from] -= amount;

        // Cannot underflow because a user's balance
        // will never be larger than the total supply.
        unchecked {
            totalSupply -= amount;
        }

        emit Transfer(from, address(0), amount);
    }
}

File 12 of 13 : DexLibrary.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.3;

import "../interfaces/IERC20.sol";
import "../interfaces/IPair.sol";

library DexLibrary {

  bytes private constant ZERO_BYTES = new bytes(0);

  /**
   * @notice Swap directly through a Pair
   * @param amountIn input amount
   * @param fromToken address
   * @param toToken address
   * @param pair Pair used for swap
   * @param minAmountOut minimum amount out, calculated offchain.
   * @return output amount
   */
  function swap(uint256 amountIn, address fromToken, address toToken, IPair pair, uint256 minAmountOut) internal returns (uint256) {
    (address token0, ) = sortTokens(fromToken, toToken);
    (uint112 reserve0, uint112 reserve1, ) = pair.getReserves();
    if (token0 != fromToken) (reserve0, reserve1) = (reserve1, reserve0);
    uint256 amountOut1 = 0;
    uint256 amountOut2 = getAmountOut(amountIn, reserve0, reserve1);
    if (token0 != fromToken)
      (amountOut1, amountOut2) = (amountOut2, amountOut1);
    safeTransfer(fromToken, address(pair), amountIn);
    pair.swap(amountOut1, amountOut2, address(this), ZERO_BYTES);
    if (amountOut2 > amountOut1){
      require(amountOut2 > minAmountOut, "Slippage Exceeded");
      return amountOut2;
    }
    else {
      require(amountOut1 > minAmountOut, "Slippage Exceeded");
      return amountOut1;
    }
  }

  /**
   * @notice Add liquidity directly through a Pair
   * @dev Checks adding the max of each token amount
   * @param depositToken address
   * @param maxAmountIn0 amount token0
   * @param maxAmountIn1 amount token1
   * @return liquidity tokens
   */
  function addLiquidity(
    address depositToken,
    uint256 maxAmountIn0,
    uint256 maxAmountIn1
  ) internal returns (uint256) {
    (uint112 reserve0, uint112 reserve1, ) = IPair(address(depositToken))
      .getReserves();
    uint256 amountIn1 = _quoteLiquidityAmountOut(
      maxAmountIn0,
      reserve0,
      reserve1
    );
    if (amountIn1 > maxAmountIn1) {
      amountIn1 = maxAmountIn1;
      maxAmountIn0 = _quoteLiquidityAmountOut(maxAmountIn1, reserve1, reserve0);
    }

    safeTransfer(IPair(depositToken).token0(), depositToken, maxAmountIn0);
    safeTransfer(IPair(depositToken).token1(), depositToken, amountIn1);
    return IPair(depositToken).mint(address(this));
  }

  /**
   * @notice Add liquidity directly through a Pair
   * @dev Checks adding the max of each token amount
   * @param depositToken address
   * @return amounts of each token returned
   */
  function removeLiquidity(address depositToken)
    internal
    returns (uint256, uint256)
  {
    IPair pair = IPair(address(depositToken));
    require(address(pair) != address(0), "Invalid pair for removingliquidity");

    safeTransfer(depositToken, depositToken, pair.balanceOf(address(this)));
    (uint256 amount0, uint256 amount1) = pair.burn(address(this));

    return (amount0, amount1);
  }

  /**
   * @notice Quote liquidity amount out
   * @param amountIn input tokens
   * @param reserve0 size of input asset reserve
   * @param reserve1 size of output asset reserve
   * @return liquidity tokens
   */
  function _quoteLiquidityAmountOut(
    uint256 amountIn,
    uint256 reserve0,
    uint256 reserve1
  ) private pure returns (uint256) {
    return (amountIn * reserve1) / reserve0;
  }

  /**
   * @notice Given two tokens, it'll return the tokens in the right order for the tokens pair
   * @dev TokenA must be different from TokenB, and both shouldn't be address(0), no validations
   * @param tokenA address
   * @param tokenB address
   * @return sorted tokens
   */
  function sortTokens(address tokenA, address tokenB)
    internal
    pure
    returns (address, address)
  {
    return tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
  }

  /**
   * @notice Given an input amount of an asset and pair reserves, returns maximum output amount of the other asset
   * @dev Assumes swap fee is 0.30%
   * @param amountIn input asset
   * @param reserveIn size of input asset reserve
   * @param reserveOut size of output asset reserve
   * @return maximum output amount
   */
  function getAmountOut(
    uint256 amountIn,
    uint256 reserveIn,
    uint256 reserveOut
  ) internal pure returns (uint256) {
    uint256 amountInWithFee = amountIn * 997;
    uint256 numerator = amountInWithFee * reserveOut;
    uint256 denominator = reserveIn * 1000 + amountInWithFee;
    uint256 amountOut = numerator / denominator;
    return amountOut;
  }

  /**
   * @notice Safely transfer using an anonymous ERC20 token
   * @dev Requires token to return true on transfer
   * @param token address
   * @param to recipient address
   * @param value amount
   */
  function safeTransfer(
    address token,
    address to,
    uint256 value
  ) internal {
    require(
      IERC20(token).transfer(to, value),
      "DexLibrary::TRANSFER_FROM_FAILED"
    );
  }
}

File 13 of 13 : IPair.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.3;

import "./IERC20.sol";

interface IPair is IERC20 {
    function token0() external pure returns (address);
    function token1() external pure returns (address);
    function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external;
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function mint(address to) external returns (uint256 liquidity);
    function burn(address to) external returns (uint256 amount0, uint256 amount1);
    function sync() external;
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 999,
    "details": {
      "yul": true
    }
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_depositToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"strategy","type":"address"}],"name":"AddStrategy","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newAmount","type":"uint256"}],"name":"AdjustDeployedCapital","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"strategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DeployToStrategy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdrawal","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"strategy","type":"address"}],"name":"RemoveStrategy","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"SetAnySwapToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"routerAddress","type":"address"}],"name":"SetRouterAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"toAddress","type":"address"}],"name":"SwapToLayerOne","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"strategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawFromStrategy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawToLayerOne","type":"event"},{"inputs":[{"internalType":"address","name":"strategy","type":"address"}],"name":"addStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newAmount","type":"uint256"}],"name":"adjustDeployedCapital","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"anySwapRouter","outputs":[{"internalType":"contract IAnyswapV5Router","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"anySwapToken","outputs":[{"internalType":"contract IAnyswapV5ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"strategy","type":"address"}],"name":"checkStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"strategy","type":"address"},{"internalType":"uint256","name":"depositPercentageBips","type":"uint256"}],"name":"deployPercentageToStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"strategy","type":"address"}],"name":"deployToStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deployedCapital","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"depositToVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"addr","type":"address"}],"name":"destroy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"emergencyWithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getCurrentBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"strategy","type":"address"}],"name":"removeStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"routerAddress","type":"address"}],"name":"setAnySwapRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"setAnySwapToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"supportedStrategies","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"supportedStrategiesMapping","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"toAddress","type":"address"}],"name":"swapToLayerOne","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"strategy","type":"address"}],"name":"withdrawFromStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"strategy","type":"address"},{"internalType":"uint256","name":"withdrawPercentageBips","type":"uint256"}],"name":"withdrawPercentageFromStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"withdrawToLayerOne","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162002f9638038062002f96833981016040819052620000349162000192565b8033806200009e5760405162461bcd60e51b8152602060048201526033602482015260008051602062002f7683398151915260448201527f626520746865207a65726f20616464726573730000000000000000000000000060648201526084015b60405180910390fd5b6001600160a01b038116600114156200010f5760405162461bcd60e51b8152602060048201526038602482015260008051602062002f7683398151915260448201527f6265207468652065637265636f76657220616464726573730000000000000000606482015260840162000095565b600080546001600160a01b0319166001600160a01b03831690811782556040805192835260208301919091527f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0910160405180910390a1505060018055600480546001600160a01b0319166001600160a01b0392909216919091179055620001c2565b600060208284031215620001a4578081fd5b81516001600160a01b0381168114620001bb578182fd5b9392505050565b612da480620001d26000396000f3fe608060405234801561001057600080fd5b50600436106101ad5760003560e01c8063831cd104116100ee578063b046229611610097578063c89039c511610071578063c89039c5146103b2578063c94211dd146103c5578063e06453d1146103d8578063f2fde38b146103eb576101ad565b8063b046229614610383578063b0c660ee14610396578063c69454d81461039f576101ad565b80639f30de02116100c85780639f30de0214610347578063a57497101461035a578063a5bd9e8414610370576101ad565b8063831cd104146103105780638da5cb5b1461032357806391127fe414610334576101ad565b8063223e54791161015b5780633076e9de116101355780633076e9de146102ac578063541b82f1146102d757806357d9989c146102ea5780637b78b47e146102fd576101ad565b8063223e5479146102645780632e1a7d4d146102775780632f54bf6e1461028a576101ad565b8063155117811161018c5780631551178114610212578063175188e81461023e57806320fdebc414610251576101ad565b8062f55d9d146101b25780630178cdc1146101c75780631403061d146101da575b600080fd5b6101c56101c0366004612ad5565b6103fe565b005b6101c56101d5366004612ad5565b610566565b6101fd6101e8366004612ad5565b60066020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6101fd610220366004612ad5565b6001600160a01b031660009081526006602052604090205460ff1690565b6101c561024c366004612ad5565b610668565b6101c561025f366004612ad5565b61093f565b6101c5610272366004612ad5565b610bb5565b6101c5610285366004612b9d565b610df6565b6101fd610298366004612ad5565b6000546001600160a01b0390811691161490565b6102bf6102ba366004612b9d565b610f59565b6040516001600160a01b039091168152602001610209565b6101c56102e5366004612af1565b610f83565b6101c56102f8366004612b36565b61123b565b6005546102bf906001600160a01b031681565b6101c561031e366004612bcd565b61142e565b6000546001600160a01b03166102bf565b6101c5610342366004612b36565b611686565b6101c5610355366004612ad5565b611a88565b610362611bbc565b604051908152602001610209565b6101c561037e366004612b36565b611c42565b6101c5610391366004612b9d565b611e91565b61036260035481565b6101c56103ad366004612ad5565b61206f565b6004546102bf906001600160a01b031681565b6101c56103d3366004612b9d565b612451565b6007546102bf906001600160a01b031681565b6101c56103f9366004612ad5565b6124f1565b6000546001600160a01b0316331461046e5760405162461bcd60e51b81526020600482015260466024820152600080516020612d4f8339815191526044820152600080516020612d2f83398151915260648201526531ba34b7b71760d11b608482015260a4015b60405180910390fd5b6001600160a01b0381166104da5760405162461bcd60e51b815260206004820152602d60248201527f5468652074617267657420616464726573732063616e6e6f742062652074686560448201526c207a65726f206164647265737360981b6064820152608401610465565b6001600160a01b0381166001141561055a5760405162461bcd60e51b815260206004820152603260248201527f5468652074617267657420616464726573732063616e6e6f742062652074686560448201527f2065637265636f766572206164647265737300000000000000000000000000006064820152608401610465565b806001600160a01b0316ff5b6000546001600160a01b031633146105d15760405162461bcd60e51b81526020600482015260466024820152600080516020612d4f8339815191526044820152600080516020612d2f83398151915260648201526531ba34b7b71760d11b608482015260a401610465565b6001600160a01b0381166106135760405162461bcd60e51b815260206004820152600960248201526830206164647265737360b81b6044820152606401610465565b600780546001600160a01b0319166001600160a01b0383169081179091556040519081527fa39c62312bdf4f309faa31bf94c5536400719f8514a8fe28da5cd48bc8ce8df3906020015b60405180910390a150565b6000546001600160a01b031633146106d35760405162461bcd60e51b81526020600482015260466024820152600080516020612d4f8339815191526044820152600080516020612d2f83398151915260648201526531ba34b7b71760d11b608482015260a401610465565b60026001600160a01b03821661072b5760405162461bcd60e51b815260206004820152601760248201527f53747261746567792069732061203020616464726573730000000000000000006044820152606401610465565b6001600160a01b03821660009081526006602052604090205460ff166107b95760405162461bcd60e51b815260206004820152602960248201527f5374726174656779206973206e6f7420737570706f727465642c2063616e6e6f60448201527f742072656d6f76652e00000000000000000000000000000000000000000000006064820152608401610465565b60005b81548110156108f5578181815481106107e557634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03848116911614156108e3578154829061081490600190612ca2565b8154811061083257634e487b7160e01b600052603260045260246000fd5b9060005260206000200160009054906101000a90046001600160a01b031682828154811061087057634e487b7160e01b600052603260045260246000fd5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550818054806108bc57634e487b7160e01b600052603160045260246000fd5b600082815260209020810160001990810180546001600160a01b03191690550190556108f5565b806108ed81612ce5565b9150506107bc565b508054610906906002908390612a70565b506040516001600160a01b038316907fd3281a40d50ae838fe77dc627744037b8f0fc6a5711d66119a9b670c5cde41af90600090a25050565b6000546001600160a01b031633146109aa5760405162461bcd60e51b81526020600482015260466024820152600080516020612d4f8339815191526044820152600080516020612d2f83398151915260648201526531ba34b7b71760d11b608482015260a401610465565b6001600160a01b0381166109ec5760405162461bcd60e51b815260206004820152600960248201526830206164647265737360b81b6044820152606401610465565b6001600160a01b03811660009081526006602052604090205460ff16610a545760405162461bcd60e51b815260206004820152601660248201527f5374726174656779206e6f7420737570706f72746564000000000000000000006044820152606401610465565b600480546040516370a0823160e01b81526001600160a01b0384811693820193909352600092909116906370a082319060240160206040518083038186803b158015610a9f57600080fd5b505afa158015610ab3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad79190612bb5565b905060008111610b145760405162461bcd60e51b81526020600482015260086024820152670c08185b5bdd5b9d60c21b6044820152606401610465565b816001600160a01b03167fb28e99afed98b3607aeea074f84c346dc4135d86f35b1c28bc35ab6782e7ce3082604051610b4f91815260200190565b60405180910390a2604051632e1a7d4d60e01b8152600481018290526001600160a01b03831690632e1a7d4d90602401600060405180830381600087803b158015610b9957600080fd5b505af1158015610bad573d6000803e3d6000fd5b505050505050565b6000546001600160a01b03163314610c205760405162461bcd60e51b81526020600482015260466024820152600080516020612d4f8339815191526044820152600080516020612d2f83398151915260648201526531ba34b7b71760d11b608482015260a401610465565b6001600160a01b038116610c765760405162461bcd60e51b815260206004820152601760248201527f53747261746567792069732061203020616464726573730000000000000000006044820152606401610465565b806001600160a01b031663c89039c56040518163ffffffff1660e01b815260040160206040518083038186803b158015610caf57600080fd5b505afa158015610cc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce79190612b81565b6004546001600160a01b03908116911614610d6a5760405162461bcd60e51b815260206004820152602760248201527f46726163745661756c743a3a61646453747261746567792c206e6f7420636f6d60448201527f70617469626c65000000000000000000000000000000000000000000000000006064820152608401610465565b6001600160a01b038116600081815260066020526040808220805460ff1916600190811790915560028054918201815583527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b03191684179055517f69887873d46778fb35539b0a9992d9176ca03c1820b0afb538bc3a6f63326b109190a250565b6000546001600160a01b03163314610e615760405162461bcd60e51b81526020600482015260466024820152600080516020612d4f8339815191526044820152600080516020612d2f83398151915260648201526531ba34b7b71760d11b608482015260a401610465565b60026001541415610eb45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610465565b600260015580610f065760405162461bcd60e51b815260206004820152601960248201527f4d757374207769746864726177206d6f7265207468616e2030000000000000006044820152606401610465565b60405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a2600454610f52906001600160a01b03163383612631565b5060018055565b60028181548110610f6957600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314610fee5760405162461bcd60e51b81526020600482015260466024820152600080516020612d4f8339815191526044820152600080516020612d2f83398151915260648201526531ba34b7b71760d11b608482015260a401610465565b6001600160a01b0384166110445760405162461bcd60e51b815260206004820152601b60248201527f746f6b656e2063616e6e6f7420626520612030206164647265737300000000006044820152606401610465565b6001600160a01b03831661109a5760405162461bcd60e51b815260206004820152601f60248201527f746f416464726573732063616e6e6f74206265206120302061646472657373006044820152606401610465565b600082116110ea5760405162461bcd60e51b815260206004820152601960248201527f4d757374207769746864726177206d6f7265207468616e2030000000000000006044820152606401610465565b60055460405163095ea7b360e01b81526001600160a01b039182166004820152602481018490529085169063095ea7b390604401602060405180830381600087803b15801561113857600080fd5b505af115801561114c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111709190612b61565b5060405182815233907f7e85b056980127566081a7dfeeb15b179f7603d3cb35c73cfaa0d265c36b73749060200160405180910390a26005546040517fedbdf5e20000000000000000000000000000000000000000000000000000000081526001600160a01b038681166004830152858116602483015260448201859052606482018490529091169063edbdf5e2906084015b600060405180830381600087803b15801561121d57600080fd5b505af1158015611231573d6000803e3d6000fd5b5050505050505050565b6000546001600160a01b031633146112a65760405162461bcd60e51b81526020600482015260466024820152600080516020612d4f8339815191526044820152600080516020612d2f83398151915260648201526531ba34b7b71760d11b608482015260a401610465565b6000811161131c5760405162461bcd60e51b815260206004820152602660248201527f5265636f7665727920616d6f756e74206d75737420626520677265617465722060448201527f7468616e203000000000000000000000000000000000000000000000000000006064820152608401610465565b604080516001600160a01b0384168152602081018390527f23d6711a1d031134a36921253c75aa59e967d38e369ac625992824315e204f20910160405180910390a160405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb90604401602060405180830381600087803b1580156113a657600080fd5b505af11580156113ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113de9190612b61565b61142a5760405162461bcd60e51b815260206004820152600f60248201527f5265636f76657279204661696c656400000000000000000000000000000000006044820152606401610465565b5050565b6000546001600160a01b031633146114995760405162461bcd60e51b81526020600482015260466024820152600080516020612d4f8339815191526044820152600080516020612d2f83398151915260648201526531ba34b7b71760d11b608482015260a401610465565b600082116114d45760405162461bcd60e51b81526020600482015260086024820152670c08185b5bdd5b9d60c21b6044820152606401610465565b6001600160a01b0381166115165760405162461bcd60e51b815260206004820152600960248201526830206164647265737360b81b6044820152606401610465565b6004805460075460405163095ea7b360e01b81526001600160a01b039182169381019390935260248301859052169063095ea7b390604401602060405180830381600087803b15801561156857600080fd5b505af115801561157c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a09190612b61565b506007546040517f628d6cba000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b0383811660248301529091169063628d6cba90604401602060405180830381600087803b15801561160857600080fd5b505af115801561161c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116409190612b61565b50604080518381526001600160a01b03831660208201527f891f4d5a5cc509f4c3653bd93fd268945530153a107635ac46ec4be51de5f0a1910160405180910390a15050565b6000546001600160a01b031633146116f15760405162461bcd60e51b81526020600482015260466024820152600080516020612d4f8339815191526044820152600080516020612d2f83398151915260648201526531ba34b7b71760d11b608482015260a401610465565b60008111801561170357506127108111155b61174f5760405162461bcd60e51b815260206004820152601260248201527f496e76616c69642050657263656e7461676500000000000000000000000000006044820152606401610465565b6001600160a01b03821660009081526006602052604090205460ff166117dd5760405162461bcd60e51b815260206004820152602760248201527f5374726174656779206973206e6f7420696e20737570706f727465642073747260448201527f61746567696573000000000000000000000000000000000000000000000000006064820152608401610465565b600480546040516370a0823160e01b815230928101929092526000916001600160a01b03909116906370a082319060240160206040518083038186803b15801561182657600080fd5b505afa15801561183a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185e9190612bb5565b9050806118d35760405162461bcd60e51b815260206004820152602d60248201527f4465706f73697420746f6b656e2062616c616e6365206d75737420626520677260448201527f6561746572207468616e202030000000000000000000000000000000000000006064820152608401610465565b60006127106118e28484612c83565b6118ec9190612c63565b9050806003546118fc9190612c4b565b6003556040518181526001600160a01b038516907f43d1bf5f1b3e8f0e41cd29283935796985cc0e28524cb48d60e69453b021db049060200160405180910390a2600454611954906001600160a01b031685836126c6565b60405163b6b55f2560e01b8152600481018290526001600160a01b0385169063b6b55f2590602401600060405180830381600087803b15801561199657600080fd5b505af11580156119aa573d6000803e3d6000fd5b50506004805460405163095ea7b360e01b81526001600160a01b0389811693820193909352600060248201529116925063095ea7b39150604401602060405180830381600087803b1580156119fe57600080fd5b505af1158015611a12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a369190612b61565b611a825760405162461bcd60e51b815260206004820152601160248201527f4465706c6f796d656e74204661696c65640000000000000000000000000000006044820152606401610465565b50505050565b6000546001600160a01b03163314611af35760405162461bcd60e51b81526020600482015260466024820152600080516020612d4f8339815191526044820152600080516020612d2f83398151915260648201526531ba34b7b71760d11b608482015260a401610465565b6001600160a01b038116611b6e5760405162461bcd60e51b8152602060048201526024808201527f526f7574657220616464726573732063616e6e6f74206265206120302061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610465565b600580546001600160a01b0319166001600160a01b0383169081179091556040519081527feb81878967dea025ef4859fd7b8b4555ee3c73cae8a039057296d25a53eaa9b69060200161065d565b600480546040516370a0823160e01b815230928101929092526000916001600160a01b03909116906370a082319060240160206040518083038186803b158015611c0557600080fd5b505afa158015611c19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c3d9190612bb5565b905090565b6000546001600160a01b03163314611cad5760405162461bcd60e51b81526020600482015260466024820152600080516020612d4f8339815191526044820152600080516020612d2f83398151915260648201526531ba34b7b71760d11b608482015260a401610465565b600081118015611cbf57506127108111155b611d0b5760405162461bcd60e51b815260206004820152601360248201527f50657263656e74616765205265717569726564000000000000000000000000006044820152606401610465565b600480546040516370a0823160e01b81526001600160a01b0385811693820193909352600092909116906370a082319060240160206040518083038186803b158015611d5657600080fd5b505afa158015611d6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8e9190612bb5565b90506000612710611d9f8484612c83565b611da99190612c63565b905060008211611de65760405162461bcd60e51b81526020600482015260086024820152670c08185b5bdd5b9d60c21b6044820152606401610465565b60008111611e215760405162461bcd60e51b81526020600482015260086024820152670c08185b5bdd5b9d60c21b6044820152606401610465565b836001600160a01b03167fb28e99afed98b3607aeea074f84c346dc4135d86f35b1c28bc35ab6782e7ce3082604051611e5c91815260200190565b60405180910390a2604051632e1a7d4d60e01b8152600481018290526001600160a01b03851690632e1a7d4d90602401611203565b6000546001600160a01b03163314611efc5760405162461bcd60e51b81526020600482015260466024820152600080516020612d4f8339815191526044820152600080516020612d2f83398151915260648201526531ba34b7b71760d11b608482015260a401610465565b60026001541415611f4f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610465565b600260015580611fa15760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610465565b6000611fab611bbc565b90506000611fb98383612c4b565b60405184815290915033907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a2600454612009906001600160a01b03163330866127a0565b6000612013611bbc565b9050818110156120655760405162461bcd60e51b815260206004820152601b60248201527f42616c616e636520766572696669636174696f6e206661696c656400000000006044820152606401610465565b5050600180555050565b6000546001600160a01b031633146120da5760405162461bcd60e51b81526020600482015260466024820152600080516020612d4f8339815191526044820152600080516020612d2f83398151915260648201526531ba34b7b71760d11b608482015260a401610465565b6001600160a01b0381166121305760405162461bcd60e51b815260206004820152601e60248201527f46726163745661756c743a3a6e6f2061637469766520737472617465677900006044820152606401610465565b6001600160a01b03811660009081526006602052604090205460ff166121be5760405162461bcd60e51b815260206004820152602860248201527f5374726174656779206973206e6f7420696e20737570706f727465642073747260448201527f617465676965732e0000000000000000000000000000000000000000000000006064820152608401610465565b600480546040516370a0823160e01b815230928101929092526000916001600160a01b03909116906370a082319060240160206040518083038186803b15801561220757600080fd5b505afa15801561221b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061223f9190612bb5565b9050600081116122b75760405162461bcd60e51b815260206004820152603460248201527f43616e6e6f74206465706c6f792062616c616e63652c20616d6f756e74206d7560448201527f73742062652067726561746572207468616e20300000000000000000000000006064820152608401610465565b80600360008282546122c99190612c4b565b90915550506040518181526001600160a01b038316907f43d1bf5f1b3e8f0e41cd29283935796985cc0e28524cb48d60e69453b021db049060200160405180910390a2600454612323906001600160a01b031683836126c6565b60405163b6b55f2560e01b8152600481018290526001600160a01b0383169063b6b55f2590602401600060405180830381600087803b15801561236557600080fd5b505af1158015612379573d6000803e3d6000fd5b50506004805460405163095ea7b360e01b81526001600160a01b0387811693820193909352600060248201529116925063095ea7b39150604401602060405180830381600087803b1580156123cd57600080fd5b505af11580156123e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124059190612b61565b61142a5760405162461bcd60e51b815260206004820152601160248201527f4465706c6f796d656e74204661696c65640000000000000000000000000000006044820152606401610465565b6000546001600160a01b031633146124bc5760405162461bcd60e51b81526020600482015260466024820152600080516020612d4f8339815191526044820152600080516020612d2f83398151915260648201526531ba34b7b71760d11b608482015260a401610465565b60038190556040518181527fb290b3cb1412083422fbbc9f67ef22d63082efc8a6e4c82bb4028b50921f44299060200161065d565b6000546001600160a01b0316331461255c5760405162461bcd60e51b81526020600482015260466024820152600080516020612d4f8339815191526044820152600080516020612d2f83398151915260648201526531ba34b7b71760d11b608482015260a401610465565b6001600160a01b0381166125c85760405162461bcd60e51b815260206004820152602d60248201527f5468652074617267657420616464726573732063616e6e6f742062652074686560448201526c207a65726f206164647265737360981b6064820152608401610465565b600054604080516001600160a01b03928316815291831660208301527f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0910160405180910390a1600080546001600160a01b0319166001600160a01b0392909216919091179055565b6040516001600160a01b0383166024820152604481018290526126c190849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526127f1565b505050565b6040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e9060440160206040518083038186803b15801561272b57600080fd5b505afa15801561273f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127639190612bb5565b61276d9190612c4b565b6040516001600160a01b038516602482015260448101829052909150611a8290859063095ea7b360e01b9060640161265d565b6040516001600160a01b0380851660248301528316604482015260648101829052611a829085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161265d565b6000612846826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166128d69092919063ffffffff16565b8051909150156126c157808060200190518101906128649190612b61565b6126c15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610465565b60606128e584846000856128ef565b90505b9392505050565b6060824710156129675760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610465565b6001600160a01b0385163b6129be5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610465565b600080866001600160a01b031685876040516129da9190612bfc565b60006040518083038185875af1925050503d8060008114612a17576040519150601f19603f3d011682016040523d82523d6000602084013e612a1c565b606091505b5091509150612a2c828286612a37565b979650505050505050565b60608315612a465750816128e8565b825115612a565782518084602001fd5b8160405162461bcd60e51b81526004016104659190612c18565b828054828255906000526020600020908101928215612ab05760005260206000209182015b82811115612ab0578254825591600101919060010190612a95565b50612abc929150612ac0565b5090565b5b80821115612abc5760008155600101612ac1565b600060208284031215612ae6578081fd5b81356128e881612d16565b60008060008060808587031215612b06578283fd5b8435612b1181612d16565b93506020850135612b2181612d16565b93969395505050506040820135916060013590565b60008060408385031215612b48578182fd5b8235612b5381612d16565b946020939093013593505050565b600060208284031215612b72578081fd5b815180151581146128e8578182fd5b600060208284031215612b92578081fd5b81516128e881612d16565b600060208284031215612bae578081fd5b5035919050565b600060208284031215612bc6578081fd5b5051919050565b60008060408385031215612bdf578182fd5b823591506020830135612bf181612d16565b809150509250929050565b60008251612c0e818460208701612cb9565b9190910192915050565b6000602082528251806020840152612c37816040850160208701612cb9565b601f01601f19169190910160400192915050565b60008219821115612c5e57612c5e612d00565b500190565b600082612c7e57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612c9d57612c9d612d00565b500290565b600082821015612cb457612cb4612d00565b500390565b60005b83811015612cd4578181015183820152602001612cbc565b83811115611a825750506000910152565b6000600019821415612cf957612cf9612d00565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114612d2b57600080fd5b5056fe7261637420697320616c6c6f77656420746f2063616c6c20746869732066756e4f6e6c7920746865206f776e6572206f662074686520736d61727420636f6e74a2646970667358221220517d00498433597bc95275241dc074348b926c72c41fc99c4a4c9f6126b2c9cf64736f6c634300080300335468652061646472657373206f6620746865206f776e65722063616e6e6f7420000000000000000000000000e3f5a90f9cb311505cd691a46596599aa1a0ad7d

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000e3f5a90f9cb311505cd691a46596599aa1a0ad7d

-----Decoded View---------------
Arg [0] : _depositToken (address): 0xe3f5a90f9cb311505cd691a46596599aa1a0ad7d

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000e3f5a90f9cb311505cd691a46596599aa1a0ad7d


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.