ETH Price: $3,356.15 (-2.84%)
Gas: 2 Gwei

Contract

0x7E93CC803c7E3DefE6718CAAE238848479DB0D35
 

Overview

ETH Balance

1.295604391865040088 ETH

Eth Value

$4,348.24 (@ $3,356.15/ETH)

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Claim202230412024-07-03 2:36:352 hrs ago1719974195IN
0x7E93CC80...479DB0D35
0 ETH0.000328553.33827123
Claim Xcept202230332024-07-03 2:34:592 hrs ago1719974099IN
0x7E93CC80...479DB0D35
0 ETH0.000759723.48779256
Claim202229542024-07-03 2:19:113 hrs ago1719973151IN
0x7E93CC80...479DB0D35
0 ETH0.000319033.24069192
Claim202229372024-07-03 2:15:473 hrs ago1719972947IN
0x7E93CC80...479DB0D35
0 ETH0.000316313.21309999
Claim202227912024-07-03 1:45:593 hrs ago1719971159IN
0x7E93CC80...479DB0D35
0 ETH0.000254072.19889405
Claim202206632024-07-02 18:37:2310 hrs ago1719945443IN
0x7E93CC80...479DB0D35
0 ETH0.000437914.44936374
Claim Xcept202206532024-07-02 18:35:2310 hrs ago1719945323IN
0x7E93CC80...479DB0D35
0 ETH0.00095624.76317037
Claim202198232024-07-02 15:48:2313 hrs ago1719935303IN
0x7E93CC80...479DB0D35
0 ETH0.00060659.3437336
Claim Xcept202176802024-07-02 8:36:5920 hrs ago1719909419IN
0x7E93CC80...479DB0D35
0 ETH0.000706173.241957
Claim202175652024-07-02 8:13:5921 hrs ago1719908039IN
0x7E93CC80...479DB0D35
0 ETH0.000204473.14955698
Claim202128992024-07-01 16:35:4736 hrs ago1719851747IN
0x7E93CC80...479DB0D35
0 ETH0.000395116.08600234
Transfer202113772024-07-01 11:29:3541 hrs ago1719833375IN
0x7E93CC80...479DB0D35
1 ETH0.000126726.01857067
Claim202109392024-07-01 10:01:5943 hrs ago1719828119IN
0x7E93CC80...479DB0D35
0 ETH0.000207263.1925475
Claim202064522024-06-30 19:00:232 days ago1719774023IN
0x7E93CC80...479DB0D35
0 ETH0.000224483.45719106
Claim202060772024-06-30 17:44:592 days ago1719769499IN
0x7E93CC80...479DB0D35
0 ETH0.000173832.67809321
Claim Xcept202049792024-06-30 14:04:232 days ago1719756263IN
0x7E93CC80...479DB0D35
0 ETH0.001026134.71029701
Claim202037962024-06-30 10:06:232 days ago1719741983IN
0x7E93CC80...479DB0D35
0 ETH0.000141412.17776645
Claim202031452024-06-30 7:55:472 days ago1719734147IN
0x7E93CC80...479DB0D35
0 ETH0.000158642.44318878
Claim Xcept202000392024-06-29 21:30:593 days ago1719696659IN
0x7E93CC80...479DB0D35
0 ETH0.000354521.76602876
Claim202000352024-06-29 21:30:113 days ago1719696611IN
0x7E93CC80...479DB0D35
0 ETH0.000191411.65696912
Claim201984762024-06-29 16:16:473 days ago1719677807IN
0x7E93CC80...479DB0D35
0 ETH0.000198812.01976027
Claim201963552024-06-29 9:09:353 days ago1719652175IN
0x7E93CC80...479DB0D35
0 ETH0.000193711.96820914
Claim201963532024-06-29 9:09:113 days ago1719652151IN
0x7E93CC80...479DB0D35
0 ETH0.000117471.80910775
Claim201939402024-06-29 1:03:474 days ago1719623027IN
0x7E93CC80...479DB0D35
0 ETH0.0001121.72497669
Claim201932842024-06-28 22:51:114 days ago1719615071IN
0x7E93CC80...479DB0D35
0 ETH0.000113211.74391181
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To Value
202230332024-07-03 2:34:592 hrs ago1719974099
0x7E93CC80...479DB0D35
0.00014673 ETH
202206532024-07-02 18:35:2310 hrs ago1719945323
0x7E93CC80...479DB0D35
0.01521239 ETH
202198232024-07-02 15:48:2313 hrs ago1719935303
0x7E93CC80...479DB0D35
0.00202211 ETH
202176802024-07-02 8:36:5920 hrs ago1719909419
0x7E93CC80...479DB0D35
0.00015859 ETH
202175652024-07-02 8:13:5921 hrs ago1719908039
0x7E93CC80...479DB0D35
0.00609155 ETH
202128992024-07-01 16:35:4736 hrs ago1719851747
0x7E93CC80...479DB0D35
0.041765 ETH
202109392024-07-01 10:01:5943 hrs ago1719828119
0x7E93CC80...479DB0D35
0.00888432 ETH
202064522024-06-30 19:00:232 days ago1719774023
0x7E93CC80...479DB0D35
0.01028302 ETH
202060772024-06-30 17:44:592 days ago1719769499
0x7E93CC80...479DB0D35
0.00488085 ETH
202049792024-06-30 14:04:232 days ago1719756263
0x7E93CC80...479DB0D35
0.00508845 ETH
202037962024-06-30 10:06:232 days ago1719741983
0x7E93CC80...479DB0D35
0.00329573 ETH
202031452024-06-30 7:55:472 days ago1719734147
0x7E93CC80...479DB0D35
0.00344607 ETH
202000392024-06-29 21:30:593 days ago1719696659
0x7E93CC80...479DB0D35
0.00418438 ETH
201963532024-06-29 9:09:113 days ago1719652151
0x7E93CC80...479DB0D35
0.01055693 ETH
201939402024-06-29 1:03:474 days ago1719623027
0x7E93CC80...479DB0D35
0.00051342 ETH
201932842024-06-28 22:51:114 days ago1719615071
0x7E93CC80...479DB0D35
0.01006889 ETH
201929602024-06-28 21:46:114 days ago1719611171
0x7E93CC80...479DB0D35
0.03640176 ETH
201919302024-06-28 18:19:234 days ago1719598763
0x7E93CC80...479DB0D35
0.06581224 ETH
201829862024-06-27 12:20:235 days ago1719490823
0x7E93CC80...479DB0D35
0.0042344 ETH
201817092024-06-27 8:03:595 days ago1719475439
0x7E93CC80...479DB0D35
0.05131432 ETH
201797652024-06-27 1:33:476 days ago1719452027
0x7E93CC80...479DB0D35
0.00510625 ETH
201791642024-06-26 23:32:476 days ago1719444767
0x7E93CC80...479DB0D35
0.02363539 ETH
201755842024-06-26 11:32:116 days ago1719401531
0x7E93CC80...479DB0D35
0.00345931 ETH
201750652024-06-26 9:48:116 days ago1719395291
0x7E93CC80...479DB0D35
0.24131619 ETH
201747792024-06-26 8:50:476 days ago1719391847
0x7E93CC80...479DB0D35
0.02722301 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
XCeptionRewards

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 15 : XCeptionRewards.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IWETH.sol";

