ETH Price: $3,606.85 (+4.66%)
 

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw Token209662002024-10-14 20:30:1181 days ago1728937811IN
0x29f3f0ac...466a08E81
0 ETH0.0014331921.30516985
Withdraw Token209661862024-10-14 20:27:2381 days ago1728937643IN
0x29f3f0ac...466a08E81
0 ETH0.0011998519.79998506
Withdraw Token206752212024-09-04 5:47:23121 days ago1725428843IN
0x29f3f0ac...466a08E81
0 ETH0.000087861.21940119
Withdraw Token205469702024-08-17 7:51:59139 days ago1723881119IN
0x29f3f0ac...466a08E81
0 ETH0.000074721.23355468
Withdraw Token205456272024-08-17 3:21:35139 days ago1723864895IN
0x29f3f0ac...466a08E81
0 ETH0.000063551.04870102
Withdraw Token205330452024-08-15 9:09:59141 days ago1723712999IN
0x29f3f0ac...466a08E81
0 ETH0.000188453.11055705
Withdraw Token204382692024-08-02 3:47:11154 days ago1722570431IN
0x29f3f0ac...466a08E81
0 ETH0.00019593.23348842
Withdraw Token194361822024-03-14 22:26:11295 days ago1710455171IN
0x29f3f0ac...466a08E81
0 ETH0.002870147.36227603
Withdraw Token192803662024-02-22 3:04:23316 days ago1708571063IN
0x29f3f0ac...466a08E81
0 ETH0.002144735.40578255
Withdraw Token192803012024-02-22 2:51:23316 days ago1708570283IN
0x29f3f0ac...466a08E81
0 ETH0.0020918334.532987
Withdraw Token191699072024-02-06 14:52:47332 days ago1707231167IN
0x29f3f0ac...466a08E81
0 ETH0.0023676639.07876502
Withdraw Token191476112024-02-03 11:43:47335 days ago1706960627IN
0x29f3f0ac...466a08E81
0 ETH0.0009066114.96687075
Withdraw Token190752902024-01-24 8:25:35345 days ago1706084735IN
0x29f3f0ac...466a08E81
0 ETH0.00065210.76152174
Set Allowance183247332023-10-11 4:09:59450 days ago1696997399IN
0x29f3f0ac...466a08E81
0 ETH0.000339285.90545205
Set Allowance183247292023-10-11 4:09:11450 days ago1696997351IN
0x29f3f0ac...466a08E81
0 ETH0.000333686.14393265
Withdraw Token180890142023-09-08 3:27:11483 days ago1694143631IN
0x29f3f0ac...466a08E81
0 ETH0.0004527810.4148639
Withdraw Token180890062023-09-08 3:25:23483 days ago1694143523IN
0x29f3f0ac...466a08E81
0 ETH0.000555329.16750991
Withdraw Token179609512023-08-21 5:14:59501 days ago1692594899IN
0x29f3f0ac...466a08E81
0 ETH0.0007629312.60735715
Update Withdraw ...179609062023-08-21 5:05:59501 days ago1692594359IN
0x29f3f0ac...466a08E81
0 ETH0.0003109611.23065504
Withdraw Token177758622023-07-26 7:48:23527 days ago1690357703IN
0x29f3f0ac...466a08E81
0 ETH0.0008562315.576348
Update Withdraw ...177758592023-07-26 7:47:47527 days ago1690357667IN
0x29f3f0ac...466a08E81
0 ETH0.0007803716.39814171
Withdraw Token177748402023-07-26 4:22:11527 days ago1690345331IN
0x29f3f0ac...466a08E81
0 ETH0.0009231316.79712127
Update Withdraw ...177748372023-07-26 4:21:35527 days ago1690345295IN
0x29f3f0ac...466a08E81
0 ETH0.0008339717.52460737
Set Allowance177175312023-07-18 3:46:23535 days ago1689651983IN
0x29f3f0ac...466a08E81
0 ETH0.0013260615.16423013

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MarketMakerProxy

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 1000 runs

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

import "@openzeppelin/contracts/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/utils/Address.sol";

import "./interfaces/IWETH.sol";
import "./utils/LibConstant.sol";
import "./utils/Ownable.sol";

