FTM Price: $0.598165 (-7.18%)
Gas: 15 GWei
 

Overview

FTM Balance

Fantom LogoFantom LogoFantom Logo0 FTM

FTM Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
0x60806040486285682022-10-07 12:23:00729 days ago1665145380IN
 Create: SinkCharger
0 FTM0.001633441.40199814

Latest 1 internal transaction

Parent Transaction Hash Block From To
486285682022-10-07 12:23:00729 days ago1665145380  Contract Creation0 FTM
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SinkCharger

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion
File 1 of 9 : SinkCharger.sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.7.0;
import "../libraries/SafeMath.sol";
import "../interfaces/ERC20Interface.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "../libraries/TransferHelper.sol";
import "../interfaces/ISwapper.sol";
import "../interfaces/IWETH9.sol";

contract SinkCharger is Ownable {
    using SafeMath for uint256;
    address public sinkAddress;
    uint256 public chargeAmount;
    address public treasuryAddress;
    address public token;
    address public weth;
    address public swapper;
    event WithdrawTokens(address token, address to, uint256 amount);
    event Executed(
        uint256 tokenBalance,
        address treasuryAddress,
        uint256 chargeAmount,
        address sinkAddress
    );

    constructor(
        address _token,
        address _weth,
        address _swapper
    ) {
        sinkAddress = 0x7188C90D1BB7A66567dCEcDBe65882fa3dcE2FA3;
        treasuryAddress = 0xf57F68e6bc75979feB128C1A2061EeD60695f190;
        chargeAmount = 5 ether;
        token = _token;
        weth = _weth;
        swapper = _swapper;
    }

    function run() external {
        // check balance of sink
        address payable sinkPayable = payable(sinkAddress);
        uint256 sinkBalance = sinkPayable.balance;
        // decide amount to send sink
        uint256 amount;
        uint256 tokenBalance;
        uint256[] memory amounts;
        if (sinkBalance < chargeAmount) {
            amount = chargeAmount.sub(sinkBalance);
            address[] memory path = ISwapper(swapper).getOptimumPath(
                token,
                weth
            );
            amounts = ISwapper(swapper).getAmountsIn(amount, path);
            // get token balance
            tokenBalance = ERC20Interface(token).balanceOf(address(this));
            if (tokenBalance == 0) return;
            if (tokenBalance < amounts[0]) {
                amounts = ISwapper(swapper).getAmountsOut(tokenBalance, path);
            }
            // swap token to weth
            TransferHelper.safeTransfer(
                path[0],
                ISwapper(swapper).GetReceiverAddress(path),
                amounts[0]
            );
            ISwapper(swapper)._swap(amounts, path, address(this));
            // convert weth to eth
            IWETH9(weth).withdraw(amounts[1]);
            // send eth to sink
            TransferHelper.safeTransferETH(sinkAddress, amounts[1]);
        }
        // sent remained token to treasury
        tokenBalance = ERC20Interface(token).balanceOf(address(this));
        if (tokenBalance > 0) {
            TransferHelper.safeTransfer(token, treasuryAddress, tokenBalance);
        }
        emit Executed(tokenBalance, treasuryAddress, amounts[1], sinkAddress);
    }

    // verified
    receive() external payable {
        // require(msg.sender == WETH, 'Not WETH9');
    }

    function getTokenBalance() public view returns (uint256) {
        return ERC20Interface(token).balanceOf(address(this));
    }

    function setUintParams(uint256 _chargeAmount) public onlyOwner {
        chargeAmount = _chargeAmount;
        require(chargeAmount <= 5 ether, "over");
    }
}

