ETH Price: $2,152.08 (+4.35%)

Contract

0xe38e54B2d6B1FCdfaAe8B674bF36ca62429fdBDe
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Add Dapp Address162805282022-12-28 3:20:591181 days ago1672197659IN
0xe38e54B2...2429fdBDe
0 ETH0.0007251215.67534944

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
Exact Input Sing...197368642024-04-26 3:30:11696 days ago1714102211
0xe38e54B2...2429fdBDe
0.99371069 ETH
Execute197368642024-04-26 3:30:11696 days ago1714102211
0xe38e54B2...2429fdBDe
0.99371069 ETH
Exact Input Sing...197180372024-04-23 12:16:35699 days ago1713874595
0xe38e54B2...2429fdBDe
0.49198955 ETH
Execute197180372024-04-23 12:16:35699 days ago1713874595
0xe38e54B2...2429fdBDe
0.49198955 ETH
Transfer196510262024-04-14 3:14:11708 days ago1713064451
0xe38e54B2...2429fdBDe
12.58891882 ETH
Transfer196510262024-04-14 3:14:11708 days ago1713064451
0xe38e54B2...2429fdBDe
12.58891882 ETH
Exact Input Sing...196471812024-04-13 14:15:35709 days ago1713017735
0xe38e54B2...2429fdBDe
1.225 ETH
Execute196471812024-04-13 14:15:35709 days ago1713017735
0xe38e54B2...2429fdBDe
1.225 ETH
Exact Input Sing...196403632024-04-12 15:16:23710 days ago1712934983
0xe38e54B2...2429fdBDe
0.3 ETH
Execute196403632024-04-12 15:16:23710 days ago1712934983
0xe38e54B2...2429fdBDe
0.3 ETH
Exact Input Sing...196211792024-04-09 22:52:11712 days ago1712703131
0xe38e54B2...2429fdBDe
0.645 ETH
Execute196211792024-04-09 22:52:11712 days ago1712703131
0xe38e54B2...2429fdBDe
0.645 ETH
Transfer195876332024-04-05 6:03:23717 days ago1712297003
0xe38e54B2...2429fdBDe
0.4884797 ETH
Transfer195876332024-04-05 6:03:23717 days ago1712297003
0xe38e54B2...2429fdBDe
0.4884797 ETH
Transfer195876172024-04-05 5:59:59717 days ago1712296799
0xe38e54B2...2429fdBDe
4.30929584 ETH
Transfer195876172024-04-05 5:59:59717 days ago1712296799
0xe38e54B2...2429fdBDe
4.30929584 ETH
Exact Input Sing...195817402024-04-04 10:14:47718 days ago1712225687
0xe38e54B2...2429fdBDe
3 ETH
Execute195817402024-04-04 10:14:47718 days ago1712225687
0xe38e54B2...2429fdBDe
3 ETH
Exact Input195483212024-03-30 17:43:23723 days ago1711820603
0xe38e54B2...2429fdBDe
23.4 ETH
Execute195483212024-03-30 17:43:23723 days ago1711820603
0xe38e54B2...2429fdBDe
23.4 ETH
Exact Input Sing...195391072024-03-29 10:36:23724 days ago1711708583
0xe38e54B2...2429fdBDe
3.06293255 ETH
Execute195391072024-03-29 10:36:23724 days ago1711708583
0xe38e54B2...2429fdBDe
3.06293255 ETH
Exact Input Sing...195379212024-03-29 6:37:23724 days ago1711694243
0xe38e54B2...2429fdBDe
1 ETH
Execute195379212024-03-29 6:37:23724 days ago1711694243
0xe38e54B2...2429fdBDe
1 ETH
Transfer195325532024-03-28 12:16:47725 days ago1711628207
0xe38e54B2...2429fdBDe
1.95423374 ETH
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
UniswapProxy

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity =0.7.6;
pragma abicoder v2;
import "../IERC20.sol";
import "@uniswap/v3-periphery/contracts/libraries/Path.sol";
import "../trade_utils.sol";

interface ISwapRouter2 {
	/// @notice Call multiple functions in the current contract and return the data from all of them if they all succeed
	/// @dev The `msg.value` should not be trusted for any method callable from multicall.
	/// @param deadline The time by which this function must be called before failing
	/// @param data The encoded function data for each of the calls to make to this contract
	/// @return results The results from each of the calls passed in via data
	function multicall(uint256 deadline, bytes[] calldata data) external payable returns (bytes[] memory results);

	/// @notice Call multiple functions in the current contract and return the data from all of them if they all succeed
	/// @dev The `msg.value` should not be trusted for any method callable from multicall.
	/// @param previousBlockhash The expected parent blockHash
	/// @param data The encoded function data for each of the calls to make to this contract
	/// @return results The results from each of the calls passed in via data
	// function multicall(bytes32 previousBlockhash, bytes[] calldata data)
	// external
	// payable
	// returns (bytes[] memory results);
	struct ExactInputSingleParams {
		address tokenIn;
		address tokenOut;
		uint24 fee;
		address recipient;
		uint256 amountIn;
		uint256 amountOutMinimum;
		uint160 sqrtPriceLimitX96;
	}

	/// @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 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);
	function WETH9() external returns(address);
}

interface Wmatic is IERC20 {
	function withdraw(uint256 amount) external;
}

