ETH Price: $3,173.31 (-7.66%)
Gas: 10 Gwei

Contract

0x9B30E89ABD81377cDDcc8376550A58376aeef4b4
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw All ETH119002332021-02-21 12:22:261250 days ago1613910146IN
0x9B30E89A...76aeef4b4
0 ETH0.0386179100
Withdraw ETH116200232021-01-09 10:23:531293 days ago1610187833IN
0x9B30E89A...76aeef4b4
0 ETH0.0319313394
Withdraw All ETH116170842021-01-08 23:33:471293 days ago1610148827IN
0x9B30E89A...76aeef4b4
0 ETH0.0235175760.90000153
Withdraw All ETH116026232021-01-06 18:13:511295 days ago1609956831IN
0x9B30E89A...76aeef4b4
0 ETH0.04077923105.6
Withdraw ETH116010972021-01-06 12:47:231296 days ago1609937243IN
0x9B30E89A...76aeef4b4
0 ETH0.04146601122.1
Withdraw ETH115937242021-01-05 9:30:351297 days ago1609839035IN
0x9B30E89A...76aeef4b4
0 ETH0.0417259123
Deposit ETH115930542021-01-05 7:05:021297 days ago1609830302IN
0x9B30E89A...76aeef4b4
0.5 ETH0.03419802143
Deposit ETH115927512021-01-05 5:56:501297 days ago1609826210IN
0x9B30E89A...76aeef4b4
3 ETH0.02076883126
Withdraw ETH115927412021-01-05 5:54:391297 days ago1609826079IN
0x9B30E89A...76aeef4b4
0 ETH0.02434494104
Deposit ETH115927352021-01-05 5:52:031297 days ago1609825923IN
0x9B30E89A...76aeef4b4
3 ETH0.0271123107
Withdraw ETH115921602021-01-05 3:55:011297 days ago1609818901IN
0x9B30E89A...76aeef4b4
0 ETH0.07781774230
Deposit ETH115799322021-01-03 6:49:191299 days ago1609656559IN
0x9B30E89A...76aeef4b4
0.049 ETH0.0156682265.75
Deposit ETH115798652021-01-03 6:36:431299 days ago1609655803IN
0x9B30E89A...76aeef4b4
0.0376 ETH0.0018186580.7
Withdraw ETH115739362021-01-02 8:39:351300 days ago1609576775IN
0x9B30E89A...76aeef4b4
0 ETH0.013534840
Deposit ETH115702992021-01-01 19:20:051300 days ago1609528805IN
0x9B30E89A...76aeef4b4
2 ETH0.017032467
Withdraw All ETH115700262021-01-01 18:16:281300 days ago1609524988IN
0x9B30E89A...76aeef4b4
0 ETH0.0241117885
Deposit ETH115699402021-01-01 17:58:491300 days ago1609523929IN
0x9B30E89A...76aeef4b4
0.7 ETH0.0232026997
Deposit ETH115691492021-01-01 15:07:161300 days ago1609513636IN
0x9B30E89A...76aeef4b4
0.2 ETH0.0193203476
Withdraw ETH115619912020-12-31 12:38:291302 days ago1609418309IN
0x9B30E89A...76aeef4b4
0 ETH0.032570296
Withdraw ETH115576602020-12-30 20:45:101302 days ago1609361110IN
0x9B30E89A...76aeef4b4
0 ETH0.0196254658
Withdraw ETH115481722020-12-29 9:43:001304 days ago1609234980IN
0x9B30E89A...76aeef4b4
0 ETH0.0011248849.35000153
Withdraw ETH115474512020-12-29 7:06:261304 days ago1609225586IN
0x9B30E89A...76aeef4b4
0 ETH0.0175958652
Deposit ETH115467052020-12-29 4:19:061304 days ago1609215546IN
0x9B30E89A...76aeef4b4
1.5 ETH0.03015582126.5
Withdraw ETH115455212020-12-28 23:51:331304 days ago1609199493IN
0x9B30E89A...76aeef4b4
0 ETH0.0152413947
Deposit ETH115448702020-12-28 21:21:451304 days ago1609190505IN
0x9B30E89A...76aeef4b4
1 ETH0.0114366145
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
119002332021-02-21 12:22:261250 days ago1613910146
0x9B30E89A...76aeef4b4
0.14825077 ETH
119002332021-02-21 12:22:261250 days ago1613910146
0x9B30E89A...76aeef4b4
0.14825077 ETH
116200232021-01-09 10:23:531293 days ago1610187833
0x9B30E89A...76aeef4b4
0.1422 ETH
116200232021-01-09 10:23:531293 days ago1610187833
0x9B30E89A...76aeef4b4
0.1422 ETH
116170842021-01-08 23:33:471293 days ago1610148827
0x9B30E89A...76aeef4b4
0.12787335 ETH
116170842021-01-08 23:33:471293 days ago1610148827
0x9B30E89A...76aeef4b4
0.12787335 ETH
116026232021-01-06 18:13:511295 days ago1609956831
0x9B30E89A...76aeef4b4
2.0634047 ETH
116026232021-01-06 18:13:511295 days ago1609956831
0x9B30E89A...76aeef4b4
2.0634047 ETH
116010972021-01-06 12:47:231296 days ago1609937243
0x9B30E89A...76aeef4b4
9.3855 ETH
116010972021-01-06 12:47:231296 days ago1609937243
0x9B30E89A...76aeef4b4
9.3855 ETH
115937242021-01-05 9:30:351297 days ago1609839035
0x9B30E89A...76aeef4b4
2.3252 ETH
115937242021-01-05 9:30:351297 days ago1609839035
0x9B30E89A...76aeef4b4
2.3252 ETH
115930542021-01-05 7:05:021297 days ago1609830302
0x9B30E89A...76aeef4b4
0.5 ETH
115927512021-01-05 5:56:501297 days ago1609826210
0x9B30E89A...76aeef4b4
3 ETH
115927412021-01-05 5:54:391297 days ago1609826079
0x9B30E89A...76aeef4b4
3 ETH
115927412021-01-05 5:54:391297 days ago1609826079
0x9B30E89A...76aeef4b4
3 ETH
115927352021-01-05 5:52:031297 days ago1609825923
0x9B30E89A...76aeef4b4
3 ETH
115921602021-01-05 3:55:011297 days ago1609818901
0x9B30E89A...76aeef4b4
2.0752 ETH
115921602021-01-05 3:55:011297 days ago1609818901
0x9B30E89A...76aeef4b4
2.0752 ETH
115799322021-01-03 6:49:191299 days ago1609656559
0x9B30E89A...76aeef4b4
0.049 ETH
115739362021-01-02 8:39:351300 days ago1609576775
0x9B30E89A...76aeef4b4
0.9996 ETH
115739362021-01-02 8:39:351300 days ago1609576775
0x9B30E89A...76aeef4b4
0.9996 ETH
115702992021-01-01 19:20:051300 days ago1609528805
0x9B30E89A...76aeef4b4
2 ETH
115700262021-01-01 18:16:281300 days ago1609524988
0x9B30E89A...76aeef4b4
0.11259128 ETH
115700262021-01-01 18:16:281300 days ago1609524988
0x9B30E89A...76aeef4b4
0.11259128 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
X2Router

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : X2Router.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import "./libraries/token/IERC20.sol";
import "./libraries/token/SafeERC20.sol";
import "./libraries/math/SafeMath.sol";

