ETH Price: $3,284.36 (-0.86%)
Gas: 6 Gwei

Contract

0xd0fa629a6D27b44d2bF378d9fb9E32FE2d622067
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Start Swap157781612022-10-18 23:04:47650 days ago1666134287IN
0xd0fa629a...E2d622067
0.0042 ETH0.0033163721.16169431
Finalize Swap149211802022-06-07 13:57:56784 days ago1654610276IN
0xd0fa629a...E2d622067
0 ETH0.0072175155.0140424
Finalize Swap149210602022-06-07 13:27:55784 days ago1654608475IN
0xd0fa629a...E2d622067
0 ETH0.0074039856.43542844
Finalize Swap149210152022-06-07 13:17:05784 days ago1654607825IN
0xd0fa629a...E2d622067
0 ETH0.0064100243.225126
Finalize Swap149209732022-06-07 13:07:32784 days ago1654607252IN
0xd0fa629a...E2d622067
0 ETH0.009332471.12790382
Finalize Swap149209572022-06-07 13:02:44784 days ago1654606964IN
0xd0fa629a...E2d622067
0 ETH0.0083328263.50949512
Finalize Swap149209002022-06-07 12:51:13784 days ago1654606273IN
0xd0fa629a...E2d622067
0 ETH0.0071610754.58385755
Finalize Swap149208422022-06-07 12:35:09784 days ago1654605309IN
0xd0fa629a...E2d622067
0 ETH0.0045494434.67726336
Finalize Swap149207492022-06-07 12:14:21784 days ago1654604061IN
0xd0fa629a...E2d622067
0 ETH0.0042341532.27106493
Finalize Swap149207202022-06-07 12:06:57784 days ago1654603617IN
0xd0fa629a...E2d622067
0 ETH0.0034096625.98951346
Finalize Swap149206792022-06-07 11:56:49784 days ago1654603009IN
0xd0fa629a...E2d622067
0 ETH0.0037955828.92845271
Finalize Swap149206572022-06-07 11:51:13784 days ago1654602673IN
0xd0fa629a...E2d622067
0 ETH0.0051687239.39756512
Finalize Swap149202212022-06-07 10:07:39784 days ago1654596459IN
0xd0fa629a...E2d622067
0 ETH0.0055387442.21414675
Start Swap149202202022-06-07 10:07:13784 days ago1654596433IN
0xd0fa629a...E2d622067
0.0042 ETH0.0059045638.87649705
Start Swap149202002022-06-07 10:01:33784 days ago1654596093IN
0xd0fa629a...E2d622067
0.0042 ETH0.0060997838.92851304
Start Swap149177202022-06-06 23:59:43784 days ago1654559983IN
0xd0fa629a...E2d622067
0.0042 ETH0.0068552145.13575739
Start Swap149174292022-06-06 22:38:05784 days ago1654555085IN
0xd0fa629a...E2d622067
0.0042 ETH0.0051293732.73788545
Start Swap148976952022-06-03 14:45:41788 days ago1654267541IN
0xd0fa629a...E2d622067
0.0042 ETH0.0092592660.95951655
Start Swap148968072022-06-03 11:19:58788 days ago1654255198IN
0xd0fa629a...E2d622067
0.0042 ETH0.0080898553.26056498
Start Swap148967652022-06-03 11:07:38788 days ago1654254458IN
0xd0fa629a...E2d622067
0.0042 ETH0.0074532149.06526581
Start Swap148957862022-06-03 7:19:04788 days ago1654240744IN
0xd0fa629a...E2d622067
0.0042 ETH0.0082457852.62012662
Start Swap148944692022-06-03 2:01:54788 days ago1654221714IN
0xd0fa629a...E2d622067
0.0042 ETH0.0139925889.30675311
Finalize Swap148934392022-06-02 22:04:49788 days ago1654207489IN
0xd0fa629a...E2d622067
0 ETH0.0059405645.28493043
Start Swap148927182022-06-02 19:19:54788 days ago1654197594IN
0xd0fa629a...E2d622067
0.0042 ETH0.01659014105.8693035
Start Swap148906032022-06-02 11:03:20789 days ago1654167800IN
0xd0fa629a...E2d622067
0.0042 ETH0.0071843647.30661317
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
157781612022-10-18 23:04:47650 days ago1666134287
0xd0fa629a...E2d622067
0.0042 ETH
149202202022-06-07 10:07:13784 days ago1654596433
0xd0fa629a...E2d622067
0.0042 ETH
149202002022-06-07 10:01:33784 days ago1654596093
0xd0fa629a...E2d622067
0.0042 ETH
149177202022-06-06 23:59:43784 days ago1654559983
0xd0fa629a...E2d622067
0.0042 ETH
149174292022-06-06 22:38:05784 days ago1654555085
0xd0fa629a...E2d622067
0.0042 ETH
148976952022-06-03 14:45:41788 days ago1654267541
0xd0fa629a...E2d622067
0.0042 ETH
148968072022-06-03 11:19:58788 days ago1654255198
0xd0fa629a...E2d622067
0.0042 ETH
148967652022-06-03 11:07:38788 days ago1654254458
0xd0fa629a...E2d622067
0.0042 ETH
148957862022-06-03 7:19:04788 days ago1654240744
0xd0fa629a...E2d622067
0.0042 ETH
148944692022-06-03 2:01:54788 days ago1654221714
0xd0fa629a...E2d622067
0.0042 ETH
148927182022-06-02 19:19:54788 days ago1654197594
0xd0fa629a...E2d622067
0.0042 ETH
148906032022-06-02 11:03:20789 days ago1654167800
0xd0fa629a...E2d622067
0.0042 ETH
148892002022-06-02 5:33:57789 days ago1654148037
0xd0fa629a...E2d622067
0.0042 ETH
148868742022-06-01 20:29:55789 days ago1654115395
0xd0fa629a...E2d622067
0.0042 ETH
148864802022-06-01 19:00:27789 days ago1654110027
0xd0fa629a...E2d622067
0.0042 ETH
148849032022-06-01 12:54:39790 days ago1654088079
0xd0fa629a...E2d622067
0.0042 ETH
148845892022-06-01 11:44:33790 days ago1654083873
0xd0fa629a...E2d622067
0.0042 ETH
148830172022-06-01 5:10:28790 days ago1654060228
0xd0fa629a...E2d622067
0.0042 ETH
148816792022-06-01 0:00:11790 days ago1654041611
0xd0fa629a...E2d622067
0.0042 ETH
148809942022-05-31 21:19:50790 days ago1654031990
0xd0fa629a...E2d622067
0.0042 ETH
148799922022-05-31 17:21:20791 days ago1654017680
0xd0fa629a...E2d622067
0.0042 ETH
148785632022-05-31 12:01:17791 days ago1653998477
0xd0fa629a...E2d622067
0.0042 ETH
148782742022-05-31 10:49:25791 days ago1653994165
0xd0fa629a...E2d622067
0.0042 ETH
148782312022-05-31 10:37:06791 days ago1653993426
0xd0fa629a...E2d622067
0.0042 ETH
148778562022-05-31 9:08:07791 days ago1653988087
0xd0fa629a...E2d622067
0.0042 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Swapper

