POL Price: $0.218716 (+0.18%)
 

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Swap415859912023-04-16 5:10:45738 days ago1681621845IN
0x98ebDc5C...F33A8F6C8
0 POL0.0507976190.28456834
Swap415469122023-04-15 4:17:44739 days ago1681532264IN
0x98ebDc5C...F33A8F6C8
15 POL0.0331771166.81131214
Swap414358592023-04-12 6:41:39742 days ago1681281699IN
0x98ebDc5C...F33A8F6C8
0 POL0.04397635169.61606014
Swap413762352023-04-10 17:46:04743 days ago1681148764IN
0x98ebDc5C...F33A8F6C8
90 POL0.02821295136.86708436
Swap412496292023-04-07 11:51:16746 days ago1680868276IN
0x98ebDc5C...F33A8F6C8
0 POL0.03728923178.87954684
Swap412039282023-04-06 7:37:22748 days ago1680766642IN
0x98ebDc5C...F33A8F6C8
0 POL0.02175066104.10751099
Swap411245052023-04-04 7:03:51750 days ago1680591831IN
0x98ebDc5C...F33A8F6C8
0 POL0.03441628136.10807541
Swap411042742023-04-03 18:10:28750 days ago1680545428IN
0x98ebDc5C...F33A8F6C8
0 POL0.02964825142.22514169
Swap410959352023-04-03 13:04:46750 days ago1680527086IN
0x98ebDc5C...F33A8F6C8
0 POL0.02653846129.7464333
Swap408481772023-03-28 3:36:19757 days ago1679974579IN
0x98ebDc5C...F33A8F6C8
0 POL0.02430043116.5712279
Swap407924962023-03-26 14:41:44758 days ago1679841704IN
0x98ebDc5C...F33A8F6C8
1.5 POL0.10636524558.86700498
Swap407732662023-03-26 1:54:17759 days ago1679795657IN
0x98ebDc5C...F33A8F6C8
0 POL0.0160672877.07610722
Swap407479332023-03-25 10:20:29759 days ago1679739629IN
0x98ebDc5C...F33A8F6C8
0 POL0.0179434786.17555934
Swap406509262023-03-22 21:36:08762 days ago1679520968IN
0x98ebDc5C...F33A8F6C8
0 POL0.0162698773.6240265
Swap406477302023-03-22 19:41:48762 days ago1679514108IN
0x98ebDc5C...F33A8F6C8
0 POL0.03050648137.33001661
Swap404895832023-03-18 12:34:55766 days ago1679142895IN
0x98ebDc5C...F33A8F6C8
0 POL0.03744909175.81816718
Swap403978142023-03-16 4:12:12769 days ago1678939932IN
0x98ebDc5C...F33A8F6C8
0 POL0.0136413965.43889543
Swap402819022023-03-13 2:31:14772 days ago1678674674IN
0x98ebDc5C...F33A8F6C8
0 POL0.02705183127.00450304
Swap402208712023-03-11 12:30:31773 days ago1678537831IN
0x98ebDc5C...F33A8F6C8
0 POL0.08061682371.17770693
Swap401821732023-03-10 11:48:03774 days ago1678448883IN
0x98ebDc5C...F33A8F6C8
0 POL0.02600479124.74119376
Swap401687362023-03-10 3:14:32775 days ago1678418072IN
0x98ebDc5C...F33A8F6C8
0 POL0.02440572117.07629695
Swap401437602023-03-09 11:28:28775 days ago1678361308IN
0x98ebDc5C...F33A8F6C8
0 POL0.03463155105.08103229
Swap401053112023-03-08 11:06:07776 days ago1678273567IN
0x98ebDc5C...F33A8F6C8
0 POL0.0370615177.78712529
Swap398719272023-03-02 7:33:27783 days ago1677742407IN
0x98ebDc5C...F33A8F6C8
0 POL0.03355675164.05080154
Swap398430892023-03-01 13:23:01783 days ago1677676981IN
0x98ebDc5C...F33A8F6C8
0 POL0.03197594156.33024193
View all transactions

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
415859912023-04-16 5:10:45738 days ago1681621845
0x98ebDc5C...F33A8F6C8
0.25236257 POL
415859912023-04-16 5:10:45738 days ago1681621845
0x98ebDc5C...F33A8F6C8
0.25236257 POL
415469122023-04-15 4:17:44739 days ago1681532264
0x98ebDc5C...F33A8F6C8
15 POL
413762352023-04-10 17:46:04743 days ago1681148764
0x98ebDc5C...F33A8F6C8
90 POL
412039282023-04-06 7:37:22748 days ago1680766642
0x98ebDc5C...F33A8F6C8
0.38665472 POL
412039282023-04-06 7:37:22748 days ago1680766642
0x98ebDc5C...F33A8F6C8
0.38665472 POL
407924962023-03-26 14:41:44758 days ago1679841704
0x98ebDc5C...F33A8F6C8
1.5 POL
407479332023-03-25 10:20:29759 days ago1679739629
0x98ebDc5C...F33A8F6C8
45.27942676 POL
407479332023-03-25 10:20:29759 days ago1679739629
0x98ebDc5C...F33A8F6C8
45.27942676 POL
401437602023-03-09 11:28:28775 days ago1678361308
0x98ebDc5C...F33A8F6C8
0.3107199 POL
401437602023-03-09 11:28:28775 days ago1678361308
0x98ebDc5C...F33A8F6C8
0.3107199 POL
395105332023-02-20 13:08:21792 days ago1676898501
0x98ebDc5C...F33A8F6C8
2.34071997 POL
395105332023-02-20 13:08:21792 days ago1676898501
0x98ebDc5C...F33A8F6C8
2.34071997 POL
395103762023-02-20 13:02:47792 days ago1676898167
0x98ebDc5C...F33A8F6C8
2.68230559 POL
395103762023-02-20 13:02:47792 days ago1676898167
0x98ebDc5C...F33A8F6C8
2.68230559 POL
383025142023-01-20 8:26:20823 days ago1674203180
0x98ebDc5C...F33A8F6C8
1.54549442 POL
383025142023-01-20 8:26:20823 days ago1674203180
0x98ebDc5C...F33A8F6C8
1.54549442 POL
382745232023-01-19 15:00:54824 days ago1674140454
0x98ebDc5C...F33A8F6C8
504.42883895 POL
382745232023-01-19 15:00:54824 days ago1674140454
0x98ebDc5C...F33A8F6C8
504.42883895 POL
380494762023-01-14 1:57:08830 days ago1673661428
0x98ebDc5C...F33A8F6C8
3.41208544 POL
380494762023-01-14 1:57:08830 days ago1673661428
0x98ebDc5C...F33A8F6C8
3.41208544 POL
380492242023-01-14 1:48:28830 days ago1673660908
0x98ebDc5C...F33A8F6C8
62.06171259 POL
380492242023-01-14 1:48:28830 days ago1673660908
0x98ebDc5C...F33A8F6C8
62.06171259 POL
380279922023-01-13 13:35:34830 days ago1673616934
0x98ebDc5C...F33A8F6C8
35.59072315 POL
380279922023-01-13 13:35:34830 days ago1673616934
0x98ebDc5C...F33A8F6C8
35.59072315 POL
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DEXAggregator