contract XCeptionRewards is Ownable {
  using SafeERC20 for IERC20;

  IWETH private _weth = IWETH(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
  address private _xcept = address(0xac506C7DC601500E997caD42Ea446624ED40c743);
  IUniswapV2Router02 private _uniswapV2RouterV2 = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);

  event Claim(
    uint256 indexed claimId,
    address indexed receiver,
    address indexed token,
    uint256 amount
  );

  bool private _paused = false;
  address private _signer;

  mapping(bytes => bool) private _usedSignatures;

  /**
   * @param signer Signer address used to verify signature
   */
  constructor(address signer) Ownable(msg.sender) {
    _signer = signer;
  }

  receive() external payable {}
  fallback() external payable {}

  /**
   * @notice Returns signer address used to verify signature
   */
  function getSigner() external view returns (address) {
    return _signer;
  }

  /**
   * @param receiver Address that will receive token/eth
   * @param token Token address
   * @param amount Amount of tokens/eth
   * @param claimId Claim unique identifier
   * @param deadline Claim deadline timestamp
   * @param signature Signature to verify claim is allowed
   */
  function claim(
    address receiver,
    address token,
    uint256 amount,
    uint256 claimId,
    uint256 deadline,
    bytes calldata signature
  ) external {
    require(deadline >= block.timestamp, 'XCeptionRewards: Expired');
    require(!_paused, 'XCeptionRewards: Paused');

    require(!_usedSignatures[signature], "XCeptionRewards: Signature has already been used");
    _usedSignatures[signature] = true;

    address sender = _msgSender();

    bytes32 messageHash = MessageHashUtils.toEthSignedMessageHash(
        keccak256(abi.encode(sender, receiver, token, amount, claimId, deadline))
    );
    require(
        ECDSA.recover(messageHash, signature) == _signer,
        "Invalid signature"
    );

    if (token != address(0)) {
      IERC20(token).safeTransfer(receiver, amount);
    } else {
      (bool sent,) = receiver.call{value: amount}("");
      require(sent, "XCeptionRewards: Failed to send Ether");
    }

    emit Claim(claimId, receiver, token, amount);
  }

  /**
   * @param receiver Address that will receive XCEPT
   * @param ethAmount Amount of eth
   * @param xceptAmountMin Amount of XCEPT expect to receive
   * @param claimId Claim unique identifier
   * @param deadline Claim deadline timestamp
   * @param targetBlock Targe block for reorg protection
   * @param signature Signature to verify claim is allowed
   */
  function claimXcept(
    address receiver,
    uint256 ethAmount,
    uint256 xceptAmountMin,
    uint256 claimId,
    uint256 deadline,
    uint256 targetBlock,
    bytes calldata signature
  ) external {
    if (targetBlock != 0) {
      require(targetBlock == block.number, "XCeptionRouter: Not a target block");
    }

    require(deadline >= block.timestamp, 'XCeptionRewards: Expired');
    require(!_paused, 'XCeptionRewards: Paused');

    require(!_usedSignatures[signature], "XCeptionRewards: Signature has already been used");
    _usedSignatures[signature] = true;

    address sender = _msgSender();

    bytes32 messageHash = MessageHashUtils.toEthSignedMessageHash(
      keccak256(abi.encode(sender, receiver, ethAmount, claimId, deadline))
    );
    require(
      ECDSA.recover(messageHash, signature) == _signer,
      "Invalid signature"
    );

    address[] memory path = new address[](2);
    path[0] = address(_weth);
    path[1] = address(_xcept);

    _uniswapV2RouterV2.swapExactETHForTokensSupportingFeeOnTransferTokens{value: ethAmount}(
      xceptAmountMin,
      path,
      receiver,
      block.timestamp
    );

    emit Claim(claimId, receiver, address(0), ethAmount);
  }

  /**
   * @notice Updates signer address used to verify signature. Allowed only for contract owner.
   * @param newSigner - address to verify that signed by server
   */
  function updateSigner(address newSigner) external onlyOwner {
    _signer = newSigner;
  }

  /**
   * @notice Pause/unpause claims could be called only by contract owner
   * @param paused Boolean parameter, if true - pause, if false - unpause
   */
  function pause(bool paused) external onlyOwner {
    _paused = paused;
  }

  /**
   * @notice Recover Eth could be called only by contract owner
   * @param to - Address that wil receive eth
   * @param value - Token address
   */
  function recoverEth(address to, uint256 value) external onlyOwner {
    (bool sent,) = to.call{value: value}("");
    require(sent, "XCeptionRewards: Failed to send Ether");
  }

  /**
   * @notice Recover token could be called only by contract owner
   * @param token - Token address
   * @param to - Address that wil receive tokens
   * @param amount - Amount of tokens to receive
   */
  function recoverToken(address token, address to, uint256 amount) external onlyOwner {
    IERC20(token).safeTransfer(to, amount);
  }
}

