Contract

0xe983a6882d5ecCa987c7Ae4dF01BdDA2Edd4e060

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

-

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...15603262024-12-25 13:16:083 days ago1735132568IN
0xe983a688...2Edd4e060
0 S0.000031511.1
Transfer Ownersh...13411732024-12-23 13:00:305 days ago1734958830IN
0xe983a688...2Edd4e060
0 S0.000031511.1
Set Keeper13407922024-12-23 12:56:235 days ago1734958583IN
0xe983a688...2Edd4e060
0 S0.000052381.1
Set Masterchef13390422024-12-23 12:37:095 days ago1734957429IN
0xe983a688...2Edd4e060
0 S0.000052051.1
Set Keeper13381892024-12-23 12:25:185 days ago1734956718IN
0xe983a688...2Edd4e060
0 S0.000052381.1
Set Router Solid...13380012024-12-23 12:22:175 days ago1734956537IN
0xe983a688...2Edd4e060
0 S0.000052031.1

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SWPxNFTFeeConverter

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 4 : SWPxNFTFeeConverter.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IPair {
    function allowance(address, address) external view returns (uint);
    function balanceOf(address) external view returns (uint);
    function burn(address to) external returns (uint amount0, uint amount1);
    function claimFees() external returns (uint claimed0, uint claimed1);
    function claimStakingFees() external;
    function current(address tokenIn, uint amountIn) external view returns (uint amountOut);
    function currentCumulativePrices() external view returns (uint reserve0Cumulative, uint reserve1Cumulative, uint blockTimestamp);
    function decimals() external view returns (uint8);
    function fees() external view returns (address);
    function getAmountOut(uint amountIn, address tokenIn) external view returns (uint);
    function getReserves() external view returns (uint _reserve0, uint _reserve1, uint _blockTimestampLast);
    function isStable() external view returns(bool);
    function metadata() external view returns (uint dec0, uint dec1, uint r0, uint r1, bool st, address t0, address t1);
    function mint(address to) external returns (uint liquidity);
    function name() external view returns (string memory);
    function nonces(address) external view returns (uint);
    function prices(address tokenIn, uint amountIn, uint points) external view returns (uint[] memory);
    function quote(address tokenIn, uint amountIn, uint granularity) external view returns (uint amountOut);
    function sample(address tokenIn, uint amountIn, uint points, uint window) external view returns (uint[] memory);
    function skim(address to) external;
    function stable() external view returns (bool);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function symbol() external view returns (string memory);
    function sync() external;
    function tokens() external view returns (address, address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function totalSupply() external view returns (uint);
}


interface ISWPxNFTChef {

    // Functions
    function addKeeper(address[] calldata _keepers) external;
    function removeKeeper(address[] calldata _keepers) external;
    function setRewardPerSecond(uint256 _rewardPerSecond) external;
    function setDistributionRate(uint256 amount) external;
    function pendingReward(address _user) external view returns (uint256);
    function stakedTokenIds(address _user) external view returns (uint256[] memory);
    function deposit(uint256[] calldata tokenIds) external;
    function withdraw(uint256[] calldata tokenIds) external;
    function harvest() external;
    function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4);

    // Public Variables
    function TOKEN() external view returns (address);
    function NFT() external view returns (address);
    function poolInfo() external view returns (uint256, uint256);
    function tokenOwner(uint256 tokenId) external view returns (address);
    function userInfo(address user) external view returns (uint256, int256, uint256[] memory);
    function isKeeper(address keeper) external view returns (bool);
    function rewardPerSecond() external view returns (uint256);
    function ACC_TOKEN_PRECISION() external view returns (uint256);
    function distributePeriod() external view returns (uint256);
    function lastDistributedTime() external view returns (uint256);

}

/// @title Callback for IAlgebraPoolActions#swap
/// @notice Any contract that calls IAlgebraPoolActions#swap must implement this interface
/// @dev Credit to Uniswap Labs under GPL-2.0-or-later license:
/// https://github.com/Uniswap/v3-core/tree/main/contracts/interfaces
interface IAlgebraSwapCallback {
  /// @notice Called to `msg.sender` after executing a swap via IAlgebraPool#swap.
  /// @dev In the implementation you must pay the pool tokens owed for the swap.
  /// The caller of this method must be checked to be a AlgebraPool deployed by the canonical AlgebraFactory.
  /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped.
  /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by
  /// the end of the swap. If positive, the callback must send that amount of token0 to the pool.
  /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by
  /// the end of the swap. If positive, the callback must send that amount of token1 to the pool.
  /// @param data Any data passed through by the caller via the IAlgebraPoolActions#swap call
  function algebraSwapCallback(
    int256 amount0Delta,
    int256 amount1Delta,
    bytes calldata data
  ) external;
}

/// @title Router token swapping functionality
/// @notice Functions for swapping tokens via Algebra
/// @dev Credit to Uniswap Labs under GPL-2.0-or-later license:
/// https://github.com/Uniswap/v3-periphery
interface ISwapRouter is IAlgebraSwapCallback {
    struct ExactInputSingleParams {
        address tokenIn;
        address tokenOut;
        address recipient;
        uint256 deadline;
        uint256 amountIn;
        uint256 amountOutMinimum;
        uint160 limitSqrtPrice;
    }

    /// @notice Swaps `amountIn` of one token for as much as possible of another token
    /// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata
    /// @return amountOut The amount of the received token
    function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);

    struct ExactInputParams {
        bytes path;
        address recipient;
        uint256 deadline;
        uint256 amountIn;
        uint256 amountOutMinimum;
    }

    /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path
    /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata
    /// @return amountOut The amount of the received token
    function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut);

    struct ExactOutputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint256 deadline;
        uint256 amountOut;
        uint256 amountInMaximum;
        uint160 limitSqrtPrice;
    }

    /// @notice Swaps as little as possible of one token for `amountOut` of another token
    /// @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata
    /// @return amountIn The amount of the input token
    function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn);

    struct ExactOutputParams {
        bytes path;
        address recipient;
        uint256 deadline;
        uint256 amountOut;
        uint256 amountInMaximum;
    }

    /// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed)
    /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata
    /// @return amountIn The amount of the input token
    function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn);

    /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path
    /// @dev Unlike standard swaps, handles transferring from user before the actual swap.
    /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata
    /// @return amountOut The amount of the received token
    function exactInputSingleSupportingFeeOnTransferTokens(ExactInputSingleParams calldata params) external returns (uint256 amountOut);
}

interface IRouter {

    struct route {
        address from;
        address to;
        bool stable;
    }