Compiler Version
v0.6.4+commit.1dca32f3

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 11 : Swapper.sol
pragma solidity 0.6.4;

import "@openzeppelin/contracts/proxy/Initializable.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "../access/Auditable.sol";
import "../token/ITenSetToken.sol";
import "../util/IERC20Query.sol";
import "../util/IERC20Cutted.sol";


contract Swapper is Auditable {

    using Address for address payable;
    using SafeERC20 for IERC20;
    using SafeMath for uint256;

    mapping(bytes32 => bool) public finalizedTxs;
    address public token;
    address payable public feeWallet;
    uint256 public swapFee;
    uint256 public minAmount;

    event TokenSet(address indexed tokenAddr, string name, string symbol, uint8 decimals);
    event SwapStarted(address indexed tokenAddr, address indexed fromAddr, uint256 amount, uint256 feeAmount);
    event SwapFinalized(address indexed tokenAddr, bytes32 indexed otherTxHash, address indexed toAddress, uint256 amount);

    constructor(address payable _feeWallet) public {
        feeWallet = _feeWallet;
    }

    modifier notContract() {
        require(!msg.sender.isContract(), "contracts are not allowed to swap");
        require(msg.sender == tx.origin, "proxy contracts are not allowed");
       _;
    }

    function setSwapFee(uint256 fee) onlyOwner external {
        swapFee = fee;
    }

    function setMinAmount(uint256 newMinAmount) onlyOwner external {
        minAmount = newMinAmount;
    }

    function setFeeWallet(address payable newWallet) onlyOwner external {
        feeWallet = newWallet;
    }

    function setToken(address newToken) onlyOwner external returns (bool) {
        require(token != newToken, "already set");

        string memory name = IERC20Query(newToken).name();
        string memory symbol = IERC20Query(newToken).symbol();
        uint8 decimals = IERC20Query(newToken).decimals();

        token = newToken;

        emit TokenSet(token, name, symbol, decimals);
        return true;
    }

    function finalizeSwap(bytes32 otherTxHash, address toAddress, uint256 amount) onlyOwner external returns (bool) {
        require(!finalizedTxs[otherTxHash], "the swap has already been finalized");

        finalizedTxs[otherTxHash] = true;
        IERC20(token).safeTransfer(toAddress, amount);

        emit SwapFinalized(token, otherTxHash, toAddress, amount);
        return true;
    }

    function startSwap(uint256 amount) notContract payable external returns (bool) {
        require(msg.value >= swapFee, "wrong swap fee");
        require(amount >= minAmount, "amount is too small");
        uint256 netAmount = ITenSetToken(token).tokenFromReflection(ITenSetToken(token).reflectionFromToken(amount, true));
        IERC20(token).safeTransferFrom(msg.sender, address(this), amount);
        if (msg.value > 0) {
            uint256 change = msg.value.sub(swapFee);
            if (swapFee > 0) feeWallet.transfer(swapFee);
            if (change > 0) _msgSender().transfer(change);
        }

        emit SwapStarted(token, msg.sender, netAmount, msg.value);
        return true;
    }

    function retrieveTokens(address to, address anotherToken) public onlyOwner() {
        IERC20Cutted alienToken = IERC20Cutted(anotherToken);
        alienToken.transfer(to, alienToken.balanceOf(address(this)));
    }

    function retriveETH(address payable to) public onlyOwner() {
        to.transfer(address(this).balance);
    }
}