import "./interfaces/IWETH.sol";
import "./interfaces/IX2Factory.sol";
import "./interfaces/IX2Router.sol";
import "./interfaces/IX2Market.sol";
import "./interfaces/IX2Token.sol";

contract X2Router is IX2Router {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    address public factory;
    address public override weth;

    modifier ensureDeadline(uint _deadline) {
        require(_deadline >= block.timestamp, "X2Router: expired");
        _;
    }

    constructor(address _factory, address _weth) public {
        factory = _factory;
        weth = _weth;
    }

    receive() external payable {
        require(msg.sender == weth, "X2Token: unsupported sender");
    }

    function deposit(
        address _token,
        uint256 _amount,
        uint256 _subsidy,
        address _receiver,
        uint256 _deadline
    ) external ensureDeadline(_deadline) {
        address market = _getMarket(_token);
        if (_subsidy > 0) {
            _transferFeeTokenToMarket(market, _subsidy);
        }
        _transferCollateralToMarket(market, _amount);
        IX2Market(market).deposit(_token, _receiver, _subsidy > 0);
    }

    function depositETH(
        address _token,
        uint256 _subsidy,
        address _receiver,
        uint256 _deadline
    ) external payable ensureDeadline(_deadline) {
        address market = _getMarket(_token);
        if (_subsidy > 0) {
            _transferFeeTokenToMarket(market, _subsidy);
        }
        _transferETHToMarket(market, msg.value);
        IX2Market(market).deposit(_token, _receiver, _subsidy > 0);
    }

    function withdraw(
        address _token,
        uint256 _amount,
        uint256 _subsidy,
        address _receiver,
        uint256 _deadline
    ) external ensureDeadline(_deadline) {
        IERC20(_token).transferFrom(msg.sender, address(this), _amount);
        address market = _getMarket(_token);
        if (_subsidy > 0) {
            _transferFeeTokenToMarket(market, _subsidy);
        }
        IX2Market(market).withdraw(_token, _amount, _receiver, _subsidy > 0);
    }

    function withdrawETH(
        address _token,
        uint256 _amount,
        uint256 _subsidy,
        address _receiver,
        uint256 _deadline
    ) external ensureDeadline(_deadline) {
        IERC20(_token).transferFrom(msg.sender, address(this), _amount);

        address market = _getMarket(_token);
        require(IX2Market(market).collateralToken() == weth, "X2Router: mismatched collateral");
        if (_subsidy > 0) {
            _transferFeeTokenToMarket(market, _subsidy);
        }

        uint256 withdrawAmount = IX2Market(market).withdraw(_token, _amount, address(this), _subsidy > 0);
        IWETH(weth).withdraw(withdrawAmount);

        (bool success,) = _receiver.call{value: withdrawAmount}("");
        require(success, "X2Token: eth transfer failed");
    }

    function withdrawAll(
        address _token,
        uint256 _subsidy,
        address _receiver,
        uint256 _deadline
    ) external ensureDeadline(_deadline) {
        address market = _getMarket(_token);
        if (_subsidy > 0) {
            _transferFeeTokenToMarket(market, _subsidy);
        }
        uint256 amount = IERC20(_token).balanceOf(msg.sender);
        IERC20(_token).transferFrom(msg.sender, address(this), amount);
        IX2Market(market).withdraw(_token, amount, _receiver, _subsidy > 0);
    }

    function withdrawAllETH(
        address _token,
        uint256 _subsidy,
        address _receiver,
        uint256 _deadline
    ) external ensureDeadline(_deadline) {
        address market = _getMarket(_token);
        if (_subsidy > 0) {
            _transferFeeTokenToMarket(market, _subsidy);
        }
        uint256 amount = IERC20(_token).balanceOf(msg.sender);
        require(IX2Market(market).collateralToken() == weth, "X2Router: mismatched collateral");

        IERC20(_token).transferFrom(msg.sender, address(this), amount);
        uint256 withdrawAmount = IX2Market(market).withdraw(_token, amount, address(this), _subsidy > 0);
        IWETH(weth).withdraw(withdrawAmount);

        (bool success,) = _receiver.call{value: withdrawAmount}("");
        require(success, "X2Token: eth transfer failed");
    }

    function _transferETHToMarket(address _market, uint256 _amount) private {
        require(IX2Market(_market).collateralToken() == weth, "X2Router: mismatched collateral");
        IWETH(weth).deposit{value: _amount}();
        require(IWETH(weth).transfer(_market, _amount), "X2Router: weth transfer failed");
    }

    function _transferCollateralToMarket(address _market, uint256 _amount) private {
        address collateralToken = IX2Market(_market).collateralToken();
        IERC20(collateralToken).safeTransferFrom(msg.sender, _market, _amount);
    }

    function _getMarket(address _token) private view returns (address) {
        address market = IX2Token(_token).market();
        return market;
    }

    function _transferFeeTokenToMarket(address _market, uint256 _subsidy) private {
        address feeToken = IX2Factory(factory).feeToken();
        IERC20(feeToken).safeTransferFrom(msg.sender, _market, _subsidy);
    }
}

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