Compiler Version
v0.8.2+commit.661d1103

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 9 : DEXAggregator.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

import "./library/TransferHelper.sol";
import "./interface/IUniswapRouter.sol";
import "./interface/IWRAP.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

contract DEXAggregator is Ownable, ReentrancyGuard {
    using SafeMath for uint256;

    /// @notice percentage of aggregator fee that will be deducted from the inputAmount (will be divided by 1000)
    uint256 public aggregatorFee;

    address public wrappedToken;

    mapping(address => bool) public whitelistedRouters;

    address payable public feeBeneficiary;

    struct SwapData {
        uint256 totalAmountIn;
        uint256 feeAmount;
        uint256 actualSwapAmount;
    }

    SwapData private _swapData;

    event Swapped(
        address indexed factoryAddress,
        uint256 indexed feeAmount,
        address indexed feeToken
    );

    event Received(address, uint256);

    constructor(
        address payable _beneficiary,
        address _wrappedToken,
        uint256 _feePercentage
    ) {
        feeBeneficiary = _beneficiary;
        wrappedToken = _wrappedToken;
        aggregatorFee = _feePercentage;
    }

    receive() external payable {
        assert(msg.sender == address(wrappedToken)); // only accept native token via fallback from the Wrapped token contract
        emit Received(msg.sender, msg.value);
    }

    function isNativeToken(IERC20 inputToken) internal pure returns (bool) {
        return
            (address(inputToken) == 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
                ? true
                : false;
    }

    function swap(
        IUniswapRouter[] calldata router,
        address[][] calldata path,
        uint256[] calldata amountIn,
        uint256[] calldata amountOutMin,
        address dustRecipient,
        IERC20 inputToken,
        uint256 inputAmount,
        IERC20 outputToken
    ) external payable nonReentrant {
        require(
            (router.length == path.length) &&
                (path.length == amountIn.length) &&
                (amountOutMin.length == amountIn.length),
            "Every array length should be same"
        );

        //Transfer tokens from the user
        if (isNativeToken(inputToken)) {
            require(
                msg.value > 0 && msg.value == inputAmount,
                "msg.value should be greater than zero"
            );
            _swapData.feeAmount = (msg.value).mul(aggregatorFee).div(1000);
            uint256 beforeDepositWrappedTokenBalance = IERC20(wrappedToken)
                .balanceOf(address(this));
            IWRAP(wrappedToken).deposit{value: msg.value}();
            uint256 afterDepositWrappedTokenBalance = IERC20(wrappedToken)
                .balanceOf(address(this));
            assert(
                afterDepositWrappedTokenBalance.sub(
                    beforeDepositWrappedTokenBalance
                ) == msg.value
            );
            TransferHelper.safeTransfer(
                address(wrappedToken),
                feeBeneficiary,
                _swapData.feeAmount
            );
        } else if (!isNativeToken(inputToken)) {
            require(
                inputAmount > 0,
                "Input amount should be greater than zero"
            );
            _swapData.feeAmount = (inputAmount).mul(aggregatorFee).div(1000);
            TransferHelper.safeTransferFrom(
                address(inputToken),
                msg.sender,
                address(this),
                inputAmount.sub(_swapData.feeAmount)
            );
            TransferHelper.safeTransferFrom(
                address(inputToken),
                msg.sender,
                feeBeneficiary,
                _swapData.feeAmount
            );
        }

        //Calculate if pending dust
        _swapData.totalAmountIn = 0;
        for (uint256 i = 0; i < amountIn.length; i++) {
            _swapData.totalAmountIn = amountIn[i].add(_swapData.totalAmountIn);
        }
        _swapData.actualSwapAmount = inputAmount.sub(_swapData.feeAmount);
        uint256 pendingDust = _swapData.actualSwapAmount.sub(
            _swapData.totalAmountIn
        );
        require(pendingDust <= 100, "Invalid total amount in");

        //Swap token in different routers
        for (uint256 i = 0; i < router.length; i++) {
            require(
                whitelistedRouters[address(router[i])],
                "Router is not whitelisted"
            );
            TransferHelper.safeApprove(
                address(path[i][0]),
                address(router[i]),
                amountIn[i]
            );
            router[i].swapExactTokensForTokens(
                amountIn[i],
                amountOutMin[i],
                path[i],
                address(this),
                block.timestamp + 3600
            );
        }

        //Transfer output token to user
        if (isNativeToken(outputToken)) {
            uint256 wrappedBalance = IERC20(wrappedToken).balanceOf(
                address(this)
            );
            if (wrappedBalance > 0) {
                IWRAP(wrappedToken).withdraw(wrappedBalance);
                TransferHelper.safeTransferETH(dustRecipient, wrappedBalance);
            }
        } else {
            uint256 outputTokenBalance = outputToken.balanceOf(address(this));
            if (outputTokenBalance > 0)
                TransferHelper.safeTransfer(
                    address(outputToken),
                    dustRecipient,
                    outputTokenBalance
                );
        }

        //Transfer pending dust to user
        if (pendingDust > 0) {
            if (isNativeToken(inputToken)) {
                IWRAP(wrappedToken).withdraw(pendingDust);
                TransferHelper.safeTransferETH(dustRecipient, pendingDust);
            } else {
                TransferHelper.safeTransfer(
                    address(inputToken),
                    dustRecipient,
                    pendingDust
                );
            }
        }
    }

    function whitelistRouters(address[] calldata _routers) external onlyOwner {
        for (uint256 i = 0; i < _routers.length; i++) {
            require(_routers[i] != address(0), "Router cannot be 0x0");
            require(
                !whitelistedRouters[_routers[i]],
                "Router already whitelisted"
            );
            whitelistedRouters[_routers[i]] = true;
        }
    }

    function blacklistRouters(address[] calldata _routers) external onlyOwner {
        for (uint256 i = 0; i < _routers.length; i++) {
            require(_routers[i] != address(0), "Router cannot be 0x0");
            require(whitelistedRouters[_routers[i]], "Router not in whitelist");
            whitelistedRouters[_routers[i]] = false;
        }
    }

    function setAggregatorFee(uint256 _fee) external onlyOwner {
        require(_fee > 0 && _fee < 1000, "Invalid fee percentage");
        aggregatorFee = _fee;
    }

    function setFeeBeneficiary(address payable _beneficiary)
        external
        onlyOwner
    {
        require(_beneficiary != address(0), "Beneficiary cant be zero address");
        feeBeneficiary = _beneficiary;
    }
}

File 2 of 9 : TransferHelper.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// helper methods for interacting with ERC20 tokens that do not consistently return true/false
library TransferHelper {
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(0x095ea7b3, to, value)
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "TransferHelper: APPROVE_FAILED"
        );
    }

    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(0xa9059cbb, to, value)
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "TransferHelper: TRANSFER_FAILED"
        );
    }

    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(0x23b872dd, from, to, value)
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "TransferHelper: TRANSFER_FROM_FAILED"
        );
    }

    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, "TransferHelper: ETH_TRANSFER_FAILED");
    }
}