contract MarketMakerProxy is Ownable {
    using SafeERC20 for IERC20;
    using Address for address payable;

    event ChangeSigner(address newSigner);
    event UpdateWhitelist(address addr, bool enabled);
    event WrapETH(uint256 amount);
    event WithdrawETH(uint256 amount);

    // bytes4(keccak256("isValidSignature(bytes32,bytes)")
    bytes4 public constant EIP1271_MAGICVALUE = 0x1626ba7e;
    IWETH public immutable WETH;

    address public signer;
    mapping(address => bool) public isWithdrawWhitelist;

    constructor(
        address _owner,
        address _signer,
        IWETH _weth
    ) Ownable(_owner) {
        require(_signer != address(0), "MarketMakerProxy: zero address");
        signer = _signer;
        WETH = _weth;
    }

    receive() external payable {}

    function setSigner(address _signer) external onlyOwner {
        require(_signer != address(0), "MarketMakerProxy: zero address");
        emit ChangeSigner(_signer);
        signer = _signer;
    }

    function setAllowance(address[] calldata tokenAddrs, address spender) external onlyOwner {
        for (uint256 i = 0; i < tokenAddrs.length; i++) {
            IERC20(tokenAddrs[i]).safeApprove(spender, LibConstant.MAX_UINT);
        }
    }

    function closeAllowance(address[] calldata tokenAddrs, address spender) external onlyOwner {
        for (uint256 i = 0; i < tokenAddrs.length; ++i) {
            IERC20(tokenAddrs[i]).safeApprove(spender, 0);
        }
    }

    function updateWithdrawWhitelist(address _addr, bool _enabled) external onlyOwner {
        require(_addr != address(0), "MarketMakerProxy: zero address");
        isWithdrawWhitelist[_addr] = _enabled;
        emit UpdateWhitelist(_addr, _enabled);
    }

    function wrapETH() external onlyOwner {
        uint256 balance = address(this).balance;
        if (balance > 0) {
            WETH.deposit{ value: balance }();
            emit WrapETH(balance);
        }
    }

    function withdrawToken(
        address token,
        address to,
        uint256 amount
    ) external onlyOwner {
        require(isWithdrawWhitelist[to], "MarketMakerProxy: not in withdraw whitelist");
        IERC20(token).safeTransfer(to, amount);
    }

    function withdrawETH(address payable to, uint256 amount) external onlyOwner {
        require(isWithdrawWhitelist[to], "MarketMakerProxy: not in withdraw whitelist");
        to.sendValue(amount);
        emit WithdrawETH(amount);
    }

    function isValidSignature(bytes32 dataHash, bytes calldata signature) external view returns (bytes4) {
        require(signer == ECDSA.recover(dataHash, signature), "MarketMakerProxy: invalid signature");
        return EIP1271_MAGICVALUE;
    }
}

File 2 of 9 : IWETH.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

interface IWETH {
    function balanceOf(address account) external view returns (uint256);

    function deposit() external payable;

    function withdraw(uint256 amount) external;

    function transfer(address dst, uint256 wad) external returns (bool);

    function transferFrom(
        address src,
        address dst,
        uint256 wad
    ) external returns (bool);
}

File 3 of 9 : LibConstant.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;

library LibConstant {
    int256 internal constant MAX_INT = 2**255 - 1;
    uint256 internal constant MAX_UINT = 2**256 - 1;
    uint16 internal constant BPS_MAX = 10000;
    address internal constant ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
    address internal constant ZERO_ADDRESS = address(0);
}

File 4 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;

/// @title Ownable Contract
/// @author imToken Labs
abstract contract Ownable {
    address public owner;
    address public nominatedOwner;

    event OwnerNominated(address indexed newOwner);
    event OwnerChanged(address indexed oldOwner, address indexed newOwner);

    constructor(address _owner) {
        require(_owner != address(0), "owner should not be 0");
        owner = _owner;
    }

    modifier onlyOwner() {
        require(msg.sender == owner, "not owner");
        _;
    }

    /// @notice Activate new ownership
    /// @notice Only nominated owner can call
    function acceptOwnership() external {
        require(msg.sender == nominatedOwner, "not nominated");
        emit OwnerChanged(owner, nominatedOwner);

        owner = nominatedOwner;
        nominatedOwner = address(0);
    }

    /// @notice Give up the ownership
    /// @notice Only owner can call
    /// @notice Ownership cannot be recovered
    function renounceOwnership() external onlyOwner {
        require(nominatedOwner == address(0), "pending nomination exists");
        emit OwnerChanged(owner, address(0));
        owner = address(0);
    }

    /// @notice Nominate new owner
    /// @notice Only owner can call
    /// @param newOwner The address of the new owner
    function nominateNewOwner(address newOwner) external onlyOwner {
        nominatedOwner = newOwner;
        emit OwnerNominated(newOwner);
    }
}

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

