ETH Price: $2,159.18 (+1.42%)

Contract

0x8B1A70fecCC6c2aE6017dDD8D0BeBDd1bD6eB261
 

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Create Order Wit...239147282025-11-30 23:21:23110 days ago1764544883IN
0x8B1A70fe...1bD6eB261
0 ETH0.000019440.05290213
Create Order Wit...223021612025-04-19 9:29:35336 days ago1745054975IN
0x8B1A70fe...1bD6eB261
0 ETH0.000142970.39409546
Create Order Wit...223021512025-04-19 9:27:35336 days ago1745054855IN
0x8B1A70fe...1bD6eB261
0 ETH0.000137410.36899721
Create Order Wit...219907872025-03-06 22:19:47379 days ago1741299587IN
0x8B1A70fe...1bD6eB261
0 ETH0.000264970.76196493
Create Order Wit...212346862024-11-21 7:42:35485 days ago1732174955IN
0x8B1A70fe...1bD6eB261
0 ETH0.0038700210
Create Order Wit...211492582024-11-09 9:39:59497 days ago1731145199IN
0x8B1A70fe...1bD6eB261
0 ETH0.0040390910.02880629
Create Order Wit...211034032024-11-03 0:02:11503 days ago1730592131IN
0x8B1A70fe...1bD6eB261
0 ETH0.002160914.96735736
Create Order Wit...211033922024-11-02 23:59:59503 days ago1730591999IN
0x8B1A70fe...1bD6eB261
0 ETH0.00158384.2
Create Order Wit...210531172024-10-26 23:35:59510 days ago1729985759IN
0x8B1A70fe...1bD6eB261
0 ETH0.001904314.02173447
Create Order Wit...209681642024-10-15 3:04:59522 days ago1728961499IN
0x8B1A70fe...1bD6eB261
0 ETH0.0057374216.49851653
Create Order Wit...208083942024-09-22 20:05:35544 days ago1727035535IN
0x8B1A70fe...1bD6eB261
0 ETH0.003596359.39165778
Create Order Wit...203549982024-07-21 12:45:11608 days ago1721565911IN
0x8B1A70fe...1bD6eB261
0 ETH0.000898782.47740903
Create Order Wit...201750832024-06-26 9:51:47633 days ago1719395507IN
0x8B1A70fe...1bD6eB261
0 ETH0.001385823.77037242
Create Order Wit...201482062024-06-22 15:42:23636 days ago1719070943IN
0x8B1A70fe...1bD6eB261
0 ETH0.001197913.43156979
Create Order Wit...199623982024-05-27 16:27:59662 days ago1716827279IN
0x8B1A70fe...1bD6eB261
0 ETH0.0095905526.43534775
Create Order Wit...197912812024-05-03 18:09:11686 days ago1714759751IN
0x8B1A70fe...1bD6eB261
0 ETH0.001979065.66926849
Create Order Wit...197793112024-05-02 1:58:47688 days ago1714615127IN
0x8B1A70fe...1bD6eB261
0 ETH0.001801785.16143365
Transfer Ownersh...190643302024-01-22 19:26:23788 days ago1705951583IN
0x8B1A70fe...1bD6eB261
0 ETH0.0006017819.57974039
Create Order Wit...188375902023-12-21 23:42:23820 days ago1703202143IN
0x8B1A70fe...1bD6eB261
0 ETH0.0108213931.12117105
Create Order Wit...185367602023-11-09 20:25:11862 days ago1699561511IN
0x8B1A70fe...1bD6eB261
0 ETH0.0170036545.36122744
Create Order Wit...184338932023-10-26 10:47:35877 days ago1698317255IN
0x8B1A70fe...1bD6eB261
0 ETH0.0075932420.25675933
Create Order Wit...183725082023-10-17 20:34:59885 days ago1697574899IN
0x8B1A70fe...1bD6eB261
0 ETH0.003062398.25473315
Create Order Wit...183351812023-10-12 15:18:11890 days ago1697123891IN
0x8B1A70fe...1bD6eB261
0 ETH0.0040795311.4163326
Create Order Wit...183213302023-10-10 16:44:35892 days ago1696956275IN
0x8B1A70fe...1bD6eB261
0 ETH0.00334228.92581623
Create Order Wit...183133852023-10-09 14:02:47894 days ago1696860167IN
0x8B1A70fe...1bD6eB261
0 ETH0.0041749611.13768473
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
0x3d602d80239147282025-11-30 23:21:23110 days ago1764544883
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80223021612025-04-19 9:29:35336 days ago1745054975
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80223021512025-04-19 9:27:35336 days ago1745054855
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80219907872025-03-06 22:19:47379 days ago1741299587
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80212346862024-11-21 7:42:35485 days ago1732174955
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80211492582024-11-09 9:39:59497 days ago1731145199
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80211034032024-11-03 0:02:11503 days ago1730592131
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80211033922024-11-02 23:59:59503 days ago1730591999
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80210531172024-10-26 23:35:59510 days ago1729985759
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80209681642024-10-15 3:04:59522 days ago1728961499
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80209125982024-10-07 8:50:47530 days ago1728291047
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80208083942024-09-22 20:05:35544 days ago1727035535
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80203549982024-07-21 12:45:11608 days ago1721565911
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80201750832024-06-26 9:51:47633 days ago1719395507
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80201482062024-06-22 15:42:23636 days ago1719070943
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80199623982024-05-27 16:27:59662 days ago1716827279
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80197912812024-05-03 18:09:11686 days ago1714759751
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80197793112024-05-02 1:58:47688 days ago1714615127
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80192261992024-02-14 12:26:23766 days ago1707913583
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80192125112024-02-12 14:22:47768 days ago1707747767
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80188375902023-12-21 23:42:23820 days ago1703202143
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80185367602023-11-09 20:25:11862 days ago1699561511
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80184338932023-10-26 10:47:35877 days ago1698317255
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80183725082023-10-17 20:34:59885 days ago1697574899
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
0x3d602d80183351812023-10-12 15:18:11890 days ago1697123891
0x8B1A70fe...1bD6eB261
 Contract Creation0 ETH
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OrderFactory

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
london EvmVersion
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity 0.8.20;