File 2 of 11 : Auditable.sol
pragma solidity >=0.6.0 <0.8.0;

import "@openzeppelin/contracts/GSN/Context.sol";


/**
 * @dev Modified Ownable. Introduces `auditor` address that has the exclusive
 * right to transfer ownership of the contract.
 *
 * This module makes available the modifiers: `onlyAuditor`, `onlyOwnerAndAuditor`.
 * `onlyOwner` replaced with `onlyOwnerAndAuditor` in function `transferOwnership`.
 */
abstract contract Auditable is Context {
    address private _owner;
    address private _auditor;

    event AuditingTransferred(address indexed previousAuditor, address indexed newAuditor);
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _auditor = msgSender;
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyAuditor() {
        require(_auditor == _msgSender(), "Auditable: caller is not the auditor");
        _;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }
    /**
     * @dev Throws if called by any account other than the owner or auditor.
     */
    modifier onlyOwnerOrAuditor() {
        require(_owner == _msgSender() || _auditor == _msgSender(), "Auditable: caller is not the owner or auditor");
        _;
    }

    /**
     * @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 transferAuditing(address newAuditor) public virtual onlyAuditor {
        require(newAuditor != address(0), "Auditable: new auditor is the zero address");
        emit AuditingTransferred(_auditor, newAuditor);
        _auditor = newAuditor;
    }

    /**
     * @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 onlyOwnerOrAuditor {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 3 of 11 : ITenSetToken.sol
pragma solidity ^0.6.2;


interface ITenSetToken {
    function reflectionFromToken(uint256 tAmount, bool deductTransferFee) external view returns (uint256);
    function tokenFromReflection(uint256 rAmount) external view returns (uint256);
}

File 4 of 11 : IERC20Cutted.sol
pragma solidity ^0.6.2;


interface IERC20Cutted {

    // Some old tokens are implemented without a retrun parameter (this was prior to the ERC20 standart change)
    function transfer(address to, uint256 value) external;

    function balanceOf(address who) external view returns (uint256);

}

File 5 of 11 : IERC20Query.sol
pragma solidity 0.6.4;

interface IERC20Query {
    /**
     * @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 amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);
}

File 6 of 11 : 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 7 of 11 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.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) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        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) {
        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 8 of 11 : Initializable.sol
// SPDX-License-Identifier: MIT

// solhint-disable-next-line compiler-version
pragma solidity >=0.4.24 <0.8.0;


/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 * 
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.
 * 
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 */
abstract contract Initializable {

    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        require(_initializing || _isConstructor() || !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /// @dev Returns true if and only if the function is running in the constructor
    function _isConstructor() private view returns (bool) {
        // extcodesize checks the size of the code stored in an address, and
        // address returns the current address. Since the code is still not
        // deployed when running a constructor, any checks on its code size will
        // yield zero, making it an effective way to detect if a contract is
        // under construction or not.
        address self = address(this);
        uint256 cs;
        // solhint-disable-next-line no-inline-assembly
        assembly { cs := extcodesize(self) }
        return cs == 0;
    }
}

File 9 of 11 : 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);
}