File 2 of 15 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 15 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 4 of 15 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

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

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

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

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

File 5 of 15 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../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 Address for address;

    /**
     * @dev An operation with an ERC20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @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);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
    }
}

File 6 of 15 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @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 or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * 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.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @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`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert FailedInnerCall();
        }
    }
}

File 7 of 15 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 8 of 15 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.20;

/**
 * @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 {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS
    }

    /**
     * @dev The signature derives the `address(0)`.
     */
    error ECDSAInvalidSignature();

    /**
     * @dev The signature has an invalid length.
     */
    error ECDSAInvalidSignatureLength(uint256 length);

    /**
     * @dev The signature has an S value that is in the upper half order.
     */
    error ECDSAInvalidSignatureS(bytes32 s);

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not
     * return address(0) without also returning an error description. Errors are documented using an enum (error type)
     * and a bytes32 providing additional information about the error.
     *
     * If no error is returned, then the address can be used for verification purposes.
     *
     * The `ecrecover` EVM precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     */
    function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {
        unchecked {
            bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
            // We do not check for an overflow here since the shift operation results in 0 or 1.
            uint8 v = uint8((uint256(vs) >> 255) + 27);
            return tryRecover(hash, v, r, s);
        }
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     */
    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError, bytes32) {
        // 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 (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): 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.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS, s);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature, bytes32(0));
        }

        return (signer, RecoverError.NoError, bytes32(0));
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.
     */
    function _throwError(RecoverError error, bytes32 errorArg) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert ECDSAInvalidSignature();
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert ECDSAInvalidSignatureLength(uint256(errorArg));
        } else if (error == RecoverError.InvalidSignatureS) {
            revert ECDSAInvalidSignatureS(errorArg);
        }
    }
}