pragma solidity 0.6.12;

/**
 * @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 3 of 10 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

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 4 of 10 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

/**
 * @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 5 of 10 : IWETH.sol
//SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IWETH {
    function deposit() external payable;
    function transfer(address to, uint value) external returns (bool);
    function withdraw(uint) external;
}

File 6 of 10 : IX2Factory.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IX2Factory {
    function feeToken() external view returns (address);
    function feeReceiver() external view returns (address);
    function getFee(address market, uint256 amount) external view returns (uint256);
}

File 7 of 10 : IX2Router.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IX2Router {
    function weth() external view returns (address);
}

File 8 of 10 : IX2Market.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IX2Market {
    function bullToken() external view returns (address);
    function bearToken() external view returns (address);
    function latestPrice() external view returns (uint256);
    function getDivisor(address token) external view returns (uint256);
    function cachedDivisors(address token) external view returns (uint256);
    function collateralToken() external view returns (address);
    function deposit(address token, address receiver, bool withFeeSubsidy) external returns (uint256);
    function withdraw(address token, uint256 amount, address receiver, bool withFeeSubsidy) external returns (uint256);
    function rebase() external returns (bool);
}

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

pragma solidity 0.6.12;

interface IX2Token {
    function _totalSupply() external view returns (uint256);
    function market() external view returns (address);
    function mint(address account, uint256 amount, uint256 divisor) external;
    function burn(address account, uint256 amount) external;
}

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

pragma solidity ^0.6.2;

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

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(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
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_weth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_subsidy","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_deadline","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_subsidy","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_deadline","type":"uint256"}],"name":"depositETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_subsidy","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_deadline","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_subsidy","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_deadline","type":"uint256"}],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_subsidy","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_deadline","type":"uint256"}],"name":"withdrawAllETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_subsidy","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_deadline","type":"uint256"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b506040516116723803806116728339818101604052604081101561003357600080fd5b508051602090910151600080546001600160a01b039384166001600160a01b031991821617909155600180549390921692169190911790556115f88061007a6000396000f3fe60806040526004361061007f5760003560e01c8063734397781161004e57806373439778146102005780638da2d4f014610247578063c45a015514610296578063e8f6aa6f146102ab576100e5565b806309a5fca3146100ea578063224a5312146101395780633fc8cef3146101805780634a109fbe146101b1576100e5565b366100e5576001546001600160a01b031633146100e3576040805162461bcd60e51b815260206004820152601b60248201527f5832546f6b656e3a20756e737570706f727465642073656e6465720000000000604482015290519081900360640190fd5b005b600080fd5b3480156100f657600080fd5b506100e3600480360360a081101561010d57600080fd5b506001600160a01b038135811691602081013591604082013591606081013590911690608001356102e5565b34801561014557600080fd5b506100e36004803603608081101561015c57600080fd5b506001600160a01b0381358116916020810135916040820135169060600135610466565b34801561018c57600080fd5b50610195610630565b604080516001600160a01b039092168252519081900360200190f35b3480156101bd57600080fd5b506100e3600480360360a08110156101d457600080fd5b506001600160a01b0381358116916020810135916040820135916060810135909116906080013561063f565b34801561020c57600080fd5b506100e36004803603608081101561022357600080fd5b506001600160a01b03813581169160208101359160408201351690606001356109a2565b34801561025357600080fd5b506100e3600480360360a081101561026a57600080fd5b506001600160a01b03813581169160208101359160408201359160608101359091169060800135610d18565b3480156102a257600080fd5b50610195610de5565b6100e3600480360360808110156102c157600080fd5b506001600160a01b0381358116916020810135916040820135169060600135610df4565b804281101561032f576040805162461bcd60e51b8152602060048201526011602482015270160c949bdd5d195c8e88195e1c1a5c9959607a1b604482015290519081900360640190fd5b604080516323b872dd60e01b81523360048201523060248201526044810187905290516001600160a01b038816916323b872dd9160648083019260209291908290030181600087803b15801561038457600080fd5b505af1158015610398573d6000803e3d6000fd5b505050506040513d60208110156103ae57600080fd5b50600090506103bc87610ef5565b905084156103ce576103ce8186610f64565b604080516309777fbf60e11b81526001600160a01b03898116600483015260248201899052868116604483015287151560648301529151918316916312eeff7e916084808201926020929091908290030181600087803b15801561043157600080fd5b505af1158015610445573d6000803e3d6000fd5b505050506040513d602081101561045b57600080fd5b505050505050505050565b80428110156104b0576040805162461bcd60e51b8152602060048201526011602482015270160c949bdd5d195c8e88195e1c1a5c9959607a1b604482015290519081900360640190fd5b60006104bb86610ef5565b905084156104cd576104cd8186610f64565b6000866001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561051c57600080fd5b505afa158015610530573d6000803e3d6000fd5b505050506040513d602081101561054657600080fd5b5051604080516323b872dd60e01b81523360048201523060248201526044810183905290519192506001600160a01b038916916323b872dd916064808201926020929091908290030181600087803b1580156105a157600080fd5b505af11580156105b5573d6000803e3d6000fd5b505050506040513d60208110156105cb57600080fd5b5050604080516309777fbf60e11b81526001600160a01b03898116600483015260248201849052878116604483015288151560648301529151918416916312eeff7e916084808201926020929091908290030181600087803b15801561043157600080fd5b6001546001600160a01b031681565b8042811015610689576040805162461bcd60e51b8152602060048201526011602482015270160c949bdd5d195c8e88195e1c1a5c9959607a1b604482015290519081900360640190fd5b604080516323b872dd60e01b81523360048201523060248201526044810187905290516001600160a01b038816916323b872dd9160648083019260209291908290030181600087803b1580156106de57600080fd5b505af11580156106f2573d6000803e3d6000fd5b505050506040513d602081101561070857600080fd5b506000905061071687610ef5565b9050600160009054906101000a90046001600160a01b03166001600160a01b0316816001600160a01b031663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b15801561077057600080fd5b505afa158015610784573d6000803e3d6000fd5b505050506040513d602081101561079a57600080fd5b50516001600160a01b0316146107f7576040805162461bcd60e51b815260206004820152601f60248201527f5832526f757465723a206d69736d61746368656420636f6c6c61746572616c00604482015290519081900360640190fd5b8415610807576108078186610f64565b604080516309777fbf60e11b81526001600160a01b03898116600483015260248201899052306044830152871515606483015291516000928416916312eeff7e91608480830192602092919082900301818787803b15801561086857600080fd5b505af115801561087c573d6000803e3d6000fd5b505050506040513d602081101561089257600080fd5b505160015460408051632e1a7d4d60e01b81526004810184905290519293506001600160a01b0390911691632e1a7d4d9160248082019260009290919082900301818387803b1580156108e457600080fd5b505af11580156108f8573d6000803e3d6000fd5b5050604051600092506001600160a01b038816915083908381818185875af1925050503d8060008114610947576040519150601f19603f3d011682016040523d82523d6000602084013e61094c565b606091505b505090508061045b576040805162461bcd60e51b815260206004820152601c60248201527f5832546f6b656e3a20657468207472616e73666572206661696c656400000000604482015290519081900360640190fd5b80428110156109ec576040805162461bcd60e51b8152602060048201526011602482015270160c949bdd5d195c8e88195e1c1a5c9959607a1b604482015290519081900360640190fd5b60006109f786610ef5565b90508415610a0957610a098186610f64565b6000866001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610a5857600080fd5b505afa158015610a6c573d6000803e3d6000fd5b505050506040513d6020811015610a8257600080fd5b505160015460408051632c805af560e21b815290519293506001600160a01b03918216929185169163b2016bd491600480820192602092909190829003018186803b158015610ad057600080fd5b505afa158015610ae4573d6000803e3d6000fd5b505050506040513d6020811015610afa57600080fd5b50516001600160a01b031614610b57576040805162461bcd60e51b815260206004820152601f60248201527f5832526f757465723a206d69736d61746368656420636f6c6c61746572616c00604482015290519081900360640190fd5b604080516323b872dd60e01b81523360048201523060248201526044810183905290516001600160a01b038916916323b872dd9160648083019260209291908290030181600087803b158015610bac57600080fd5b505af1158015610bc0573d6000803e3d6000fd5b505050506040513d6020811015610bd657600080fd5b5050604080516309777fbf60e11b81526001600160a01b03898116600483015260248201849052306044830152881515606483015291516000928516916312eeff7e91608480830192602092919082900301818787803b158015610c3957600080fd5b505af1158015610c4d573d6000803e3d6000fd5b505050506040513d6020811015610c6357600080fd5b505160015460408051632e1a7d4d60e01b81526004810184905290519293506001600160a01b0390911691632e1a7d4d9160248082019260009290919082900301818387803b158015610cb557600080fd5b505af1158015610cc9573d6000803e3d6000fd5b5050604051600092506001600160a01b038916915083908381818185875af1925050503d8060008114610947576040519150601f19603f3d011682016040523d82523d6000602084013e61094c565b8042811015610d62576040805162461bcd60e51b8152602060048201526011602482015270160c949bdd5d195c8e88195e1c1a5c9959607a1b604482015290519081900360640190fd5b6000610d6d87610ef5565b90508415610d7f57610d7f8186610f64565b610d898187610ffb565b60408051630404773760e11b81526001600160a01b03898116600483015286811660248301528715156044830152915191831691630808ee6e916064808201926020929091908290030181600087803b15801561043157600080fd5b6000546001600160a01b031681565b8042811015610e3e576040805162461bcd60e51b8152602060048201526011602482015270160c949bdd5d195c8e88195e1c1a5c9959607a1b604482015290519081900360640190fd5b6000610e4986610ef5565b90508415610e5b57610e5b8186610f64565b610e658134611036565b60408051630404773760e11b81526001600160a01b03888116600483015286811660248301528715156044830152915191831691630808ee6e916064808201926020929091908290030181600087803b158015610ec157600080fd5b505af1158015610ed5573d6000803e3d6000fd5b505050506040513d6020811015610eeb57600080fd5b5050505050505050565b600080826001600160a01b03166380f556056040518163ffffffff1660e01b815260040160206040518083038186803b158015610f3157600080fd5b505afa158015610f45573d6000803e3d6000fd5b505050506040513d6020811015610f5b57600080fd5b50519392505050565b60008060009054906101000a90046001600160a01b03166001600160a01b031663647846a56040518163ffffffff1660e01b815260040160206040518083038186803b158015610fb357600080fd5b505afa158015610fc7573d6000803e3d6000fd5b505050506040513d6020811015610fdd57600080fd5b50519050610ff66001600160a01b038216338585611242565b505050565b6000826001600160a01b031663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b158015610fb357600080fd5b60015460408051632c805af560e21b815290516001600160a01b039283169285169163b2016bd4916004808301926020929190829003018186803b15801561107d57600080fd5b505afa158015611091573d6000803e3d6000fd5b505050506040513d60208110156110a757600080fd5b50516001600160a01b031614611104576040805162461bcd60e51b815260206004820152601f60248201527f5832526f757465723a206d69736d61746368656420636f6c6c61746572616c00604482015290519081900360640190fd5b600160009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561115457600080fd5b505af1158015611168573d6000803e3d6000fd5b50506001546040805163a9059cbb60e01b81526001600160a01b03888116600483015260248201889052915191909216945063a9059cbb9350604480830193506020928290030181600087803b1580156111c157600080fd5b505af11580156111d5573d6000803e3d6000fd5b505050506040513d60208110156111eb57600080fd5b505161123e576040805162461bcd60e51b815260206004820152601e60248201527f5832526f757465723a2077657468207472616e73666572206661696c65640000604482015290519081900360640190fd5b5050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261129c9085906112a2565b50505050565b60606112f7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113539092919063ffffffff16565b805190915015610ff65780806020019051602081101561131657600080fd5b5051610ff65760405162461bcd60e51b815260040180806020018281038252602a815260200180611599602a913960400191505060405180910390fd5b6060611362848460008561136c565b90505b9392505050565b6060824710156113ad5760405162461bcd60e51b81526004018080602001828103825260268152602001806115736026913960400191505060405180910390fd5b6113b6856114c8565b611407576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106114465780518252601f199092019160209182019101611427565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146114a8576040519150601f19603f3d011682016040523d82523d6000602084013e6114ad565b606091505b50915091506114bd8282866114ce565b979650505050505050565b3b151590565b606083156114dd575081611365565b8251156114ed5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561153757818101518382015260200161151f565b50505050905090810190601f1680156115645780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212206e37cc88fa32b7c339264481c82036be591adf6fac6ab6dfa8d10b15733a088e64736f6c634300060c0033000000000000000000000000c3f9de2840776b9798c79d194dd07d76bd052046000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

Deployed Bytecode

0x60806040526004361061007f5760003560e01c8063734397781161004e57806373439778146102005780638da2d4f014610247578063c45a015514610296578063e8f6aa6f146102ab576100e5565b806309a5fca3146100ea578063224a5312146101395780633fc8cef3146101805780634a109fbe146101b1576100e5565b366100e5576001546001600160a01b031633146100e3576040805162461bcd60e51b815260206004820152601b60248201527f5832546f6b656e3a20756e737570706f727465642073656e6465720000000000604482015290519081900360640190fd5b005b600080fd5b3480156100f657600080fd5b506100e3600480360360a081101561010d57600080fd5b506001600160a01b038135811691602081013591604082013591606081013590911690608001356102e5565b34801561014557600080fd5b506100e36004803603608081101561015c57600080fd5b506001600160a01b0381358116916020810135916040820135169060600135610466565b34801561018c57600080fd5b50610195610630565b604080516001600160a01b039092168252519081900360200190f35b3480156101bd57600080fd5b506100e3600480360360a08110156101d457600080fd5b506001600160a01b0381358116916020810135916040820135916060810135909116906080013561063f565b34801561020c57600080fd5b506100e36004803603608081101561022357600080fd5b506001600160a01b03813581169160208101359160408201351690606001356109a2565b34801561025357600080fd5b506100e3600480360360a081101561026a57600080fd5b506001600160a01b03813581169160208101359160408201359160608101359091169060800135610d18565b3480156102a257600080fd5b50610195610de5565b6100e3600480360360808110156102c157600080fd5b506001600160a01b0381358116916020810135916040820135169060600135610df4565b804281101561032f576040805162461bcd60e51b8152602060048201526011602482015270160c949bdd5d195c8e88195e1c1a5c9959607a1b604482015290519081900360640190fd5b604080516323b872dd60e01b81523360048201523060248201526044810187905290516001600160a01b038816916323b872dd9160648083019260209291908290030181600087803b15801561038457600080fd5b505af1158015610398573d6000803e3d6000fd5b505050506040513d60208110156103ae57600080fd5b50600090506103bc87610ef5565b905084156103ce576103ce8186610f64565b604080516309777fbf60e11b81526001600160a01b03898116600483015260248201899052868116604483015287151560648301529151918316916312eeff7e916084808201926020929091908290030181600087803b15801561043157600080fd5b505af1158015610445573d6000803e3d6000fd5b505050506040513d602081101561045b57600080fd5b505050505050505050565b80428110156104b0576040805162461bcd60e51b8152602060048201526011602482015270160c949bdd5d195c8e88195e1c1a5c9959607a1b604482015290519081900360640190fd5b60006104bb86610ef5565b905084156104cd576104cd8186610f64565b6000866001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561051c57600080fd5b505afa158015610530573d6000803e3d6000fd5b505050506040513d602081101561054657600080fd5b5051604080516323b872dd60e01b81523360048201523060248201526044810183905290519192506001600160a01b038916916323b872dd916064808201926020929091908290030181600087803b1580156105a157600080fd5b505af11580156105b5573d6000803e3d6000fd5b505050506040513d60208110156105cb57600080fd5b5050604080516309777fbf60e11b81526001600160a01b03898116600483015260248201849052878116604483015288151560648301529151918416916312eeff7e916084808201926020929091908290030181600087803b15801561043157600080fd5b6001546001600160a01b031681565b8042811015610689576040805162461bcd60e51b8152602060048201526011602482015270160c949bdd5d195c8e88195e1c1a5c9959607a1b604482015290519081900360640190fd5b604080516323b872dd60e01b81523360048201523060248201526044810187905290516001600160a01b038816916323b872dd9160648083019260209291908290030181600087803b1580156106de57600080fd5b505af11580156106f2573d6000803e3d6000fd5b505050506040513d602081101561070857600080fd5b506000905061071687610ef5565b9050600160009054906101000a90046001600160a01b03166001600160a01b0316816001600160a01b031663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b15801561077057600080fd5b505afa158015610784573d6000803e3d6000fd5b505050506040513d602081101561079a57600080fd5b50516001600160a01b0316146107f7576040805162461bcd60e51b815260206004820152601f60248201527f5832526f757465723a206d69736d61746368656420636f6c6c61746572616c00604482015290519081900360640190fd5b8415610807576108078186610f64565b604080516309777fbf60e11b81526001600160a01b03898116600483015260248201899052306044830152871515606483015291516000928416916312eeff7e91608480830192602092919082900301818787803b15801561086857600080fd5b505af115801561087c573d6000803e3d6000fd5b505050506040513d602081101561089257600080fd5b505160015460408051632e1a7d4d60e01b81526004810184905290519293506001600160a01b0390911691632e1a7d4d9160248082019260009290919082900301818387803b1580156108e457600080fd5b505af11580156108f8573d6000803e3d6000fd5b5050604051600092506001600160a01b038816915083908381818185875af1925050503d8060008114610947576040519150601f19603f3d011682016040523d82523d6000602084013e61094c565b606091505b505090508061045b576040805162461bcd60e51b815260206004820152601c60248201527f5832546f6b656e3a20657468207472616e73666572206661696c656400000000604482015290519081900360640190fd5b80428110156109ec576040805162461bcd60e51b8152602060048201526011602482015270160c949bdd5d195c8e88195e1c1a5c9959607a1b604482015290519081900360640190fd5b60006109f786610ef5565b90508415610a0957610a098186610f64565b6000866001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610a5857600080fd5b505afa158015610a6c573d6000803e3d6000fd5b505050506040513d6020811015610a8257600080fd5b505160015460408051632c805af560e21b815290519293506001600160a01b03918216929185169163b2016bd491600480820192602092909190829003018186803b158015610ad057600080fd5b505afa158015610ae4573d6000803e3d6000fd5b505050506040513d6020811015610afa57600080fd5b50516001600160a01b031614610b57576040805162461bcd60e51b815260206004820152601f60248201527f5832526f757465723a206d69736d61746368656420636f6c6c61746572616c00604482015290519081900360640190fd5b604080516323b872dd60e01b81523360048201523060248201526044810183905290516001600160a01b038916916323b872dd9160648083019260209291908290030181600087803b158015610bac57600080fd5b505af1158015610bc0573d6000803e3d6000fd5b505050506040513d6020811015610bd657600080fd5b5050604080516309777fbf60e11b81526001600160a01b03898116600483015260248201849052306044830152881515606483015291516000928516916312eeff7e91608480830192602092919082900301818787803b158015610c3957600080fd5b505af1158015610c4d573d6000803e3d6000fd5b505050506040513d6020811015610c6357600080fd5b505160015460408051632e1a7d4d60e01b81526004810184905290519293506001600160a01b0390911691632e1a7d4d9160248082019260009290919082900301818387803b158015610cb557600080fd5b505af1158015610cc9573d6000803e3d6000fd5b5050604051600092506001600160a01b038916915083908381818185875af1925050503d8060008114610947576040519150601f19603f3d011682016040523d82523d6000602084013e61094c565b8042811015610d62576040805162461bcd60e51b8152602060048201526011602482015270160c949bdd5d195c8e88195e1c1a5c9959607a1b604482015290519081900360640190fd5b6000610d6d87610ef5565b90508415610d7f57610d7f8186610f64565b610d898187610ffb565b60408051630404773760e11b81526001600160a01b03898116600483015286811660248301528715156044830152915191831691630808ee6e916064808201926020929091908290030181600087803b15801561043157600080fd5b6000546001600160a01b031681565b8042811015610e3e576040805162461bcd60e51b8152602060048201526011602482015270160c949bdd5d195c8e88195e1c1a5c9959607a1b604482015290519081900360640190fd5b6000610e4986610ef5565b90508415610e5b57610e5b8186610f64565b610e658134611036565b60408051630404773760e11b81526001600160a01b03888116600483015286811660248301528715156044830152915191831691630808ee6e916064808201926020929091908290030181600087803b158015610ec157600080fd5b505af1158015610ed5573d6000803e3d6000fd5b505050506040513d6020811015610eeb57600080fd5b5050505050505050565b600080826001600160a01b03166380f556056040518163ffffffff1660e01b815260040160206040518083038186803b158015610f3157600080fd5b505afa158015610f45573d6000803e3d6000fd5b505050506040513d6020811015610f5b57600080fd5b50519392505050565b60008060009054906101000a90046001600160a01b03166001600160a01b031663647846a56040518163ffffffff1660e01b815260040160206040518083038186803b158015610fb357600080fd5b505afa158015610fc7573d6000803e3d6000fd5b505050506040513d6020811015610fdd57600080fd5b50519050610ff66001600160a01b038216338585611242565b505050565b6000826001600160a01b031663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b158015610fb357600080fd5b60015460408051632c805af560e21b815290516001600160a01b039283169285169163b2016bd4916004808301926020929190829003018186803b15801561107d57600080fd5b505afa158015611091573d6000803e3d6000fd5b505050506040513d60208110156110a757600080fd5b50516001600160a01b031614611104576040805162461bcd60e51b815260206004820152601f60248201527f5832526f757465723a206d69736d61746368656420636f6c6c61746572616c00604482015290519081900360640190fd5b600160009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561115457600080fd5b505af1158015611168573d6000803e3d6000fd5b50506001546040805163a9059cbb60e01b81526001600160a01b03888116600483015260248201889052915191909216945063a9059cbb9350604480830193506020928290030181600087803b1580156111c157600080fd5b505af11580156111d5573d6000803e3d6000fd5b505050506040513d60208110156111eb57600080fd5b505161123e576040805162461bcd60e51b815260206004820152601e60248201527f5832526f757465723a2077657468207472616e73666572206661696c65640000604482015290519081900360640190fd5b5050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261129c9085906112a2565b50505050565b60606112f7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113539092919063ffffffff16565b805190915015610ff65780806020019051602081101561131657600080fd5b5051610ff65760405162461bcd60e51b815260040180806020018281038252602a815260200180611599602a913960400191505060405180910390fd5b6060611362848460008561136c565b90505b9392505050565b6060824710156113ad5760405162461bcd60e51b81526004018080602001828103825260268152602001806115736026913960400191505060405180910390fd5b6113b6856114c8565b611407576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106114465780518252601f199092019160209182019101611427565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146114a8576040519150601f19603f3d011682016040523d82523d6000602084013e6114ad565b606091505b50915091506114bd8282866114ce565b979650505050505050565b3b151590565b606083156114dd575081611365565b8251156114ed5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561153757818101518382015260200161151f565b50505050905090810190601f1680156115645780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212206e37cc88fa32b7c339264481c82036be591adf6fac6ab6dfa8d10b15733a088e64736f6c634300060c0033

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

000000000000000000000000c3f9de2840776b9798c79d194dd07d76bd052046000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

-----Decoded View---------------
Arg [0] : _factory (address): 0xc3f9DE2840776b9798C79D194dD07d76Bd052046
Arg [1] : _weth (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000c3f9de2840776b9798c79d194dd07d76bd052046
Arg [1] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2


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.