File 3 of 9 : IUniswapRouter.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.2;

interface IUniswapRouter {
    function factory() external view returns (address);

    function WETH() external view returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountADesired,
        uint256 amountBDesired,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    )
        external
        returns (
            uint256 amountA,
            uint256 amountB,
            uint256 liquidity
        );

    function addLiquidityETH(
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    )
        external
        payable
        returns (
            uint256 amountToken,
            uint256 amountETH,
            uint256 liquidity
        );

    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityETH(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountToken, uint256 amountETH);

    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityETHWithPermit(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountToken, uint256 amountETH);

    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountETH);

    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountETH);

    function swapExactTokensForTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapTokensForExactTokens(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactETHForTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function swapTokensForExactETH(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactTokensForETH(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapETHForExactTokens(
        uint256 amountOut,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;

    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable;

    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;

    function quote(
        uint256 amountA,
        uint256 reserveA,
        uint256 reserveB
    ) external pure returns (uint256 amountB);

    function getAmountOut(
        uint256 amountIn,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountOut);

    function getAmountIn(
        uint256 amountOut,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountIn);

    function getAmountsOut(uint256 amountIn, address[] calldata path)
        external
        view
        returns (uint256[] memory amounts);

    function getAmountsIn(uint256 amountOut, address[] calldata path)
        external
        view
        returns (uint256[] memory amounts);
}

File 4 of 9 : IWRAP.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.2;

interface IWRAP {
    function deposit() external payable;

    function transfer(address to, uint256 value) external returns (bool);

    function withdraw(uint256) external;
}

File 5 of 9 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 6 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        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 7 of 9 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 9 of 9 : 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

API
[{"inputs":[{"internalType":"address payable","name":"_beneficiary","type":"address"},{"internalType":"address","name":"_wrappedToken","type":"address"},{"internalType":"uint256","name":"_feePercentage","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"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":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"Received","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"factoryAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"feeAmount","type":"uint256"},{"indexed":true,"internalType":"address","name":"feeToken","type":"address"}],"name":"Swapped","type":"event"},{"inputs":[],"name":"aggregatorFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_routers","type":"address[]"}],"name":"blacklistRouters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeBeneficiary","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setAggregatorFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_beneficiary","type":"address"}],"name":"setFeeBeneficiary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IUniswapRouter[]","name":"router","type":"address[]"},{"internalType":"address[][]","name":"path","type":"address[][]"},{"internalType":"uint256[]","name":"amountIn","type":"uint256[]"},{"internalType":"uint256[]","name":"amountOutMin","type":"uint256[]"},{"internalType":"address","name":"dustRecipient","type":"address"},{"internalType":"contract IERC20","name":"inputToken","type":"address"},{"internalType":"uint256","name":"inputAmount","type":"uint256"},{"internalType":"contract IERC20","name":"outputToken","type":"address"}],"name":"swap","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_routers","type":"address[]"}],"name":"whitelistRouters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedRouters","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wrappedToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b5060405162001d3638038062001d368339810160408190526200003491620000cc565b6200003f336200007c565b60018055600580546001600160a01b039485166001600160a01b03199182161790915560038054939094169216919091179091556002556200012c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080600060608486031215620000e1578283fd5b8351620000ee8162000113565b6020850151909350620001018162000113565b80925050604084015190509250925092565b6001600160a01b03811681146200012957600080fd5b50565b611bfa806200013c6000396000f3fe6080604052600436106100ab5760003560e01c806392e49dfd1161006457806392e49dfd14610209578063996c6cc3146102295780639ed5b4dd14610249578063a5ff1dc71461026d578063ba960ae31461028d578063f2fde38b146102a057610112565b80630f874a1314610117578063355466c81461015c578063492fb3431461017e5780635a0a3d82146101b6578063715018a6146101d65780638da5cb5b146101eb57610112565b36610112576003546001600160a01b031633146100d857634e487b7160e01b600052600160045260246000fd5b604080513381523460208201527f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874910160405180910390a1005b600080fd5b34801561012357600080fd5b50610147610132366004611756565b60046020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b34801561016857600080fd5b5061017c6101773660046119a2565b6102c0565b005b34801561018a57600080fd5b5060055461019e906001600160a01b031681565b6040516001600160a01b039091168152602001610153565b3480156101c257600080fd5b5061017c6101d1366004611756565b61034e565b3480156101e257600080fd5b5061017c6103f0565b3480156101f757600080fd5b506000546001600160a01b031661019e565b34801561021557600080fd5b5061017c610224366004611772565b610426565b34801561023557600080fd5b5060035461019e906001600160a01b031681565b34801561025557600080fd5b5061025f60025481565b604051908152602001610153565b34801561027957600080fd5b5061017c610288366004611772565b6105fc565b61017c61029b3660046117b2565b6107ce565b3480156102ac57600080fd5b5061017c6102bb366004611756565b611180565b6000546001600160a01b031633146102f35760405162461bcd60e51b81526004016102ea90611a0b565b60405180910390fd5b60008111801561030457506103e881105b6103495760405162461bcd60e51b8152602060048201526016602482015275496e76616c6964206665652070657263656e7461676560501b60448201526064016102ea565b600255565b6000546001600160a01b031633146103785760405162461bcd60e51b81526004016102ea90611a0b565b6001600160a01b0381166103ce5760405162461bcd60e51b815260206004820181905260248201527f42656e65666963696172792063616e74206265207a65726f206164647265737360448201526064016102ea565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461041a5760405162461bcd60e51b81526004016102ea90611a0b565b610424600061121b565b565b6000546001600160a01b031633146104505760405162461bcd60e51b81526004016102ea90611a0b565b60005b818110156105f757600083838381811061047d57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906104929190611756565b6001600160a01b031614156104e05760405162461bcd60e51b81526020600482015260146024820152730526f757465722063616e6e6f74206265203078360641b60448201526064016102ea565b6004600084848481811061050457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105199190611756565b6001600160a01b0316815260208101919091526040016000205460ff166105825760405162461bcd60e51b815260206004820152601760248201527f526f75746572206e6f7420696e2077686974656c69737400000000000000000060448201526064016102ea565b6000600460008585858181106105a857634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105bd9190611756565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806105ef81611b68565b915050610453565b505050565b6000546001600160a01b031633146106265760405162461bcd60e51b81526004016102ea90611a0b565b60005b818110156105f757600083838381811061065357634e487b7160e01b600052603260045260246000fd5b90506020020160208101906106689190611756565b6001600160a01b031614156106b65760405162461bcd60e51b81526020600482015260146024820152730526f757465722063616e6e6f74206265203078360641b60448201526064016102ea565b600460008484848181106106da57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906106ef9190611756565b6001600160a01b0316815260208101919091526040016000205460ff16156107595760405162461bcd60e51b815260206004820152601a60248201527f526f7574657220616c72656164792077686974656c697374656400000000000060448201526064016102ea565b60016004600085858581811061077f57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906107949190611756565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806107c681611b68565b915050610629565b600260015414156108215760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102ea565b60026001558a8914801561083457508887145b801561083f57508487145b6108955760405162461bcd60e51b815260206004820152602160248201527f4576657279206172726179206c656e6774682073686f756c642062652073616d6044820152606560f81b60648201526084016102ea565b61089e8361126b565b15610ae4576000341180156108b257508134145b61090c5760405162461bcd60e51b815260206004820152602560248201527f6d73672e76616c75652073686f756c642062652067726561746572207468616e604482015264207a65726f60d81b60648201526084016102ea565b61092d6103e8610927600254346112a390919063ffffffff16565b906112b6565b6007556003546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561097457600080fd5b505afa158015610988573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ac91906119ba565b9050600360009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156109fe57600080fd5b505af1158015610a12573d6000803e3d6000fd5b50506003546040516370a0823160e01b8152306004820152600094506001600160a01b0390911692506370a08231915060240160206040518083038186803b158015610a5d57600080fd5b505afa158015610a71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9591906119ba565b905034610aa282846112c2565b14610abd57634e487b7160e01b600052600160045260246000fd5b600354600554600754610add926001600160a01b039081169216906112ce565b5050610ba9565b610aed8361126b565b610ba95760008211610b525760405162461bcd60e51b815260206004820152602860248201527f496e70757420616d6f756e742073686f756c642062652067726561746572207460448201526768616e207a65726f60c01b60648201526084016102ea565b610b6d6103e8610927600254856112a390919063ffffffff16565b6007819055610b8c90849033903090610b879087906112c2565b6113e9565b600554600754610ba991859133916001600160a01b0316906113e9565b600060068190555b87811015610c0a57600654610bf5908a8a84818110610be057634e487b7160e01b600052603260045260246000fd5b9050602002013561151990919063ffffffff16565b60065580610c0281611b68565b915050610bb1565b50600754610c199083906112c2565b6008819055600654600091610c2d916112c2565b90506064811115610c805760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420746f74616c20616d6f756e7420696e00000000000000000060448201526064016102ea565b60005b8c811015610f5157600460008f8f84818110610caf57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610cc49190611756565b6001600160a01b0316815260208101919091526040016000205460ff16610d2d5760405162461bcd60e51b815260206004820152601960248201527f526f75746572206973206e6f742077686974656c69737465640000000000000060448201526064016102ea565b610df78c8c83818110610d5057634e487b7160e01b600052603260045260246000fd5b9050602002810190610d629190611ab3565b6000818110610d8157634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610d969190611756565b8f8f84818110610db657634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610dcb9190611756565b8c8c85818110610deb57634e487b7160e01b600052603260045260246000fd5b90506020020135611525565b8d8d82818110610e1757634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610e2c9190611756565b6001600160a01b03166338ed17398b8b84818110610e5a57634e487b7160e01b600052603260045260246000fd5b905060200201358a8a85818110610e8157634e487b7160e01b600052603260045260246000fd5b905060200201358f8f86818110610ea857634e487b7160e01b600052603260045260246000fd5b9050602002810190610eba9190611ab3565b30610ec742610e10611afa565b6040518763ffffffff1660e01b8152600401610ee896959493929190611a40565b600060405180830381600087803b158015610f0257600080fd5b505af1158015610f16573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f3e91908101906118c3565b5080610f4981611b68565b915050610c83565b50610f5b8261126b565b15611052576003546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610fa457600080fd5b505afa158015610fb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fdc91906119ba565b9050801561104c57600354604051632e1a7d4d60e01b8152600481018390526001600160a01b0390911690632e1a7d4d90602401600060405180830381600087803b15801561102a57600080fd5b505af115801561103e573d6000803e3d6000fd5b5050505061104c8682611639565b506110e1565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a082319060240160206040518083038186803b15801561109457600080fd5b505afa1580156110a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cc91906119ba565b905080156110df576110df8387836112ce565b505b801561116d576110f08461126b565b1561116257600354604051632e1a7d4d60e01b8152600481018390526001600160a01b0390911690632e1a7d4d90602401600060405180830381600087803b15801561113b57600080fd5b505af115801561114f573d6000803e3d6000fd5b5050505061115d8582611639565b61116d565b61116d8486836112ce565b5050600180555050505050505050505050565b6000546001600160a01b031633146111aa5760405162461bcd60e51b81526004016102ea90611a0b565b6001600160a01b03811661120f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102ea565b6112188161121b565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0383161461129857600061129b565b60015b90505b919050565b60006112af8284611b32565b9392505050565b60006112af8284611b12565b60006112af8284611b51565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009283929087169161132a91906119d2565b6000604051808303816000865af19150503d8060008114611367576040519150601f19603f3d011682016040523d82523d6000602084013e61136c565b606091505b50915091508180156113965750805115806113965750808060200190518101906113969190611982565b6113e25760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c45440060448201526064016102ea565b5050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009283929088169161144d91906119d2565b6000604051808303816000865af19150503d806000811461148a576040519150601f19603f3d011682016040523d82523d6000602084013e61148f565b606091505b50915091508180156114b95750805115806114b95750808060200190518101906114b99190611982565b6115115760405162461bcd60e51b8152602060048201526024808201527f5472616e7366657248656c7065723a205452414e534645525f46524f4d5f46416044820152631253115160e21b60648201526084016102ea565b505050505050565b60006112af8284611afa565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b179052915160009283929087169161158191906119d2565b6000604051808303816000865af19150503d80600081146115be576040519150601f19603f3d011682016040523d82523d6000602084013e6115c3565b606091505b50915091508180156115ed5750805115806115ed5750808060200190518101906115ed9190611982565b6113e25760405162461bcd60e51b815260206004820152601e60248201527f5472616e7366657248656c7065723a20415050524f56455f4641494c4544000060448201526064016102ea565b604080516000808252602082019092526001600160a01b03841690839060405161166391906119d2565b60006040518083038185875af1925050503d80600081146116a0576040519150601f19603f3d011682016040523d82523d6000602084013e6116a5565b606091505b50509050806105f75760405162461bcd60e51b815260206004820152602360248201527f5472616e7366657248656c7065723a204554485f5452414e534645525f46414960448201526213115160ea1b60648201526084016102ea565b803561129e81611baf565b60008083601f84011261171e578081fd5b50813567ffffffffffffffff811115611735578182fd5b602083019150836020808302850101111561174f57600080fd5b9250929050565b600060208284031215611767578081fd5b81356112af81611baf565b60008060208385031215611784578081fd5b823567ffffffffffffffff81111561179a578182fd5b6117a68582860161170d565b90969095509350505050565b6000806000806000806000806000806000806101008d8f0312156117d4578788fd5b67ffffffffffffffff8d3511156117e9578788fd5b6117f68e8e358f0161170d565b909c509a5067ffffffffffffffff60208e01351115611813578788fd5b6118238e60208f01358f0161170d565b909a50985067ffffffffffffffff60408e01351115611840578788fd5b6118508e60408f01358f0161170d565b909850965067ffffffffffffffff60608e0135111561186d578586fd5b61187d8e60608f01358f0161170d565b909650945061188e60808e01611702565b935061189c60a08e01611702565b925060c08d013591506118b160e08e01611702565b90509295989b509295989b509295989b565b600060208083850312156118d5578182fd5b825167ffffffffffffffff808211156118ec578384fd5b818501915085601f8301126118ff578384fd5b81518181111561191157611911611b99565b838102604051601f19603f8301168101818110858211171561193557611935611b99565b604052828152858101935084860182860187018a1015611953578788fd5b8795505b83861015611975578051855260019590950194938601938601611957565b5098975050505050505050565b600060208284031215611993578081fd5b815180151581146112af578182fd5b6000602082840312156119b3578081fd5b5035919050565b6000602082840312156119cb578081fd5b5051919050565b60008251815b818110156119f257602081860181015185830152016119d8565b81811115611a005782828501525b509190910192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b868152602080820187905260a0604083018190528201859052600090869060c08401835b88811015611a92578335611a7781611baf565b6001600160a01b031682529282019290820190600101611a64565b506001600160a01b0396909616606085015250505060800152949350505050565b6000808335601e19843603018112611ac9578283fd5b83018035915067ffffffffffffffff821115611ae3578283fd5b602090810192508102360382131561174f57600080fd5b60008219821115611b0d57611b0d611b83565b500190565b600082611b2d57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611b4c57611b4c611b83565b500290565b600082821015611b6357611b63611b83565b500390565b6000600019821415611b7c57611b7c611b83565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461121857600080fdfea2646970667358221220ddeb3311abd61a4f5803a1fe0e4ebaa06bdabd4123dd6fc871b7ace6fa41665664736f6c63430008020033000000000000000000000000d09f58896c5734b87230c99d1d51d0d36a8bef5d0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf12700000000000000000000000000000000000000000000000000000000000000001

Deployed Bytecode

0x6080604052600436106100ab5760003560e01c806392e49dfd1161006457806392e49dfd14610209578063996c6cc3146102295780639ed5b4dd14610249578063a5ff1dc71461026d578063ba960ae31461028d578063f2fde38b146102a057610112565b80630f874a1314610117578063355466c81461015c578063492fb3431461017e5780635a0a3d82146101b6578063715018a6146101d65780638da5cb5b146101eb57610112565b36610112576003546001600160a01b031633146100d857634e487b7160e01b600052600160045260246000fd5b604080513381523460208201527f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874910160405180910390a1005b600080fd5b34801561012357600080fd5b50610147610132366004611756565b60046020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b34801561016857600080fd5b5061017c6101773660046119a2565b6102c0565b005b34801561018a57600080fd5b5060055461019e906001600160a01b031681565b6040516001600160a01b039091168152602001610153565b3480156101c257600080fd5b5061017c6101d1366004611756565b61034e565b3480156101e257600080fd5b5061017c6103f0565b3480156101f757600080fd5b506000546001600160a01b031661019e565b34801561021557600080fd5b5061017c610224366004611772565b610426565b34801561023557600080fd5b5060035461019e906001600160a01b031681565b34801561025557600080fd5b5061025f60025481565b604051908152602001610153565b34801561027957600080fd5b5061017c610288366004611772565b6105fc565b61017c61029b3660046117b2565b6107ce565b3480156102ac57600080fd5b5061017c6102bb366004611756565b611180565b6000546001600160a01b031633146102f35760405162461bcd60e51b81526004016102ea90611a0b565b60405180910390fd5b60008111801561030457506103e881105b6103495760405162461bcd60e51b8152602060048201526016602482015275496e76616c6964206665652070657263656e7461676560501b60448201526064016102ea565b600255565b6000546001600160a01b031633146103785760405162461bcd60e51b81526004016102ea90611a0b565b6001600160a01b0381166103ce5760405162461bcd60e51b815260206004820181905260248201527f42656e65666963696172792063616e74206265207a65726f206164647265737360448201526064016102ea565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461041a5760405162461bcd60e51b81526004016102ea90611a0b565b610424600061121b565b565b6000546001600160a01b031633146104505760405162461bcd60e51b81526004016102ea90611a0b565b60005b818110156105f757600083838381811061047d57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906104929190611756565b6001600160a01b031614156104e05760405162461bcd60e51b81526020600482015260146024820152730526f757465722063616e6e6f74206265203078360641b60448201526064016102ea565b6004600084848481811061050457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105199190611756565b6001600160a01b0316815260208101919091526040016000205460ff166105825760405162461bcd60e51b815260206004820152601760248201527f526f75746572206e6f7420696e2077686974656c69737400000000000000000060448201526064016102ea565b6000600460008585858181106105a857634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105bd9190611756565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806105ef81611b68565b915050610453565b505050565b6000546001600160a01b031633146106265760405162461bcd60e51b81526004016102ea90611a0b565b60005b818110156105f757600083838381811061065357634e487b7160e01b600052603260045260246000fd5b90506020020160208101906106689190611756565b6001600160a01b031614156106b65760405162461bcd60e51b81526020600482015260146024820152730526f757465722063616e6e6f74206265203078360641b60448201526064016102ea565b600460008484848181106106da57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906106ef9190611756565b6001600160a01b0316815260208101919091526040016000205460ff16156107595760405162461bcd60e51b815260206004820152601a60248201527f526f7574657220616c72656164792077686974656c697374656400000000000060448201526064016102ea565b60016004600085858581811061077f57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906107949190611756565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806107c681611b68565b915050610629565b600260015414156108215760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102ea565b60026001558a8914801561083457508887145b801561083f57508487145b6108955760405162461bcd60e51b815260206004820152602160248201527f4576657279206172726179206c656e6774682073686f756c642062652073616d6044820152606560f81b60648201526084016102ea565b61089e8361126b565b15610ae4576000341180156108b257508134145b61090c5760405162461bcd60e51b815260206004820152602560248201527f6d73672e76616c75652073686f756c642062652067726561746572207468616e604482015264207a65726f60d81b60648201526084016102ea565b61092d6103e8610927600254346112a390919063ffffffff16565b906112b6565b6007556003546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561097457600080fd5b505afa158015610988573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ac91906119ba565b9050600360009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156109fe57600080fd5b505af1158015610a12573d6000803e3d6000fd5b50506003546040516370a0823160e01b8152306004820152600094506001600160a01b0390911692506370a08231915060240160206040518083038186803b158015610a5d57600080fd5b505afa158015610a71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9591906119ba565b905034610aa282846112c2565b14610abd57634e487b7160e01b600052600160045260246000fd5b600354600554600754610add926001600160a01b039081169216906112ce565b5050610ba9565b610aed8361126b565b610ba95760008211610b525760405162461bcd60e51b815260206004820152602860248201527f496e70757420616d6f756e742073686f756c642062652067726561746572207460448201526768616e207a65726f60c01b60648201526084016102ea565b610b6d6103e8610927600254856112a390919063ffffffff16565b6007819055610b8c90849033903090610b879087906112c2565b6113e9565b600554600754610ba991859133916001600160a01b0316906113e9565b600060068190555b87811015610c0a57600654610bf5908a8a84818110610be057634e487b7160e01b600052603260045260246000fd5b9050602002013561151990919063ffffffff16565b60065580610c0281611b68565b915050610bb1565b50600754610c199083906112c2565b6008819055600654600091610c2d916112c2565b90506064811115610c805760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420746f74616c20616d6f756e7420696e00000000000000000060448201526064016102ea565b60005b8c811015610f5157600460008f8f84818110610caf57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610cc49190611756565b6001600160a01b0316815260208101919091526040016000205460ff16610d2d5760405162461bcd60e51b815260206004820152601960248201527f526f75746572206973206e6f742077686974656c69737465640000000000000060448201526064016102ea565b610df78c8c83818110610d5057634e487b7160e01b600052603260045260246000fd5b9050602002810190610d629190611ab3565b6000818110610d8157634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610d969190611756565b8f8f84818110610db657634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610dcb9190611756565b8c8c85818110610deb57634e487b7160e01b600052603260045260246000fd5b90506020020135611525565b8d8d82818110610e1757634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610e2c9190611756565b6001600160a01b03166338ed17398b8b84818110610e5a57634e487b7160e01b600052603260045260246000fd5b905060200201358a8a85818110610e8157634e487b7160e01b600052603260045260246000fd5b905060200201358f8f86818110610ea857634e487b7160e01b600052603260045260246000fd5b9050602002810190610eba9190611ab3565b30610ec742610e10611afa565b6040518763ffffffff1660e01b8152600401610ee896959493929190611a40565b600060405180830381600087803b158015610f0257600080fd5b505af1158015610f16573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f3e91908101906118c3565b5080610f4981611b68565b915050610c83565b50610f5b8261126b565b15611052576003546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610fa457600080fd5b505afa158015610fb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fdc91906119ba565b9050801561104c57600354604051632e1a7d4d60e01b8152600481018390526001600160a01b0390911690632e1a7d4d90602401600060405180830381600087803b15801561102a57600080fd5b505af115801561103e573d6000803e3d6000fd5b5050505061104c8682611639565b506110e1565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a082319060240160206040518083038186803b15801561109457600080fd5b505afa1580156110a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cc91906119ba565b905080156110df576110df8387836112ce565b505b801561116d576110f08461126b565b1561116257600354604051632e1a7d4d60e01b8152600481018390526001600160a01b0390911690632e1a7d4d90602401600060405180830381600087803b15801561113b57600080fd5b505af115801561114f573d6000803e3d6000fd5b5050505061115d8582611639565b61116d565b61116d8486836112ce565b5050600180555050505050505050505050565b6000546001600160a01b031633146111aa5760405162461bcd60e51b81526004016102ea90611a0b565b6001600160a01b03811661120f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102ea565b6112188161121b565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0383161461129857600061129b565b60015b90505b919050565b60006112af8284611b32565b9392505050565b60006112af8284611b12565b60006112af8284611b51565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009283929087169161132a91906119d2565b6000604051808303816000865af19150503d8060008114611367576040519150601f19603f3d011682016040523d82523d6000602084013e61136c565b606091505b50915091508180156113965750805115806113965750808060200190518101906113969190611982565b6113e25760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c45440060448201526064016102ea565b5050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009283929088169161144d91906119d2565b6000604051808303816000865af19150503d806000811461148a576040519150601f19603f3d011682016040523d82523d6000602084013e61148f565b606091505b50915091508180156114b95750805115806114b95750808060200190518101906114b99190611982565b6115115760405162461bcd60e51b8152602060048201526024808201527f5472616e7366657248656c7065723a205452414e534645525f46524f4d5f46416044820152631253115160e21b60648201526084016102ea565b505050505050565b60006112af8284611afa565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b179052915160009283929087169161158191906119d2565b6000604051808303816000865af19150503d80600081146115be576040519150601f19603f3d011682016040523d82523d6000602084013e6115c3565b606091505b50915091508180156115ed5750805115806115ed5750808060200190518101906115ed9190611982565b6113e25760405162461bcd60e51b815260206004820152601e60248201527f5472616e7366657248656c7065723a20415050524f56455f4641494c4544000060448201526064016102ea565b604080516000808252602082019092526001600160a01b03841690839060405161166391906119d2565b60006040518083038185875af1925050503d80600081146116a0576040519150601f19603f3d011682016040523d82523d6000602084013e6116a5565b606091505b50509050806105f75760405162461bcd60e51b815260206004820152602360248201527f5472616e7366657248656c7065723a204554485f5452414e534645525f46414960448201526213115160ea1b60648201526084016102ea565b803561129e81611baf565b60008083601f84011261171e578081fd5b50813567ffffffffffffffff811115611735578182fd5b602083019150836020808302850101111561174f57600080fd5b9250929050565b600060208284031215611767578081fd5b81356112af81611baf565b60008060208385031215611784578081fd5b823567ffffffffffffffff81111561179a578182fd5b6117a68582860161170d565b90969095509350505050565b6000806000806000806000806000806000806101008d8f0312156117d4578788fd5b67ffffffffffffffff8d3511156117e9578788fd5b6117f68e8e358f0161170d565b909c509a5067ffffffffffffffff60208e01351115611813578788fd5b6118238e60208f01358f0161170d565b909a50985067ffffffffffffffff60408e01351115611840578788fd5b6118508e60408f01358f0161170d565b909850965067ffffffffffffffff60608e0135111561186d578586fd5b61187d8e60608f01358f0161170d565b909650945061188e60808e01611702565b935061189c60a08e01611702565b925060c08d013591506118b160e08e01611702565b90509295989b509295989b509295989b565b600060208083850312156118d5578182fd5b825167ffffffffffffffff808211156118ec578384fd5b818501915085601f8301126118ff578384fd5b81518181111561191157611911611b99565b838102604051601f19603f8301168101818110858211171561193557611935611b99565b604052828152858101935084860182860187018a1015611953578788fd5b8795505b83861015611975578051855260019590950194938601938601611957565b5098975050505050505050565b600060208284031215611993578081fd5b815180151581146112af578182fd5b6000602082840312156119b3578081fd5b5035919050565b6000602082840312156119cb578081fd5b5051919050565b60008251815b818110156119f257602081860181015185830152016119d8565b81811115611a005782828501525b509190910192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b868152602080820187905260a0604083018190528201859052600090869060c08401835b88811015611a92578335611a7781611baf565b6001600160a01b031682529282019290820190600101611a64565b506001600160a01b0396909616606085015250505060800152949350505050565b6000808335601e19843603018112611ac9578283fd5b83018035915067ffffffffffffffff821115611ae3578283fd5b602090810192508102360382131561174f57600080fd5b60008219821115611b0d57611b0d611b83565b500190565b600082611b2d57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611b4c57611b4c611b83565b500290565b600082821015611b6357611b63611b83565b500390565b6000600019821415611b7c57611b7c611b83565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461121857600080fdfea2646970667358221220ddeb3311abd61a4f5803a1fe0e4ebaa06bdabd4123dd6fc871b7ace6fa41665664736f6c63430008020033

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

000000000000000000000000d09f58896c5734b87230c99d1d51d0d36a8bef5d0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf12700000000000000000000000000000000000000000000000000000000000000001

-----Decoded View---------------
Arg [0] : _beneficiary (address): 0xD09f58896C5734B87230C99d1d51d0D36a8bEF5D
Arg [1] : _wrappedToken (address): 0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270
Arg [2] : _feePercentage (uint256): 1

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000d09f58896c5734b87230c99d1d51d0d36a8bef5d
Arg [1] : 0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf1270
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000001


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  ]
[ 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.