import {Clones} from "oz/proxy/Clones.sol";
import {IERC20} from "oz/token/ERC20/IERC20.sol";
import {IERC721} from "oz/token/ERC721/IERC721.sol";
import {Ownable2Step} from "oz/access/Ownable2Step.sol";
import {SafeERC20} from "oz/token/ERC20/utils/SafeERC20.sol";

error ForbiddenValue();

contract OrderFactory is Ownable2Step {
  using SafeERC20 for IERC20;

  uint16 private constant HUNDRED_PERCENT = 10000;
  uint16 public protocolFee = 25; // default 0.25% (range: 0-500 / 0-5%)

  event OrderCreated(address indexed order);

  /// @dev Allows to create a new proxy contract and execute a message call to the new proxy within one transaction.
  /// @param _singleton Address of singleton contract. Must be deployed at the time of execution.
  /// @param _initializer Payload for a message call to be sent to a new proxy contract.
  /// @param _saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.
  function createProxy(address _singleton, bytes memory _initializer, uint256 _saltNonce)
    internal
    returns (address order)
  {
    // If the initializer changes the proxy address should change too. Hashing the initializer data is cheaper than just concatinating it
    bytes32 salt = keccak256(abi.encodePacked(keccak256(_initializer), _saltNonce));
    order = Clones.cloneDeterministic(_singleton, salt);

    if (_initializer.length > 0) {
      // solhint-disable-next-line no-inline-assembly
      assembly {
        if eq(call(gas(), order, 0, add(_initializer, 0x20), mload(_initializer), 0, 0), 0) { revert(0, 0) }
      }
    }
  }

  /// @dev Allows to create a new order contract and execute a message call to the new order within one transaction.
  /// @param _singleton Address of singleton contract. Must be deployed at the time of execution.
  /// @param _owner The owner of the order.
  /// @param _receiver The receiver of the buyToken orders.
  /// @param _sellToken The token that is being traded in the order.
  /// @param _amount The amount of the DCA order.
  /// @param _buyToken The token that is DCA'd in the order.
  /// @param _startTime The start time of the DCA order.
  /// @param _endTime The end time of the DCA order.
  /// @param _interval The frequency interval of the DCA order in hours.
  /// @param _settlementContract The settlement contract address.
  /// @param _saltNonce Nonce that will be used to generate the salt to calculate the address of the new order contract.
  function createOrderWithNonce(
    address _singleton,
    address _owner,
    address _receiver,
    address _sellToken,
    address _buyToken,
    uint256 _amount,
    uint256 _startTime,
    uint256 _endTime,
    uint256 _interval,
    address _settlementContract,
    uint256 _saltNonce
  ) public returns (address order) {
    uint256 feeAmount = (_amount * protocolFee) / HUNDRED_PERCENT;
    uint256 amountWithoutFees = _amount - feeAmount;

    bytes memory initializer = abi.encodeWithSignature(
      "initialize(address,address,address,address,uint256,uint256,uint256,uint256,address)",
      _owner,
      _receiver,
      _sellToken,
      _buyToken,
      amountWithoutFees,
      _startTime,
      _endTime,
      _interval,
      _settlementContract
    );

    // Deploy a new order
    order = createProxy(_singleton, initializer, _saltNonce);

    emit OrderCreated(order);

    // Transfer the amount to the order
    IERC20(_sellToken).safeTransferFrom(msg.sender, order, amountWithoutFees);

    // Transfer the fee to the factory
    IERC20(_sellToken).safeTransferFrom(msg.sender, address(this), feeAmount);
  }

  /// @dev Set the protocol fee percent
  /// @param _fee The new protocol fee percent 0-5% (range: 0-500)
  function setProtocolFee(uint16 _fee) external onlyOwner {
    if (_fee > 500) revert ForbiddenValue();
    protocolFee = _fee;
  }

  /// @dev Withdraw protocol fee share
  /// @param tokens Tokens' addresses transferred to the owner as protocol fee
  function withdrawTokens(address[] calldata tokens) external onlyOwner {
    for (uint256 i = 0; i < tokens.length; i++) {
      IERC20(tokens[i]).safeTransfer(owner(), IERC20(tokens[i]).balanceOf(address(this)));
    }
  }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @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 {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _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 {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _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);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/Ownable2Step.sol)

pragma solidity ^0.8.0;

import "./Ownable.sol";

/**
 * @dev Contract module which provides access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership} and {acceptOwnership}.
 *
 * This module is used through inheritance. It will make available all functions
 * from parent (Ownable).
 */
abstract contract Ownable2Step is Ownable {
    address private _pendingOwner;

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

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

    /**
     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual override onlyOwner {
        _pendingOwner = newOwner;
        emit OwnershipTransferStarted(owner(), newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual override {
        delete _pendingOwner;
        super._transferOwnership(newOwner);
    }

    /**
     * @dev The new owner accepts the ownership transfer.
     */
    function acceptOwnership() external {
        address sender = _msgSender();
        require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner");
        _transferOwnership(sender);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (proxy/Clones.sol)

pragma solidity ^0.8.0;

/**
 * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for
 * deploying minimal proxy contracts, also known as "clones".
 *
 * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies
 * > a minimal bytecode implementation that delegates all calls to a known, fixed address.
 *
 * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`
 * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the
 * deterministic method.
 *
 * _Available since v3.4._
 */
library Clones {
    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create opcode, which should never revert.
     */
    function clone(address implementation) internal returns (address instance) {
        /// @solidity memory-safe-assembly
        assembly {
            // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes
            // of the `implementation` address with the bytecode before the address.
            mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))
            // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.
            mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))
            instance := create(0, 0x09, 0x37)
        }
        require(instance != address(0), "ERC1167: create failed");
    }

    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create2 opcode and a `salt` to deterministically deploy
     * the clone. Using the same `implementation` and `salt` multiple time will revert, since
     * the clones cannot be deployed twice at the same address.
     */
    function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {
        /// @solidity memory-safe-assembly
        assembly {
            // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes
            // of the `implementation` address with the bytecode before the address.
            mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))
            // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.
            mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))
            instance := create2(0, 0x09, 0x37, salt)
        }
        require(instance != address(0), "ERC1167: create2 failed");
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(
        address implementation,
        bytes32 salt,
        address deployer
    ) internal pure returns (address predicted) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(add(ptr, 0x38), deployer)
            mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff)
            mstore(add(ptr, 0x14), implementation)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73)
            mstore(add(ptr, 0x58), salt)
            mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37))
            predicted := keccak256(add(ptr, 0x43), 0x55)
        }
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(address implementation, bytes32 salt)
        internal
        view
        returns (address predicted)
    {
        return predictDeterministicAddress(implementation, salt, address(this));
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @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 amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

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

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

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

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

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

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

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

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

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

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

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

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) 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(errorMessage);
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with 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;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