File 9 of 15 : MessageHashUtils.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)

pragma solidity ^0.8.20;

import {Strings} from "../Strings.sol";

/**
 * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.
 *
 * The library provides methods for generating a hash of a message that conforms to the
 * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]
 * specifications.
 */
library MessageHashUtils {
    /**
     * @dev Returns the keccak256 digest of an EIP-191 signed data with version
     * `0x45` (`personal_sign` messages).
     *
     * The digest is calculated by prefixing a bytes32 `messageHash` with
     * `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the
     * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
     *
     * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with
     * keccak256, although any bytes32 value can be safely used because the final digest will
     * be re-hashed.
     *
     * See {ECDSA-recover}.
     */
    function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash
            mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix
            digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)
        }
    }

    /**
     * @dev Returns the keccak256 digest of an EIP-191 signed data with version
     * `0x45` (`personal_sign` messages).
     *
     * The digest is calculated by prefixing an arbitrary `message` with
     * `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the
     * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
     *
     * See {ECDSA-recover}.
     */
    function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {
        return
            keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message));
    }

    /**
     * @dev Returns the keccak256 digest of an EIP-191 signed data with version
     * `0x00` (data with intended validator).
     *
     * The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended
     * `validator` address. Then hashing the result.
     *
     * See {ECDSA-recover}.
     */
    function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked(hex"19_00", validator, data));
    }

    /**
     * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).
     *
     * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with
     * `\x19\x01` and hashing the result. It corresponds to the hash signed by the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.
     *
     * See {ECDSA-recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, hex"19_01")
            mstore(add(ptr, 0x02), domainSeparator)
            mstore(add(ptr, 0x22), structHash)
            digest := keccak256(ptr, 0x42)
        }
    }
}

File 10 of 15 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Muldiv operation overflow.
     */
    error MathOverflowedMulDiv();

    enum Rounding {
        Floor, // Toward negative infinity
        Ceil, // Toward positive infinity
        Trunc, // Toward zero
        Expand // Away from zero
    }

    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

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

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // 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.
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            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.
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds towards infinity instead
     * of rounding towards zero.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        if (b == 0) {
            // Guarantee the same behavior as in a regular Solidity division.
            return a / b;
        }

        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
     * denominator == 0.
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
     * Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0 = x * y; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            if (denominator <= prod1) {
                revert MathOverflowedMulDiv();
            }

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.
            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.

            uint256 twos = denominator & (0 - denominator);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also
            // works in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
     * towards zero.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
        }
    }

    /**
     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
     */
    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
        return uint8(rounding) % 2 == 1;
    }
}

File 11 of 15 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two signed numbers.
     */
    function min(int256 a, int256 b) internal pure returns (int256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

File 12 of 15 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)

pragma solidity ^0.8.20;

import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant HEX_DIGITS = "0123456789abcdef";
    uint8 private constant ADDRESS_LENGTH = 20;

    /**
     * @dev The `value` string doesn't fit in the specified `length`.
     */
    error StringsInsufficientHexLength(uint256 value, uint256 length);

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toStringSigned(int256 value) internal pure returns (string memory) {
        return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value)));
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        uint256 localValue = value;
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = HEX_DIGITS[localValue & 0xf];
            localValue >>= 4;
        }
        if (localValue != 0) {
            revert StringsInsufficientHexLength(value, length);
        }
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal
     * representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);
    }

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 13 of 15 : IUniswapV2Router01.sol
pragma solidity >=0.6.2;

interface IUniswapV2Router01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

File 14 of 15 : IUniswapV2Router02.sol
pragma solidity >=0.6.2;

import './IUniswapV2Router01.sol';

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