File 10 of 11 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC20.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 11 of 11 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address payable","name":"_feeWallet","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousAuditor","type":"address"},{"indexed":true,"internalType":"address","name":"newAuditor","type":"address"}],"name":"AuditingTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenAddr","type":"address"},{"indexed":true,"internalType":"bytes32","name":"otherTxHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"toAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SwapFinalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenAddr","type":"address"},{"indexed":true,"internalType":"address","name":"fromAddr","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"SwapStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenAddr","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"},{"indexed":false,"internalType":"uint8","name":"decimals","type":"uint8"}],"name":"TokenSet","type":"event"},{"inputs":[],"name":"auditor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeWallet","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"otherTxHash","type":"bytes32"},{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"finalizeSwap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"finalizedTxs","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minAmount","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":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"anotherToken","type":"address"}],"name":"retrieveTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"}],"name":"retriveETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newWallet","type":"address"}],"name":"setFeeWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMinAmount","type":"uint256"}],"name":"setMinAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"setSwapFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newToken","type":"address"}],"name":"setToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"startSwap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"swapFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAuditor","type":"address"}],"name":"transferAuditing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506040516119a53803806119a58339818101604052602081101561003357600080fd5b505160006100486001600160e01b036100c516565b600180546001600160a01b0383166001600160a01b03199182168117909255600080549091168217815560405192935090917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600480546001600160a01b0319166001600160a01b03929092169190911790556100c9565b3390565b6118cd806100d86000396000f3fe6080604052600436106101095760003560e01c8063715018a61161009557806390d49b9d1161006457806390d49b9d146103545780639b2cb5d814610387578063f25f4b561461039c578063f2fde38b146103b1578063fc0c546a146103e457610109565b8063715018a6146102d6578063731b5fef146102eb578063897b0637146103155780638da5cb5b1461033f57610109565b8063492b50d7116100dc578063492b50d7146101e557806354cf2aeb146102025780636341ca0b146102295780636473b1eb146102645780636c605b771461029757610109565b8063144fa6d71461010e5780631eaa9d7c1461015557806334e199071461018a5780633ec045a6146101b4575b600080fd5b34801561011a57600080fd5b506101416004803603602081101561013157600080fd5b50356001600160a01b03166103f9565b604080519115158252519081900360200190f35b34801561016157600080fd5b506101886004803603602081101561017857600080fd5b50356001600160a01b03166108a0565b005b34801561019657600080fd5b50610188600480360360208110156101ad57600080fd5b5035610995565b3480156101c057600080fd5b506101c96109f2565b604080516001600160a01b039092168252519081900360200190f35b610141600480360360208110156101fb57600080fd5b5035610a01565b34801561020e57600080fd5b50610217610d41565b60408051918252519081900360200190f35b34801561023557600080fd5b506101886004803603604081101561024c57600080fd5b506001600160a01b0381358116916020013516610d47565b34801561027057600080fd5b506101886004803603602081101561028757600080fd5b50356001600160a01b0316610e88565b3480156102a357600080fd5b50610141600480360360608110156102ba57600080fd5b508035906001600160a01b036020820135169060400135610f19565b3480156102e257600080fd5b50610188611049565b3480156102f757600080fd5b506101416004803603602081101561030e57600080fd5b50356110eb565b34801561032157600080fd5b506101886004803603602081101561033857600080fd5b5035611100565b34801561034b57600080fd5b506101c961115d565b34801561036057600080fd5b506101886004803603602081101561037757600080fd5b50356001600160a01b031661116c565b34801561039357600080fd5b506102176111e6565b3480156103a857600080fd5b506101c96111ec565b3480156103bd57600080fd5b50610188600480360360208110156103d457600080fd5b50356001600160a01b03166111fb565b3480156103f057600080fd5b506101c961130f565b600061040361131e565b6000546001600160a01b03908116911614610453576040805162461bcd60e51b81526020600482018190526024820152600080516020611821833981519152604482015290519081900360640190fd5b6003546001600160a01b03838116911614156104a4576040805162461bcd60e51b815260206004820152600b60248201526a185b1c9958591e481cd95d60aa1b604482015290519081900360640190fd5b6060826001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b1580156104df57600080fd5b505afa1580156104f3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561051c57600080fd5b810190808051604051939291908464010000000082111561053c57600080fd5b90830190602082018581111561055157600080fd5b825164010000000081118282018810171561056b57600080fd5b82525081516020918201929091019080838360005b83811015610598578181015183820152602001610580565b50505050905090810190601f1680156105c55780820380516001836020036101000a031916815260200191505b5060405250505090506060836001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b15801561060957600080fd5b505afa15801561061d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561064657600080fd5b810190808051604051939291908464010000000082111561066657600080fd5b90830190602082018581111561067b57600080fd5b825164010000000081118282018810171561069557600080fd5b82525081516020918201929091019080838360005b838110156106c25781810151838201526020016106aa565b50505050905090810190601f1680156106ef5780820380516001836020036101000a031916815260200191505b5060405250505090506000846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561073357600080fd5b505afa158015610747573d6000803e3d6000fd5b505050506040513d602081101561075d57600080fd5b5051600380546001600160a01b0319166001600160a01b0388811691909117918290556040805160ff851691810191909152606080825287519082015286519394509116917fdd368d1daac2d49c89f2177a1dfbb1a0c72762b98fc4e1ccacba03114cffe0e2918691869186918190602080830191608084019188019080838360005b838110156107f85781810151838201526020016107e0565b50505050905090810190601f1680156108255780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610858578181015183820152602001610840565b50505050905090810190601f1680156108855780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a2506001949350505050565b6108a861131e565b6001546001600160a01b039081169116146108f45760405162461bcd60e51b81526004018080602001828103825260248152602001806117fd6024913960400191505060405180910390fd5b6001600160a01b0381166109395760405162461bcd60e51b815260040180806020018281038252602a815260200180611743602a913960400191505060405180910390fd5b6001546040516001600160a01b038084169216907fa62f64a982fc53b7419e2382cf536a22016f03b942b79ecfb9cb48703ad13e7c90600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b61099d61131e565b6000546001600160a01b039081169116146109ed576040805162461bcd60e51b81526020600482018190526024820152600080516020611821833981519152604482015290519081900360640190fd5b600555565b6001546001600160a01b031690565b6000610a0c33611322565b15610a485760405162461bcd60e51b81526004018080602001828103825260218152602001806117b66021913960400191505060405180910390fd5b333214610a9c576040805162461bcd60e51b815260206004820152601f60248201527f70726f787920636f6e74726163747320617265206e6f7420616c6c6f77656400604482015290519081900360640190fd5b600554341015610ae4576040805162461bcd60e51b815260206004820152600e60248201526d77726f6e6720737761702066656560901b604482015290519081900360640190fd5b600654821015610b31576040805162461bcd60e51b8152602060048201526013602482015272185b5bdd5b9d081a5cc81d1bdbc81cdb585b1b606a1b604482015290519081900360640190fd5b60035460408051634549b03960e01b8152600481018590526001602482015290516000926001600160a01b031691632d838119918391634549b039916044808301926020929190829003018186803b158015610b8c57600080fd5b505afa158015610ba0573d6000803e3d6000fd5b505050506040513d6020811015610bb657600080fd5b5051604080516001600160e01b031960e085901b1681526004810192909252516024808301926020929190829003018186803b158015610bf557600080fd5b505afa158015610c09573d6000803e3d6000fd5b505050506040513d6020811015610c1f57600080fd5b5051600354909150610c42906001600160a01b031633308663ffffffff61132816565b3415610cf2576000610c5f6005543461138890919063ffffffff16565b60055490915015610ca8576004546005546040516001600160a01b039092169181156108fc0291906000818181858888f19350505050158015610ca6573d6000803e3d6000fd5b505b8015610cf057610cb661131e565b6001600160a01b03166108fc829081150290604051600060405180830381858888f19350505050158015610cee573d6000803e3d6000fd5b505b505b60035460408051838152346020820152815133936001600160a01b0316927ff60309f865a6aa297da5fac6188136a02e5acfdf6e8f6d35257a9f4e9653170f928290030190a350600192915050565b60055481565b610d4f61131e565b6000546001600160a01b03908116911614610d9f576040805162461bcd60e51b81526020600482018190526024820152600080516020611821833981519152604482015290519081900360640190fd5b604080516370a0823160e01b8152306004820152905182916001600160a01b0383169163a9059cbb91869184916370a08231916024808301926020929190829003018186803b158015610df157600080fd5b505afa158015610e05573d6000803e3d6000fd5b505050506040513d6020811015610e1b57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b039093166004840152602483019190915251604480830192600092919082900301818387803b158015610e6b57600080fd5b505af1158015610e7f573d6000803e3d6000fd5b50505050505050565b610e9061131e565b6000546001600160a01b03908116911614610ee0576040805162461bcd60e51b81526020600482018190526024820152600080516020611821833981519152604482015290519081900360640190fd5b6040516001600160a01b038216904780156108fc02916000818181858888f19350505050158015610f15573d6000803e3d6000fd5b5050565b6000610f2361131e565b6000546001600160a01b03908116911614610f73576040805162461bcd60e51b81526020600482018190526024820152600080516020611821833981519152604482015290519081900360640190fd5b60008481526002602052604090205460ff1615610fc15760405162461bcd60e51b81526004018080602001828103825260238152602001806117936023913960400191505060405180910390fd5b6000848152600260205260409020805460ff19166001179055600354610ff7906001600160a01b0316848463ffffffff6113ca16565b6003546040805184815290516001600160a01b038087169388939116917f6a7b2e85c9adcee9c40970c6fcdb78f57d45931efee389c62b5293af702e52749181900360200190a45060015b9392505050565b61105161131e565b6000546001600160a01b039081169116146110a1576040805162461bcd60e51b81526020600482018190526024820152600080516020611821833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60026020526000908152604090205460ff1681565b61110861131e565b6000546001600160a01b03908116911614611158576040805162461bcd60e51b81526020600482018190526024820152600080516020611821833981519152604482015290519081900360640190fd5b600655565b6000546001600160a01b031690565b61117461131e565b6000546001600160a01b039081169116146111c4576040805162461bcd60e51b81526020600482018190526024820152600080516020611821833981519152604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b60065481565b6004546001600160a01b031681565b61120361131e565b6000546001600160a01b0390811691161480611234575061122261131e565b6001546001600160a01b039081169116145b61126f5760405162461bcd60e51b815260040180806020018281038252602d815260200180611841602d913960400191505060405180910390fd5b6001600160a01b0381166112b45760405162461bcd60e51b815260040180806020018281038252602681526020018061176d6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b031681565b3390565b3b151590565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611382908590611421565b50505050565b600061104283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506114d2565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261141c908490611421565b505050565b6060611476826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115699092919063ffffffff16565b80519091501561141c5780806020019051602081101561149557600080fd5b505161141c5760405162461bcd60e51b815260040180806020018281038252602a81526020018061186e602a913960400191505060405180910390fd5b600081848411156115615760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561152657818101518382015260200161150e565b50505050905090810190601f1680156115535780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60606115788484600085611580565b949350505050565b6060824710156115c15760405162461bcd60e51b81526004018080602001828103825260268152602001806117d76026913960400191505060405180910390fd5b6115ca85611322565b61161b576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061165a5780518252601f19909201916020918201910161163b565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146116bc576040519150601f19603f3d011682016040523d82523d6000602084013e6116c1565b606091505b50915091506116d18282866116dc565b979650505050505050565b606083156116eb575081611042565b8251156116fb5782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561152657818101518382015260200161150e56fe417564697461626c653a206e65772061756469746f7220697320746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737374686520737761702068617320616c7265616479206265656e2066696e616c697a6564636f6e74726163747320617265206e6f7420616c6c6f77656420746f2073776170416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c417564697461626c653a2063616c6c6572206973206e6f74207468652061756469746f724f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572417564697461626c653a2063616c6c6572206973206e6f7420746865206f776e6572206f722061756469746f725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122030c49585a152bd4f4c2de52892e7e947af11067094c264b6cb2e7ca82719a17164736f6c63430006040033000000000000000000000000c6bf9ae1d65ae5aa446a7fbaeedd61423cb62dae