pragma solidity ^0.7.0;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        // Check the signature length
        if (signature.length != 65) {
            revert("ECDSA: invalid signature length");
        }

        // Divide the signature in r, s and v variables
        bytes32 r;
        bytes32 s;
        uint8 v;

        // ecrecover takes the signature parameters, and the only way to get them
        // currently is to use assembly.
        // solhint-disable-next-line no-inline-assembly
        assembly {
            r := mload(add(signature, 0x20))
            s := mload(add(signature, 0x40))
            v := byte(0, mload(add(signature, 0x60)))
        }

        return recover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover-bytes32-bytes-} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        require(uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, "ECDSA: invalid signature 's' value");
        require(v == 27 || v == 28, "ECDSA: invalid signature 'v' value");

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        require(signer != address(0), "ECDSA: invalid signature");

        return signer;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * replicates the behavior of the
     * https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign[`eth_sign`]
     * JSON-RPC method.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }
}

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

pragma solidity ^0.7.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

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

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

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

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

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        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) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        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, reverting 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) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

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

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

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * 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);
        return a / b;
    }

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

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

pragma solidity ^0.7.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.7.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 9 of 9 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.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);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    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.4._
     */
    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": 1000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "remappings": [
    "@openzeppelin/=tokenlon-contracts/lib/openzeppelin-contracts/",
    "forge-std/=tokenlon-contracts/lib/forge-std/src/"
  ],
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_signer","type":"address"},{"internalType":"contract IWETH","name":"_weth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newSigner","type":"address"}],"name":"ChangeSigner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"UpdateWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawETH","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WrapETH","type":"event"},{"inputs":[],"name":"EIP1271_MAGICVALUE","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"contract IWETH","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokenAddrs","type":"address[]"},{"internalType":"address","name":"spender","type":"address"}],"name":"closeAllowance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"dataHash","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"isValidSignature","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isWithdrawWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"nominateNewOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokenAddrs","type":"address[]"},{"internalType":"address","name":"spender","type":"address"}],"name":"setAllowance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"},{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"updateWithdrawWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wrapETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a060405234801561001057600080fd5b506040516118cd3803806118cd8339818101604052606081101561003357600080fd5b5080516020820151604090920151909190826001600160a01b0381166100a0576040805162461bcd60e51b815260206004820152601560248201527f6f776e65722073686f756c64206e6f7420626520300000000000000000000000604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b03928316179055821661010f576040805162461bcd60e51b815260206004820152601e60248201527f4d61726b65744d616b657250726f78793a207a65726f20616464726573730000604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b03938416179055606081901b6001600160601b03191660805216905061177161015c60003980610d905280610e3d52506117716000f3fe6080604052600436106101125760003560e01c806355c16af9116100a557806379ba509711610074578063940702e211610059578063940702e2146104a8578063a85ef678146104e3578063ad5c4648146104f857610119565b806379ba50971461047e5780638da5cb5b1461049357610119565b806355c16af9146103da5780636742a936146103ef5780636c19e78314610436578063715018a61461046957610119565b806330db4580116100e157806330db45801461028057806346920bad146103065780634782f7791461038c57806353a47bb7146103c557610119565b806301e336671461011e5780631626ba7e146101635780631627540c1461021c578063238ac9331461024f57610119565b3661011957005b600080fd5b34801561012a57600080fd5b506101616004803603606081101561014157600080fd5b506001600160a01b0381358116916020810135909116906040013561050d565b005b34801561016f57600080fd5b506101e76004803603604081101561018657600080fd5b813591908101906040810160208201356401000000008111156101a857600080fd5b8201836020820111156101ba57600080fd5b803590602001918460018302840111640100000000831117156101dc57600080fd5b5090925090506105c8565b604080517fffffffff000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b34801561022857600080fd5b506101616004803603602081101561023f57600080fd5b50356001600160a01b0316610667565b34801561025b57600080fd5b50610264610709565b604080516001600160a01b039092168252519081900360200190f35b34801561028c57600080fd5b50610161600480360360408110156102a357600080fd5b8101906020810181356401000000008111156102be57600080fd5b8201836020820111156102d057600080fd5b803590602001918460208302840111640100000000831117156102f257600080fd5b9193509150356001600160a01b0316610718565b34801561031257600080fd5b506101616004803603604081101561032957600080fd5b81019060208101813564010000000081111561034457600080fd5b82018360208201111561035657600080fd5b8035906020019184602083028401116401000000008311171561037857600080fd5b9193509150356001600160a01b03166107b6565b34801561039857600080fd5b50610161600480360360408110156103af57600080fd5b506001600160a01b038135169060200135610827565b3480156103d157600080fd5b50610264610913565b3480156103e657600080fd5b506101e7610922565b3480156103fb57600080fd5b506104226004803603602081101561041257600080fd5b50356001600160a01b031661092d565b604080519115158252519081900360200190f35b34801561044257600080fd5b506101616004803603602081101561045957600080fd5b50356001600160a01b0316610942565b34801561047557600080fd5b50610161610a53565b34801561048a57600080fd5b50610161610b53565b34801561049f57600080fd5b50610264610c23565b3480156104b457600080fd5b50610161600480360360408110156104cb57600080fd5b506001600160a01b0381351690602001351515610c32565b3480156104ef57600080fd5b50610161610d3c565b34801561050457600080fd5b50610264610e3b565b6000546001600160a01b03163314610558576040805162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b604482015290519081900360640190fd5b6001600160a01b03821660009081526003602052604090205460ff166105af5760405162461bcd60e51b815260040180806020018281038252602b8152602001806116db602b913960400191505060405180910390fd5b6105c36001600160a01b0384168383610e5f565b505050565b600061060a8484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610edf92505050565b6002546001600160a01b039081169116146106565760405162461bcd60e51b815260040180806020018281038252602381526020018061168e6023913960400191505060405180910390fd5b50630b135d3f60e11b5b9392505050565b6000546001600160a01b031633146106b2576040805162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b604482015290519081900360640190fd5b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290600090a250565b6002546001600160a01b031681565b6000546001600160a01b03163314610763576040805162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b604482015290519081900360640190fd5b60005b828110156107b0576107a882600086868581811061078057fe5b905060200201356001600160a01b03166001600160a01b0316610f5f9092919063ffffffff16565b600101610766565b50505050565b6000546001600160a01b03163314610801576040805162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b604482015290519081900360640190fd5b60005b828110156107b05761081f8260001986868581811061078057fe5b600101610804565b6000546001600160a01b03163314610872576040805162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b604482015290519081900360640190fd5b6001600160a01b03821660009081526003602052604090205460ff166108c95760405162461bcd60e51b815260040180806020018281038252602b8152602001806116db602b913960400191505060405180910390fd5b6108dc6001600160a01b038316826110b9565b6040805182815290517f94effa14ea3a1ef396fa2fd829336d1597f1d76b548c26bfa2332869706638af9181900360200190a15050565b6001546001600160a01b031681565b630b135d3f60e11b81565b60036020526000908152604090205460ff1681565b6000546001600160a01b0316331461098d576040805162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b604482015290519081900360640190fd5b6001600160a01b0381166109e8576040805162461bcd60e51b815260206004820152601e60248201527f4d61726b65744d616b657250726f78793a207a65726f20616464726573730000604482015290519081900360640190fd5b604080516001600160a01b038316815290517f2c4c2330e655d7c5374379a59a72351868d5364faf6af52488661fa4e344f9489181900360200190a16002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a9e576040805162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b604482015290519081900360640190fd5b6001546001600160a01b031615610afc576040805162461bcd60e51b815260206004820152601960248201527f70656e64696e67206e6f6d696e6174696f6e2065786973747300000000000000604482015290519081900360640190fd5b600080546040516001600160a01b03909116907fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6001546001600160a01b03163314610bb2576040805162461bcd60e51b815260206004820152600d60248201527f6e6f74206e6f6d696e6174656400000000000000000000000000000000000000604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91a3600180546000805473ffffffffffffffffffffffffffffffffffffffff199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b6000546001600160a01b03163314610c7d576040805162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b604482015290519081900360640190fd5b6001600160a01b038216610cd8576040805162461bcd60e51b815260206004820152601e60248201527f4d61726b65744d616b657250726f78793a207a65726f20616464726573730000604482015290519081900360640190fd5b6001600160a01b038216600081815260036020908152604091829020805460ff191685151590811790915582519384529083015280517f08b2c0469ecd1d7a21d7e1492f0fc75fc7e8e0fa4fdf4275949c90875f5ebdf59281900390910190a15050565b6000546001600160a01b03163314610d87576040805162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b604482015290519081900360640190fd5b478015610e38577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610de957600080fd5b505af1158015610dfd573d6000803e3d6000fd5b50506040805185815290517fecd7785612b8cd587d21c47c57be068d574c88e997296415344b4419736de92d94509081900360200192509050a15b50565b7f000000000000000000000000000000000000000000000000000000000000000081565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526105c390849061119e565b60008151604114610f37576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a610f558682858561124f565b9695505050505050565b801580610ffe5750604080517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015610fd057600080fd5b505afa158015610fe4573d6000803e3d6000fd5b505050506040513d6020811015610ffa57600080fd5b5051155b6110395760405162461bcd60e51b81526004018080602001828103825260368152602001806117066036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790526105c390849061119e565b8047101561110e576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015290519081900360640190fd5b6040516000906001600160a01b0384169083908381818185875af1925050503d8060008114611159576040519150601f19603f3d011682016040523d82523d6000602084013e61115e565b606091505b50509050806105c35760405162461bcd60e51b815260040180806020018281038252603a8152602001806115ea603a913960400191505060405180910390fd5b60006111f3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113cd9092919063ffffffff16565b8051909150156105c35780806020019051602081101561121257600080fd5b50516105c35760405162461bcd60e51b815260040180806020018281038252602a8152602001806116b1602a913960400191505060405180910390fd5b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156112b05760405162461bcd60e51b81526004018080602001828103825260228152602001806116246022913960400191505060405180910390fd5b8360ff16601b14806112c557508360ff16601c145b6113005760405162461bcd60e51b815260040180806020018281038252602281526020018061166c6022913960400191505060405180910390fd5b600060018686868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa15801561135c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166113c4576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b95945050505050565b60606113dc84846000856113e4565b949350505050565b6060824710156114255760405162461bcd60e51b81526004018080602001828103825260268152602001806116466026913960400191505060405180910390fd5b61142e8561153f565b61147f576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106114bd5780518252601f19909201916020918201910161149e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461151f576040519150601f19603f3d011682016040523d82523d6000602084013e611524565b606091505b5091509150611534828286611545565b979650505050505050565b3b151590565b60608315611554575081610660565b8251156115645782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156115ae578181015183820152602001611596565b50505050905090810190601f1680156115db5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d6179206861766520726576657274656445434453413a20696e76616c6964207369676e6174757265202773272076616c7565416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c45434453413a20696e76616c6964207369676e6174757265202776272076616c75654d61726b65744d616b657250726f78793a20696e76616c6964207369676e61747572655361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565644d61726b65744d616b657250726f78793a206e6f7420696e2077697468647261772077686974656c6973745361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a2646970667358221220a8886d622b4180806fac9efeac65eb24dc28fc2e52b0572d569f4ec2434a694264736f6c6343000706003300000000000000000000000042c336c45649891caff2d5c94caef34e916bc55800000000000000000000000042c336c45649891caff2d5c94caef34e916bc558000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

Deployed Bytecode

0x6080604052600436106101125760003560e01c806355c16af9116100a557806379ba509711610074578063940702e211610059578063940702e2146104a8578063a85ef678146104e3578063ad5c4648146104f857610119565b806379ba50971461047e5780638da5cb5b1461049357610119565b806355c16af9146103da5780636742a936146103ef5780636c19e78314610436578063715018a61461046957610119565b806330db4580116100e157806330db45801461028057806346920bad146103065780634782f7791461038c57806353a47bb7146103c557610119565b806301e336671461011e5780631626ba7e146101635780631627540c1461021c578063238ac9331461024f57610119565b3661011957005b600080fd5b34801561012a57600080fd5b506101616004803603606081101561014157600080fd5b506001600160a01b0381358116916020810135909116906040013561050d565b005b34801561016f57600080fd5b506101e76004803603604081101561018657600080fd5b813591908101906040810160208201356401000000008111156101a857600080fd5b8201836020820111156101ba57600080fd5b803590602001918460018302840111640100000000831117156101dc57600080fd5b5090925090506105c8565b604080517fffffffff000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b34801561022857600080fd5b506101616004803603602081101561023f57600080fd5b50356001600160a01b0316610667565b34801561025b57600080fd5b50610264610709565b604080516001600160a01b039092168252519081900360200190f35b34801561028c57600080fd5b50610161600480360360408110156102a357600080fd5b8101906020810181356401000000008111156102be57600080fd5b8201836020820111156102d057600080fd5b803590602001918460208302840111640100000000831117156102f257600080fd5b9193509150356001600160a01b0316610718565b34801561031257600080fd5b506101616004803603604081101561032957600080fd5b81019060208101813564010000000081111561034457600080fd5b82018360208201111561035657600080fd5b8035906020019184602083028401116401000000008311171561037857600080fd5b9193509150356001600160a01b03166107b6565b34801561039857600080fd5b50610161600480360360408110156103af57600080fd5b506001600160a01b038135169060200135610827565b3480156103d157600080fd5b50610264610913565b3480156103e657600080fd5b506101e7610922565b3480156103fb57600080fd5b506104226004803603602081101561041257600080fd5b50356001600160a01b031661092d565b604080519115158252519081900360200190f35b34801561044257600080fd5b506101616004803603602081101561045957600080fd5b50356001600160a01b0316610942565b34801561047557600080fd5b50610161610a53565b34801561048a57600080fd5b50610161610b53565b34801561049f57600080fd5b50610264610c23565b3480156104b457600080fd5b50610161600480360360408110156104cb57600080fd5b506001600160a01b0381351690602001351515610c32565b3480156104ef57600080fd5b50610161610d3c565b34801561050457600080fd5b50610264610e3b565b6000546001600160a01b03163314610558576040805162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b604482015290519081900360640190fd5b6001600160a01b03821660009081526003602052604090205460ff166105af5760405162461bcd60e51b815260040180806020018281038252602b8152602001806116db602b913960400191505060405180910390fd5b6105c36001600160a01b0384168383610e5f565b505050565b600061060a8484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610edf92505050565b6002546001600160a01b039081169116146106565760405162461bcd60e51b815260040180806020018281038252602381526020018061168e6023913960400191505060405180910390fd5b50630b135d3f60e11b5b9392505050565b6000546001600160a01b031633146106b2576040805162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b604482015290519081900360640190fd5b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290600090a250565b6002546001600160a01b031681565b6000546001600160a01b03163314610763576040805162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b604482015290519081900360640190fd5b60005b828110156107b0576107a882600086868581811061078057fe5b905060200201356001600160a01b03166001600160a01b0316610f5f9092919063ffffffff16565b600101610766565b50505050565b6000546001600160a01b03163314610801576040805162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b604482015290519081900360640190fd5b60005b828110156107b05761081f8260001986868581811061078057fe5b600101610804565b6000546001600160a01b03163314610872576040805162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b604482015290519081900360640190fd5b6001600160a01b03821660009081526003602052604090205460ff166108c95760405162461bcd60e51b815260040180806020018281038252602b8152602001806116db602b913960400191505060405180910390fd5b6108dc6001600160a01b038316826110b9565b6040805182815290517f94effa14ea3a1ef396fa2fd829336d1597f1d76b548c26bfa2332869706638af9181900360200190a15050565b6001546001600160a01b031681565b630b135d3f60e11b81565b60036020526000908152604090205460ff1681565b6000546001600160a01b0316331461098d576040805162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b604482015290519081900360640190fd5b6001600160a01b0381166109e8576040805162461bcd60e51b815260206004820152601e60248201527f4d61726b65744d616b657250726f78793a207a65726f20616464726573730000604482015290519081900360640190fd5b604080516001600160a01b038316815290517f2c4c2330e655d7c5374379a59a72351868d5364faf6af52488661fa4e344f9489181900360200190a16002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a9e576040805162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b604482015290519081900360640190fd5b6001546001600160a01b031615610afc576040805162461bcd60e51b815260206004820152601960248201527f70656e64696e67206e6f6d696e6174696f6e2065786973747300000000000000604482015290519081900360640190fd5b600080546040516001600160a01b03909116907fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6001546001600160a01b03163314610bb2576040805162461bcd60e51b815260206004820152600d60248201527f6e6f74206e6f6d696e6174656400000000000000000000000000000000000000604482015290519081900360640190fd5b600154600080546040516001600160a01b0393841693909116917fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91a3600180546000805473ffffffffffffffffffffffffffffffffffffffff199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b6000546001600160a01b03163314610c7d576040805162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b604482015290519081900360640190fd5b6001600160a01b038216610cd8576040805162461bcd60e51b815260206004820152601e60248201527f4d61726b65744d616b657250726f78793a207a65726f20616464726573730000604482015290519081900360640190fd5b6001600160a01b038216600081815260036020908152604091829020805460ff191685151590811790915582519384529083015280517f08b2c0469ecd1d7a21d7e1492f0fc75fc7e8e0fa4fdf4275949c90875f5ebdf59281900390910190a15050565b6000546001600160a01b03163314610d87576040805162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b604482015290519081900360640190fd5b478015610e38577f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610de957600080fd5b505af1158015610dfd573d6000803e3d6000fd5b50506040805185815290517fecd7785612b8cd587d21c47c57be068d574c88e997296415344b4419736de92d94509081900360200192509050a15b50565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526105c390849061119e565b60008151604114610f37576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a610f558682858561124f565b9695505050505050565b801580610ffe5750604080517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015610fd057600080fd5b505afa158015610fe4573d6000803e3d6000fd5b505050506040513d6020811015610ffa57600080fd5b5051155b6110395760405162461bcd60e51b81526004018080602001828103825260368152602001806117066036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790526105c390849061119e565b8047101561110e576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015290519081900360640190fd5b6040516000906001600160a01b0384169083908381818185875af1925050503d8060008114611159576040519150601f19603f3d011682016040523d82523d6000602084013e61115e565b606091505b50509050806105c35760405162461bcd60e51b815260040180806020018281038252603a8152602001806115ea603a913960400191505060405180910390fd5b60006111f3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113cd9092919063ffffffff16565b8051909150156105c35780806020019051602081101561121257600080fd5b50516105c35760405162461bcd60e51b815260040180806020018281038252602a8152602001806116b1602a913960400191505060405180910390fd5b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156112b05760405162461bcd60e51b81526004018080602001828103825260228152602001806116246022913960400191505060405180910390fd5b8360ff16601b14806112c557508360ff16601c145b6113005760405162461bcd60e51b815260040180806020018281038252602281526020018061166c6022913960400191505060405180910390fd5b600060018686868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa15801561135c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166113c4576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b95945050505050565b60606113dc84846000856113e4565b949350505050565b6060824710156114255760405162461bcd60e51b81526004018080602001828103825260268152602001806116466026913960400191505060405180910390fd5b61142e8561153f565b61147f576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106114bd5780518252601f19909201916020918201910161149e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461151f576040519150601f19603f3d011682016040523d82523d6000602084013e611524565b606091505b5091509150611534828286611545565b979650505050505050565b3b151590565b60608315611554575081610660565b8251156115645782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156115ae578181015183820152602001611596565b50505050905090810190601f1680156115db5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d6179206861766520726576657274656445434453413a20696e76616c6964207369676e6174757265202773272076616c7565416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c45434453413a20696e76616c6964207369676e6174757265202776272076616c75654d61726b65744d616b657250726f78793a20696e76616c6964207369676e61747572655361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565644d61726b65744d616b657250726f78793a206e6f7420696e2077697468647261772077686974656c6973745361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a2646970667358221220a8886d622b4180806fac9efeac65eb24dc28fc2e52b0572d569f4ec2434a694264736f6c63430007060033

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

00000000000000000000000042c336c45649891caff2d5c94caef34e916bc55800000000000000000000000042c336c45649891caff2d5c94caef34e916bc558000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

-----Decoded View---------------
Arg [0] : _owner (address): 0x42c336C45649891Caff2D5c94cAEF34E916Bc558
Arg [1] : _signer (address): 0x42c336C45649891Caff2D5c94cAEF34E916Bc558
Arg [2] : _weth (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000042c336c45649891caff2d5c94caef34e916bc558
Arg [1] : 00000000000000000000000042c336c45649891caff2d5c94caef34e916bc558
Arg [2] : 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  ]

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.