contract UniswapProxy is Executor {
	using Path for bytes;
	// Variables
	address constant public ETH_CONTRACT_ADDRESS = 0x0000000000000000000000000000000000000000;
	uint constant public MAX = uint(-1);
	ISwapRouter2 public swaprouter02;
	Wmatic public wmatic;

	struct CallSummary {
		address to;
		address token;
		uint256 amount;
		bytes data;
	}

	/**
     * @dev Contract constructor
     * @param _swaproute02 uniswap routes contract address
     */
	constructor(ISwapRouter2 _swaproute02) payable {
		swaprouter02 = _swaproute02;
		wmatic = Wmatic(swaprouter02.WETH9());
	}

	function tradeInputSingle(ISwapRouter2.ExactInputSingleParams calldata params, bool isNative) external payable returns(address, uint) {
		checkApproved(IERC20(params.tokenIn), params.amountIn);
		uint amountOut = swaprouter02.exactInputSingle{value: msg.value}(params);
		require(amountOut >= params.amountOutMinimum, "lower than expected output");
		address returnToken = withdrawMatic(params.tokenOut, amountOut, isNative);
		return (returnToken, amountOut);
	}

	function tradeInput(ISwapRouter2.ExactInputParams calldata params, bool isNative) external payable returns(address, uint) {
		(address tokenIn,,) = params.path.decodeFirstPool();
		checkApproved(IERC20(tokenIn), params.amountIn);
		uint amountOut = swaprouter02.exactInput{value: msg.value}(params);
		bytes memory tempPath = params.path;
		address returnToken;
		while (true) {
			bool hasMultiplePools = tempPath.hasMultiplePools();
			// decide whether to continue or terminate
			if (hasMultiplePools) {
				tempPath = tempPath.skipToken();
			} else {
				(,returnToken,) = tempPath.decodeFirstPool();
				break;
			}
		}
		returnToken = withdrawMatic(returnToken, amountOut, isNative);
		return (returnToken, amountOut);
	}

	function multiTrades(uint256 deadline, bytes[] calldata data, IERC20 sellToken, address buyToken, uint256 sellAmount, bool isNative) external payable returns(address, uint) {
		checkApproved(sellToken, sellAmount);
		uint256 amountOut;
		bytes[] memory results = swaprouter02.multicall{value: msg.value}(deadline, data);
		for (uint i = 0; i < results.length; i++) {
			amountOut += abi.decode(results[i], (uint256));
		}
		address returnToken = withdrawMatic(buyToken, amountOut, isNative);

		return (returnToken, amountOut);
	}

	function _inspectTradeInputSingle(ISwapRouter2.ExactInputSingleParams calldata params, bool isNative) external view returns (bytes memory, CallSummary memory) {
		bytes memory rdata = abi.encodeWithSelector(0x421f4388, params, isNative);
		CallSummary memory cs = CallSummary(address(swaprouter02), params.tokenIn, params.amountIn,
			abi.encodeWithSelector(0x04e45aaf, params)
		);
		return (rdata, cs);
	}

	function _inspectTradeInput(ISwapRouter2.ExactInputParams calldata params, bool isNative) external view returns(bytes memory, CallSummary memory) {
		(address tokenIn,,) = params.path.decodeFirstPool();
		bytes memory rdata = abi.encodeWithSelector(0xc8dc75e6, params, isNative);
		CallSummary memory cs = CallSummary(address(swaprouter02), tokenIn, params.amountIn,
			abi.encodeWithSelector(0xb858183f, params)
		);
		return (rdata, cs);
	}

	function _inspectMultiTrades(uint256 deadline, bytes[] calldata data, IERC20 sellToken, address buyToken, uint256 sellAmount, bool isNative) external view returns (bytes memory, CallSummary memory) {
		bytes memory rdata = abi.encodeWithSelector(0x92171fd8, block.timestamp + 1000000000, data, sellToken, buyToken, sellAmount, isNative);
		CallSummary memory cs = CallSummary(address(swaprouter02), address(sellToken), sellAmount,
			abi.encodeWithSelector(0x5ae401dc, block.timestamp + 1000000000, data)
		);
		return (rdata, cs);
	}

	function checkApproved(IERC20 srcToken, uint256 amount) internal {
		if (msg.value == 0 && srcToken.allowance(address(this), address(swaprouter02)) < amount) {
			srcToken.approve(address(swaprouter02), MAX);
		}
	}

	function withdrawMatic(address tokenOut, uint256 amountOut, bool isNative) internal returns(address returnToken) {
		if (tokenOut == address(wmatic) && isNative) {
			// convert wmatic to matic
			// recipient in params must be this contract
			wmatic.withdraw(amountOut);
			returnToken = ETH_CONTRACT_ADDRESS;
			transfer(returnToken, amountOut);
		} else {
			returnToken = tokenOut;
		}
	}

	function transfer(address token, uint amount) internal {
		if (token == ETH_CONTRACT_ADDRESS) {
			require(address(this).balance >= amount, "IUP: transfer amount exceeds balance");
			(bool success, ) = msg.sender.call{value: amount}("");
			require(success, "IUP: transfer failed");
		} else {
			IERC20(token).transfer(msg.sender, amount);
			require(checkSuccess(), "IUP: transfer token failed");
		}
	}

	/**
     * @dev Check if transfer() and transferFrom() of ERC20 succeeded or not
     * This check is needed to fix https://github.com/ethereum/solidity/issues/4116
     * This function is copied from https://github.com/AdExNetwork/adex-protocol-eth/blob/master/contracts/libs/SafeERC20.sol
     */
	function checkSuccess() internal pure returns (bool) {
		uint256 returnValue = 0;

		assembly {
		// check number of bytes returned from last function call
			switch returndatasize()

			// no bytes returned: assume success
			case 0x0 {
				returnValue := 1
			}

			// 32 bytes returned: check if non-zero
			case 0x20 {
			// copy 32 bytes into scratch space
				returndatacopy(0x0, 0x0, 0x20)

			// load those bytes into returnValue
				returnValue := mload(0x0)
			}

			// not sure what was returned: don't mark as success
			default { }
		}
		return returnValue != 0;
	}

	/**
     * @dev Payable receive function to receive Ether from oldVault when migrating
     */
	receive() external payable {}
}

// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see `ERC20Detailed`.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint);

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

    /**
     * @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, uint amount) external;

    /**
     * @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.
     *
     * > 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, uint amount) external;

    /**
     * @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, uint amount) external;

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() external view returns (uint);

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

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.0;

import './BytesLib.sol';

/// @title Functions for manipulating path data for multihop swaps
library Path {
    using BytesLib for bytes;

    /// @dev The length of the bytes encoded address
    uint256 private constant ADDR_SIZE = 20;
    /// @dev The length of the bytes encoded fee
    uint256 private constant FEE_SIZE = 3;

    /// @dev The offset of a single token address and pool fee
    uint256 private constant NEXT_OFFSET = ADDR_SIZE + FEE_SIZE;
    /// @dev The offset of an encoded pool key
    uint256 private constant POP_OFFSET = NEXT_OFFSET + ADDR_SIZE;
    /// @dev The minimum length of an encoding that contains 2 or more pools
    uint256 private constant MULTIPLE_POOLS_MIN_LENGTH = POP_OFFSET + NEXT_OFFSET;

    /// @notice Returns true iff the path contains two or more pools
    /// @param path The encoded swap path
    /// @return True if path contains two or more pools, otherwise false
    function hasMultiplePools(bytes memory path) internal pure returns (bool) {
        return path.length >= MULTIPLE_POOLS_MIN_LENGTH;
    }

    /// @notice Returns the number of pools in the path
    /// @param path The encoded swap path
    /// @return The number of pools in the path
    function numPools(bytes memory path) internal pure returns (uint256) {
        // Ignore the first token address. From then on every fee and token offset indicates a pool.
        return ((path.length - ADDR_SIZE) / NEXT_OFFSET);
    }

    /// @notice Decodes the first pool in path
    /// @param path The bytes encoded swap path
    /// @return tokenA The first token of the given pool
    /// @return tokenB The second token of the given pool
    /// @return fee The fee level of the pool
    function decodeFirstPool(bytes memory path)
        internal
        pure
        returns (
            address tokenA,
            address tokenB,
            uint24 fee
        )
    {
        tokenA = path.toAddress(0);
        fee = path.toUint24(ADDR_SIZE);
        tokenB = path.toAddress(NEXT_OFFSET);
    }

    /// @notice Gets the segment corresponding to the first pool in the path
    /// @param path The bytes encoded swap path
    /// @return The segment containing all data necessary to target the first pool in the path
    function getFirstPool(bytes memory path) internal pure returns (bytes memory) {
        return path.slice(0, POP_OFFSET);
    }

    /// @notice Skips a token + fee element from the buffer and returns the remainder
    /// @param path The swap path
    /// @return The remaining token + fee elements in the path
    function skipToken(bytes memory path) internal pure returns (bytes memory) {
        return path.slice(NEXT_OFFSET, path.length - NEXT_OFFSET);
    }
}

pragma solidity >=0.6.12 <=0.8.9;

import './IERC20.sol';
import '@openzeppelin/contracts/access/Ownable.sol';

contract TradeUtils {
	IERC20 constant public ETH_CONTRACT_ADDRESS = IERC20(0x0000000000000000000000000000000000000000);

	function balanceOf(IERC20 token) internal view returns (uint256) {
		if (token == ETH_CONTRACT_ADDRESS) {
			return address(this).balance;
		}
        return token.balanceOf(address(this));
    }

	function transfer(IERC20 token, uint amount) internal {
		if (token == ETH_CONTRACT_ADDRESS) {
			require(address(this).balance >= amount);
			(bool success, ) = msg.sender.call{value: amount}("");
          	require(success);
		} else {
			token.transfer(msg.sender, amount);
			require(checkSuccess());
		}
	}

	function approve(IERC20 token, address proxy, uint amount) internal {
		if (token != ETH_CONTRACT_ADDRESS) {
			token.approve(proxy, 0);
			require(checkSuccess());
			token.approve(proxy, amount);
			require(checkSuccess());
		}
	}

	/**
     * @dev Check if transfer() and transferFrom() of ERC20 succeeded or not
     * This check is needed to fix https://github.com/ethereum/solidity/issues/4116
     * This function is copied from https://github.com/AdExNetwork/adex-protocol-eth/blob/master/contracts/libs/SafeERC20.sol
     */
    function checkSuccess() internal pure returns (bool) {
		uint256 returnValue = 0;

		assembly {
			// check number of bytes returned from last function call
			switch returndatasize()

			// no bytes returned: assume success
			case 0x0 {
				returnValue := 1
			}

			// 32 bytes returned: check if non-zero
			case 0x20 {
				// copy 32 bytes into scratch space
				returndatacopy(0x0, 0x0, 0x20)

				// load those bytes into returnValue
				returnValue := mload(0x0)
			}

			// not sure what was returned: don't mark as success
			default { }
		}
		return returnValue != 0;
	}
}

abstract contract Executor is Ownable {
	mapping (address => bool) public dappAddresses;

	constructor() internal {
		dappAddresses[address(this)] = true;
	}

	function addDappAddress(address addr) external onlyOwner {
		require(addr != address(0x0), "Executor:A0"); // address is zero
		dappAddresses[addr] = true;
	}

	function removeDappAddress(address addr) external onlyOwner {
		require(addr != address(0x0), "Executor:A0"); // address is zero
		dappAddresses[addr] = false;
	}

	function dappExists(address addr) public view returns (bool) {
		return dappAddresses[addr];
	}

    function execute(address fns, bytes calldata data) external payable returns (bytes memory) {
    	require(dappExists(fns), "Executor:DNE"); // dapp does not exist
        (bool success, bytes memory result) = fns.delegatecall(data);
        if (!success) {
        	// Next 5 lines from https://ethereum.stackexchange.com/a/83577
            if (result.length < 68) revert();
            assembly {
                result := add(result, 0x04)
            }
            revert(abi.decode(result, (string)));
        }
        return result;
    }
}

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * @title Solidity Bytes Arrays Utils
 * @author Gonçalo Sá <goncalo.sa@consensys.net>
 *
 * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.
 *      The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.
 */
pragma solidity >=0.5.0 <0.8.0;