Deployed Bytecode

0x6080604052600436106101095760003560e01c8063715018a61161009557806390d49b9d1161006457806390d49b9d146103545780639b2cb5d814610387578063f25f4b561461039c578063f2fde38b146103b1578063fc0c546a146103e457610109565b8063715018a6146102d6578063731b5fef146102eb578063897b0637146103155780638da5cb5b1461033f57610109565b8063492b50d7116100dc578063492b50d7146101e557806354cf2aeb146102025780636341ca0b146102295780636473b1eb146102645780636c605b771461029757610109565b8063144fa6d71461010e5780631eaa9d7c1461015557806334e199071461018a5780633ec045a6146101b4575b600080fd5b34801561011a57600080fd5b506101416004803603602081101561013157600080fd5b50356001600160a01b03166103f9565b604080519115158252519081900360200190f35b34801561016157600080fd5b506101886004803603602081101561017857600080fd5b50356001600160a01b03166108a0565b005b34801561019657600080fd5b50610188600480360360208110156101ad57600080fd5b5035610995565b3480156101c057600080fd5b506101c96109f2565b604080516001600160a01b039092168252519081900360200190f35b610141600480360360208110156101fb57600080fd5b5035610a01565b34801561020e57600080fd5b50610217610d41565b60408051918252519081900360200190f35b34801561023557600080fd5b506101886004803603604081101561024c57600080fd5b506001600160a01b0381358116916020013516610d47565b34801561027057600080fd5b506101886004803603602081101561028757600080fd5b50356001600160a01b0316610e88565b3480156102a357600080fd5b50610141600480360360608110156102ba57600080fd5b508035906001600160a01b036020820135169060400135610f19565b3480156102e257600080fd5b50610188611049565b3480156102f757600080fd5b506101416004803603602081101561030e57600080fd5b50356110eb565b34801561032157600080fd5b506101886004803603602081101561033857600080fd5b5035611100565b34801561034b57600080fd5b506101c961115d565b34801561036057600080fd5b506101886004803603602081101561037757600080fd5b50356001600160a01b031661116c565b34801561039357600080fd5b506102176111e6565b3480156103a857600080fd5b506101c96111ec565b3480156103bd57600080fd5b50610188600480360360208110156103d457600080fd5b50356001600160a01b03166111fb565b3480156103f057600080fd5b506101c961130f565b600061040361131e565b6000546001600160a01b03908116911614610453576040805162461bcd60e51b81526020600482018190526024820152600080516020611821833981519152604482015290519081900360640190fd5b6003546001600160a01b03838116911614156104a4576040805162461bcd60e51b815260206004820152600b60248201526a185b1c9958591e481cd95d60aa1b604482015290519081900360640190fd5b6060826001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b1580156104df57600080fd5b505afa1580156104f3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561051c57600080fd5b810190808051604051939291908464010000000082111561053c57600080fd5b90830190602082018581111561055157600080fd5b825164010000000081118282018810171561056b57600080fd5b82525081516020918201929091019080838360005b83811015610598578181015183820152602001610580565b50505050905090810190601f1680156105c55780820380516001836020036101000a031916815260200191505b5060405250505090506060836001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b15801561060957600080fd5b505afa15801561061d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561064657600080fd5b810190808051604051939291908464010000000082111561066657600080fd5b90830190602082018581111561067b57600080fd5b825164010000000081118282018810171561069557600080fd5b82525081516020918201929091019080838360005b838110156106c25781810151838201526020016106aa565b50505050905090810190601f1680156106ef5780820380516001836020036101000a031916815260200191505b5060405250505090506000846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561073357600080fd5b505afa158015610747573d6000803e3d6000fd5b505050506040513d602081101561075d57600080fd5b5051600380546001600160a01b0319166001600160a01b0388811691909117918290556040805160ff851691810191909152606080825287519082015286519394509116917fdd368d1daac2d49c89f2177a1dfbb1a0c72762b98fc4e1ccacba03114cffe0e2918691869186918190602080830191608084019188019080838360005b838110156107f85781810151838201526020016107e0565b50505050905090810190601f1680156108255780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610858578181015183820152602001610840565b50505050905090810190601f1680156108855780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a2506001949350505050565b6108a861131e565b6001546001600160a01b039081169116146108f45760405162461bcd60e51b81526004018080602001828103825260248152602001806117fd6024913960400191505060405180910390fd5b6001600160a01b0381166109395760405162461bcd60e51b815260040180806020018281038252602a815260200180611743602a913960400191505060405180910390fd5b6001546040516001600160a01b038084169216907fa62f64a982fc53b7419e2382cf536a22016f03b942b79ecfb9cb48703ad13e7c90600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b61099d61131e565b6000546001600160a01b039081169116146109ed576040805162461bcd60e51b81526020600482018190526024820152600080516020611821833981519152604482015290519081900360640190fd5b600555565b6001546001600160a01b031690565b6000610a0c33611322565b15610a485760405162461bcd60e51b81526004018080602001828103825260218152602001806117b66021913960400191505060405180910390fd5b333214610a9c576040805162461bcd60e51b815260206004820152601f60248201527f70726f787920636f6e74726163747320617265206e6f7420616c6c6f77656400604482015290519081900360640190fd5b600554341015610ae4576040805162461bcd60e51b815260206004820152600e60248201526d77726f6e6720737761702066656560901b604482015290519081900360640190fd5b600654821015610b31576040805162461bcd60e51b8152602060048201526013602482015272185b5bdd5b9d081a5cc81d1bdbc81cdb585b1b606a1b604482015290519081900360640190fd5b60035460408051634549b03960e01b8152600481018590526001602482015290516000926001600160a01b031691632d838119918391634549b039916044808301926020929190829003018186803b158015610b8c57600080fd5b505afa158015610ba0573d6000803e3d6000fd5b505050506040513d6020811015610bb657600080fd5b5051604080516001600160e01b031960e085901b1681526004810192909252516024808301926020929190829003018186803b158015610bf557600080fd5b505afa158015610c09573d6000803e3d6000fd5b505050506040513d6020811015610c1f57600080fd5b5051600354909150610c42906001600160a01b031633308663ffffffff61132816565b3415610cf2576000610c5f6005543461138890919063ffffffff16565b60055490915015610ca8576004546005546040516001600160a01b039092169181156108fc0291906000818181858888f19350505050158015610ca6573d6000803e3d6000fd5b505b8015610cf057610cb661131e565b6001600160a01b03166108fc829081150290604051600060405180830381858888f19350505050158015610cee573d6000803e3d6000fd5b505b505b60035460408051838152346020820152815133936001600160a01b0316927ff60309f865a6aa297da5fac6188136a02e5acfdf6e8f6d35257a9f4e9653170f928290030190a350600192915050565b60055481565b610d4f61131e565b6000546001600160a01b03908116911614610d9f576040805162461bcd60e51b81526020600482018190526024820152600080516020611821833981519152604482015290519081900360640190fd5b604080516370a0823160e01b8152306004820152905182916001600160a01b0383169163a9059cbb91869184916370a08231916024808301926020929190829003018186803b158015610df157600080fd5b505afa158015610e05573d6000803e3d6000fd5b505050506040513d6020811015610e1b57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b039093166004840152602483019190915251604480830192600092919082900301818387803b158015610e6b57600080fd5b505af1158015610e7f573d6000803e3d6000fd5b50505050505050565b610e9061131e565b6000546001600160a01b03908116911614610ee0576040805162461bcd60e51b81526020600482018190526024820152600080516020611821833981519152604482015290519081900360640190fd5b6040516001600160a01b038216904780156108fc02916000818181858888f19350505050158015610f15573d6000803e3d6000fd5b5050565b6000610f2361131e565b6000546001600160a01b03908116911614610f73576040805162461bcd60e51b81526020600482018190526024820152600080516020611821833981519152604482015290519081900360640190fd5b60008481526002602052604090205460ff1615610fc15760405162461bcd60e51b81526004018080602001828103825260238152602001806117936023913960400191505060405180910390fd5b6000848152600260205260409020805460ff19166001179055600354610ff7906001600160a01b0316848463ffffffff6113ca16565b6003546040805184815290516001600160a01b038087169388939116917f6a7b2e85c9adcee9c40970c6fcdb78f57d45931efee389c62b5293af702e52749181900360200190a45060015b9392505050565b61105161131e565b6000546001600160a01b039081169116146110a1576040805162461bcd60e51b81526020600482018190526024820152600080516020611821833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60026020526000908152604090205460ff1681565b61110861131e565b6000546001600160a01b03908116911614611158576040805162461bcd60e51b81526020600482018190526024820152600080516020611821833981519152604482015290519081900360640190fd5b600655565b6000546001600160a01b031690565b61117461131e565b6000546001600160a01b039081169116146111c4576040805162461bcd60e51b81526020600482018190526024820152600080516020611821833981519152604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b60065481565b6004546001600160a01b031681565b61120361131e565b6000546001600160a01b0390811691161480611234575061122261131e565b6001546001600160a01b039081169116145b61126f5760405162461bcd60e51b815260040180806020018281038252602d815260200180611841602d913960400191505060405180910390fd5b6001600160a01b0381166112b45760405162461bcd60e51b815260040180806020018281038252602681526020018061176d6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b031681565b3390565b3b151590565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611382908590611421565b50505050565b600061104283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506114d2565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261141c908490611421565b505050565b6060611476826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115699092919063ffffffff16565b80519091501561141c5780806020019051602081101561149557600080fd5b505161141c5760405162461bcd60e51b815260040180806020018281038252602a81526020018061186e602a913960400191505060405180910390fd5b600081848411156115615760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561152657818101518382015260200161150e565b50505050905090810190601f1680156115535780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60606115788484600085611580565b949350505050565b6060824710156115c15760405162461bcd60e51b81526004018080602001828103825260268152602001806117d76026913960400191505060405180910390fd5b6115ca85611322565b61161b576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061165a5780518252601f19909201916020918201910161163b565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146116bc576040519150601f19603f3d011682016040523d82523d6000602084013e6116c1565b606091505b50915091506116d18282866116dc565b979650505050505050565b606083156116eb575081611042565b8251156116fb5782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561152657818101518382015260200161150e56fe417564697461626c653a206e65772061756469746f7220697320746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737374686520737761702068617320616c7265616479206265656e2066696e616c697a6564636f6e74726163747320617265206e6f7420616c6c6f77656420746f2073776170416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c417564697461626c653a2063616c6c6572206973206e6f74207468652061756469746f724f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572417564697461626c653a2063616c6c6572206973206e6f7420746865206f776e6572206f722061756469746f725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122030c49585a152bd4f4c2de52892e7e947af11067094c264b6cb2e7ca82719a17164736f6c63430006040033

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

000000000000000000000000c6bf9ae1d65ae5aa446a7fbaeedd61423cb62dae

-----Decoded View---------------
Arg [0] : _feeWallet (address): 0xc6BF9ae1d65ae5aa446a7FbaeedD61423Cb62dAE

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


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.