File 2 of 9 : SafeMath.sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.7.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
  /**
   * @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 add(a, b, "SafeMath: addition overflow");
  }

  /**
   * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
   * overflow (when the result is negative).
   *
   * Counterpart to Solidity's `-` operator.
   *
   * Requirements:
   * - Subtraction cannot overflow.
   */
  function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
    uint256 c = a + b;
    require(c >= a, errorMessage);

    return c;
  }

  /**
   * @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 sub(a, b, "SafeMath: subtraction overflow");
  }

  /**
   * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
   * overflow (when the result is negative).
   *
   * Counterpart to Solidity's `-` operator.
   *
   * Requirements:
   * - Subtraction cannot overflow.
   */
  function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
    require(b <= a, errorMessage);
    uint256 c = a - b;

    return c;
  }

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

    uint256 c = a * b;
    require(c / a == b, "SafeMath: multiplication overflow");

    return c;
  }

  /**
   * @dev Returns the integer division of two unsigned integers. Reverts 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) internal pure returns (uint256) {
    return div(a, b, "SafeMath: division by zero");
  }

  /**
   * @dev Returns the integer division of two unsigned integers. Reverts 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) {
    // Solidity only automatically asserts when dividing by 0
    require(b > 0, errorMessage);
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold

    return c;
  }

  /**
   * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
   * Reverts 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 mod(a, b, "SafeMath: modulo by zero");
  }

  /**
   * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
   * Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
    require(b != 0, errorMessage);
    return a % b;
  }
}

File 3 of 9 : ERC20Interface.sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.7.0;

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

  /**
   * @dev Returns the token decimals.
   */
  function decimals() external view returns (uint8);

  /**
   * @dev Returns the token symbol.
   */
  function symbol() external view returns (string memory);

  /**
  * @dev Returns the token name.
  */
  function name() external view returns (string memory);

  /**
   * @dev Returns the bep token owner.
   */
  function getOwner() external view returns (address);

  /**
   * @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 4 of 9 : Ownable.sol
// 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;
    }
}

File 5 of 9 : TransferHelper.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.0;

import '@openzeppelin/contracts/token/ERC20/IERC20.sol';

library TransferHelper {
    /// @notice Transfers tokens from the targeted address to the given destination
    /// @notice Errors with 'STF' if transfer fails
    /// @param token The contract address of the token to be transferred
    /// @param from The originating address from which the tokens will be transferred
    /// @param to The destination address of the transfer
    /// @param value The amount to be transferred
    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) =
            token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'STF');
    }

    /// @notice Transfers tokens from msg.sender to a recipient
    /// @dev Errors with ST if transfer fails
    /// @param token The contract address of the token which will be transferred
    /// @param to The recipient of the transfer
    /// @param value The value of the transfer
    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'ST');
    }

    /// @notice Approves the stipulated contract to spend the given allowance in the given token
    /// @dev Errors with 'SA' if transfer fails
    /// @param token The contract address of the token to be approved
    /// @param to The target of the approval
    /// @param value The amount of the given token the target will be allowed to spend
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'SA');
    }

    /// @notice Transfers ETH to the recipient address
    /// @dev Fails with `STE`
    /// @param to The destination of the transfer
    /// @param value The value to be transferred
    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, 'STE');
    }
}

File 6 of 9 : ISwapper.sol
// SPDX-License-Identifier: LICENSED
pragma solidity ^0.7.0;

interface ISwapper {
    function _swap(
        uint256[] memory amounts,
        address[] memory path,
        address _to
    ) external;

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

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

    function GetReceiverAddress(address[] memory path)
        external
        view
        returns (address);

    function getOptimumPath(address token0, address token1)
        external
        view
        returns (address[] memory);
}

File 7 of 9 : IWETH9.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.7.0;

import '@openzeppelin/contracts/token/ERC20/IERC20.sol';

/// @title Interface for WETH9
interface IWETH9 is IERC20 {
    /// @notice Deposit ether to get wrapped ether
    function deposit() external payable;

    /// @notice Withdraw wrapped ether to get ether
    function withdraw(uint256) external;
}

File 8 of 9 : Context.sol
// 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;
    }
}

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

pragma solidity >=0.6.0 <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);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_weth","type":"address"},{"internalType":"address","name":"_swapper","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenBalance","type":"uint256"},{"indexed":false,"internalType":"address","name":"treasuryAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"chargeAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"sinkAddress","type":"address"}],"name":"Executed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawTokens","type":"event"},{"inputs":[],"name":"chargeAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"name":"run","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chargeAmount","type":"uint256"}],"name":"setUintParams","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sinkAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b506040516112653803806112658339818101604052606081101561003357600080fd5b5080516020820151604090920151909190600061004e610123565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b0319908116737188c90d1bb7a66567dcecdbe65882fa3dce2fa31790915560038054821673f57f68e6bc75979feb128c1a2061eed60695f190179055674563918244f40000600255600480546001600160a01b03958616908316179055600580549385169382169390931790925560068054919093169116179055610127565b3390565b61112f806101366000396000f3fe6080604052600436106100ab5760003560e01c80638da5cb5b116100645780638da5cb5b1461017a578063a0f1a0e11461018f578063c0406226146101a4578063c5f956af146101b9578063f2fde38b146101ce578063fc0c546a14610201576100b2565b80632b3297f9146100b75780633fc8cef3146100e85780636a026b39146100fd578063715018a61461012957806382b2e2571461013e57806384dde4af14610165576100b2565b366100b257005b600080fd5b3480156100c357600080fd5b506100cc610216565b604080516001600160a01b039092168252519081900360200190f35b3480156100f457600080fd5b506100cc610225565b34801561010957600080fd5b506101276004803603602081101561012057600080fd5b5035610234565b005b34801561013557600080fd5b506101276102e4565b34801561014a57600080fd5b50610153610390565b60408051918252519081900360200190f35b34801561017157600080fd5b506100cc610410565b34801561018657600080fd5b506100cc61041f565b34801561019b57600080fd5b5061015361042e565b3480156101b057600080fd5b50610127610434565b3480156101c557600080fd5b506100cc610c96565b3480156101da57600080fd5b50610127600480360360208110156101f157600080fd5b50356001600160a01b0316610ca5565b34801561020d57600080fd5b506100cc610da7565b6006546001600160a01b031681565b6005546001600160a01b031681565b61023c610db6565b6001600160a01b031661024d61041f565b6001600160a01b031614610296576040805162461bcd60e51b81526020600482018190526024820152600080516020611103833981519152604482015290519081900360640190fd5b6002819055674563918244f400008111156102e1576040805162461bcd60e51b8152602060048083019190915260248201526337bb32b960e11b604482015290519081900360640190fd5b50565b6102ec610db6565b6001600160a01b03166102fd61041f565b6001600160a01b031614610346576040805162461bcd60e51b81526020600482018190526024820152600080516020611103833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60048054604080516370a0823160e01b81523093810193909352516000926001600160a01b03909216916370a08231916024808301926020929190829003018186803b1580156103df57600080fd5b505afa1580156103f3573d6000803e3d6000fd5b505050506040513d602081101561040957600080fd5b5051905090565b6001546001600160a01b031681565b6000546001600160a01b031690565b60025481565b6001546002546001600160a01b03909116908131906000908190606090841015610b6a576002546104659085610dba565b600654600480546005546040805163361b48eb60e11b81526001600160a01b0393841694810194909452908216602484015251939650600093921691636c3691d6916044808201928692909190829003018186803b1580156104c657600080fd5b505afa1580156104da573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561050357600080fd5b8101908080516040519392919084600160201b82111561052257600080fd5b90830190602082018581111561053757600080fd5b82518660208202830111600160201b8211171561055357600080fd5b82525081516020918201928201910280838360005b83811015610580578181015183820152602001610568565b505050509190910160408181526006546307c0329d60e21b8352600483018c8152602484019283528851604485015288519899506001600160a01b0390911697631f00ca7497508c96508995509093509091606401906020808601910280838360005b838110156105fb5781810151838201526020016105e3565b50505050905001935050505060006040518083038186803b15801561061f57600080fd5b505afa158015610633573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561065c57600080fd5b8101908080516040519392919084600160201b82111561067b57600080fd5b90830190602082018581111561069057600080fd5b82518660208202830111600160201b821117156106ac57600080fd5b82525081516020918201928201910280838360005b838110156106d95781810151838201526020016106c1565b50505050919091016040818152600480546370a0823160e01b8452309184019190915290519698506001600160a01b0316956370a082319550602480830195506020945090925090829003018186803b15801561073557600080fd5b505afa158015610749573d6000803e3d6000fd5b505050506040513d602081101561075f57600080fd5b505192508261077357505050505050610c94565b8160008151811061078057fe5b60200260200101518310156108e7576006546040805163d06ca61f60e01b815260048101868152602482019283528451604483015284516001600160a01b039094169363d06ca61f9388938793926064909101906020808601910280838360005b838110156107f95781810151838201526020016107e1565b50505050905001935050505060006040518083038186803b15801561081d57600080fd5b505afa158015610831573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561085a57600080fd5b8101908080516040519392919084600160201b82111561087957600080fd5b90830190602082018581111561088e57600080fd5b82518660208202830111600160201b821117156108aa57600080fd5b82525081516020918201928201910280838360005b838110156108d75781810151838201526020016108bf565b5050505090500160405250505091505b6109cd816000815181106108f757fe5b602090810291909101810151600654604051630137e32360e31b81526004810184815286516024830152865193946001600160a01b03909316936309bf19189388938392604490910191858101910280838360005b8381101561096457818101518382015260200161094c565b505050509050019250505060206040518083038186803b15801561098757600080fd5b505afa15801561099b573d6000803e3d6000fd5b505050506040513d60208110156109b157600080fd5b5051845185906000906109c057fe5b6020026020010151610e03565b60065460405163f5901d4d60e01b815230604482018190526060600483019081528551606484015285516001600160a01b039094169363f5901d4d93879387939092909182916024820191608401906020808901910280838360005b83811015610a41578181015183820152602001610a29565b50505050905001838103825285818151815260200191508051906020019060200280838360005b83811015610a80578181015183820152602001610a68565b5050505090500195505050505050600060405180830381600087803b158015610aa857600080fd5b505af1158015610abc573d6000803e3d6000fd5b505060055484516001600160a01b039091169250632e1a7d4d915084906001908110610ae457fe5b60200260200101516040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610b2257600080fd5b505af1158015610b36573d6000803e3d6000fd5b5050600180548551610b6894506001600160a01b0390911692508591908110610b5b57fe5b6020026020010151610f51565b505b60048054604080516370a0823160e01b81523093810193909352516001600160a01b03909116916370a08231916024808301926020929190829003018186803b158015610bb657600080fd5b505afa158015610bca573d6000803e3d6000fd5b505050506040513d6020811015610be057600080fd5b505191508115610c0757600454600354610c07916001600160a01b03908116911684610e03565b7fff1b123b2ce1194394325209d89105d006a6ae45b909ed087f4cae7fbaca755282600360009054906101000a90046001600160a01b031683600181518110610c4c57fe5b602090810291909101810151600154604080519586526001600160a01b039485169386019390935284830191909152919091166060830152519081900360800190a150505050505b565b6003546001600160a01b031681565b610cad610db6565b6001600160a01b0316610cbe61041f565b6001600160a01b031614610d07576040805162461bcd60e51b81526020600482018190526024820152600080516020611103833981519152604482015290519081900360640190fd5b6001600160a01b038116610d4c5760405162461bcd60e51b81526004018080602001828103825260268152602001806110dd6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031681565b3390565b6000610dfc83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611045565b9392505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1781529251825160009485949389169392918291908083835b60208310610e7f5780518252601f199092019160209182019101610e60565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610ee1576040519150601f19603f3d011682016040523d82523d6000602084013e610ee6565b606091505b5091509150818015610f14575080511580610f145750808060200190516020811015610f1157600080fd5b50515b610f4a576040805162461bcd60e51b815260206004820152600260248201526114d560f21b604482015290519081900360640190fd5b5050505050565b604080516000808252602082019092526001600160a01b0384169083906040518082805190602001908083835b60208310610f9d5780518252601f199092019160209182019101610f7e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610fff576040519150601f19603f3d011682016040523d82523d6000602084013e611004565b606091505b5050905080611040576040805162461bcd60e51b815260206004820152600360248201526253544560e81b604482015290519081900360640190fd5b505050565b600081848411156110d45760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611099578181015183820152602001611081565b50505050905090810190601f1680156110c65780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50505090039056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a164736f6c6343000706000a00000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b7500000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c8300000000000000000000000096a5ec2229b02ebb6fb5512762a71fa2b98acb37

Deployed Bytecode

0x6080604052600436106100ab5760003560e01c80638da5cb5b116100645780638da5cb5b1461017a578063a0f1a0e11461018f578063c0406226146101a4578063c5f956af146101b9578063f2fde38b146101ce578063fc0c546a14610201576100b2565b80632b3297f9146100b75780633fc8cef3146100e85780636a026b39146100fd578063715018a61461012957806382b2e2571461013e57806384dde4af14610165576100b2565b366100b257005b600080fd5b3480156100c357600080fd5b506100cc610216565b604080516001600160a01b039092168252519081900360200190f35b3480156100f457600080fd5b506100cc610225565b34801561010957600080fd5b506101276004803603602081101561012057600080fd5b5035610234565b005b34801561013557600080fd5b506101276102e4565b34801561014a57600080fd5b50610153610390565b60408051918252519081900360200190f35b34801561017157600080fd5b506100cc610410565b34801561018657600080fd5b506100cc61041f565b34801561019b57600080fd5b5061015361042e565b3480156101b057600080fd5b50610127610434565b3480156101c557600080fd5b506100cc610c96565b3480156101da57600080fd5b50610127600480360360208110156101f157600080fd5b50356001600160a01b0316610ca5565b34801561020d57600080fd5b506100cc610da7565b6006546001600160a01b031681565b6005546001600160a01b031681565b61023c610db6565b6001600160a01b031661024d61041f565b6001600160a01b031614610296576040805162461bcd60e51b81526020600482018190526024820152600080516020611103833981519152604482015290519081900360640190fd5b6002819055674563918244f400008111156102e1576040805162461bcd60e51b8152602060048083019190915260248201526337bb32b960e11b604482015290519081900360640190fd5b50565b6102ec610db6565b6001600160a01b03166102fd61041f565b6001600160a01b031614610346576040805162461bcd60e51b81526020600482018190526024820152600080516020611103833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60048054604080516370a0823160e01b81523093810193909352516000926001600160a01b03909216916370a08231916024808301926020929190829003018186803b1580156103df57600080fd5b505afa1580156103f3573d6000803e3d6000fd5b505050506040513d602081101561040957600080fd5b5051905090565b6001546001600160a01b031681565b6000546001600160a01b031690565b60025481565b6001546002546001600160a01b03909116908131906000908190606090841015610b6a576002546104659085610dba565b600654600480546005546040805163361b48eb60e11b81526001600160a01b0393841694810194909452908216602484015251939650600093921691636c3691d6916044808201928692909190829003018186803b1580156104c657600080fd5b505afa1580156104da573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561050357600080fd5b8101908080516040519392919084600160201b82111561052257600080fd5b90830190602082018581111561053757600080fd5b82518660208202830111600160201b8211171561055357600080fd5b82525081516020918201928201910280838360005b83811015610580578181015183820152602001610568565b505050509190910160408181526006546307c0329d60e21b8352600483018c8152602484019283528851604485015288519899506001600160a01b0390911697631f00ca7497508c96508995509093509091606401906020808601910280838360005b838110156105fb5781810151838201526020016105e3565b50505050905001935050505060006040518083038186803b15801561061f57600080fd5b505afa158015610633573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561065c57600080fd5b8101908080516040519392919084600160201b82111561067b57600080fd5b90830190602082018581111561069057600080fd5b82518660208202830111600160201b821117156106ac57600080fd5b82525081516020918201928201910280838360005b838110156106d95781810151838201526020016106c1565b50505050919091016040818152600480546370a0823160e01b8452309184019190915290519698506001600160a01b0316956370a082319550602480830195506020945090925090829003018186803b15801561073557600080fd5b505afa158015610749573d6000803e3d6000fd5b505050506040513d602081101561075f57600080fd5b505192508261077357505050505050610c94565b8160008151811061078057fe5b60200260200101518310156108e7576006546040805163d06ca61f60e01b815260048101868152602482019283528451604483015284516001600160a01b039094169363d06ca61f9388938793926064909101906020808601910280838360005b838110156107f95781810151838201526020016107e1565b50505050905001935050505060006040518083038186803b15801561081d57600080fd5b505afa158015610831573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561085a57600080fd5b8101908080516040519392919084600160201b82111561087957600080fd5b90830190602082018581111561088e57600080fd5b82518660208202830111600160201b821117156108aa57600080fd5b82525081516020918201928201910280838360005b838110156108d75781810151838201526020016108bf565b5050505090500160405250505091505b6109cd816000815181106108f757fe5b602090810291909101810151600654604051630137e32360e31b81526004810184815286516024830152865193946001600160a01b03909316936309bf19189388938392604490910191858101910280838360005b8381101561096457818101518382015260200161094c565b505050509050019250505060206040518083038186803b15801561098757600080fd5b505afa15801561099b573d6000803e3d6000fd5b505050506040513d60208110156109b157600080fd5b5051845185906000906109c057fe5b6020026020010151610e03565b60065460405163f5901d4d60e01b815230604482018190526060600483019081528551606484015285516001600160a01b039094169363f5901d4d93879387939092909182916024820191608401906020808901910280838360005b83811015610a41578181015183820152602001610a29565b50505050905001838103825285818151815260200191508051906020019060200280838360005b83811015610a80578181015183820152602001610a68565b5050505090500195505050505050600060405180830381600087803b158015610aa857600080fd5b505af1158015610abc573d6000803e3d6000fd5b505060055484516001600160a01b039091169250632e1a7d4d915084906001908110610ae457fe5b60200260200101516040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610b2257600080fd5b505af1158015610b36573d6000803e3d6000fd5b5050600180548551610b6894506001600160a01b0390911692508591908110610b5b57fe5b6020026020010151610f51565b505b60048054604080516370a0823160e01b81523093810193909352516001600160a01b03909116916370a08231916024808301926020929190829003018186803b158015610bb657600080fd5b505afa158015610bca573d6000803e3d6000fd5b505050506040513d6020811015610be057600080fd5b505191508115610c0757600454600354610c07916001600160a01b03908116911684610e03565b7fff1b123b2ce1194394325209d89105d006a6ae45b909ed087f4cae7fbaca755282600360009054906101000a90046001600160a01b031683600181518110610c4c57fe5b602090810291909101810151600154604080519586526001600160a01b039485169386019390935284830191909152919091166060830152519081900360800190a150505050505b565b6003546001600160a01b031681565b610cad610db6565b6001600160a01b0316610cbe61041f565b6001600160a01b031614610d07576040805162461bcd60e51b81526020600482018190526024820152600080516020611103833981519152604482015290519081900360640190fd5b6001600160a01b038116610d4c5760405162461bcd60e51b81526004018080602001828103825260268152602001806110dd6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031681565b3390565b6000610dfc83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611045565b9392505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1781529251825160009485949389169392918291908083835b60208310610e7f5780518252601f199092019160209182019101610e60565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610ee1576040519150601f19603f3d011682016040523d82523d6000602084013e610ee6565b606091505b5091509150818015610f14575080511580610f145750808060200190516020811015610f1157600080fd5b50515b610f4a576040805162461bcd60e51b815260206004820152600260248201526114d560f21b604482015290519081900360640190fd5b5050505050565b604080516000808252602082019092526001600160a01b0384169083906040518082805190602001908083835b60208310610f9d5780518252601f199092019160209182019101610f7e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610fff576040519150601f19603f3d011682016040523d82523d6000602084013e611004565b606091505b5050905080611040576040805162461bcd60e51b815260206004820152600360248201526253544560e81b604482015290519081900360640190fd5b505050565b600081848411156110d45760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611099578181015183820152602001611081565b50505050905090810190601f1680156110c65780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50505090039056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a164736f6c6343000706000a

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

00000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b7500000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c8300000000000000000000000096a5ec2229b02ebb6fb5512762a71fa2b98acb37

-----Decoded View---------------
Arg [0] : _token (address): 0x04068DA6C83AFCFA0e13ba15A6696662335D5B75
Arg [1] : _weth (address): 0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83
Arg [2] : _swapper (address): 0x96a5EC2229B02ebB6Fb5512762A71fA2B98ACB37

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b75
Arg [1] : 00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c83
Arg [2] : 00000000000000000000000096a5ec2229b02ebb6fb5512762a71fa2b98acb37


Block Transaction Gas Used Reward
view all blocks produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
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.