library BytesLib {
    function slice(
        bytes memory _bytes,
        uint256 _start,
        uint256 _length
    ) internal pure returns (bytes memory) {
        require(_length + 31 >= _length, 'slice_overflow');
        require(_start + _length >= _start, 'slice_overflow');
        require(_bytes.length >= _start + _length, 'slice_outOfBounds');

        bytes memory tempBytes;

        assembly {
            switch iszero(_length)
                case 0 {
                    // Get a location of some free memory and store it in tempBytes as
                    // Solidity does for memory variables.
                    tempBytes := mload(0x40)

                    // The first word of the slice result is potentially a partial
                    // word read from the original array. To read it, we calculate
                    // the length of that partial word and start copying that many
                    // bytes into the array. The first word we copy will start with
                    // data we don't care about, but the last `lengthmod` bytes will
                    // land at the beginning of the contents of the new array. When
                    // we're done copying, we overwrite the full first word with
                    // the actual length of the slice.
                    let lengthmod := and(_length, 31)

                    // The multiplication in the next line is necessary
                    // because when slicing multiples of 32 bytes (lengthmod == 0)
                    // the following copy loop was copying the origin's length
                    // and then ending prematurely not copying everything it should.
                    let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))
                    let end := add(mc, _length)

                    for {
                        // The multiplication in the next line has the same exact purpose
                        // as the one above.
                        let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)
                    } lt(mc, end) {
                        mc := add(mc, 0x20)
                        cc := add(cc, 0x20)
                    } {
                        mstore(mc, mload(cc))
                    }

                    mstore(tempBytes, _length)

                    //update free-memory pointer
                    //allocating the array padded to 32 bytes like the compiler does now
                    mstore(0x40, and(add(mc, 31), not(31)))
                }
                //if we want a zero-length slice let's just return a zero-length array
                default {
                    tempBytes := mload(0x40)
                    //zero out the 32 bytes slice we are about to return
                    //we need to do it because Solidity does not garbage collect
                    mstore(tempBytes, 0)

                    mstore(0x40, add(tempBytes, 0x20))
                }
        }

        return tempBytes;
    }

    function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) {
        require(_start + 20 >= _start, 'toAddress_overflow');
        require(_bytes.length >= _start + 20, 'toAddress_outOfBounds');
        address tempAddress;

        assembly {
            tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)
        }

        return tempAddress;
    }

    function toUint24(bytes memory _bytes, uint256 _start) internal pure returns (uint24) {
        require(_start + 3 >= _start, 'toUint24_overflow');
        require(_bytes.length >= _start + 3, 'toUint24_outOfBounds');
        uint24 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x3), _start))
        }

        return tempUint;
    }
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), 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 {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 GSN 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 payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract ISwapRouter2","name":"_swaproute02","type":"address"}],"stateMutability":"payable","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"},{"inputs":[],"name":"ETH_CONTRACT_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes[]","name":"data","type":"bytes[]"},{"internalType":"contract IERC20","name":"sellToken","type":"address"},{"internalType":"address","name":"buyToken","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"bool","name":"isNative","type":"bool"}],"name":"_inspectMultiTrades","outputs":[{"internalType":"bytes","name":"","type":"bytes"},{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct UniswapProxy.CallSummary","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes","name":"path","type":"bytes"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMinimum","type":"uint256"}],"internalType":"struct ISwapRouter2.ExactInputParams","name":"params","type":"tuple"},{"internalType":"bool","name":"isNative","type":"bool"}],"name":"_inspectTradeInput","outputs":[{"internalType":"bytes","name":"","type":"bytes"},{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct UniswapProxy.CallSummary","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMinimum","type":"uint256"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"internalType":"struct ISwapRouter2.ExactInputSingleParams","name":"params","type":"tuple"},{"internalType":"bool","name":"isNative","type":"bool"}],"name":"_inspectTradeInputSingle","outputs":[{"internalType":"bytes","name":"","type":"bytes"},{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct UniswapProxy.CallSummary","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"addDappAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"dappAddresses","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"dappExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"fns","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"execute","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes[]","name":"data","type":"bytes[]"},{"internalType":"contract IERC20","name":"sellToken","type":"address"},{"internalType":"address","name":"buyToken","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"bool","name":"isNative","type":"bool"}],"name":"multiTrades","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"removeDappAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swaprouter02","outputs":[{"internalType":"contract ISwapRouter2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes","name":"path","type":"bytes"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMinimum","type":"uint256"}],"internalType":"struct ISwapRouter2.ExactInputParams","name":"params","type":"tuple"},{"internalType":"bool","name":"isNative","type":"bool"}],"name":"tradeInput","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMinimum","type":"uint256"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"internalType":"struct ISwapRouter2.ExactInputSingleParams","name":"params","type":"tuple"},{"internalType":"bool","name":"isNative","type":"bool"}],"name":"tradeInputSingle","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wmatic","outputs":[{"internalType":"contract Wmatic","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040526040516200218a3803806200218a833981016040819052620000269162000158565b60006200003262000154565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350306000908152600160208181526040808420805460ff1916909317909255600280546001600160a01b0319166001600160a01b03868116919091179182905583516312a9293f60e21b81529351911693634aa4a4fc936004808201949392918390030190829087803b158015620000f257600080fd5b505af115801562000107573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200012d919062000158565b600380546001600160a01b0319166001600160a01b03929092169190911790555062000197565b3390565b6000602082840312156200016a578081fd5b815162000177816200017e565b9392505050565b6001600160a01b03811681146200019457600080fd5b50565b611fe380620001a76000396000f3fe60806040526004361061012d5760003560e01c80638da5cb5b116100a5578063c8dc75e611610074578063d6edf5f011610059578063d6edf5f014610309578063f2fde38b14610329578063fb41be161461034957610134565b8063c8dc75e6146102d4578063d49d5181146102e757610134565b80638da5cb5b1461026c57806392171fd814610281578063a2de021214610294578063bbf6f5a7146102b457610134565b80636da41924116100fc57806372e94bf6116100e157806372e94bf61461020a578063772be2371461021f578063787ca4381461023f57610134565b80636da41924146101d3578063715018a6146101f557610134565b8063017e1619146101395780631cff79cd14610170578063421f4388146101905780636b150c3c146101b157610134565b3661013457005b600080fd5b34801561014557600080fd5b5061015961015436600461193b565b61035e565b604051610167929190611c52565b60405180910390f35b61018361017e366004611787565b610447565b6040516101679190611c3f565b6101a361019e36600461193b565b610678565b604051610167929190611c1b565b3480156101bd57600080fd5b506101c661078a565b6040516101679190611bed565b3480156101df57600080fd5b506101f36101ee36600461176b565b610799565b005b34801561020157600080fd5b506101f361087d565b34801561021657600080fd5b506101c6610948565b34801561022b57600080fd5b5061015961023a366004611984565b61094d565b34801561024b57600080fd5b5061025f61025a36600461176b565b610a56565b6040516101679190611c34565b34801561027857600080fd5b506101c6610a6b565b6101a361028f366004611984565b610a7a565b3480156102a057600080fd5b5061025f6102af36600461176b565b610b92565b3480156102c057600080fd5b506101596102cf3660046118eb565b610bb4565b6101a36102e23660046118eb565b610cf0565b3480156102f357600080fd5b506102fc610e4c565b6040516101679190611e1a565b34801561031557600080fd5b506101f361032436600461176b565b610e52565b34801561033557600080fd5b506101f361034436600461176b565b610f30565b34801561035557600080fd5b506101c6611051565b606061036861172a565b600063421f43888585604051602401610382929190611dfc565b60408051601f19818403018152918152602080830180516001600160e01b031660e09590951b949094179093528051608081019091526002546001600160a01b03168152909250600091818101906103dc9089018961176b565b6001600160a01b03168152602001876080013581526020016304e45aaf8860405160240161040a9190611dee565b60408051601f198184030181529190526020810180516001600160e01b031660e09390931b929092179091529052919350909150505b9250929050565b606061045284610b92565b6104a3576040805162461bcd60e51b815260206004820152600c60248201527f4578656375746f723a444e450000000000000000000000000000000000000000604482015290519081900360640190fd5b600080856001600160a01b031685856040518083838082843760405192019450600093509091505080830381855af49150503d8060008114610501576040519150601f19603f3d011682016040523d82523d6000602084013e610506565b606091505b50915091508161066d5760448151101561051f57600080fd5b600481018051909160240190602081101561053957600080fd5b810190808051604051939291908464010000000082111561055957600080fd5b90830190602082018581111561056e57600080fd5b825164010000000081118282018810171561058857600080fd5b82525081516020918201929091019080838360005b838110156105b557818101518382015260200161059d565b50505050905090810190601f1680156105e25780820380516001836020036101000a031916815260200191505b5060405250505060405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561063257818101518382015260200161061a565b50505050905090810190601f16801561065f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b9150505b9392505050565b60008061069561068b602086018661176b565b8560800135611060565b6002546040517f04e45aaf0000000000000000000000000000000000000000000000000000000081526000916001600160a01b0316906304e45aaf9034906106e1908990600401611dee565b6020604051808303818588803b1580156106fa57600080fd5b505af115801561070e573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610733919061196c565b90508460a001358110156107625760405162461bcd60e51b815260040161075990611d80565b60405180910390fd5b600061077e610777604088016020890161176b565b8387611194565b96919550909350505050565b6002546001600160a01b031681565b6107a161124c565b6001600160a01b03166107b2610a6b565b6001600160a01b03161461080d576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610856576040805162461bcd60e51b815260206004820152600b60248201526a04578656375746f723a41360ac1b604482015290519081900360640190fd5b6001600160a01b03166000908152600160208190526040909120805460ff19169091179055565b61088561124c565b6001600160a01b0316610896610a6b565b6001600160a01b0316146108f1576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600081565b606061095761172a565b60006392171fd842633b9aca00018a8a8a8a8a8a6040516024016109819796959493929190611e46565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050905060006040518060800160405280600260009054906101000a90046001600160a01b03166001600160a01b03168152602001896001600160a01b03168152602001878152602001635ae401dc42633b9aca00018d8d604051602401610a1593929190611e23565b60408051601f198184030181529190526020810180516001600160e01b031660e09390931b9290921790915290529193509091505097509795505050505050565b60016020526000908152604090205460ff1681565b6000546001600160a01b031690565b600080610a878685611060565b6002546040517f5ae401dc00000000000000000000000000000000000000000000000000000000815260009182916001600160a01b0390911690635ae401dc903490610adb908f908f908f90600401611e23565b6000604051808303818588803b158015610af457600080fd5b505af1158015610b08573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052610b319190810190611807565b905060005b8151811015610b7257818181518110610b4b57fe5b6020026020010151806020019051810190610b66919061196c565b90920191600101610b36565b506000610b80888488611194565b9c929b50919950505050505050505050565b6001600160a01b03811660009081526001602052604090205460ff165b919050565b6060610bbe61172a565b6000610c07610bcd8680611e91565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061125092505050565b50509050600063c8dc75e68686604051602401610c25929190611dca565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050905060006040518060800160405280600260009054906101000a90046001600160a01b03166001600160a01b03168152602001846001600160a01b031681526020018860400135815260200163b858183f89604051602401610cb39190611db7565b60408051601f198184030181529190526020810180516001600160e01b031660e09390931b92909217909152905291945090925050509250929050565b60008080610d01610bcd8680611e91565b50509050610d13818660400135611060565b6002546040517fb858183f0000000000000000000000000000000000000000000000000000000081526000916001600160a01b03169063b858183f903490610d5f908a90600401611db7565b6020604051808303818588803b158015610d7857600080fd5b505af1158015610d8c573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610db1919061196c565b90506000610dbf8780611e91565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509394505050505b6000610e0183611281565b90508015610e1957610e1283611289565b9250610e2d565b610e2283611250565b509250610e33915050565b50610df6565b610e3e818489611194565b989297509195505050505050565b60001981565b610e5a61124c565b6001600160a01b0316610e6b610a6b565b6001600160a01b031614610ec6576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610f0f576040805162461bcd60e51b815260206004820152600b60248201526a04578656375746f723a41360ac1b604482015290519081900360640190fd5b6001600160a01b03166000908152600160205260409020805460ff19169055565b610f3861124c565b6001600160a01b0316610f49610a6b565b6001600160a01b031614610fa4576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610fe95760405162461bcd60e51b8152600401808060200182810382526026815260200180611f886026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6003546001600160a01b031681565b3415801561110957506002546040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815282916001600160a01b038086169263dd62ed3e926110b7923092911690600401611c01565b60206040518083038186803b1580156110cf57600080fd5b505afa1580156110e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611107919061196c565b105b15611190576002546040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b038481169263095ea7b39261115d929091169060001990600401611c1b565b600060405180830381600087803b15801561117757600080fd5b505af115801561118b573d6000803e3d6000fd5b505050505b5050565b6003546000906001600160a01b0385811691161480156111b15750815b15611244576003546040517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690632e1a7d4d906111ff908690600401611e1a565b600060405180830381600087803b15801561121957600080fd5b505af115801561122d573d6000803e3d6000fd5b505050506000905061123f81846112a6565b610671565b509192915050565b3390565b6000808061125e84826113f3565b925061126b8460146114bf565b90506112788460176113f3565b91509193909250565b516042111590565b80516060906112a09083906017906016190161157b565b92915050565b6001600160a01b03821661135657804710156112d45760405162461bcd60e51b815260040161075990611d23565b6000336001600160a01b0316826040516112ed90611bea565b60006040518083038185875af1925050503d806000811461132a576040519150601f19603f3d011682016040523d82523d6000602084013e61132f565b606091505b50509050806113505760405162461bcd60e51b815260040161075990611cb5565b50611190565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0383169063a9059cbb9061139d9033908590600401611c1b565b600060405180830381600087803b1580156113b757600080fd5b505af11580156113cb573d6000803e3d6000fd5b505050506113d76116f6565b6111905760405162461bcd60e51b815260040161075990611cec565b60008182601401101561144d576040805162461bcd60e51b815260206004820152601260248201527f746f416464726573735f6f766572666c6f770000000000000000000000000000604482015290519081900360640190fd5b81601401835110156114a6576040805162461bcd60e51b815260206004820152601560248201527f746f416464726573735f6f75744f66426f756e64730000000000000000000000604482015290519081900360640190fd5b5001602001516c01000000000000000000000000900490565b600081826003011015611519576040805162461bcd60e51b815260206004820152601160248201527f746f55696e7432345f6f766572666c6f77000000000000000000000000000000604482015290519081900360640190fd5b8160030183511015611572576040805162461bcd60e51b815260206004820152601460248201527f746f55696e7432345f6f75744f66426f756e6473000000000000000000000000604482015290519081900360640190fd5b50016003015190565b60608182601f0110156115d5576040805162461bcd60e51b815260206004820152600e60248201527f736c6963655f6f766572666c6f77000000000000000000000000000000000000604482015290519081900360640190fd5b82828401101561162c576040805162461bcd60e51b815260206004820152600e60248201527f736c6963655f6f766572666c6f77000000000000000000000000000000000000604482015290519081900360640190fd5b81830184511015611684576040805162461bcd60e51b815260206004820152601160248201527f736c6963655f6f75744f66426f756e6473000000000000000000000000000000604482015290519081900360640190fd5b6060821580156116a357604051915060008252602082016040526116ed565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156116dc5780518352602092830192016116c4565b5050858452601f01601f1916604052505b50949350505050565b6000803d801561170d576020811461171657611722565b60019150611722565b60206000803e60005191505b501515905090565b604080516080810182526000808252602082018190529181019190915260608082015290565b8035610baf81611f6f565b80358015158114610baf57600080fd5b60006020828403121561177c578081fd5b813561067181611f6f565b60008060006040848603121561179b578182fd5b83356117a681611f6f565b9250602084013567ffffffffffffffff808211156117c2578384fd5b818601915086601f8301126117d5578384fd5b8135818111156117e3578485fd5b8760208285010111156117f4578485fd5b6020830194508093505050509250925092565b60006020808385031215611819578182fd5b825167ffffffffffffffff80821115611830578384fd5b8185019150601f8681840112611844578485fd5b82518281111561185057fe5b61185d8586830201611ed6565b81815285810190858701885b848110156118db57815188018c603f820112611883578a8bfd5b8981015160408982111561189357fe5b6118a4828a01601f19168d01611ed6565b8281528f828486010111156118b7578d8efd5b6118c6838e8301848701611f3f565b87525050509288019290880190600101611869565b50909a9950505050505050505050565b600080604083850312156118fd578182fd5b823567ffffffffffffffff811115611913578283fd5b830160808186031215611924578283fd5b91506119326020840161175b565b90509250929050565b60008082840361010081121561194f578283fd5b60e081121561195c578283fd5b5082915061193260e0840161175b565b60006020828403121561197d578081fd5b5051919050565b600080600080600080600060c0888a03121561199e578283fd5b87359650602088013567ffffffffffffffff808211156119bc578485fd5b818a0191508a601f8301126119cf578485fd5b8135818111156119dd578586fd5b8b602080830285010111156119f0578586fd5b602083019850809750505050611a0860408901611750565b9350611a1660608901611750565b925060808801359150611a2b60a0890161175b565b905092959891949750929550565b6001600160a01b03169052565b8183526020808401936000918085028201810184845b87811015611a9657848303601f19018952611a778288611efa565b611a82858284611aa3565b9a86019a9450505090830190600101611a5c565b5090979650505050505050565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b60008151808452611ae5816020860160208601611f3f565b601f01601f19169290920160200192915050565b6000611b058283611efa565b60808552611b17608086018284611aa3565b9150506020830135611b2881611f6f565b6001600160a01b031660208501526040838101359085015260609283013592909301919091525090565b8035611b5d81611f6f565b6001600160a01b039081168352602082013590611b7982611f6f565b166020830152604081013562ffffff8116808214611b9657600080fd5b6040840152506060810135611baa81611f6f565b611bb76060840182611a39565b506080810135608083015260a081013560a0830152611bd860c08201611750565b611be560c0840182611a39565b505050565b90565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6000602082526106716020830184611acd565b600060408252611c656040830185611acd565b82810360208401526001600160a01b038085511682528060208601511660208301525060408401516040820152606084015160806060830152611cab6080830182611acd565b9695505050505050565b60208082526014908201527f4955503a207472616e73666572206661696c6564000000000000000000000000604082015260600190565b6020808252601a908201527f4955503a207472616e7366657220746f6b656e206661696c6564000000000000604082015260600190565b60208082526024908201527f4955503a207472616e7366657220616d6f756e7420657863656564732062616c60408201527f616e636500000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601a908201527f6c6f776572207468616e206578706563746564206f7574707574000000000000604082015260600190565b6000602082526106716020830184611af9565b600060408252611ddd6040830185611af9565b905082151560208301529392505050565b60e081016112a08284611b52565b6101008101611e0b8285611b52565b82151560e08301529392505050565b90815260200190565b600084825260406020830152611e3d604083018486611a46565b95945050505050565b600088825260c06020830152611e6060c08301888a611a46565b6001600160a01b0396871660408401529490951660608201526080810192909252151560a090910152949350505050565b6000808335601e19843603018112611ea7578283fd5b83018035915067ffffffffffffffff821115611ec1578283fd5b60200191503681900382131561044057600080fd5b60405181810167ffffffffffffffff81118282101715611ef257fe5b604052919050565b6000808335601e19843603018112611f10578283fd5b830160208101925035905067ffffffffffffffff811115611f3057600080fd5b80360383131561044057600080fd5b60005b83811015611f5a578181015183820152602001611f42565b83811115611f69576000848401525b50505050565b6001600160a01b0381168114611f8457600080fd5b5056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220529b2d291db1d31677a67bce0debee55e08f9747d237f255443cac49f0d269f664736f6c6343000706003300000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45

Deployed Bytecode

0x60806040526004361061012d5760003560e01c80638da5cb5b116100a5578063c8dc75e611610074578063d6edf5f011610059578063d6edf5f014610309578063f2fde38b14610329578063fb41be161461034957610134565b8063c8dc75e6146102d4578063d49d5181146102e757610134565b80638da5cb5b1461026c57806392171fd814610281578063a2de021214610294578063bbf6f5a7146102b457610134565b80636da41924116100fc57806372e94bf6116100e157806372e94bf61461020a578063772be2371461021f578063787ca4381461023f57610134565b80636da41924146101d3578063715018a6146101f557610134565b8063017e1619146101395780631cff79cd14610170578063421f4388146101905780636b150c3c146101b157610134565b3661013457005b600080fd5b34801561014557600080fd5b5061015961015436600461193b565b61035e565b604051610167929190611c52565b60405180910390f35b61018361017e366004611787565b610447565b6040516101679190611c3f565b6101a361019e36600461193b565b610678565b604051610167929190611c1b565b3480156101bd57600080fd5b506101c661078a565b6040516101679190611bed565b3480156101df57600080fd5b506101f36101ee36600461176b565b610799565b005b34801561020157600080fd5b506101f361087d565b34801561021657600080fd5b506101c6610948565b34801561022b57600080fd5b5061015961023a366004611984565b61094d565b34801561024b57600080fd5b5061025f61025a36600461176b565b610a56565b6040516101679190611c34565b34801561027857600080fd5b506101c6610a6b565b6101a361028f366004611984565b610a7a565b3480156102a057600080fd5b5061025f6102af36600461176b565b610b92565b3480156102c057600080fd5b506101596102cf3660046118eb565b610bb4565b6101a36102e23660046118eb565b610cf0565b3480156102f357600080fd5b506102fc610e4c565b6040516101679190611e1a565b34801561031557600080fd5b506101f361032436600461176b565b610e52565b34801561033557600080fd5b506101f361034436600461176b565b610f30565b34801561035557600080fd5b506101c6611051565b606061036861172a565b600063421f43888585604051602401610382929190611dfc565b60408051601f19818403018152918152602080830180516001600160e01b031660e09590951b949094179093528051608081019091526002546001600160a01b03168152909250600091818101906103dc9089018961176b565b6001600160a01b03168152602001876080013581526020016304e45aaf8860405160240161040a9190611dee565b60408051601f198184030181529190526020810180516001600160e01b031660e09390931b929092179091529052919350909150505b9250929050565b606061045284610b92565b6104a3576040805162461bcd60e51b815260206004820152600c60248201527f4578656375746f723a444e450000000000000000000000000000000000000000604482015290519081900360640190fd5b600080856001600160a01b031685856040518083838082843760405192019450600093509091505080830381855af49150503d8060008114610501576040519150601f19603f3d011682016040523d82523d6000602084013e610506565b606091505b50915091508161066d5760448151101561051f57600080fd5b600481018051909160240190602081101561053957600080fd5b810190808051604051939291908464010000000082111561055957600080fd5b90830190602082018581111561056e57600080fd5b825164010000000081118282018810171561058857600080fd5b82525081516020918201929091019080838360005b838110156105b557818101518382015260200161059d565b50505050905090810190601f1680156105e25780820380516001836020036101000a031916815260200191505b5060405250505060405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561063257818101518382015260200161061a565b50505050905090810190601f16801561065f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b9150505b9392505050565b60008061069561068b602086018661176b565b8560800135611060565b6002546040517f04e45aaf0000000000000000000000000000000000000000000000000000000081526000916001600160a01b0316906304e45aaf9034906106e1908990600401611dee565b6020604051808303818588803b1580156106fa57600080fd5b505af115801561070e573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610733919061196c565b90508460a001358110156107625760405162461bcd60e51b815260040161075990611d80565b60405180910390fd5b600061077e610777604088016020890161176b565b8387611194565b96919550909350505050565b6002546001600160a01b031681565b6107a161124c565b6001600160a01b03166107b2610a6b565b6001600160a01b03161461080d576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610856576040805162461bcd60e51b815260206004820152600b60248201526a04578656375746f723a41360ac1b604482015290519081900360640190fd5b6001600160a01b03166000908152600160208190526040909120805460ff19169091179055565b61088561124c565b6001600160a01b0316610896610a6b565b6001600160a01b0316146108f1576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600081565b606061095761172a565b60006392171fd842633b9aca00018a8a8a8a8a8a6040516024016109819796959493929190611e46565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050905060006040518060800160405280600260009054906101000a90046001600160a01b03166001600160a01b03168152602001896001600160a01b03168152602001878152602001635ae401dc42633b9aca00018d8d604051602401610a1593929190611e23565b60408051601f198184030181529190526020810180516001600160e01b031660e09390931b9290921790915290529193509091505097509795505050505050565b60016020526000908152604090205460ff1681565b6000546001600160a01b031690565b600080610a878685611060565b6002546040517f5ae401dc00000000000000000000000000000000000000000000000000000000815260009182916001600160a01b0390911690635ae401dc903490610adb908f908f908f90600401611e23565b6000604051808303818588803b158015610af457600080fd5b505af1158015610b08573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052610b319190810190611807565b905060005b8151811015610b7257818181518110610b4b57fe5b6020026020010151806020019051810190610b66919061196c565b90920191600101610b36565b506000610b80888488611194565b9c929b50919950505050505050505050565b6001600160a01b03811660009081526001602052604090205460ff165b919050565b6060610bbe61172a565b6000610c07610bcd8680611e91565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061125092505050565b50509050600063c8dc75e68686604051602401610c25929190611dca565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050905060006040518060800160405280600260009054906101000a90046001600160a01b03166001600160a01b03168152602001846001600160a01b031681526020018860400135815260200163b858183f89604051602401610cb39190611db7565b60408051601f198184030181529190526020810180516001600160e01b031660e09390931b92909217909152905291945090925050509250929050565b60008080610d01610bcd8680611e91565b50509050610d13818660400135611060565b6002546040517fb858183f0000000000000000000000000000000000000000000000000000000081526000916001600160a01b03169063b858183f903490610d5f908a90600401611db7565b6020604051808303818588803b158015610d7857600080fd5b505af1158015610d8c573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610db1919061196c565b90506000610dbf8780611e91565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509394505050505b6000610e0183611281565b90508015610e1957610e1283611289565b9250610e2d565b610e2283611250565b509250610e33915050565b50610df6565b610e3e818489611194565b989297509195505050505050565b60001981565b610e5a61124c565b6001600160a01b0316610e6b610a6b565b6001600160a01b031614610ec6576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610f0f576040805162461bcd60e51b815260206004820152600b60248201526a04578656375746f723a41360ac1b604482015290519081900360640190fd5b6001600160a01b03166000908152600160205260409020805460ff19169055565b610f3861124c565b6001600160a01b0316610f49610a6b565b6001600160a01b031614610fa4576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610fe95760405162461bcd60e51b8152600401808060200182810382526026815260200180611f886026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6003546001600160a01b031681565b3415801561110957506002546040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815282916001600160a01b038086169263dd62ed3e926110b7923092911690600401611c01565b60206040518083038186803b1580156110cf57600080fd5b505afa1580156110e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611107919061196c565b105b15611190576002546040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b038481169263095ea7b39261115d929091169060001990600401611c1b565b600060405180830381600087803b15801561117757600080fd5b505af115801561118b573d6000803e3d6000fd5b505050505b5050565b6003546000906001600160a01b0385811691161480156111b15750815b15611244576003546040517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690632e1a7d4d906111ff908690600401611e1a565b600060405180830381600087803b15801561121957600080fd5b505af115801561122d573d6000803e3d6000fd5b505050506000905061123f81846112a6565b610671565b509192915050565b3390565b6000808061125e84826113f3565b925061126b8460146114bf565b90506112788460176113f3565b91509193909250565b516042111590565b80516060906112a09083906017906016190161157b565b92915050565b6001600160a01b03821661135657804710156112d45760405162461bcd60e51b815260040161075990611d23565b6000336001600160a01b0316826040516112ed90611bea565b60006040518083038185875af1925050503d806000811461132a576040519150601f19603f3d011682016040523d82523d6000602084013e61132f565b606091505b50509050806113505760405162461bcd60e51b815260040161075990611cb5565b50611190565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0383169063a9059cbb9061139d9033908590600401611c1b565b600060405180830381600087803b1580156113b757600080fd5b505af11580156113cb573d6000803e3d6000fd5b505050506113d76116f6565b6111905760405162461bcd60e51b815260040161075990611cec565b60008182601401101561144d576040805162461bcd60e51b815260206004820152601260248201527f746f416464726573735f6f766572666c6f770000000000000000000000000000604482015290519081900360640190fd5b81601401835110156114a6576040805162461bcd60e51b815260206004820152601560248201527f746f416464726573735f6f75744f66426f756e64730000000000000000000000604482015290519081900360640190fd5b5001602001516c01000000000000000000000000900490565b600081826003011015611519576040805162461bcd60e51b815260206004820152601160248201527f746f55696e7432345f6f766572666c6f77000000000000000000000000000000604482015290519081900360640190fd5b8160030183511015611572576040805162461bcd60e51b815260206004820152601460248201527f746f55696e7432345f6f75744f66426f756e6473000000000000000000000000604482015290519081900360640190fd5b50016003015190565b60608182601f0110156115d5576040805162461bcd60e51b815260206004820152600e60248201527f736c6963655f6f766572666c6f77000000000000000000000000000000000000604482015290519081900360640190fd5b82828401101561162c576040805162461bcd60e51b815260206004820152600e60248201527f736c6963655f6f766572666c6f77000000000000000000000000000000000000604482015290519081900360640190fd5b81830184511015611684576040805162461bcd60e51b815260206004820152601160248201527f736c6963655f6f75744f66426f756e6473000000000000000000000000000000604482015290519081900360640190fd5b6060821580156116a357604051915060008252602082016040526116ed565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156116dc5780518352602092830192016116c4565b5050858452601f01601f1916604052505b50949350505050565b6000803d801561170d576020811461171657611722565b60019150611722565b60206000803e60005191505b501515905090565b604080516080810182526000808252602082018190529181019190915260608082015290565b8035610baf81611f6f565b80358015158114610baf57600080fd5b60006020828403121561177c578081fd5b813561067181611f6f565b60008060006040848603121561179b578182fd5b83356117a681611f6f565b9250602084013567ffffffffffffffff808211156117c2578384fd5b818601915086601f8301126117d5578384fd5b8135818111156117e3578485fd5b8760208285010111156117f4578485fd5b6020830194508093505050509250925092565b60006020808385031215611819578182fd5b825167ffffffffffffffff80821115611830578384fd5b8185019150601f8681840112611844578485fd5b82518281111561185057fe5b61185d8586830201611ed6565b81815285810190858701885b848110156118db57815188018c603f820112611883578a8bfd5b8981015160408982111561189357fe5b6118a4828a01601f19168d01611ed6565b8281528f828486010111156118b7578d8efd5b6118c6838e8301848701611f3f565b87525050509288019290880190600101611869565b50909a9950505050505050505050565b600080604083850312156118fd578182fd5b823567ffffffffffffffff811115611913578283fd5b830160808186031215611924578283fd5b91506119326020840161175b565b90509250929050565b60008082840361010081121561194f578283fd5b60e081121561195c578283fd5b5082915061193260e0840161175b565b60006020828403121561197d578081fd5b5051919050565b600080600080600080600060c0888a03121561199e578283fd5b87359650602088013567ffffffffffffffff808211156119bc578485fd5b818a0191508a601f8301126119cf578485fd5b8135818111156119dd578586fd5b8b602080830285010111156119f0578586fd5b602083019850809750505050611a0860408901611750565b9350611a1660608901611750565b925060808801359150611a2b60a0890161175b565b905092959891949750929550565b6001600160a01b03169052565b8183526020808401936000918085028201810184845b87811015611a9657848303601f19018952611a778288611efa565b611a82858284611aa3565b9a86019a9450505090830190600101611a5c565b5090979650505050505050565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b60008151808452611ae5816020860160208601611f3f565b601f01601f19169290920160200192915050565b6000611b058283611efa565b60808552611b17608086018284611aa3565b9150506020830135611b2881611f6f565b6001600160a01b031660208501526040838101359085015260609283013592909301919091525090565b8035611b5d81611f6f565b6001600160a01b039081168352602082013590611b7982611f6f565b166020830152604081013562ffffff8116808214611b9657600080fd5b6040840152506060810135611baa81611f6f565b611bb76060840182611a39565b506080810135608083015260a081013560a0830152611bd860c08201611750565b611be560c0840182611a39565b505050565b90565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6000602082526106716020830184611acd565b600060408252611c656040830185611acd565b82810360208401526001600160a01b038085511682528060208601511660208301525060408401516040820152606084015160806060830152611cab6080830182611acd565b9695505050505050565b60208082526014908201527f4955503a207472616e73666572206661696c6564000000000000000000000000604082015260600190565b6020808252601a908201527f4955503a207472616e7366657220746f6b656e206661696c6564000000000000604082015260600190565b60208082526024908201527f4955503a207472616e7366657220616d6f756e7420657863656564732062616c60408201527f616e636500000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601a908201527f6c6f776572207468616e206578706563746564206f7574707574000000000000604082015260600190565b6000602082526106716020830184611af9565b600060408252611ddd6040830185611af9565b905082151560208301529392505050565b60e081016112a08284611b52565b6101008101611e0b8285611b52565b82151560e08301529392505050565b90815260200190565b600084825260406020830152611e3d604083018486611a46565b95945050505050565b600088825260c06020830152611e6060c08301888a611a46565b6001600160a01b0396871660408401529490951660608201526080810192909252151560a090910152949350505050565b6000808335601e19843603018112611ea7578283fd5b83018035915067ffffffffffffffff821115611ec1578283fd5b60200191503681900382131561044057600080fd5b60405181810167ffffffffffffffff81118282101715611ef257fe5b604052919050565b6000808335601e19843603018112611f10578283fd5b830160208101925035905067ffffffffffffffff811115611f3057600080fd5b80360383131561044057600080fd5b60005b83811015611f5a578181015183820152602001611f42565b83811115611f69576000848401525b50505050565b6001600160a01b0381168114611f8457600080fd5b5056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220529b2d291db1d31677a67bce0debee55e08f9747d237f255443cac49f0d269f664736f6c63430007060033

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

00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45

-----Decoded View---------------
Arg [0] : _swaproute02 (address): 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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