    function sortTokens(address tokenA, address tokenB) external pure returns (address token0, address token1);
    function pairFor(address tokenA, address tokenB, bool stable) external view returns (address pair);
    function quoteLiquidity(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getReserves(address tokenA, address tokenB, bool stable) external view returns (uint reserveA, uint reserveB);
    function getAmountOut(uint amountIn, address tokenIn, address tokenOut) external view returns (uint amount, bool stable);
    function getAmountsOut(uint amountIn, route[] memory routes) external view returns (uint[] memory amounts);
    function isPair(address pair) external view returns (bool);
    function quoteAddLiquidity(address tokenA, address tokenB, bool stable, uint amountADesired, uint amountBDesired) external view returns (uint amountA, uint amountB, uint liquidity);
    function quoteRemoveLiquidity(address tokenA, address tokenB, bool stable, uint liquidity) external view returns (uint amountA, uint amountB);
    function addLiquidity(address tokenA, address tokenB, bool stable, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(address token, bool stable, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external  returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(address tokenA, address tokenB, bool stable, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(address token, bool stable, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(address tokenA, address tokenB, bool stable, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(address token, bool stable, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokensSimple(uint amountIn, uint amountOutMin, address tokenFrom, address tokenTo, bool stable, address to, uint deadline) external  returns (uint[] memory amounts);
    function swapExactTokensForTokens(uint amountIn, uint amountOutMin, route[] calldata routes, address to, uint deadline) external  returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, route[] calldata routes, address to, uint deadline) external   returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, route[] calldata routes, address to, uint deadline) external  returns (uint[] memory amounts);
    function UNSAFE_swapExactTokensForTokens(uint[] memory amounts, route[] calldata routes, address to, uint deadline) external  returns (uint[] memory);
    function removeLiquidityETHSupportingFeeOnTransferTokens(address token, bool stable, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external  returns (uint amountToken, uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(address token, bool stable, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokensSupportingFeeOnTransferTokens(uint amountIn,uint amountOutMin,route[] calldata routes,address to,uint deadline) external ;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(uint amountOutMin, route[] calldata routes, address to, uint deadline) external  ;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, route[] calldata routes, address to, uint deadline) external ;

}


abstract contract SWPxNFTFeeConverterStorageAndEvents {

    bool public isPaused;

    // address constant public wsonic = 0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38;
    address public masterchef;  // SWPxNFT chef
    address public routerSolidly;
    address public routerAlgebra = 0x0331B2f96372cF77b3e9E072BdC3671B0D109eD5;
    address public rewardToken; // $SWPx
    address[] public tokens;    // used to swap tokens
    address[] public pairs;     // used to claim fee from Pair.sol



    mapping(address => bytes) public tokenToPath;
    mapping(address => bool) public hasPath;
    mapping(address => bool) public isKeeper;
    mapping(address => bool) public isToken;
    mapping(address => bool) public isPair;


    event StakingReward(uint256 _timestamp, uint256 _wsonicAmount);
    event ClaimFee(address indexed _pair, uint256 timestamp);
    event ClaimFeeError(address indexed _pair, uint256 timestamp);
    event SwapError(address indexed _tokenIn, uint256 _balanceIn, uint256 timestamp);
    event Swap(address indexed _tokenIn, uint256 _balanceIn, uint256 _balanceOut);
    event AddPair(address indexed _pair);
    event RemovePair(address indexed _pair);
    event AddToken(address indexed token);
    event RemoveToken(address indexed token);
    event SetPath(address indexed token, bytes path);
    event RemovePath(address indexed token);
    event WithdrawERC20(address indexed token, address receiver, uint256 amount);
    event SetKeeper(address indexed keeper);
    event RemoveKeeper(address indexed keeper);
    event SetSolidlyRouter(address indexed router);
    event SetAlgebraRouter(address indexed router);
    event SetMasterchef(address indexed chef);
    event SetRewardToken(address indexed token);
    event TriggerPause(bool newState);



}



abstract contract SWPxNFTFeeConverterRouter is SWPxNFTFeeConverterStorageAndEvents {


    /// @notice Internal swap on Algebra router
    function _swap(address _tokenIn, uint256 _amountIn) internal {

        if(hasPath[_tokenIn]){
            ISwapRouter.ExactInputParams memory eip = ISwapRouter.ExactInputParams({
            path: tokenToPath[_tokenIn],
            recipient: address(this),
            deadline: block.timestamp + 600,
            amountIn: _amountIn,
            amountOutMinimum: 0
            });

            if(IERC20(_tokenIn).allowance(address(this), routerAlgebra) < _amountIn) {
                _safeApprove(_tokenIn, routerAlgebra, 0);
                _safeApprove(_tokenIn, routerAlgebra, type(uint).max);
            }

            try ISwapRouter(routerAlgebra).exactInput(eip) returns (uint256 _amountOut) {
                emit Swap(_tokenIn, _amountIn, _amountOut);
            }
            catch {
                emit SwapError(_tokenIn, _amountIn, block.timestamp);
            }
        }

    }


    function _swapManualInputSingleAlgebra(address _tokenIn, address _tokenOut, uint256 _amountIn, uint256 _amountOutMin, uint160 _limitSqrtPrice) internal returns (uint256 _amountOut) {

        ISwapRouter.ExactInputSingleParams memory eisp = ISwapRouter.ExactInputSingleParams({
            tokenIn: _tokenIn,
            tokenOut: _tokenOut,
            recipient: address(this),
            deadline: block.timestamp + 600,
            amountIn: _amountIn,
            amountOutMinimum: _amountOutMin,
            limitSqrtPrice: _limitSqrtPrice
        });

        if(IERC20(_tokenIn).allowance(address(this), routerAlgebra) < _amountIn) {
            _safeApprove(_tokenIn, routerAlgebra, 0);
            _safeApprove(_tokenIn, routerAlgebra, type(uint).max);
        }

        _amountOut = ISwapRouter(routerAlgebra).exactInputSingle(eisp);
        emit Swap(_tokenIn, _amountIn, _amountOut);
    }


    /// @notice Internal swap on Solidly router
    function _swapManualV2(uint _amountIn,uint _amountOutMin, IRouter.route[] calldata _routes,uint deadline) internal returns (uint[] memory amounts){
        address _tokenIn = _routes[0].from;

        if(IERC20(_tokenIn).allowance(address(this), routerSolidly) < _amountIn) {
            _safeApprove(_tokenIn, routerSolidly, 0);
            _safeApprove(_tokenIn, routerSolidly, type(uint).max);
        }

        amounts = IRouter(routerSolidly).swapExactTokensForTokens(_amountIn, _amountOutMin, _routes, address(this), deadline);
        emit Swap(_tokenIn, _amountIn, amounts[amounts.length-1]);
    }





    /* -----------------------------------------------------------------------------
    --------------------------------------------------------------------------------
                                    Helper
    --------------------------------------------------------------------------------
    ----------------------------------------------------------------------------- */


    function _safeTransfer(address token,address to,uint256 value) internal {
        require(token.code.length > 0);
        (bool success, bytes memory data) =
        token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))));
    }

    function _safeApprove(address token,address spender,uint256 value) internal {
        require(token.code.length > 0);
        require((value == 0) || (IERC20(token).allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, spender, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))));
    }

}


contract SWPxNFTFeeConverter is Ownable, SWPxNFTFeeConverterRouter {


    modifier keeper() {
        require(isKeeper[msg.sender] == true || msg.sender == owner(), 'not keeper');
        _;
    }


    constructor(address _rewardToken) {
        rewardToken = _rewardToken;
        isKeeper[msg.sender] == true;
        isPaused = false;
    }


    /* -----------------------------------------------------------------------------
    --------------------------------------------------------------------------------
                                    KEEPER
    --------------------------------------------------------------------------------
    ----------------------------------------------------------------------------- */

    /// @notice Claim SolidlyPairs fees
    function claimFees() external keeper {
        uint i = 0;
        uint _len = pairs.length;
        address[] memory _pairs = new address[](_len);
        _pairs = pairs;

        for(i; i <_len; i++){
            try IPair(_pairs[i]).claimStakingFees() {
                emit ClaimFee(_pairs[i], block.timestamp);
            }
            catch {
                emit ClaimFeeError(_pairs[i], block.timestamp);
            }
        }

    }



    /// @notice Swap all the tokens
    function swap() external keeper {
        _swapInternal(0, tokens.length);
    }

    /// @notice swap a certain amount of token
    function swap(uint256 from, uint256 to) external keeper {
        _swapInternal(from, to);
    }

    /// @notice execute the swap and update masterchef distribution rate
    function _swapInternal(uint256 from, uint256 to) internal {
        require(!isPaused, 'TFC: paused');

        uint256 _balance;
        address _token;
        uint256 i;

        for(i=from; i < to; i++){
            _token = tokens[i];
            _balance = IERC20(_token).balanceOf(address(this));
            if(_balance > 0) _swap(_token, _balance);
        }

        _balance = IERC20(rewardToken).balanceOf(address(this));
        if(_balance > 0){
            _safeTransfer(rewardToken, masterchef, _balance);
            ISWPxNFTChef(masterchef).setDistributionRate(_balance);
        }

        emit StakingReward(block.timestamp, _balance);

    }



    /* -----------------------------------------------------------------------------
    --------------------------------------------------------------------------------
                                    VIEW
    --------------------------------------------------------------------------------
    ----------------------------------------------------------------------------- */
    /// @notice view length of all tokens
    function tokensLength() external view returns(uint256) {
        return tokens.length;
    }

    /// @notice view length of all solidly pairs
    function pairsLength() external view returns(uint256) {
        return pairs.length;
    }



    /* -----------------------------------------------------------------------------
    --------------------------------------------------------------------------------
                                    OWNER
    --------------------------------------------------------------------------------
    ----------------------------------------------------------------------------- */

    ///@notice claim any pair. Used if ClaimFeeError() is emitted
    function claimSingleFee(address _pair) external onlyOwner {
        require(_pair != address(0), "TFC: ZeroAddress");
        IPair(_pair).claimStakingFees();
        emit ClaimFee(_pair, block.timestamp);
    }


    ///@notice set Masterchef distriubtion given this.balance
    function updateMasterchefDistributionRate() external onlyOwner {
        uint _balance = IERC20(rewardToken).balanceOf(address(this));
        _safeTransfer(rewardToken, masterchef, _balance);
        ISWPxNFTChef(masterchef).setDistributionRate(_balance);
        emit StakingReward(block.timestamp, _balance);
    }



    /// @notice Add Solidly volatile or stable pair
    /// @dev    Fusion pairs send directly the fees via FeeVault, no need to add pair
    /// @param _pair pair to add
    function addPair(address[] calldata _pair) external onlyOwner {
        uint i = 0;
        address _singlePair = address(0);
        for(i; i < _pair.length; i++){
            _singlePair = _pair[i];
            require(_singlePair != address(0), "TFC: ZeroAddress");
            if(!isPair[_singlePair]){
                pairs.push(_singlePair);
                isPair[_singlePair] = true;
                emit AddPair(_singlePair);
            }
        }
    }

    /// @notice Remove Solidly volatile or stable pair
    function removePair(address _pair) external onlyOwner {
        uint i = 0;
        uint len = pairs.length;
        for(i; i < len; i++){
            if(pairs[i] == _pair){
                pairs[i] = pairs[len -1];
                pairs.pop();
                isPair[_pair] = false;
                emit RemovePair(_pair);
                break;
            }
        }
    }

    /// @notice Add a token to the tokens list
    function addToken(address[] calldata _tokens) external onlyOwner {
        address _token;
        for(uint i = 0; i < _tokens.length; i++){
            _token = _tokens[i];
            require(_token != address(0), "TFC: ZeroAddress");
            if(!isToken[_token]) {
                tokens.push(_token);
                isToken[_token] = true;
                _safeApprove(_token, routerAlgebra, 0);
                _safeApprove(_token, routerAlgebra, type(uint).max);
                _safeApprove(_token, routerSolidly, 0);
                _safeApprove(_token, routerSolidly, type(uint).max);
                emit AddToken(_token);
            }
        }
    }

    /// @notice Remove a token from the token list
    function removeToken(address _token) external onlyOwner {
        uint i = 0;
        uint len = tokens.length;
        for(i; i < len; i++){
            if(tokens[i] == _token){
                tokens[i] = tokens[len -1];
                tokens.pop();
                isToken[_token] = false;
                _safeApprove(_token, routerAlgebra, 0);
                _safeApprove(_token, routerSolidly, 0);
                emit RemoveToken(_token);
                break;
            }
        }
    }

    /// @notice Set the path for a given token
    /// @dev    deadline, amountIn and amountOutMinimum;are set during swap
    ///         TokenOut is RewardToken!
    /// @param _token   the starting token
    /// @param path     the path in bytes (see ISwapRouter.ExactInputParams)
    function setPathToToken(address _token, bytes calldata path) external onlyOwner {
        tokenToPath[_token] = path;
        hasPath[_token] = true;
        emit SetPath(_token, path);
    }

    /// @notice Remove the path from a given token
    function removePathFromToken(address _token) external onlyOwner {
        tokenToPath[_token] = "";
        hasPath[_token] = false;
        emit RemovePath(_token);
    }


    ///@notice in case token get stuck.
    function withdrawERC20(address _token, uint256 _amount) external onlyOwner {
        require(_token != address(0), "TFC: ZeroAddress");
        require(IERC20(_token).balanceOf(address(this)) >= _amount, "TCF: !amount");
        _safeTransfer(_token, msg.sender, _amount);
        emit WithdrawERC20(_token, msg.sender, _amount);
    }

    /// @notice Set a new keeper
    function setKeeper(address _keeper) external onlyOwner {
        require(_keeper != address(0), "TFC: ZeroAddress");
        require(isKeeper[_keeper] == false, "TFC: keeper");
        isKeeper[_keeper] = true;
        emit SetKeeper(_keeper);
    }

    /// @notice Remove a keeper
    function removeKeeper(address _keeper) external onlyOwner {
        require(_keeper != address(0), "TFC: ZeroAddress");
        require(isKeeper[_keeper] == true, "TFC: !keeper");
        isKeeper[_keeper] = false;
        emit RemoveKeeper(_keeper);
    }

    /// @notice Set the solidly router
    function setRouterSolidly(address _router) external onlyOwner {
        require(_router != address(0), "TFC: ZeroAddress");
        routerSolidly = _router;
        emit SetSolidlyRouter(_router);
    }

    /// @notice Set the algebra router
    function setRouterAlgebra(address _router) external onlyOwner {
        require(_router != address(0), "TFC: ZeroAddress");
        routerAlgebra = _router;
        emit SetAlgebraRouter(_router);
    }

    /// @notice Set the masterchef
    function setMasterchef(address _masterchef) external onlyOwner {
        require(_masterchef != address(0), "TFC: ZeroAddress");
        masterchef = _masterchef;
        emit SetMasterchef(_masterchef);
    }

    /// @notice Set Reward token
    /// @dev    Paths end with the reward token, if a new token is set check them
    function setRewardToken(address _token) external onlyOwner {
        require(_token != address(0), "TFC: ZeroAddress");
        rewardToken = _token;
        emit SetRewardToken(_token);
    }

    /// @notice Swap a token using Algebra input single
    function swapManualInputSingleAlgebra(address _tokenIn, address _tokenOut, uint256 _amountIn, uint256 _amountOutMin, uint160 _limitSqrtPrice) external onlyOwner returns (uint256 _amountOut) {
        return _swapManualInputSingleAlgebra(_tokenIn, _tokenOut, _amountIn, _amountOutMin, _limitSqrtPrice);
    }

    ///@notice Swap a token using Solidly router
    function swapManualV2(uint amountIn,uint amountOutMin, IRouter.route[] calldata _routes) external onlyOwner returns (uint[] memory amounts) {
        return _swapManualV2(amountIn, amountOutMin, _routes, block.timestamp + 600);
    }


    /// @notice (Un)Pause the swap function
    function triggerPause() external onlyOwner {
        isPaused = !isPaused;
        emit TriggerPause(isPaused);
    }


    function revokeApprove(address token, address spender) external onlyOwner {
        require(token != address(0) && spender != address(0));

        _safeApprove(token, spender, 0);
    }


}

File 2 of 4 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 4 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 4 of 4 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_pair","type":"address"}],"name":"AddPair","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"}],"name":"AddToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_pair","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ClaimFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_pair","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ClaimFeeError","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"keeper","type":"address"}],"name":"RemoveKeeper","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_pair","type":"address"}],"name":"RemovePair","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"}],"name":"RemovePath","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"}],"name":"RemoveToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"router","type":"address"}],"name":"SetAlgebraRouter","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"keeper","type":"address"}],"name":"SetKeeper","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"chef","type":"address"}],"name":"SetMasterchef","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"bytes","name":"path","type":"bytes"}],"name":"SetPath","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"}],"name":"SetRewardToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"router","type":"address"}],"name":"SetSolidlyRouter","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_timestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_wsonicAmount","type":"uint256"}],"name":"StakingReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_tokenIn","type":"address"},{"indexed":false,"internalType":"uint256","name":"_balanceIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_balanceOut","type":"uint256"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_tokenIn","type":"address"},{"indexed":false,"internalType":"uint256","name":"_balanceIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"SwapError","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"newState","type":"bool"}],"name":"TriggerPause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawERC20","type":"event"},{"inputs":[{"internalType":"address[]","name":"_pair","type":"address[]"}],"name":"addPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"}],"name":"addToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pair","type":"address"}],"name":"claimSingleFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"hasPath","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isKeeper","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isPair","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"masterchef","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"pairs","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pairsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_keeper","type":"address"}],"name":"removeKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pair","type":"address"}],"name":"removePair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"removePathFromToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"removeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"revokeApprove","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"routerAlgebra","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"routerSolidly","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_keeper","type":"address"}],"name":"setKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_masterchef","type":"address"}],"name":"setMasterchef","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bytes","name":"path","type":"bytes"}],"name":"setPathToToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"setRewardToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_router","type":"address"}],"name":"setRouterAlgebra","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_router","type":"address"}],"name":"setRouterSolidly","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"from","type":"uint256"},{"internalType":"uint256","name":"to","type":"uint256"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenIn","type":"address"},{"internalType":"address","name":"_tokenOut","type":"address"},{"internalType":"uint256","name":"_amountIn","type":"uint256"},{"internalType":"uint256","name":"_amountOutMin","type":"uint256"},{"internalType":"uint160","name":"_limitSqrtPrice","type":"uint160"}],"name":"swapManualInputSingleAlgebra","outputs":[{"internalType":"uint256","name":"_amountOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"stable","type":"bool"}],"internalType":"struct IRouter.route[]","name":"_routes","type":"tuple[]"}],"name":"swapManualV2","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenToPath","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokensLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"triggerPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updateMasterchefDistributionRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600380546001600160a01b031916730331b2f96372cf77b3e9e072bdc3671b0d109ed51790553480156200003757600080fd5b5060405162002cf738038062002cf78339810160408190526200005a91620000f1565b6200006533620000a1565b600480546001600160a01b0319166001600160a01b03929092169190911790553360009081526009602052805460ff60a01b1916905562000123565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156200010457600080fd5b81516001600160a01b03811681146200011c57600080fd5b9392505050565b612bc480620001336000396000f3fe608060405234801561001057600080fd5b506004361061023d5760003560e01c80638da5cb5b1161013b578063d294f093116100b8578063db6770e41161007c578063db6770e4146104fd578063e5e31b1314610510578063f2fde38b14610533578063f7c618c114610546578063fb1db2781461055957600080fd5b8063d294f093146104a4578063d65a3a2e146104ac578063d92fc67b146104bf578063d96073cf146104c7578063db141981146104da57600080fd5b8063a25a0999116100ff578063a25a099914610437578063af6c9c1d14610457578063b187bd261461046a578063b91ac7881461047e578063c54bc2b51461049157600080fd5b80638da5cb5b146103da5780638e6e3846146103eb578063933baa86146103fe578063970ecedb14610411578063a1db97821461042457600080fd5b80636428cb45116101c95780637f1ebb671161018d5780637f1ebb6714610384578063810c7883146103a45780638119c065146103b75780638aee8127146103bf5780638cbf7d3c146103d257600080fd5b80636428cb451461032b5780636833f60d1461033e5780636ba42aaa14610346578063715018a614610369578063748747e61461037157600080fd5b8063349757481161021057806334975748146102b55780633d300966146102c75780634f64b2be146102da5780635d794a5c146103055780635fa7b5841461031857600080fd5b8063108811661461024257806314ae9f2e1461025757806319f373611461026a5780632207802b146102a2575b600080fd5b6102556102503660046124b1565b61056c565b005b61025561026536600461253b565b61070a565b61028d61027836600461253b565b600a6020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6102556102b036600461253b565b6107dd565b6006545b604051908152602001610299565b6102556102d536600461253b565b610860565b6102ed6102e836600461255f565b6108d8565b6040516001600160a01b039091168152602001610299565b610255610313366004612578565b610902565b61025561032636600461253b565b610990565b6003546102ed906001600160a01b031681565b610255610b26565b61028d61035436600461253b565b60096020526000908152604090205460ff1681565b610255610b94565b61025561037f36600461253b565b610ba8565b6103976103923660046125fd565b610c79565b6040516102999190612680565b6002546102ed906001600160a01b031681565b610255610ca4565b6102556103cd36600461253b565b610cfc565b610255610d74565b6000546001600160a01b03166102ed565b6102556103f936600461253b565b610ea9565b61025561040c36600461253b565b610f70565b61025561041f3660046124b1565b610fe8565b6102556104323660046126c4565b61110a565b61044a61044536600461253b565b611232565b6040516102999190612748565b61025561046536600461253b565b6112cc565b60005461028d90600160a01b900460ff1681565b6102ed61048c36600461255f565b611424565b61025561049f36600461253b565b611434565b6102556114ac565b6102556104ba36600461275b565b6116db565b6005546102b9565b6102556104d5366004612794565b61171c565b61028d6104e836600461253b565b60086020526000908152604090205460ff1681565b6102b961050b3660046127b6565b61176f565b61028d61051e36600461253b565b600b6020526000908152604090205460ff1681565b61025561054136600461253b565b611790565b6004546102ed906001600160a01b031681565b6001546102ed906001600160a01b031681565b610574611809565b6000805b828110156107045783838281811061059257610592612815565b90506020020160208101906105a7919061253b565b91506001600160a01b0382166105d85760405162461bcd60e51b81526004016105cf9061282b565b60405180910390fd5b6001600160a01b0382166000908152600a602052604090205460ff166106f2576005805460018082019092557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319166001600160a01b038581169182179092556000908152600a60205260408120805460ff19169093179092556003546106709285929190911690611863565b60035461068a9083906001600160a01b0316600019611863565b6002546106a39083906001600160a01b03166000611863565b6002546106bd9083906001600160a01b0316600019611863565b6040516001600160a01b038316907fe473c74f34be27c1464d6624f14a0d7fd4e301cbfa29c3eba425d378c8a7ebe090600090a25b806106fc8161286b565b915050610578565b50505050565b610712611809565b6001600160a01b0381166107385760405162461bcd60e51b81526004016105cf9061282b565b6001600160a01b03811660009081526009602052604090205460ff1615156001146107945760405162461bcd60e51b815260206004820152600c60248201526b2a23219d1010b5b2b2b832b960a11b60448201526064016105cf565b6001600160a01b038116600081815260096020526040808220805460ff19169055517f59685075b2309073f4098ced95b9d9735afd3e9f7c332029d79286ae46f5d0da9190a250565b6107e5611809565b60408051602080820180845260008084526001600160a01b03861681526007909252929020905161081692906123a4565b506001600160a01b038116600081815260086020526040808220805460ff19169055517f3423f064b0dcc17a5b46d2641b5e80982c995ce43a3d97c3adce309cbe2364419190a250565b610868611809565b6001600160a01b03811661088e5760405162461bcd60e51b81526004016105cf9061282b565b600280546001600160a01b0319166001600160a01b0383169081179091556040517fbc6957d67306fd2bcbd67469070cc0391de5f3ccc6cff24f1be1f2fd51bdb6ee90600090a250565b600581815481106108e857600080fd5b6000918252602090912001546001600160a01b0316905081565b61090a611809565b6001600160a01b038316600090815260076020526040902061092d908383612428565b506001600160a01b03831660008181526008602052604090819020805460ff19166001179055517fa4cb5d47d2e811828a599b5866df2cb31519b48ccb3d7782ed17e108e6ac45f7906109839085908590612884565b60405180910390a2505050565b610998611809565b6005546000905b80821015610b2157826001600160a01b0316600583815481106109c4576109c4612815565b6000918252602090912001546001600160a01b031603610b0f5760056109eb6001836128b3565b815481106109fb576109fb612815565b600091825260209091200154600580546001600160a01b039092169184908110610a2757610a27612815565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506005805480610a6657610a666128ca565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038581168352600a90915260408220805460ff19169055600354610abd9286929190911690611863565b600254610ad69084906001600160a01b03166000611863565b6040516001600160a01b038416907f4eb129c82dcd3eedb52df2b0e6fb4cfa41ac64ee9d63ff081acbb1877e85d79b90600090a2505050565b81610b198161286b565b92505061099f565b505050565b610b2e611809565b6000805460ff600160a01b808304821615810260ff60a01b1990931692909217928390556040517fc1a5eafc27d9e59f277e8e4e99809b369c04ed10ae0fd758863a010b26fa407393610b8a9390049091161515815260200190565b60405180910390a1565b610b9c611809565b610ba66000611a48565b565b610bb0611809565b6001600160a01b038116610bd65760405162461bcd60e51b81526004016105cf9061282b565b6001600160a01b03811660009081526009602052604090205460ff1615610c2d5760405162461bcd60e51b815260206004820152600b60248201526a2a23219d1035b2b2b832b960a91b60448201526064016105cf565b6001600160a01b038116600081815260096020526040808220805460ff19166001179055517fefb5cfa1a8690c124332ab93324539c5c9c4be03f28aeb8be86f2d8a0c9fb99b9190a250565b6060610c83611809565b610c9b85858585610c96426102586128e0565b611a98565b95945050505050565b3360009081526009602052604090205460ff16151560011480610cd157506000546001600160a01b031633145b610ced5760405162461bcd60e51b81526004016105cf906128f8565b600554610ba690600090611c76565b610d04611809565b6001600160a01b038116610d2a5760405162461bcd60e51b81526004016105cf9061282b565b600480546001600160a01b0319166001600160a01b0383169081179091556040517f6f8c206ce9f10423f2b99164314c3e6e47f872d0d56a1c072c5e5bb4a9b9cd3690600090a250565b610d7c611809565b600480546040516370a0823160e01b815230928101929092526000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610dca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dee919061291c565b600454600154919250610e0e916001600160a01b03918216911683611eab565b600154604051631998325160e01b8152600481018390526001600160a01b0390911690631998325190602401600060405180830381600087803b158015610e5457600080fd5b505af1158015610e68573d6000803e3d6000fd5b505060408051428152602081018590527f4b7716bc5b5b26ece4410befaf3e3f5432de88e4593fdc339eaef715d0a0489c935001905060405180910390a150565b610eb1611809565b6001600160a01b038116610ed75760405162461bcd60e51b81526004016105cf9061282b565b806001600160a01b031663f083be3b6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610f1257600080fd5b505af1158015610f26573d6000803e3d6000fd5b50505050806001600160a01b03167ff40b9ca28516abde647ef8ed0e7b155e16347eb4d8dd6eb29989ed2c0c3d27e842604051610f6591815260200190565b60405180910390a250565b610f78611809565b6001600160a01b038116610f9e5760405162461bcd60e51b81526004016105cf9061282b565b600180546001600160a01b0319166001600160a01b0383169081179091556040517f11530d044f9845f8adc17717b047239a25b1dd02418212b95da152c594cd5bcc90600090a250565b610ff0611809565b6000805b828210156107045783838381811061100e5761100e612815565b9050602002016020810190611023919061253b565b90506001600160a01b03811661104b5760405162461bcd60e51b81526004016105cf9061282b565b6001600160a01b0381166000908152600b602052604090205460ff166110f8576006805460018082019092557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b0384169081179091556000818152600b6020526040808220805460ff1916909417909355915190917f84f21453a36d947225b71844083d0755a7939b6c09162d5ced65f7cc0ac9d42c91a25b816111028161286b565b925050610ff4565b611112611809565b6001600160a01b0382166111385760405162461bcd60e51b81526004016105cf9061282b565b6040516370a0823160e01b815230600482015281906001600160a01b038416906370a0823190602401602060405180830381865afa15801561117e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a2919061291c565b10156111df5760405162461bcd60e51b815260206004820152600c60248201526b1510d18e8808585b5bdd5b9d60a21b60448201526064016105cf565b6111ea823383611eab565b60408051338152602081018390526001600160a01b038416917f33c35f9541201e342d5e7467016e65a0a06182eb12a5f17103f71cec95b6cb29910160405180910390a25050565b6007602052600090815260409020805461124b90612935565b80601f016020809104026020016040519081016040528092919081815260200182805461127790612935565b80156112c45780601f10611299576101008083540402835291602001916112c4565b820191906000526020600020905b8154815290600101906020018083116112a757829003601f168201915b505050505081565b6112d4611809565b6006546000905b80821015610b2157826001600160a01b03166006838154811061130057611300612815565b6000918252602090912001546001600160a01b0316036114125760066113276001836128b3565b8154811061133757611337612815565b600091825260209091200154600680546001600160a01b03909216918490811061136357611363612815565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060068054806113a2576113a26128ca565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038516808352600b9091526040808320805460ff191690555190917f9697519ee68edd99585564430e506173581037114f47f0083979d8e97d1d048091a2505050565b8161141c8161286b565b9250506112db565b600681815481106108e857600080fd5b61143c611809565b6001600160a01b0381166114625760405162461bcd60e51b81526004016105cf9061282b565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f919dd04de65d56f06091b9fccff81a2febccfd955ddc7fc01fcae02849a04da790600090a250565b3360009081526009602052604090205460ff161515600114806114d957506000546001600160a01b031633145b6114f55760405162461bcd60e51b81526004016105cf906128f8565b600654600090818167ffffffffffffffff8111156115155761151561296f565b60405190808252806020026020018201604052801561153e578160200160208202803683370190505b50600680546040805160208084028201810190925282815293945083018282801561159257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611574575b505050505090505b81831015610b21578083815181106115b4576115b4612815565b60200260200101516001600160a01b031663f083be3b6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156115f657600080fd5b505af1925050508015611607575060015b61166c5780838151811061161d5761161d612815565b60200260200101516001600160a01b03167fe1563b4dfb06394fe84449e66b5c42f40347d03a3e1398ffeeb85a298cc338ea4260405161165f91815260200190565b60405180910390a26116c9565b80838151811061167e5761167e612815565b60200260200101516001600160a01b03167ff40b9ca28516abde647ef8ed0e7b155e16347eb4d8dd6eb29989ed2c0c3d27e8426040516116c091815260200190565b60405180910390a25b826116d38161286b565b93505061159a565b6116e3611809565b6001600160a01b0382161580159061170357506001600160a01b03811615155b61170c57600080fd5b61171882826000611863565b5050565b3360009081526009602052604090205460ff1615156001148061174957506000546001600160a01b031633145b6117655760405162461bcd60e51b81526004016105cf906128f8565b6117188282611c76565b6000611779611809565b6117868686868686611ef5565b9695505050505050565b611798611809565b6001600160a01b0381166117fd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105cf565b61180681611a48565b50565b6000546001600160a01b03163314610ba65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105cf565b6000836001600160a01b03163b1161187a57600080fd5b8015806118f45750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156118ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f2919061291c565b155b61195f5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b60648201526084016105cf565b6040516001600160a01b03838116602483015260448201839052600091829186169063095ea7b360e01b906064015b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516119cc9190612985565b6000604051808303816000865af19150503d8060008114611a09576040519150601f19603f3d011682016040523d82523d6000602084013e611a0e565b606091505b5091509150818015611a38575080511580611a38575080806020019051810190611a3891906129af565b611a4157600080fd5b5050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060600084846000818110611aaf57611aaf612815565b611ac5926020606090920201908101915061253b565b600254604051636eb1769f60e11b81523060048201526001600160a01b03918216602482015291925088919083169063dd62ed3e90604401602060405180830381865afa158015611b1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b3e919061291c565b1015611b7757600254611b5d9082906001600160a01b03166000611863565b600254611b779082906001600160a01b0316600019611863565b600254604051631e82ecdb60e31b81526001600160a01b039091169063f41766d890611bb1908a908a908a908a9030908b906004016129cc565b6000604051808303816000875af1158015611bd0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611bf89190810190612a78565b9150806001600160a01b03167f77f92a1b6a1a11de8ca49515ad4c1fad45632dd3442167d74b90b304a3c7a758888460018651611c3591906128b3565b81518110611c4557611c45612815565b6020026020010151604051611c64929190918252602082015260400190565b60405180910390a25095945050505050565b600054600160a01b900460ff1615611cbe5760405162461bcd60e51b815260206004820152600b60248201526a151190ce881c185d5cd95960aa1b60448201526064016105cf565b600080835b83811015611d7a5760058181548110611cde57611cde612815565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116925082906370a0823190602401602060405180830381865afa158015611d32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d56919061291c565b92508215611d6857611d688284612103565b80611d728161286b565b915050611cc3565b600480546040516370a0823160e01b815230928101929092526001600160a01b0316906370a0823190602401602060405180830381865afa158015611dc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611de7919061291c565b92508215611e6b57600454600154611e0c916001600160a01b03908116911685611eab565b600154604051631998325160e01b8152600481018590526001600160a01b0390911690631998325190602401600060405180830381600087803b158015611e5257600080fd5b505af1158015611e66573d6000803e3d6000fd5b505050505b60408051428152602081018590527f4b7716bc5b5b26ece4410befaf3e3f5432de88e4593fdc339eaef715d0a0489c910160405180910390a15050505050565b6000836001600160a01b03163b11611ec257600080fd5b6040516001600160a01b03838116602483015260448201839052600091829186169063a9059cbb60e01b9060640161198e565b6000806040518060e00160405280886001600160a01b03168152602001876001600160a01b03168152602001306001600160a01b0316815260200142610258611f3e91906128e0565b81526020810187905260408082018790526001600160a01b038087166060909301929092526003549051636eb1769f60e11b8152306004820152908216602482015291925086919089169063dd62ed3e90604401602060405180830381865afa158015611faf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fd3919061291c565b101561200c57600354611ff29088906001600160a01b03166000611863565b60035461200c9088906001600160a01b0316600019611863565b6003546040805163178ca23160e31b815283516001600160a01b0390811660048301526020850151811660248301529184015182166044820152606084015160648201526080840151608482015260a084015160a482015260c0840151821660c482015291169063bc6511889060e4016020604051808303816000875af115801561209b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120bf919061291c565b60408051878152602081018390529193506001600160a01b038916917f77f92a1b6a1a11de8ca49515ad4c1fad45632dd3442167d74b90b304a3c7a7589101611c64565b6001600160a01b03821660009081526008602052604090205460ff1615611718576040805160a0810182526001600160a01b03841660009081526007602052918220805482919061215390612935565b80601f016020809104026020016040519081016040528092919081815260200182805461217f90612935565b80156121cc5780601f106121a1576101008083540402835291602001916121cc565b820191906000526020600020905b8154815290600101906020018083116121af57829003601f168201915b50505091835250503060208201526040016121e9426102586128e0565b81526020810184905260006040918201526003549051636eb1769f60e11b81523060048201526001600160a01b03918216602482015291925083919085169063dd62ed3e90604401602060405180830381865afa15801561224e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612272919061291c565b10156122ab576003546122919084906001600160a01b03166000611863565b6003546122ab9084906001600160a01b0316600019611863565b60035460405163c04b8d5960e01b81526001600160a01b039091169063c04b8d59906122db908490600401612b36565b6020604051808303816000875af1925050508015612316575060408051601f3d908101601f191682019092526123139181019061291c565b60015b61235a57604080518381524260208201526001600160a01b038516917f24bb57c4c135223eb3fa5d03c9aa5958f103cc3ec9b2d7c8d35fffad65779d069101610983565b60408051848152602081018390526001600160a01b038616917f77f92a1b6a1a11de8ca49515ad4c1fad45632dd3442167d74b90b304a3c7a758910160405180910390a250505050565b8280546123b090612935565b90600052602060002090601f0160209004810192826123d25760008555612418565b82601f106123eb57805160ff1916838001178555612418565b82800160010185558215612418579182015b828111156124185782518255916020019190600101906123fd565b5061242492915061249c565b5090565b82805461243490612935565b90600052602060002090601f0160209004810192826124565760008555612418565b82601f1061246f5782800160ff19823516178555612418565b82800160010185558215612418579182015b82811115612418578235825591602001919060010190612481565b5b80821115612424576000815560010161249d565b600080602083850312156124c457600080fd5b823567ffffffffffffffff808211156124dc57600080fd5b818501915085601f8301126124f057600080fd5b8135818111156124ff57600080fd5b8660208260051b850101111561251457600080fd5b60209290920196919550909350505050565b6001600160a01b038116811461180657600080fd5b60006020828403121561254d57600080fd5b813561255881612526565b9392505050565b60006020828403121561257157600080fd5b5035919050565b60008060006040848603121561258d57600080fd5b833561259881612526565b9250602084013567ffffffffffffffff808211156125b557600080fd5b818601915086601f8301126125c957600080fd5b8135818111156125d857600080fd5b8760208285010111156125ea57600080fd5b6020830194508093505050509250925092565b6000806000806060858703121561261357600080fd5b8435935060208501359250604085013567ffffffffffffffff8082111561263957600080fd5b818701915087601f83011261264d57600080fd5b81358181111561265c57600080fd5b88602060608302850101111561267157600080fd5b95989497505060200194505050565b6020808252825182820181905260009190848201906040850190845b818110156126b85783518352928401929184019160010161269c565b50909695505050505050565b600080604083850312156126d757600080fd5b82356126e281612526565b946020939093013593505050565b60005b8381101561270b5781810151838201526020016126f3565b838111156107045750506000910152565b600081518084526127348160208601602086016126f0565b601f01601f19169290920160200192915050565b602081526000612558602083018461271c565b6000806040838503121561276e57600080fd5b823561277981612526565b9150602083013561278981612526565b809150509250929050565b600080604083850312156127a757600080fd5b50508035926020909101359150565b600080600080600060a086880312156127ce57600080fd5b85356127d981612526565b945060208601356127e981612526565b93506040860135925060608601359150608086013561280781612526565b809150509295509295909350565b634e487b7160e01b600052603260045260246000fd5b60208082526010908201526f5446433a205a65726f4164647265737360801b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60006001820161287d5761287d612855565b5060010190565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b6000828210156128c5576128c5612855565b500390565b634e487b7160e01b600052603160045260246000fd5b600082198211156128f3576128f3612855565b500190565b6020808252600a90820152693737ba1035b2b2b832b960b11b604082015260600190565b60006020828403121561292e57600080fd5b5051919050565b600181811c9082168061294957607f821691505b60208210810361296957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b600082516129978184602087016126f0565b9190910192915050565b801515811461180657600080fd5b6000602082840312156129c157600080fd5b8151612558816129a1565b600060a0820188835260208881850152604060a0818601528288845260c08601905089935060005b89811015612a4c578435612a0781612526565b6001600160a01b0390811683528585013590612a2282612526565b168285015284830135612a34816129a1565b151582840152606094850194909101906001016129f4565b506001600160a01b03881660608701529350612a6792505050565b826080830152979650505050505050565b60006020808385031215612a8b57600080fd5b825167ffffffffffffffff80821115612aa357600080fd5b818501915085601f830112612ab757600080fd5b815181811115612ac957612ac961296f565b8060051b604051601f19603f83011681018181108582111715612aee57612aee61296f565b604052918252848201925083810185019188831115612b0c57600080fd5b938501935b82851015612b2a57845184529385019392850192612b11565b98975050505050505050565b602081526000825160a06020840152612b5260c084018261271c565b905060018060a01b0360208501511660408401526040840151606084015260608401516080840152608084015160a0840152809150509291505056fea264697066735822122068f5336363e652faa2fb5417ee43f8f047e547e226236e5448e38ffcc04bc8ef64736f6c634300080d003300000000000000000000000090c44218e202995f1c06cb0f0e452dd3b6d8ebdf

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061023d5760003560e01c80638da5cb5b1161013b578063d294f093116100b8578063db6770e41161007c578063db6770e4146104fd578063e5e31b1314610510578063f2fde38b14610533578063f7c618c114610546578063fb1db2781461055957600080fd5b8063d294f093146104a4578063d65a3a2e146104ac578063d92fc67b146104bf578063d96073cf146104c7578063db141981146104da57600080fd5b8063a25a0999116100ff578063a25a099914610437578063af6c9c1d14610457578063b187bd261461046a578063b91ac7881461047e578063c54bc2b51461049157600080fd5b80638da5cb5b146103da5780638e6e3846146103eb578063933baa86146103fe578063970ecedb14610411578063a1db97821461042457600080fd5b80636428cb45116101c95780637f1ebb671161018d5780637f1ebb6714610384578063810c7883146103a45780638119c065146103b75780638aee8127146103bf5780638cbf7d3c146103d257600080fd5b80636428cb451461032b5780636833f60d1461033e5780636ba42aaa14610346578063715018a614610369578063748747e61461037157600080fd5b8063349757481161021057806334975748146102b55780633d300966146102c75780634f64b2be146102da5780635d794a5c146103055780635fa7b5841461031857600080fd5b8063108811661461024257806314ae9f2e1461025757806319f373611461026a5780632207802b146102a2575b600080fd5b6102556102503660046124b1565b61056c565b005b61025561026536600461253b565b61070a565b61028d61027836600461253b565b600a6020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6102556102b036600461253b565b6107dd565b6006545b604051908152602001610299565b6102556102d536600461253b565b610860565b6102ed6102e836600461255f565b6108d8565b6040516001600160a01b039091168152602001610299565b610255610313366004612578565b610902565b61025561032636600461253b565b610990565b6003546102ed906001600160a01b031681565b610255610b26565b61028d61035436600461253b565b60096020526000908152604090205460ff1681565b610255610b94565b61025561037f36600461253b565b610ba8565b6103976103923660046125fd565b610c79565b6040516102999190612680565b6002546102ed906001600160a01b031681565b610255610ca4565b6102556103cd36600461253b565b610cfc565b610255610d74565b6000546001600160a01b03166102ed565b6102556103f936600461253b565b610ea9565b61025561040c36600461253b565b610f70565b61025561041f3660046124b1565b610fe8565b6102556104323660046126c4565b61110a565b61044a61044536600461253b565b611232565b6040516102999190612748565b61025561046536600461253b565b6112cc565b60005461028d90600160a01b900460ff1681565b6102ed61048c36600461255f565b611424565b61025561049f36600461253b565b611434565b6102556114ac565b6102556104ba36600461275b565b6116db565b6005546102b9565b6102556104d5366004612794565b61171c565b61028d6104e836600461253b565b60086020526000908152604090205460ff1681565b6102b961050b3660046127b6565b61176f565b61028d61051e36600461253b565b600b6020526000908152604090205460ff1681565b61025561054136600461253b565b611790565b6004546102ed906001600160a01b031681565b6001546102ed906001600160a01b031681565b610574611809565b6000805b828110156107045783838281811061059257610592612815565b90506020020160208101906105a7919061253b565b91506001600160a01b0382166105d85760405162461bcd60e51b81526004016105cf9061282b565b60405180910390fd5b6001600160a01b0382166000908152600a602052604090205460ff166106f2576005805460018082019092557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319166001600160a01b038581169182179092556000908152600a60205260408120805460ff19169093179092556003546106709285929190911690611863565b60035461068a9083906001600160a01b0316600019611863565b6002546106a39083906001600160a01b03166000611863565b6002546106bd9083906001600160a01b0316600019611863565b6040516001600160a01b038316907fe473c74f34be27c1464d6624f14a0d7fd4e301cbfa29c3eba425d378c8a7ebe090600090a25b806106fc8161286b565b915050610578565b50505050565b610712611809565b6001600160a01b0381166107385760405162461bcd60e51b81526004016105cf9061282b565b6001600160a01b03811660009081526009602052604090205460ff1615156001146107945760405162461bcd60e51b815260206004820152600c60248201526b2a23219d1010b5b2b2b832b960a11b60448201526064016105cf565b6001600160a01b038116600081815260096020526040808220805460ff19169055517f59685075b2309073f4098ced95b9d9735afd3e9f7c332029d79286ae46f5d0da9190a250565b6107e5611809565b60408051602080820180845260008084526001600160a01b03861681526007909252929020905161081692906123a4565b506001600160a01b038116600081815260086020526040808220805460ff19169055517f3423f064b0dcc17a5b46d2641b5e80982c995ce43a3d97c3adce309cbe2364419190a250565b610868611809565b6001600160a01b03811661088e5760405162461bcd60e51b81526004016105cf9061282b565b600280546001600160a01b0319166001600160a01b0383169081179091556040517fbc6957d67306fd2bcbd67469070cc0391de5f3ccc6cff24f1be1f2fd51bdb6ee90600090a250565b600581815481106108e857600080fd5b6000918252602090912001546001600160a01b0316905081565b61090a611809565b6001600160a01b038316600090815260076020526040902061092d908383612428565b506001600160a01b03831660008181526008602052604090819020805460ff19166001179055517fa4cb5d47d2e811828a599b5866df2cb31519b48ccb3d7782ed17e108e6ac45f7906109839085908590612884565b60405180910390a2505050565b610998611809565b6005546000905b80821015610b2157826001600160a01b0316600583815481106109c4576109c4612815565b6000918252602090912001546001600160a01b031603610b0f5760056109eb6001836128b3565b815481106109fb576109fb612815565b600091825260209091200154600580546001600160a01b039092169184908110610a2757610a27612815565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506005805480610a6657610a666128ca565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038581168352600a90915260408220805460ff19169055600354610abd9286929190911690611863565b600254610ad69084906001600160a01b03166000611863565b6040516001600160a01b038416907f4eb129c82dcd3eedb52df2b0e6fb4cfa41ac64ee9d63ff081acbb1877e85d79b90600090a2505050565b81610b198161286b565b92505061099f565b505050565b610b2e611809565b6000805460ff600160a01b808304821615810260ff60a01b1990931692909217928390556040517fc1a5eafc27d9e59f277e8e4e99809b369c04ed10ae0fd758863a010b26fa407393610b8a9390049091161515815260200190565b60405180910390a1565b610b9c611809565b610ba66000611a48565b565b610bb0611809565b6001600160a01b038116610bd65760405162461bcd60e51b81526004016105cf9061282b565b6001600160a01b03811660009081526009602052604090205460ff1615610c2d5760405162461bcd60e51b815260206004820152600b60248201526a2a23219d1035b2b2b832b960a91b60448201526064016105cf565b6001600160a01b038116600081815260096020526040808220805460ff19166001179055517fefb5cfa1a8690c124332ab93324539c5c9c4be03f28aeb8be86f2d8a0c9fb99b9190a250565b6060610c83611809565b610c9b85858585610c96426102586128e0565b611a98565b95945050505050565b3360009081526009602052604090205460ff16151560011480610cd157506000546001600160a01b031633145b610ced5760405162461bcd60e51b81526004016105cf906128f8565b600554610ba690600090611c76565b610d04611809565b6001600160a01b038116610d2a5760405162461bcd60e51b81526004016105cf9061282b565b600480546001600160a01b0319166001600160a01b0383169081179091556040517f6f8c206ce9f10423f2b99164314c3e6e47f872d0d56a1c072c5e5bb4a9b9cd3690600090a250565b610d7c611809565b600480546040516370a0823160e01b815230928101929092526000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610dca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dee919061291c565b600454600154919250610e0e916001600160a01b03918216911683611eab565b600154604051631998325160e01b8152600481018390526001600160a01b0390911690631998325190602401600060405180830381600087803b158015610e5457600080fd5b505af1158015610e68573d6000803e3d6000fd5b505060408051428152602081018590527f4b7716bc5b5b26ece4410befaf3e3f5432de88e4593fdc339eaef715d0a0489c935001905060405180910390a150565b610eb1611809565b6001600160a01b038116610ed75760405162461bcd60e51b81526004016105cf9061282b565b806001600160a01b031663f083be3b6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610f1257600080fd5b505af1158015610f26573d6000803e3d6000fd5b50505050806001600160a01b03167ff40b9ca28516abde647ef8ed0e7b155e16347eb4d8dd6eb29989ed2c0c3d27e842604051610f6591815260200190565b60405180910390a250565b610f78611809565b6001600160a01b038116610f9e5760405162461bcd60e51b81526004016105cf9061282b565b600180546001600160a01b0319166001600160a01b0383169081179091556040517f11530d044f9845f8adc17717b047239a25b1dd02418212b95da152c594cd5bcc90600090a250565b610ff0611809565b6000805b828210156107045783838381811061100e5761100e612815565b9050602002016020810190611023919061253b565b90506001600160a01b03811661104b5760405162461bcd60e51b81526004016105cf9061282b565b6001600160a01b0381166000908152600b602052604090205460ff166110f8576006805460018082019092557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b0384169081179091556000818152600b6020526040808220805460ff1916909417909355915190917f84f21453a36d947225b71844083d0755a7939b6c09162d5ced65f7cc0ac9d42c91a25b816111028161286b565b925050610ff4565b611112611809565b6001600160a01b0382166111385760405162461bcd60e51b81526004016105cf9061282b565b6040516370a0823160e01b815230600482015281906001600160a01b038416906370a0823190602401602060405180830381865afa15801561117e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a2919061291c565b10156111df5760405162461bcd60e51b815260206004820152600c60248201526b1510d18e8808585b5bdd5b9d60a21b60448201526064016105cf565b6111ea823383611eab565b60408051338152602081018390526001600160a01b038416917f33c35f9541201e342d5e7467016e65a0a06182eb12a5f17103f71cec95b6cb29910160405180910390a25050565b6007602052600090815260409020805461124b90612935565b80601f016020809104026020016040519081016040528092919081815260200182805461127790612935565b80156112c45780601f10611299576101008083540402835291602001916112c4565b820191906000526020600020905b8154815290600101906020018083116112a757829003601f168201915b505050505081565b6112d4611809565b6006546000905b80821015610b2157826001600160a01b03166006838154811061130057611300612815565b6000918252602090912001546001600160a01b0316036114125760066113276001836128b3565b8154811061133757611337612815565b600091825260209091200154600680546001600160a01b03909216918490811061136357611363612815565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060068054806113a2576113a26128ca565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038516808352600b9091526040808320805460ff191690555190917f9697519ee68edd99585564430e506173581037114f47f0083979d8e97d1d048091a2505050565b8161141c8161286b565b9250506112db565b600681815481106108e857600080fd5b61143c611809565b6001600160a01b0381166114625760405162461bcd60e51b81526004016105cf9061282b565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f919dd04de65d56f06091b9fccff81a2febccfd955ddc7fc01fcae02849a04da790600090a250565b3360009081526009602052604090205460ff161515600114806114d957506000546001600160a01b031633145b6114f55760405162461bcd60e51b81526004016105cf906128f8565b600654600090818167ffffffffffffffff8111156115155761151561296f565b60405190808252806020026020018201604052801561153e578160200160208202803683370190505b50600680546040805160208084028201810190925282815293945083018282801561159257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611574575b505050505090505b81831015610b21578083815181106115b4576115b4612815565b60200260200101516001600160a01b031663f083be3b6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156115f657600080fd5b505af1925050508015611607575060015b61166c5780838151811061161d5761161d612815565b60200260200101516001600160a01b03167fe1563b4dfb06394fe84449e66b5c42f40347d03a3e1398ffeeb85a298cc338ea4260405161165f91815260200190565b60405180910390a26116c9565b80838151811061167e5761167e612815565b60200260200101516001600160a01b03167ff40b9ca28516abde647ef8ed0e7b155e16347eb4d8dd6eb29989ed2c0c3d27e8426040516116c091815260200190565b60405180910390a25b826116d38161286b565b93505061159a565b6116e3611809565b6001600160a01b0382161580159061170357506001600160a01b03811615155b61170c57600080fd5b61171882826000611863565b5050565b3360009081526009602052604090205460ff1615156001148061174957506000546001600160a01b031633145b6117655760405162461bcd60e51b81526004016105cf906128f8565b6117188282611c76565b6000611779611809565b6117868686868686611ef5565b9695505050505050565b611798611809565b6001600160a01b0381166117fd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105cf565b61180681611a48565b50565b6000546001600160a01b03163314610ba65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105cf565b6000836001600160a01b03163b1161187a57600080fd5b8015806118f45750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156118ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f2919061291c565b155b61195f5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b60648201526084016105cf565b6040516001600160a01b03838116602483015260448201839052600091829186169063095ea7b360e01b906064015b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516119cc9190612985565b6000604051808303816000865af19150503d8060008114611a09576040519150601f19603f3d011682016040523d82523d6000602084013e611a0e565b606091505b5091509150818015611a38575080511580611a38575080806020019051810190611a3891906129af565b611a4157600080fd5b5050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060600084846000818110611aaf57611aaf612815565b611ac5926020606090920201908101915061253b565b600254604051636eb1769f60e11b81523060048201526001600160a01b03918216602482015291925088919083169063dd62ed3e90604401602060405180830381865afa158015611b1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b3e919061291c565b1015611b7757600254611b5d9082906001600160a01b03166000611863565b600254611b779082906001600160a01b0316600019611863565b600254604051631e82ecdb60e31b81526001600160a01b039091169063f41766d890611bb1908a908a908a908a9030908b906004016129cc565b6000604051808303816000875af1158015611bd0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611bf89190810190612a78565b9150806001600160a01b03167f77f92a1b6a1a11de8ca49515ad4c1fad45632dd3442167d74b90b304a3c7a758888460018651611c3591906128b3565b81518110611c4557611c45612815565b6020026020010151604051611c64929190918252602082015260400190565b60405180910390a25095945050505050565b600054600160a01b900460ff1615611cbe5760405162461bcd60e51b815260206004820152600b60248201526a151190ce881c185d5cd95960aa1b60448201526064016105cf565b600080835b83811015611d7a5760058181548110611cde57611cde612815565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116925082906370a0823190602401602060405180830381865afa158015611d32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d56919061291c565b92508215611d6857611d688284612103565b80611d728161286b565b915050611cc3565b600480546040516370a0823160e01b815230928101929092526001600160a01b0316906370a0823190602401602060405180830381865afa158015611dc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611de7919061291c565b92508215611e6b57600454600154611e0c916001600160a01b03908116911685611eab565b600154604051631998325160e01b8152600481018590526001600160a01b0390911690631998325190602401600060405180830381600087803b158015611e5257600080fd5b505af1158015611e66573d6000803e3d6000fd5b505050505b60408051428152602081018590527f4b7716bc5b5b26ece4410befaf3e3f5432de88e4593fdc339eaef715d0a0489c910160405180910390a15050505050565b6000836001600160a01b03163b11611ec257600080fd5b6040516001600160a01b03838116602483015260448201839052600091829186169063a9059cbb60e01b9060640161198e565b6000806040518060e00160405280886001600160a01b03168152602001876001600160a01b03168152602001306001600160a01b0316815260200142610258611f3e91906128e0565b81526020810187905260408082018790526001600160a01b038087166060909301929092526003549051636eb1769f60e11b8152306004820152908216602482015291925086919089169063dd62ed3e90604401602060405180830381865afa158015611faf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fd3919061291c565b101561200c57600354611ff29088906001600160a01b03166000611863565b60035461200c9088906001600160a01b0316600019611863565b6003546040805163178ca23160e31b815283516001600160a01b0390811660048301526020850151811660248301529184015182166044820152606084015160648201526080840151608482015260a084015160a482015260c0840151821660c482015291169063bc6511889060e4016020604051808303816000875af115801561209b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120bf919061291c565b60408051878152602081018390529193506001600160a01b038916917f77f92a1b6a1a11de8ca49515ad4c1fad45632dd3442167d74b90b304a3c7a7589101611c64565b6001600160a01b03821660009081526008602052604090205460ff1615611718576040805160a0810182526001600160a01b03841660009081526007602052918220805482919061215390612935565b80601f016020809104026020016040519081016040528092919081815260200182805461217f90612935565b80156121cc5780601f106121a1576101008083540402835291602001916121cc565b820191906000526020600020905b8154815290600101906020018083116121af57829003601f168201915b50505091835250503060208201526040016121e9426102586128e0565b81526020810184905260006040918201526003549051636eb1769f60e11b81523060048201526001600160a01b03918216602482015291925083919085169063dd62ed3e90604401602060405180830381865afa15801561224e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612272919061291c565b10156122ab576003546122919084906001600160a01b03166000611863565b6003546122ab9084906001600160a01b0316600019611863565b60035460405163c04b8d5960e01b81526001600160a01b039091169063c04b8d59906122db908490600401612b36565b6020604051808303816000875af1925050508015612316575060408051601f3d908101601f191682019092526123139181019061291c565b60015b61235a57604080518381524260208201526001600160a01b038516917f24bb57c4c135223eb3fa5d03c9aa5958f103cc3ec9b2d7c8d35fffad65779d069101610983565b60408051848152602081018390526001600160a01b038616917f77f92a1b6a1a11de8ca49515ad4c1fad45632dd3442167d74b90b304a3c7a758910160405180910390a250505050565b8280546123b090612935565b90600052602060002090601f0160209004810192826123d25760008555612418565b82601f106123eb57805160ff1916838001178555612418565b82800160010185558215612418579182015b828111156124185782518255916020019190600101906123fd565b5061242492915061249c565b5090565b82805461243490612935565b90600052602060002090601f0160209004810192826124565760008555612418565b82601f1061246f5782800160ff19823516178555612418565b82800160010185558215612418579182015b82811115612418578235825591602001919060010190612481565b5b80821115612424576000815560010161249d565b600080602083850312156124c457600080fd5b823567ffffffffffffffff808211156124dc57600080fd5b818501915085601f8301126124f057600080fd5b8135818111156124ff57600080fd5b8660208260051b850101111561251457600080fd5b60209290920196919550909350505050565b6001600160a01b038116811461180657600080fd5b60006020828403121561254d57600080fd5b813561255881612526565b9392505050565b60006020828403121561257157600080fd5b5035919050565b60008060006040848603121561258d57600080fd5b833561259881612526565b9250602084013567ffffffffffffffff808211156125b557600080fd5b818601915086601f8301126125c957600080fd5b8135818111156125d857600080fd5b8760208285010111156125ea57600080fd5b6020830194508093505050509250925092565b6000806000806060858703121561261357600080fd5b8435935060208501359250604085013567ffffffffffffffff8082111561263957600080fd5b818701915087601f83011261264d57600080fd5b81358181111561265c57600080fd5b88602060608302850101111561267157600080fd5b95989497505060200194505050565b6020808252825182820181905260009190848201906040850190845b818110156126b85783518352928401929184019160010161269c565b50909695505050505050565b600080604083850312156126d757600080fd5b82356126e281612526565b946020939093013593505050565b60005b8381101561270b5781810151838201526020016126f3565b838111156107045750506000910152565b600081518084526127348160208601602086016126f0565b601f01601f19169290920160200192915050565b602081526000612558602083018461271c565b6000806040838503121561276e57600080fd5b823561277981612526565b9150602083013561278981612526565b809150509250929050565b600080604083850312156127a757600080fd5b50508035926020909101359150565b600080600080600060a086880312156127ce57600080fd5b85356127d981612526565b945060208601356127e981612526565b93506040860135925060608601359150608086013561280781612526565b809150509295509295909350565b634e487b7160e01b600052603260045260246000fd5b60208082526010908201526f5446433a205a65726f4164647265737360801b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60006001820161287d5761287d612855565b5060010190565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b6000828210156128c5576128c5612855565b500390565b634e487b7160e01b600052603160045260246000fd5b600082198211156128f3576128f3612855565b500190565b6020808252600a90820152693737ba1035b2b2b832b960b11b604082015260600190565b60006020828403121561292e57600080fd5b5051919050565b600181811c9082168061294957607f821691505b60208210810361296957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b600082516129978184602087016126f0565b9190910192915050565b801515811461180657600080fd5b6000602082840312156129c157600080fd5b8151612558816129a1565b600060a0820188835260208881850152604060a0818601528288845260c08601905089935060005b89811015612a4c578435612a0781612526565b6001600160a01b0390811683528585013590612a2282612526565b168285015284830135612a34816129a1565b151582840152606094850194909101906001016129f4565b506001600160a01b03881660608701529350612a6792505050565b826080830152979650505050505050565b60006020808385031215612a8b57600080fd5b825167ffffffffffffffff80821115612aa357600080fd5b818501915085601f830112612ab757600080fd5b815181811115612ac957612ac961296f565b8060051b604051601f19603f83011681018181108582111715612aee57612aee61296f565b604052918252848201925083810185019188831115612b0c57600080fd5b938501935b82851015612b2a57845184529385019392850192612b11565b98975050505050505050565b602081526000825160a06020840152612b5260c084018261271c565b905060018060a01b0360208501511660408401526040840151606084015260608401516080840152608084015160a0840152809150509291505056fea264697066735822122068f5336363e652faa2fb5417ee43f8f047e547e226236e5448e38ffcc04bc8ef64736f6c634300080d0033

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

00000000000000000000000090c44218e202995f1c06cb0f0e452dd3b6d8ebdf

-----Decoded View---------------
Arg [0] : _rewardToken (address): 0x90C44218E202995F1c06CB0f0E452dd3b6d8eBDf

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000090c44218e202995f1c06cb0f0e452dd3b6d8ebdf


Block Transaction Gas Used Reward
view all blocks produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.