Settings
{
  "remappings": [
    "BokkyPooBahsDateTimeLibrary/=lib/BokkyPooBahsDateTimeLibrary/",
    "date/=lib/BokkyPooBahsDateTimeLibrary/contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "oz/=lib/openzeppelin-contracts/contracts/",
    "solmate/=lib/solmate/src/",
    "src/=src/",
    "tests/=tests/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"name":"ForbiddenValue","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"order","type":"address"}],"name":"OrderCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","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"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_singleton","type":"address"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"address","name":"_sellToken","type":"address"},{"internalType":"address","name":"_buyToken","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_endTime","type":"uint256"},{"internalType":"uint256","name":"_interval","type":"uint256"},{"internalType":"address","name":"_settlementContract","type":"address"},{"internalType":"uint256","name":"_saltNonce","type":"uint256"}],"name":"createOrderWithNonce","outputs":[{"internalType":"address","name":"order","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolFee","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_fee","type":"uint16"}],"name":"setProtocolFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526001805461ffff60a01b1916601960a01b17905534801561002457600080fd5b5061002e33610033565b61009f565b600180546001600160a01b031916905561004c8161004f565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610cda806100ae6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638da5cb5b116100665780638da5cb5b146100ed578063b0e21e8a146100fe578063e30c397814610126578063e4467f3514610137578063f2fde38b1461014a57600080fd5b80635ecb16cd14610098578063715018a6146100ad57806378cafcaf146100b557806379ba5097146100e5575b600080fd5b6100ab6100a63660046109e5565b61015d565b005b6100ab610264565b6100c86100c3366004610a76565b610278565b6040516001600160a01b0390911681526020015b60405180910390f35b6100ab6103c7565b6000546001600160a01b03166100c8565b60015461011390600160a01b900461ffff1681565b60405161ffff90911681526020016100dc565b6001546001600160a01b03166100c8565b6100ab610145366004610b1f565b610446565b6100ab610158366004610b4a565b610497565b610165610508565b60005b8181101561025f5761024d6101856000546001600160a01b031690565b84848481811061019757610197610b65565b90506020020160208101906101ac9190610b4a565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa1580156101f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102169190610b7b565b85858581811061022857610228610b65565b905060200201602081019061023d9190610b4a565b6001600160a01b03169190610562565b8061025781610baa565b915050610168565b505050565b61026c610508565b61027660006105c5565b565b60015460009081906127109061029990600160a01b900461ffff168a610bc3565b6102a39190610bda565b905060006102b1828a610bfc565b905060008d8d8d8d858d8d8d8d60405160240161031d999897969594939291906001600160a01b03998a168152978916602089015295881660408801529387166060870152608086019290925260a085015260c084015260e08301529091166101008201526101200190565b60408051601f198184030181529190526020810180516001600160e01b031663b9eec7a760e01b17905290506103548f82876105de565b6040519094506001600160a01b038516907fed94e6f8f334678b3265725f268ecd9032016d6050efeb9e673a561ffbfb0a7690600090a26103a06001600160a01b038d16338685610652565b6103b56001600160a01b038d16333086610652565b5050509b9a5050505050505050505050565b60015433906001600160a01b0316811461043a5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b60648201526084015b60405180910390fd5b610443816105c5565b50565b61044e610508565b6101f48161ffff16111561047557604051634ec4e8d760e11b815260040160405180910390fd5b6001805461ffff909216600160a01b0261ffff60a01b19909216919091179055565b61049f610508565b600180546001600160a01b0383166001600160a01b031990911681179091556104d06000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000546001600160a01b031633146102765760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610431565b6040516001600160a01b03831660248201526044810182905261025f90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610690565b600180546001600160a01b031916905561044381610762565b600080838051906020012083604051602001610604929190918252602082015260400190565b60405160208183030381529060405280519060200120905061062685826107b2565b84519092501561064a5760008060008651602088016000875af10361064a57600080fd5b509392505050565b6040516001600160a01b038085166024830152831660448201526064810182905261068a9085906323b872dd60e01b9060840161058e565b50505050565b60006106e5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166108559092919063ffffffff16565b80519091501561025f57808060200190518101906107039190610c0f565b61025f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610431565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008360601b60e81c176000526e5af43d82803e903d91602b57fd5bf38360781b1760205281603760096000f590506001600160a01b03811661084f5760405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c65640000000000000000006044820152606401610431565b92915050565b6060610864848460008561086c565b949350505050565b6060824710156108cd5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610431565b600080866001600160a01b031685876040516108e99190610c55565b60006040518083038185875af1925050503d8060008114610926576040519150601f19603f3d011682016040523d82523d6000602084013e61092b565b606091505b509150915061093c87838387610947565b979650505050505050565b606083156109b65782516000036109af576001600160a01b0385163b6109af5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610431565b5081610864565b61086483838151156109cb5781518083602001fd5b8060405162461bcd60e51b81526004016104319190610c71565b600080602083850312156109f857600080fd5b823567ffffffffffffffff80821115610a1057600080fd5b818501915085601f830112610a2457600080fd5b813581811115610a3357600080fd5b8660208260051b8501011115610a4857600080fd5b60209290920196919550909350505050565b80356001600160a01b0381168114610a7157600080fd5b919050565b60008060008060008060008060008060006101608c8e031215610a9857600080fd5b610aa18c610a5a565b9a50610aaf60208d01610a5a565b9950610abd60408d01610a5a565b9850610acb60608d01610a5a565b9750610ad960808d01610a5a565b965060a08c0135955060c08c0135945060e08c013593506101008c01359250610b056101208d01610a5a565b91506101408c013590509295989b509295989b9093969950565b600060208284031215610b3157600080fd5b813561ffff81168114610b4357600080fd5b9392505050565b600060208284031215610b5c57600080fd5b610b4382610a5a565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610b8d57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600060018201610bbc57610bbc610b94565b5060010190565b808202811582820484141761084f5761084f610b94565b600082610bf757634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561084f5761084f610b94565b600060208284031215610c2157600080fd5b81518015158114610b4357600080fd5b60005b83811015610c4c578181015183820152602001610c34565b50506000910152565b60008251610c67818460208701610c31565b9190910192915050565b6020815260008251806020840152610c90816040850160208701610c31565b601f01601f1916919091016040019291505056fea2646970667358221220ed5f5acf923e389d2692895ef3b151594ded4edb6e0a9e5ee1de2aab8cd3dc4864736f6c63430008140033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100935760003560e01c80638da5cb5b116100665780638da5cb5b146100ed578063b0e21e8a146100fe578063e30c397814610126578063e4467f3514610137578063f2fde38b1461014a57600080fd5b80635ecb16cd14610098578063715018a6146100ad57806378cafcaf146100b557806379ba5097146100e5575b600080fd5b6100ab6100a63660046109e5565b61015d565b005b6100ab610264565b6100c86100c3366004610a76565b610278565b6040516001600160a01b0390911681526020015b60405180910390f35b6100ab6103c7565b6000546001600160a01b03166100c8565b60015461011390600160a01b900461ffff1681565b60405161ffff90911681526020016100dc565b6001546001600160a01b03166100c8565b6100ab610145366004610b1f565b610446565b6100ab610158366004610b4a565b610497565b610165610508565b60005b8181101561025f5761024d6101856000546001600160a01b031690565b84848481811061019757610197610b65565b90506020020160208101906101ac9190610b4a565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa1580156101f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102169190610b7b565b85858581811061022857610228610b65565b905060200201602081019061023d9190610b4a565b6001600160a01b03169190610562565b8061025781610baa565b915050610168565b505050565b61026c610508565b61027660006105c5565b565b60015460009081906127109061029990600160a01b900461ffff168a610bc3565b6102a39190610bda565b905060006102b1828a610bfc565b905060008d8d8d8d858d8d8d8d60405160240161031d999897969594939291906001600160a01b03998a168152978916602089015295881660408801529387166060870152608086019290925260a085015260c084015260e08301529091166101008201526101200190565b60408051601f198184030181529190526020810180516001600160e01b031663b9eec7a760e01b17905290506103548f82876105de565b6040519094506001600160a01b038516907fed94e6f8f334678b3265725f268ecd9032016d6050efeb9e673a561ffbfb0a7690600090a26103a06001600160a01b038d16338685610652565b6103b56001600160a01b038d16333086610652565b5050509b9a5050505050505050505050565b60015433906001600160a01b0316811461043a5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b60648201526084015b60405180910390fd5b610443816105c5565b50565b61044e610508565b6101f48161ffff16111561047557604051634ec4e8d760e11b815260040160405180910390fd5b6001805461ffff909216600160a01b0261ffff60a01b19909216919091179055565b61049f610508565b600180546001600160a01b0383166001600160a01b031990911681179091556104d06000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000546001600160a01b031633146102765760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610431565b6040516001600160a01b03831660248201526044810182905261025f90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610690565b600180546001600160a01b031916905561044381610762565b600080838051906020012083604051602001610604929190918252602082015260400190565b60405160208183030381529060405280519060200120905061062685826107b2565b84519092501561064a5760008060008651602088016000875af10361064a57600080fd5b509392505050565b6040516001600160a01b038085166024830152831660448201526064810182905261068a9085906323b872dd60e01b9060840161058e565b50505050565b60006106e5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166108559092919063ffffffff16565b80519091501561025f57808060200190518101906107039190610c0f565b61025f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610431565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008360601b60e81c176000526e5af43d82803e903d91602b57fd5bf38360781b1760205281603760096000f590506001600160a01b03811661084f5760405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c65640000000000000000006044820152606401610431565b92915050565b6060610864848460008561086c565b949350505050565b6060824710156108cd5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610431565b600080866001600160a01b031685876040516108e99190610c55565b60006040518083038185875af1925050503d8060008114610926576040519150601f19603f3d011682016040523d82523d6000602084013e61092b565b606091505b509150915061093c87838387610947565b979650505050505050565b606083156109b65782516000036109af576001600160a01b0385163b6109af5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610431565b5081610864565b61086483838151156109cb5781518083602001fd5b8060405162461bcd60e51b81526004016104319190610c71565b600080602083850312156109f857600080fd5b823567ffffffffffffffff80821115610a1057600080fd5b818501915085601f830112610a2457600080fd5b813581811115610a3357600080fd5b8660208260051b8501011115610a4857600080fd5b60209290920196919550909350505050565b80356001600160a01b0381168114610a7157600080fd5b919050565b60008060008060008060008060008060006101608c8e031215610a9857600080fd5b610aa18c610a5a565b9a50610aaf60208d01610a5a565b9950610abd60408d01610a5a565b9850610acb60608d01610a5a565b9750610ad960808d01610a5a565b965060a08c0135955060c08c0135945060e08c013593506101008c01359250610b056101208d01610a5a565b91506101408c013590509295989b509295989b9093969950565b600060208284031215610b3157600080fd5b813561ffff81168114610b4357600080fd5b9392505050565b600060208284031215610b5c57600080fd5b610b4382610a5a565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610b8d57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600060018201610bbc57610bbc610b94565b5060010190565b808202811582820484141761084f5761084f610b94565b600082610bf757634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561084f5761084f610b94565b600060208284031215610c2157600080fd5b81518015158114610b4357600080fd5b60005b83811015610c4c578181015183820152602001610c34565b50506000910152565b60008251610c67818460208701610c31565b9190910192915050565b6020815260008251806020840152610c90816040850160208701610c31565b601f01601f1916919091016040019291505056fea2646970667358221220ed5f5acf923e389d2692895ef3b151594ded4edb6e0a9e5ee1de2aab8cd3dc4864736f6c63430008140033

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