File 15 of 15 : IWETH.sol
pragma solidity >=0.5.0;

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"signer","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"claimId","type":"uint256"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"claimId","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"ethAmount","type":"uint256"},{"internalType":"uint256","name":"xceptAmountMin","type":"uint256"},{"internalType":"uint256","name":"claimId","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"targetBlock","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"claimXcept","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"paused","type":"bool"}],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"recoverEth","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":"recoverToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSigner","type":"address"}],"name":"updateSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080604052600180546001600160a01b031990811673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2179091556002805490911673ac506c7dc601500e997cad42ea446624ed40c743179055600380546001600160a81b031916737a250d5630b4cf539739df2c5dacb4c659f2488d17905534801561007e57600080fd5b506040516113ef3803806113ef83398101604081905261009d91610142565b33806100c357604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100cc816100f2565b50600480546001600160a01b0319166001600160a01b0392909216919091179055610172565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561015457600080fd5b81516001600160a01b038116811461016b57600080fd5b9392505050565b61126e806101816000396000f3fe60806040526004361061008f5760003560e01c80638da5cb5b116100565780638da5cb5b14610143578063a7229fd914610161578063a7ecd37e14610181578063e72c5717146101a1578063f2fde38b146101c157005b806302329a2914610098578063343685d1146100b85780633a10f173146100d8578063715018a6146100f85780637ac3c02f1461010d57005b3661009657005b005b3480156100a457600080fd5b506100966100b3366004610ea6565b6101e1565b3480156100c457600080fd5b506100966100d3366004610f28565b610207565b3480156100e457600080fd5b506100966100f3366004610faa565b61054e565b34801561010457600080fd5b50610096610914565b34801561011957600080fd5b506004546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b34801561014f57600080fd5b506000546001600160a01b0316610127565b34801561016d57600080fd5b5061009661017c36600461102e565b610928565b34801561018d57600080fd5b5061009661019c36600461106a565b610949565b3480156101ad57600080fd5b506100966101bc366004611085565b610973565b3480156101cd57600080fd5b506100966101dc36600461106a565b6109ee565b6101e9610a2c565b60038054911515600160a01b0260ff60a01b19909216919091179055565b428310156102575760405162461bcd60e51b81526020600482015260186024820152771610d95c1d1a5bdb94995dd85c991cce88115e1c1a5c995960421b60448201526064015b60405180910390fd5b600354600160a01b900460ff16156102ab5760405162461bcd60e51b81526020600482015260176024820152761610d95c1d1a5bdb94995dd85c991cce8814185d5cd959604a1b604482015260640161024e565b600582826040516102bd9291906110af565b9081526040519081900360200190205460ff16156102ed5760405162461bcd60e51b815260040161024e906110bf565b6001600583836040516103019291906110af565b908152604051908190036020019020805491151560ff19909216919091179055600061032a3390565b604080516001600160a01b038084166020830152808c169282019290925290891660608201526080810188905260a0810187905260c081018690529091506000906103bc9060e0015b604051602081830303815290604052805190602001207f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b600454604080516020601f88018190048102820181019092528681529293506001600160a01b039091169161040e918491908890889081908401838280828437600092019190915250610a5992505050565b6001600160a01b0316146104585760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b604482015260640161024e565b6001600160a01b038816156104805761047b6001600160a01b0389168a89610a83565b6104f5565b6000896001600160a01b03168860405160006040518083038185875af1925050503d80600081146104cd576040519150601f19603f3d011682016040523d82523d6000602084013e6104d2565b606091505b50509050806104f35760405162461bcd60e51b815260040161024e9061110f565b505b876001600160a01b0316896001600160a01b0316877fa27580a77a01c86ee8598d930ae5f9a0ec6f146c6e0e9e9f50b95bacb33787188a60405161053b91815260200190565b60405180910390a4505050505050505050565b82156105ae574383146105ae5760405162461bcd60e51b815260206004820152602260248201527f5843657074696f6e526f757465723a204e6f7420612074617267657420626c6f604482015261636b60f01b606482015260840161024e565b428410156105f95760405162461bcd60e51b81526020600482015260186024820152771610d95c1d1a5bdb94995dd85c991cce88115e1c1a5c995960421b604482015260640161024e565b600354600160a01b900460ff161561064d5760405162461bcd60e51b81526020600482015260176024820152761610d95c1d1a5bdb94995dd85c991cce8814185d5cd959604a1b604482015260640161024e565b6005828260405161065f9291906110af565b9081526040519081900360200190205460ff161561068f5760405162461bcd60e51b815260040161024e906110bf565b6001600583836040516106a39291906110af565b908152604051908190036020019020805491151560ff1990921691909117905560006106cc3390565b604080516001600160a01b0380841660208301528c1691810191909152606081018a90526080810188905260a081018790529091506000906107109060c001610373565b600454604080516020601f88018190048102820181019092528681529293506001600160a01b0390911691610762918491908890889081908401838280828437600092019190915250610a5992505050565b6001600160a01b0316146107ac5760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b604482015260640161024e565b604080516002808252606082018352600092602083019080368337505060015482519293506001600160a01b0316918391506000906107ed576107ed611154565b6001600160a01b03928316602091820292909201015260025482519116908290600190811061081e5761081e611154565b60200260200101906001600160a01b031690816001600160a01b031681525050600360009054906101000a90046001600160a01b03166001600160a01b031663b6f9de958b8b848f426040518663ffffffff1660e01b8152600401610886949392919061116a565b6000604051808303818588803b15801561089f57600080fd5b505af11580156108b3573d6000803e3d6000fd5b505050505060006001600160a01b03168b6001600160a01b0316897fa27580a77a01c86ee8598d930ae5f9a0ec6f146c6e0e9e9f50b95bacb33787188d6040516108ff91815260200190565b60405180910390a45050505050505050505050565b61091c610a2c565b6109266000610ad5565b565b610930610a2c565b6109446001600160a01b0384168383610a83565b505050565b610951610a2c565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b61097b610a2c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146109c8576040519150601f19603f3d011682016040523d82523d6000602084013e6109cd565b606091505b50509050806109445760405162461bcd60e51b815260040161024e9061110f565b6109f6610a2c565b6001600160a01b038116610a2057604051631e4fbdf760e01b81526000600482015260240161024e565b610a2981610ad5565b50565b6000546001600160a01b031633146109265760405163118cdaa760e01b815233600482015260240161024e565b600080600080610a698686610b25565b925092509250610a798282610b72565b5090949350505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610944908490610c2f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060008351604103610b5f5760208401516040850151606086015160001a610b5188828585610c92565b955095509550505050610b6b565b50508151600091506002905b9250925092565b6000826003811115610b8657610b866111d6565b03610b8f575050565b6001826003811115610ba357610ba36111d6565b03610bc15760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610bd557610bd56111d6565b03610bf65760405163fce698f760e01b81526004810182905260240161024e565b6003826003811115610c0a57610c0a6111d6565b03610c2b576040516335e2f38360e21b81526004810182905260240161024e565b5050565b6000610c446001600160a01b03841683610d61565b90508051600014158015610c69575080806020019051810190610c6791906111ec565b155b1561094457604051635274afe760e01b81526001600160a01b038416600482015260240161024e565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ccd5750600091506003905082610d57565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610d21573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d4d57506000925060019150829050610d57565b9250600091508190505b9450945094915050565b6060610d6f83836000610d76565b9392505050565b606081471015610d9b5760405163cd78605960e01b815230600482015260240161024e565b600080856001600160a01b03168486604051610db79190611209565b60006040518083038185875af1925050503d8060008114610df4576040519150601f19603f3d011682016040523d82523d6000602084013e610df9565b606091505b5091509150610e09868383610e13565b9695505050505050565b606082610e2857610e2382610e6f565b610d6f565b8151158015610e3f57506001600160a01b0384163b155b15610e6857604051639996b31560e01b81526001600160a01b038516600482015260240161024e565b5080610d6f565b805115610e7f5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b8015158114610a2957600080fd5b600060208284031215610eb857600080fd5b8135610d6f81610e98565b80356001600160a01b0381168114610eda57600080fd5b919050565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600080600060c0888a031215610f4357600080fd5b610f4c88610ec3565b9650610f5a60208901610ec3565b955060408801359450606088013593506080880135925060a088013567ffffffffffffffff811115610f8b57600080fd5b610f978a828b01610edf565b989b979a50959850939692959293505050565b60008060008060008060008060e0898b031215610fc657600080fd5b610fcf89610ec3565b97506020890135965060408901359550606089013594506080890135935060a0890135925060c089013567ffffffffffffffff81111561100e57600080fd5b61101a8b828c01610edf565b999c989b5096995094979396929594505050565b60008060006060848603121561104357600080fd5b61104c84610ec3565b925061105a60208501610ec3565b9150604084013590509250925092565b60006020828403121561107c57600080fd5b610d6f82610ec3565b6000806040838503121561109857600080fd5b6110a183610ec3565b946020939093013593505050565b8183823760009101908152919050565b60208082526030908201527f5843657074696f6e526577617264733a205369676e617475726520686173206160408201526f1b1c9958591e481899595b881d5cd95960821b606082015260800190565b60208082526025908201527f5843657074696f6e526577617264733a204661696c656420746f2073656e642060408201526422ba3432b960d91b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60006080820186835260206080602085015281875180845260a08601915060208901935060005b818110156111b65784516001600160a01b031683529383019391830191600101611191565b50506001600160a01b039690961660408501525050506060015292915050565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156111fe57600080fd5b8151610d6f81610e98565b6000825160005b8181101561122a5760208186018101518583015201611210565b50600092019182525091905056fea26469706673582212206bce6bf5e35201ad3c4a5fcb828fe39951dbf86df4e9be6b667b6e2489b9e5d464736f6c63430008170033000000000000000000000000e317db2edd9ffb3ab34998b4ba27cde8a2594f86

Deployed Bytecode

0x60806040526004361061008f5760003560e01c80638da5cb5b116100565780638da5cb5b14610143578063a7229fd914610161578063a7ecd37e14610181578063e72c5717146101a1578063f2fde38b146101c157005b806302329a2914610098578063343685d1146100b85780633a10f173146100d8578063715018a6146100f85780637ac3c02f1461010d57005b3661009657005b005b3480156100a457600080fd5b506100966100b3366004610ea6565b6101e1565b3480156100c457600080fd5b506100966100d3366004610f28565b610207565b3480156100e457600080fd5b506100966100f3366004610faa565b61054e565b34801561010457600080fd5b50610096610914565b34801561011957600080fd5b506004546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b34801561014f57600080fd5b506000546001600160a01b0316610127565b34801561016d57600080fd5b5061009661017c36600461102e565b610928565b34801561018d57600080fd5b5061009661019c36600461106a565b610949565b3480156101ad57600080fd5b506100966101bc366004611085565b610973565b3480156101cd57600080fd5b506100966101dc36600461106a565b6109ee565b6101e9610a2c565b60038054911515600160a01b0260ff60a01b19909216919091179055565b428310156102575760405162461bcd60e51b81526020600482015260186024820152771610d95c1d1a5bdb94995dd85c991cce88115e1c1a5c995960421b60448201526064015b60405180910390fd5b600354600160a01b900460ff16156102ab5760405162461bcd60e51b81526020600482015260176024820152761610d95c1d1a5bdb94995dd85c991cce8814185d5cd959604a1b604482015260640161024e565b600582826040516102bd9291906110af565b9081526040519081900360200190205460ff16156102ed5760405162461bcd60e51b815260040161024e906110bf565b6001600583836040516103019291906110af565b908152604051908190036020019020805491151560ff19909216919091179055600061032a3390565b604080516001600160a01b038084166020830152808c169282019290925290891660608201526080810188905260a0810187905260c081018690529091506000906103bc9060e0015b604051602081830303815290604052805190602001207f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b600454604080516020601f88018190048102820181019092528681529293506001600160a01b039091169161040e918491908890889081908401838280828437600092019190915250610a5992505050565b6001600160a01b0316146104585760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b604482015260640161024e565b6001600160a01b038816156104805761047b6001600160a01b0389168a89610a83565b6104f5565b6000896001600160a01b03168860405160006040518083038185875af1925050503d80600081146104cd576040519150601f19603f3d011682016040523d82523d6000602084013e6104d2565b606091505b50509050806104f35760405162461bcd60e51b815260040161024e9061110f565b505b876001600160a01b0316896001600160a01b0316877fa27580a77a01c86ee8598d930ae5f9a0ec6f146c6e0e9e9f50b95bacb33787188a60405161053b91815260200190565b60405180910390a4505050505050505050565b82156105ae574383146105ae5760405162461bcd60e51b815260206004820152602260248201527f5843657074696f6e526f757465723a204e6f7420612074617267657420626c6f604482015261636b60f01b606482015260840161024e565b428410156105f95760405162461bcd60e51b81526020600482015260186024820152771610d95c1d1a5bdb94995dd85c991cce88115e1c1a5c995960421b604482015260640161024e565b600354600160a01b900460ff161561064d5760405162461bcd60e51b81526020600482015260176024820152761610d95c1d1a5bdb94995dd85c991cce8814185d5cd959604a1b604482015260640161024e565b6005828260405161065f9291906110af565b9081526040519081900360200190205460ff161561068f5760405162461bcd60e51b815260040161024e906110bf565b6001600583836040516106a39291906110af565b908152604051908190036020019020805491151560ff1990921691909117905560006106cc3390565b604080516001600160a01b0380841660208301528c1691810191909152606081018a90526080810188905260a081018790529091506000906107109060c001610373565b600454604080516020601f88018190048102820181019092528681529293506001600160a01b0390911691610762918491908890889081908401838280828437600092019190915250610a5992505050565b6001600160a01b0316146107ac5760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b604482015260640161024e565b604080516002808252606082018352600092602083019080368337505060015482519293506001600160a01b0316918391506000906107ed576107ed611154565b6001600160a01b03928316602091820292909201015260025482519116908290600190811061081e5761081e611154565b60200260200101906001600160a01b031690816001600160a01b031681525050600360009054906101000a90046001600160a01b03166001600160a01b031663b6f9de958b8b848f426040518663ffffffff1660e01b8152600401610886949392919061116a565b6000604051808303818588803b15801561089f57600080fd5b505af11580156108b3573d6000803e3d6000fd5b505050505060006001600160a01b03168b6001600160a01b0316897fa27580a77a01c86ee8598d930ae5f9a0ec6f146c6e0e9e9f50b95bacb33787188d6040516108ff91815260200190565b60405180910390a45050505050505050505050565b61091c610a2c565b6109266000610ad5565b565b610930610a2c565b6109446001600160a01b0384168383610a83565b505050565b610951610a2c565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b61097b610a2c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146109c8576040519150601f19603f3d011682016040523d82523d6000602084013e6109cd565b606091505b50509050806109445760405162461bcd60e51b815260040161024e9061110f565b6109f6610a2c565b6001600160a01b038116610a2057604051631e4fbdf760e01b81526000600482015260240161024e565b610a2981610ad5565b50565b6000546001600160a01b031633146109265760405163118cdaa760e01b815233600482015260240161024e565b600080600080610a698686610b25565b925092509250610a798282610b72565b5090949350505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610944908490610c2f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060008351604103610b5f5760208401516040850151606086015160001a610b5188828585610c92565b955095509550505050610b6b565b50508151600091506002905b9250925092565b6000826003811115610b8657610b866111d6565b03610b8f575050565b6001826003811115610ba357610ba36111d6565b03610bc15760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610bd557610bd56111d6565b03610bf65760405163fce698f760e01b81526004810182905260240161024e565b6003826003811115610c0a57610c0a6111d6565b03610c2b576040516335e2f38360e21b81526004810182905260240161024e565b5050565b6000610c446001600160a01b03841683610d61565b90508051600014158015610c69575080806020019051810190610c6791906111ec565b155b1561094457604051635274afe760e01b81526001600160a01b038416600482015260240161024e565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ccd5750600091506003905082610d57565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610d21573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d4d57506000925060019150829050610d57565b9250600091508190505b9450945094915050565b6060610d6f83836000610d76565b9392505050565b606081471015610d9b5760405163cd78605960e01b815230600482015260240161024e565b600080856001600160a01b03168486604051610db79190611209565b60006040518083038185875af1925050503d8060008114610df4576040519150601f19603f3d011682016040523d82523d6000602084013e610df9565b606091505b5091509150610e09868383610e13565b9695505050505050565b606082610e2857610e2382610e6f565b610d6f565b8151158015610e3f57506001600160a01b0384163b155b15610e6857604051639996b31560e01b81526001600160a01b038516600482015260240161024e565b5080610d6f565b805115610e7f5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b8015158114610a2957600080fd5b600060208284031215610eb857600080fd5b8135610d6f81610e98565b80356001600160a01b0381168114610eda57600080fd5b919050565b60008083601f840112610ef157600080fd5b50813567ffffffffffffffff811115610f0957600080fd5b602083019150836020828501011115610f2157600080fd5b9250929050565b600080600080600080600060c0888a031215610f4357600080fd5b610f4c88610ec3565b9650610f5a60208901610ec3565b955060408801359450606088013593506080880135925060a088013567ffffffffffffffff811115610f8b57600080fd5b610f978a828b01610edf565b989b979a50959850939692959293505050565b60008060008060008060008060e0898b031215610fc657600080fd5b610fcf89610ec3565b97506020890135965060408901359550606089013594506080890135935060a0890135925060c089013567ffffffffffffffff81111561100e57600080fd5b61101a8b828c01610edf565b999c989b5096995094979396929594505050565b60008060006060848603121561104357600080fd5b61104c84610ec3565b925061105a60208501610ec3565b9150604084013590509250925092565b60006020828403121561107c57600080fd5b610d6f82610ec3565b6000806040838503121561109857600080fd5b6110a183610ec3565b946020939093013593505050565b8183823760009101908152919050565b60208082526030908201527f5843657074696f6e526577617264733a205369676e617475726520686173206160408201526f1b1c9958591e481899595b881d5cd95960821b606082015260800190565b60208082526025908201527f5843657074696f6e526577617264733a204661696c656420746f2073656e642060408201526422ba3432b960d91b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60006080820186835260206080602085015281875180845260a08601915060208901935060005b818110156111b65784516001600160a01b031683529383019391830191600101611191565b50506001600160a01b039690961660408501525050506060015292915050565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156111fe57600080fd5b8151610d6f81610e98565b6000825160005b8181101561122a5760208186018101518583015201611210565b50600092019182525091905056fea26469706673582212206bce6bf5e35201ad3c4a5fcb828fe39951dbf86df4e9be6b667b6e2489b9e5d464736f6c63430008170033

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

000000000000000000000000e317db2edd9ffb3ab34998b4ba27cde8a2594f86

-----Decoded View---------------
Arg [0] : signer (address): 0xe317db2edD9fFb3AB34998B4ba27cDe8a2594F86

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


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.