ETH Price: $2,408.95 (-2.94%)
Gas: 4.32 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00
Transaction Hash
Method
Block
From
To
0x60a03462164259302023-01-17 10:30:11657 days ago1673951411IN
 Create: SeaportModule
0 ETH0.0489166316.85918472

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
169450832023-03-31 5:23:47584 days ago1680240227
0x20794EF7...3E04b9572
0.0225 ETH
169450832023-03-31 5:23:47584 days ago1680240227
0x20794EF7...3E04b9572
0.0225 ETH
169450832023-03-31 5:23:47584 days ago1680240227
0x20794EF7...3E04b9572
0.0225 ETH
169316642023-03-29 8:08:23586 days ago1680077303
0x20794EF7...3E04b9572
0.004 ETH
169316642023-03-29 8:08:23586 days ago1680077303
0x20794EF7...3E04b9572
0.004 ETH
169297942023-03-29 1:49:59587 days ago1680054599
0x20794EF7...3E04b9572
0.003996 ETH
169297942023-03-29 1:49:59587 days ago1680054599
0x20794EF7...3E04b9572
0.0888 ETH
169297942023-03-29 1:49:59587 days ago1680054599
0x20794EF7...3E04b9572
0.092796 ETH
169291952023-03-28 23:49:23587 days ago1680047363
0x20794EF7...3E04b9572
0.01 ETH
169291952023-03-28 23:49:23587 days ago1680047363
0x20794EF7...3E04b9572
0.01 ETH
169290612023-03-28 23:22:11587 days ago1680045731
0x20794EF7...3E04b9572
0.0002 ETH
169290612023-03-28 23:22:11587 days ago1680045731
0x20794EF7...3E04b9572
0.0002 ETH
169290612023-03-28 23:22:11587 days ago1680045731
0x20794EF7...3E04b9572
0.0002 ETH
169290612023-03-28 23:22:11587 days ago1680045731
0x20794EF7...3E04b9572
0.0002 ETH
169290612023-03-28 23:22:11587 days ago1680045731
0x20794EF7...3E04b9572
0.0002 ETH
169290612023-03-28 23:22:11587 days ago1680045731
0x20794EF7...3E04b9572
0.0002 ETH
169290612023-03-28 23:22:11587 days ago1680045731
0x20794EF7...3E04b9572
0.002 ETH
169290612023-03-28 23:22:11587 days ago1680045731
0x20794EF7...3E04b9572
0.002 ETH
169290612023-03-28 23:22:11587 days ago1680045731
0x20794EF7...3E04b9572
0.002 ETH
169290612023-03-28 23:22:11587 days ago1680045731
0x20794EF7...3E04b9572
0.002 ETH
169290612023-03-28 23:22:11587 days ago1680045731
0x20794EF7...3E04b9572
0.002 ETH
169290612023-03-28 23:22:11587 days ago1680045731
0x20794EF7...3E04b9572
0.002 ETH
169290612023-03-28 23:22:11587 days ago1680045731
0x20794EF7...3E04b9572
0.0132 ETH
169281762023-03-28 20:22:47587 days ago1680034967
0x20794EF7...3E04b9572
0.054 ETH
169281762023-03-28 20:22:47587 days ago1680034967
0x20794EF7...3E04b9572
0.054 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SeaportModule

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 13 : SeaportModule.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import {IERC1155} from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";

import {BaseExchangeModule} from "./BaseExchangeModule.sol";
import {BaseModule} from "../BaseModule.sol";
import {ISeaport} from "../../../interfaces/ISeaport.sol";

// Notes on the Seaport module:
// - supports filling listings (both ERC721/ERC1155)
// - supports filling offers (both ERC721/ERC1155)

contract SeaportModule is BaseExchangeModule {
    // --- Structs ---

    struct SeaportETHListingWithPrice {
        ISeaport.AdvancedOrder order;
        uint256 price;
    }

    // --- Fields ---

    ISeaport public constant EXCHANGE =
        ISeaport(0x00000000006c3852cbEf3e08E8dF289169EdE581);

    // --- Constructor ---

    constructor(address owner, address router)
        BaseModule(owner)
        BaseExchangeModule(router)
    {}

    // --- Fallback ---

    receive() external payable {}

    // --- Single ETH listing ---

    function acceptETHListing(
        ISeaport.AdvancedOrder calldata order,
        ETHListingParams calldata params,
        Fee[] calldata fees
    )
        external
        payable
        nonReentrant
        refundETHLeftover(params.refundTo)
        chargeETHFees(fees, params.amount)
    {
        // Execute the fill
        params.revertIfIncomplete
            ? _fillSingleOrderWithRevertIfIncomplete(
                order,
                new ISeaport.CriteriaResolver[](0),
                params.fillTo,
                params.amount
            )
            : _fillSingleOrder(
                order,
                new ISeaport.CriteriaResolver[](0),
                params.fillTo,
                params.amount
            );
    }

    // --- Single ERC20 listing ---

    function acceptERC20Listing(
        ISeaport.AdvancedOrder calldata order,
        ERC20ListingParams calldata params,
        Fee[] calldata fees
    )
        external
        nonReentrant
        refundERC20Leftover(params.refundTo, params.token)
        chargeERC20Fees(fees, params.token, params.amount)
    {
        // Approve the exchange if needed
        _approveERC20IfNeeded(params.token, address(EXCHANGE), params.amount);

        // Execute the fill
        params.revertIfIncomplete
            ? _fillSingleOrderWithRevertIfIncomplete(
                order,
                new ISeaport.CriteriaResolver[](0),
                params.fillTo,
                0
            )
            : _fillSingleOrder(
                order,
                new ISeaport.CriteriaResolver[](0),
                params.fillTo,
                0
            );
    }

    // --- Multiple ETH listings ---

    function acceptETHListings(
        SeaportETHListingWithPrice[] calldata orders,
        ETHListingParams calldata params,
        Fee[] calldata fees
    )
        external
        payable
        nonReentrant
        refundETHLeftover(params.refundTo)
        chargeETHFees(fees, params.amount)
    {
        uint256 length = orders.length;
        ISeaport.CriteriaResolver[]
            memory criteriaResolvers = new ISeaport.CriteriaResolver[](0);

        // Execute the fills
        if (params.revertIfIncomplete) {
            for (uint256 i; i < length; ) {
                _fillSingleOrderWithRevertIfIncomplete(
                    orders[i].order,
                    criteriaResolvers,
                    params.fillTo,
                    orders[i].price
                );

                unchecked {
                    ++i;
                }
            }
        } else {
            for (uint256 i; i < length; ) {
                _fillSingleOrder(
                    orders[i].order,
                    criteriaResolvers,
                    params.fillTo,
                    orders[i].price
                );

                unchecked {
                    ++i;
                }
            }
        }
    }

    // --- Multiple ERC20 listings ---

    function acceptERC20Listings(
        ISeaport.AdvancedOrder[] calldata orders,
        ERC20ListingParams calldata params,
        Fee[] calldata fees
    )
        external
        nonReentrant
        refundERC20Leftover(params.refundTo, params.token)
        chargeERC20Fees(fees, params.token, params.amount)
    {
        // Approve the exchange if needed
        _approveERC20IfNeeded(params.token, address(EXCHANGE), params.amount);

        uint256 length = orders.length;
        ISeaport.CriteriaResolver[]
            memory criteriaResolvers = new ISeaport.CriteriaResolver[](0);

        // Execute the fills
        if (params.revertIfIncomplete) {
            for (uint256 i; i < length; ) {
                _fillSingleOrderWithRevertIfIncomplete(
                    orders[i],
                    criteriaResolvers,
                    params.fillTo,
                    0
                );

                unchecked {
                    ++i;
                }
            }
        } else {
            for (uint256 i; i < length; ) {
                _fillSingleOrder(
                    orders[i],
                    criteriaResolvers,
                    params.fillTo,
                    0
                );

                unchecked {
                    ++i;
                }
            }
        }
    }

    // --- Single ERC721 offer ---

    function acceptERC721Offer(
        ISeaport.AdvancedOrder calldata order,
        // Use `memory` instead of `calldata` to avoid `Stack too deep` errors
        ISeaport.CriteriaResolver[] memory criteriaResolvers,
        OfferParams calldata params,
        Fee[] calldata fees
    ) external nonReentrant {
        // Extract the ERC721 token from the consideration items
        ISeaport.ConsiderationItem calldata nftItem = order
            .parameters
            .consideration[0];
        if (
            nftItem.itemType != ISeaport.ItemType.ERC721 &&
            nftItem.itemType != ISeaport.ItemType.ERC721_WITH_CRITERIA
        ) {
            revert WrongParams();
        }
        IERC721 nftToken = IERC721(nftItem.token);

        // Extract the payment token from the offer items
        ISeaport.OfferItem calldata paymentItem = order.parameters.offer[0];
        IERC20 paymentToken = IERC20(paymentItem.token);

        // Approve the exchange if needed
        _approveERC721IfNeeded(nftToken, address(EXCHANGE));
        _approveERC20IfNeeded(
            paymentToken,
            address(EXCHANGE),
            type(uint256).max
        );

        // Execute the fill
        params.revertIfIncomplete
            ? _fillSingleOrderWithRevertIfIncomplete(
                order,
                criteriaResolvers,
                address(this),
                0
            )
            : _fillSingleOrder(order, criteriaResolvers, address(this), 0);

        uint256 identifier = nftItem.itemType == ISeaport.ItemType.ERC721
            ? nftItem.identifierOrCriteria
            : criteriaResolvers[0].identifier;

        // Pay fees
        if (nftToken.ownerOf(identifier) != address(this)) {
            // Only pay fees if the fill was successful
            uint256 feesLength = fees.length;
            for (uint256 i; i < feesLength; ) {
                Fee memory fee = fees[i];
                _sendERC20(fee.recipient, fee.amount, paymentToken);

                unchecked {
                    ++i;
                }
            }
        }

        // Refund any ERC721 leftover
        _sendAllERC721(params.refundTo, nftToken, identifier);

        // Forward any left payment to the specified receiver
        _sendAllERC20(params.fillTo, paymentToken);
    }

    // --- Single ERC1155 offer ---

    function acceptERC1155Offer(
        ISeaport.AdvancedOrder calldata order,
        // Use `memory` instead of `calldata` to avoid `Stack too deep` errors
        ISeaport.CriteriaResolver[] memory criteriaResolvers,
        OfferParams calldata params,
        Fee[] calldata fees
    ) external nonReentrant {
        // Extract the ERC1155 token from the consideration items
        ISeaport.ConsiderationItem calldata nftItem = order
            .parameters
            .consideration[0];
        if (
            nftItem.itemType != ISeaport.ItemType.ERC1155 &&
            nftItem.itemType != ISeaport.ItemType.ERC1155_WITH_CRITERIA
        ) {
            revert WrongParams();
        }
        IERC1155 nftToken = IERC1155(nftItem.token);

        // Extract the payment token from the offer items
        ISeaport.OfferItem calldata paymentItem = order.parameters.offer[0];
        IERC20 paymentToken = IERC20(paymentItem.token);

        // Approve the exchange if needed
        _approveERC1155IfNeeded(nftToken, address(EXCHANGE));
        _approveERC20IfNeeded(
            paymentToken,
            address(EXCHANGE),
            type(uint256).max
        );

        uint256 identifier = nftItem.itemType == ISeaport.ItemType.ERC1155
            ? nftItem.identifierOrCriteria
            : criteriaResolvers[0].identifier;

        uint256 balanceBefore = nftToken.balanceOf(address(this), identifier);

        // Execute the fill
        params.revertIfIncomplete
            ? _fillSingleOrderWithRevertIfIncomplete(
                order,
                criteriaResolvers,
                address(this),
                0
            )
            : _fillSingleOrder(order, criteriaResolvers, address(this), 0);

        uint256 balanceAfter = nftToken.balanceOf(address(this), identifier);

        // Pay fees
        uint256 amountFilled = balanceBefore - balanceAfter;
        if (amountFilled > 0) {
            uint256 feesLength = fees.length;
            for (uint256 i; i < feesLength; ) {
                Fee memory fee = fees[i];
                _sendERC20(
                    fee.recipient,
                    // Only pay fees for the amount that was actually filled
                    (fee.amount * amountFilled) / order.numerator,
                    paymentToken
                );

                unchecked {
                    ++i;
                }
            }
        }

        // Refund any ERC1155 leftover
        _sendAllERC1155(params.refundTo, nftToken, identifier);

        // Forward any left payment to the specified receiver
        _sendAllERC20(params.fillTo, paymentToken);
    }

    // --- Generic handler (used for Seaport-based approvals) ---

    function matchOrders(
        ISeaport.Order[] calldata orders,
        ISeaport.Fulfillment[] calldata fulfillments
    ) external nonReentrant {
        // We don't perform any kind of input or return value validation,
        // so this function should be used with precaution - the official
        // way to use it is only for Seaport-based approvals
        EXCHANGE.matchOrders(orders, fulfillments);
    }

    // --- ERC721 / ERC1155 hooks ---

    // Single token offer acceptance can be done approval-less by using the
    // standard `safeTransferFrom` method together with specifying data for
    // further contract calls. An example:
    // `safeTransferFrom(
    //      0xWALLET,
    //      0xMODULE,
    //      TOKEN_ID,
    //      0xABI_ENCODED_ROUTER_EXECUTION_CALLDATA_FOR_OFFER_ACCEPTANCE
    // )`

    function onERC721Received(
        address, // operator,
        address, // from
        uint256, // tokenId,
        bytes calldata data
    ) external returns (bytes4) {
        if (data.length > 0) {
            _makeCall(router, data, 0);
        }

        return this.onERC721Received.selector;
    }

    function onERC1155Received(
        address, // operator
        address, // from
        uint256, // tokenId
        uint256, // amount
        bytes calldata data
    ) external returns (bytes4) {
        if (data.length > 0) {
            _makeCall(router, data, 0);
        }

        return this.onERC1155Received.selector;
    }

    // --- Internal ---

    // NOTE: In lots of cases, Seaport will not revert if fills were not
    // fully executed. An example of that is partial filling, which will
    // successfully fill any amount that is still available (including a
    // zero amount). One way to ensure that we revert in case of partial
    // executions is to check the order's filled amount before and after
    // we trigger the fill (we can use Seaport's `getOrderStatus` method
    // to check). Since this can be expensive in terms of gas, we have a
    // separate method variant to be called when reverts are enabled.

    function _fillSingleOrder(
        ISeaport.AdvancedOrder calldata order,
        // Use `memory` instead of `calldata` to avoid `Stack too deep` errors
        ISeaport.CriteriaResolver[] memory criteriaResolvers,
        address receiver,
        uint256 value
    ) internal {
        // Execute the fill
        try
            EXCHANGE.fulfillAdvancedOrder{value: value}(
                order,
                criteriaResolvers,
                bytes32(0),
                receiver
            )
        {} catch {}
    }

    function _fillSingleOrderWithRevertIfIncomplete(
        ISeaport.AdvancedOrder calldata order,
        // Use `memory` instead of `calldata` to avoid `Stack too deep` errors
        ISeaport.CriteriaResolver[] memory criteriaResolvers,
        address receiver,
        uint256 value
    ) internal {
        // Cache the order's hash
        bytes32 orderHash = _getOrderHash(order.parameters);

        // Before filling, get the order's filled amount
        uint256 beforeFilledAmount = _getFilledAmount(orderHash);

        // Execute the fill
        bool success;
        try
            EXCHANGE.fulfillAdvancedOrder{value: value}(
                order,
                criteriaResolvers,
                bytes32(0),
                receiver
            )
        returns (bool fulfilled) {
            success = fulfilled;
        } catch {
            revert UnsuccessfulFill();
        }

        if (!success) {
            revert UnsuccessfulFill();
        } else {
            // After successfully filling, get the order's filled amount
            uint256 afterFilledAmount = _getFilledAmount(orderHash);

            // Make sure the amount filled as part of this call is correct
            if (afterFilledAmount - beforeFilledAmount != order.numerator) {
                revert UnsuccessfulFill();
            }
        }
    }

    function _getOrderHash(
        // Must use `memory` instead of `calldata` for the below cast
        ISeaport.OrderParameters memory orderParameters
    ) internal view returns (bytes32 orderHash) {
        // `OrderParameters` and `OrderComponents` share the exact same
        // fields, apart from the last one, so here we simply treat the
        // `orderParameters` argument as `OrderComponents` and then set
        // the last field to the correct data
        ISeaport.OrderComponents memory orderComponents;
        assembly {
            orderComponents := orderParameters
        }
        orderComponents.counter = EXCHANGE.getCounter(orderParameters.offerer);

        orderHash = EXCHANGE.getOrderHash(orderComponents);
    }

    function _getFilledAmount(bytes32 orderHash)
        internal
        view
        returns (uint256 totalFilled)
    {
        (, , totalFilled, ) = EXCHANGE.getOrderStatus(orderHash);
    }
}

File 2 of 13 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 3 of 13 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 4 of 13 : draft-IERC20Permit.sol
// 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);
}

File 5 of 13 : IERC20.sol
// 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);
}

File 6 of 13 : SafeERC20.sol
// 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");
        }
    }
}

File 7 of 13 : IERC721.sol
// 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);
}

File 8 of 13 : Address.sol
// 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);
        }
    }
}

File 9 of 13 : IERC165.sol
// 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);
}

File 10 of 13 : ISeaport.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

interface ISeaport {
    enum OrderType {
        FULL_OPEN,
        PARTIAL_OPEN,
        FULL_RESTRICTED,
        PARTIAL_RESTRICTED
    }

    enum ItemType {
        NATIVE,
        ERC20,
        ERC721,
        ERC1155,
        ERC721_WITH_CRITERIA,
        ERC1155_WITH_CRITERIA
    }

    enum Side {
        OFFER,
        CONSIDERATION
    }

    struct OfferItem {
        ItemType itemType;
        address token;
        uint256 identifierOrCriteria;
        uint256 startAmount;
        uint256 endAmount;
    }

    struct ConsiderationItem {
        ItemType itemType;
        address token;
        uint256 identifierOrCriteria;
        uint256 startAmount;
        uint256 endAmount;
        address recipient;
    }

    struct ReceivedItem {
        ItemType itemType;
        address token;
        uint256 identifier;
        uint256 amount;
        address recipient;
    }

    struct OrderComponents {
        address offerer;
        address zone;
        OfferItem[] offer;
        ConsiderationItem[] consideration;
        OrderType orderType;
        uint256 startTime;
        uint256 endTime;
        bytes32 zoneHash;
        uint256 salt;
        bytes32 conduitKey;
        uint256 counter;
    }

    struct OrderParameters {
        address offerer;
        address zone;
        OfferItem[] offer;
        ConsiderationItem[] consideration;
        OrderType orderType;
        uint256 startTime;
        uint256 endTime;
        bytes32 zoneHash;
        uint256 salt;
        bytes32 conduitKey;
        uint256 totalOriginalConsiderationItems;
    }

    struct Order {
        OrderParameters parameters;
        bytes signature;
    }

    struct AdvancedOrder {
        OrderParameters parameters;
        uint120 numerator;
        uint120 denominator;
        bytes signature;
        bytes extraData;
    }

    struct CriteriaResolver {
        uint256 orderIndex;
        Side side;
        uint256 index;
        uint256 identifier;
        bytes32[] criteriaProof;
    }

    struct FulfillmentComponent {
        uint256 orderIndex;
        uint256 itemIndex;
    }

    struct Fulfillment {
        FulfillmentComponent[] offerComponents;
        FulfillmentComponent[] considerationComponents;
    }

    struct Execution {
        ReceivedItem item;
        address offerer;
        bytes32 conduitKey;
    }

    function getOrderHash(OrderComponents calldata order)
        external
        view
        returns (bytes32 orderHash);

    function getOrderStatus(bytes32 orderHash)
        external
        view
        returns (
            bool isValidated,
            bool isCancelled,
            uint256 totalFilled,
            uint256 totalSize
        );

    function getCounter(address offerer)
        external
        view
        returns (uint256 counter);

    function fulfillAdvancedOrder(
        AdvancedOrder calldata advancedOrder,
        CriteriaResolver[] calldata criteriaResolvers,
        bytes32 fulfillerConduitKey,
        address recipient
    ) external payable returns (bool fulfilled);

    function fulfillAvailableAdvancedOrders(
        AdvancedOrder[] memory advancedOrders,
        CriteriaResolver[] calldata criteriaResolvers,
        FulfillmentComponent[][] calldata offerFulfillments,
        FulfillmentComponent[][] calldata considerationFulfillments,
        bytes32 fulfillerConduitKey,
        address recipient,
        uint256 maximumFulfilled
    )
        external
        payable
        returns (bool[] memory availableOrders, Execution[] memory executions);

    function matchOrders(
        Order[] calldata orders,
        Fulfillment[] calldata fulfillments
    ) external payable returns (Execution[] memory executions);

    function matchAdvancedOrders(
        AdvancedOrder[] calldata advancedOrders,
        CriteriaResolver[] calldata criteriaResolvers,
        Fulfillment[] calldata fulfillments
    ) external payable returns (Execution[] memory executions);
}

File 11 of 13 : TwoStepOwnable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

// Adapted from:
// https://github.com/boringcrypto/BoringSolidity/blob/e74c5b22a61bfbadd645e51a64aa1d33734d577a/contracts/BoringOwnable.sol
contract TwoStepOwnable {
    // --- Fields ---

    address public owner;
    address public pendingOwner;

    // --- Events ---

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

    // --- Errors ---

    error InvalidParams();
    error Unauthorized();

    // --- Modifiers ---

    modifier onlyOwner() {
        if (msg.sender != owner) {
            revert Unauthorized();
        }

        _;
    }

    // --- Constructor ---

    constructor(address initialOwner) {
        owner = initialOwner;
        emit OwnershipTransferred(address(0), initialOwner);
    }

    // --- Methods ---

    function transferOwnership(address newOwner) public onlyOwner {
        pendingOwner = newOwner;
    }

    function claimOwnership() public {
        address _pendingOwner = pendingOwner;
        if (msg.sender != _pendingOwner) {
            revert Unauthorized();
        }

        owner = _pendingOwner;
        pendingOwner = address(0);
        emit OwnershipTransferred(owner, _pendingOwner);
    }
}

File 12 of 13 : BaseModule.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

import {TwoStepOwnable} from "../../misc/TwoStepOwnable.sol";

// Notes:
// - includes common helpers useful for all modules

abstract contract BaseModule is TwoStepOwnable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    // --- Events ---

    event CallExecuted(address target, bytes data, uint256 value);

    // --- Errors ---

    error UnsuccessfulCall();
    error UnsuccessfulPayment();
    error WrongParams();

    // --- Constructor ---

    constructor(address owner) TwoStepOwnable(owner) {}

    // --- Owner ---

    // To be able to recover anything that gets stucked by mistake in the module,
    // we allow the owner to perform any arbitrary call. Since the goal is to be
    // stateless, this should only happen in case of mistakes. In addition, this
    // method is also useful for withdrawing any earned trading rewards.
    function makeCalls(
        address[] calldata targets,
        bytes[] calldata data,
        uint256[] calldata values
    ) external payable onlyOwner nonReentrant {
        uint256 length = targets.length;
        for (uint256 i = 0; i < length; ) {
            _makeCall(targets[i], data[i], values[i]);
            emit CallExecuted(targets[i], data[i], values[i]);

            unchecked {
                ++i;
            }
        }
    }

    // --- Helpers ---

    function _sendETH(address to, uint256 amount) internal {
        if (amount > 0) {
            (bool success, ) = payable(to).call{value: amount}("");
            if (!success) {
                revert UnsuccessfulPayment();
            }
        }
    }

    function _sendERC20(
        address to,
        uint256 amount,
        IERC20 token
    ) internal {
        if (amount > 0) {
            token.safeTransfer(to, amount);
        }
    }

    function _makeCall(
        address target,
        bytes memory data,
        uint256 value
    ) internal {
        (bool success, ) = payable(target).call{value: value}(data);
        if (!success) {
            revert UnsuccessfulCall();
        }
    }
}

File 13 of 13 : BaseExchangeModule.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import {IERC1155} from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";

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

// Notes:
// - includes common helpers useful for all marketplace/exchange modules

abstract contract BaseExchangeModule is BaseModule {
    using SafeERC20 for IERC20;

    // --- Structs ---

    // Every fill execution has the following parameters:
    // - `fillTo`: the recipient of the received items
    // - `refundTo`: the recipient of any refunds
    // - `revertIfIncomplete`: whether to revert or skip unsuccessful fills

    // The below `ETHListingParams` and `ERC20ListingParams` rely on the
    // off-chain execution encoder to ensure that the orders filled with
    // the passed in listing parameters exactly match (eg. order amounts
    // and payment tokens match).

    struct ETHListingParams {
        address fillTo;
        address refundTo;
        bool revertIfIncomplete;
        // The total amount of ETH to be provided when filling
        uint256 amount;
    }

    struct ERC20ListingParams {
        address fillTo;
        address refundTo;
        bool revertIfIncomplete;
        // The ERC20 payment token for the listings
        IERC20 token;
        // The total amount of `token` to be provided when filling
        uint256 amount;
    }

    struct OfferParams {
        address fillTo;
        address refundTo;
        bool revertIfIncomplete;
    }

    struct Fee {
        address recipient;
        uint256 amount;
    }

    // --- Fields ---

    address public immutable router;

    // --- Errors ---

    error UnsuccessfulFill();

    // --- Constructor ---

    constructor(address routerAddress) {
        router = routerAddress;
    }

    // --- Modifiers ---

    modifier refundETHLeftover(address refundTo) {
        _;

        uint256 leftover = address(this).balance;
        if (leftover > 0) {
            _sendETH(refundTo, leftover);
        }
    }

    modifier refundERC20Leftover(address refundTo, IERC20 token) {
        _;

        uint256 leftover = token.balanceOf(address(this));
        if (leftover > 0) {
            token.safeTransfer(refundTo, leftover);
        }
    }

    modifier chargeETHFees(Fee[] calldata fees, uint256 amount) {
        if (fees.length == 0) {
            _;
        } else {
            uint256 balanceBefore = address(this).balance;

            _;

            uint256 length = fees.length;
            if (length > 0) {
                uint256 balanceAfter = address(this).balance;
                uint256 actualPaid = balanceBefore - balanceAfter;

                uint256 actualFee;
                for (uint256 i = 0; i < length; ) {
                    // Adjust the fee to what was actually paid
                    actualFee = (fees[i].amount * actualPaid) / amount;
                    if (actualFee > 0) {
                        _sendETH(fees[i].recipient, actualFee);
                    }

                    unchecked {
                        ++i;
                    }
                }
            }
        }
    }

    modifier chargeERC20Fees(
        Fee[] calldata fees,
        IERC20 token,
        uint256 amount
    ) {
        if (fees.length == 0) {
            _;
        } else {
            uint256 balanceBefore = token.balanceOf(address(this));

            _;

            uint256 length = fees.length;
            if (length > 0) {
                uint256 balanceAfter = token.balanceOf(address(this));
                uint256 actualPaid = balanceBefore - balanceAfter;

                uint256 actualFee;
                for (uint256 i = 0; i < length; ) {
                    // Adjust the fee to what was actually paid
                    actualFee = (fees[i].amount * actualPaid) / amount;
                    if (actualFee > 0) {
                        token.safeTransfer(fees[i].recipient, actualFee);
                    }

                    unchecked {
                        ++i;
                    }
                }
            }
        }
    }

    // --- Helpers ---

    function _sendAllETH(address to) internal {
        _sendETH(to, address(this).balance);
    }

    function _sendAllERC20(address to, IERC20 token) internal {
        uint256 balance = token.balanceOf(address(this));
        if (balance > 0) {
            token.safeTransfer(to, balance);
        }
    }

    function _sendAllERC721(
        address to,
        IERC721 token,
        uint256 tokenId
    ) internal {
        if (token.ownerOf(tokenId) == address(this)) {
            token.safeTransferFrom(address(this), to, tokenId);
        }
    }

    function _sendAllERC1155(
        address to,
        IERC1155 token,
        uint256 tokenId
    ) internal {
        uint256 balance = token.balanceOf(address(this), tokenId);
        if (balance > 0) {
            token.safeTransferFrom(address(this), to, tokenId, balance, "");
        }
    }

    function _approveERC20IfNeeded(
        IERC20 token,
        address spender,
        uint256 amount
    ) internal {
        uint256 allowance = token.allowance(address(this), spender);
        if (allowance < amount) {
            token.approve(spender, amount - allowance);
        }
    }

    function _approveERC721IfNeeded(IERC721 token, address operator) internal {
        bool isApproved = token.isApprovedForAll(address(this), operator);
        if (!isApproved) {
            token.setApprovalForAll(operator, true);
        }
    }

    function _approveERC1155IfNeeded(IERC1155 token, address operator)
        internal
    {
        bool isApproved = token.isApprovedForAll(address(this), operator);
        if (!isApproved) {
            token.setApprovalForAll(operator, true);
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"router","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidParams","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"UnsuccessfulCall","type":"error"},{"inputs":[],"name":"UnsuccessfulFill","type":"error"},{"inputs":[],"name":"UnsuccessfulPayment","type":"error"},{"inputs":[],"name":"WrongParams","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"CallExecuted","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":"EXCHANGE","outputs":[{"internalType":"contract ISeaport","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"zone","type":"address"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"}],"internalType":"struct ISeaport.OfferItem[]","name":"offer","type":"tuple[]"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"internalType":"struct ISeaport.ConsiderationItem[]","name":"consideration","type":"tuple[]"},{"internalType":"enum ISeaport.OrderType","name":"orderType","type":"uint8"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bytes32","name":"zoneHash","type":"bytes32"},{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes32","name":"conduitKey","type":"bytes32"},{"internalType":"uint256","name":"totalOriginalConsiderationItems","type":"uint256"}],"internalType":"struct ISeaport.OrderParameters","name":"parameters","type":"tuple"},{"internalType":"uint120","name":"numerator","type":"uint120"},{"internalType":"uint120","name":"denominator","type":"uint120"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct ISeaport.AdvancedOrder","name":"order","type":"tuple"},{"components":[{"internalType":"uint256","name":"orderIndex","type":"uint256"},{"internalType":"enum ISeaport.Side","name":"side","type":"uint8"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"identifier","type":"uint256"},{"internalType":"bytes32[]","name":"criteriaProof","type":"bytes32[]"}],"internalType":"struct ISeaport.CriteriaResolver[]","name":"criteriaResolvers","type":"tuple[]"},{"components":[{"internalType":"address","name":"fillTo","type":"address"},{"internalType":"address","name":"refundTo","type":"address"},{"internalType":"bool","name":"revertIfIncomplete","type":"bool"}],"internalType":"struct BaseExchangeModule.OfferParams","name":"params","type":"tuple"},{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct BaseExchangeModule.Fee[]","name":"fees","type":"tuple[]"}],"name":"acceptERC1155Offer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"zone","type":"address"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"}],"internalType":"struct ISeaport.OfferItem[]","name":"offer","type":"tuple[]"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"internalType":"struct ISeaport.ConsiderationItem[]","name":"consideration","type":"tuple[]"},{"internalType":"enum ISeaport.OrderType","name":"orderType","type":"uint8"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bytes32","name":"zoneHash","type":"bytes32"},{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes32","name":"conduitKey","type":"bytes32"},{"internalType":"uint256","name":"totalOriginalConsiderationItems","type":"uint256"}],"internalType":"struct ISeaport.OrderParameters","name":"parameters","type":"tuple"},{"internalType":"uint120","name":"numerator","type":"uint120"},{"internalType":"uint120","name":"denominator","type":"uint120"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct ISeaport.AdvancedOrder","name":"order","type":"tuple"},{"components":[{"internalType":"address","name":"fillTo","type":"address"},{"internalType":"address","name":"refundTo","type":"address"},{"internalType":"bool","name":"revertIfIncomplete","type":"bool"},{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct BaseExchangeModule.ERC20ListingParams","name":"params","type":"tuple"},{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct BaseExchangeModule.Fee[]","name":"fees","type":"tuple[]"}],"name":"acceptERC20Listing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"zone","type":"address"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"}],"internalType":"struct ISeaport.OfferItem[]","name":"offer","type":"tuple[]"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"internalType":"struct ISeaport.ConsiderationItem[]","name":"consideration","type":"tuple[]"},{"internalType":"enum ISeaport.OrderType","name":"orderType","type":"uint8"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bytes32","name":"zoneHash","type":"bytes32"},{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes32","name":"conduitKey","type":"bytes32"},{"internalType":"uint256","name":"totalOriginalConsiderationItems","type":"uint256"}],"internalType":"struct ISeaport.OrderParameters","name":"parameters","type":"tuple"},{"internalType":"uint120","name":"numerator","type":"uint120"},{"internalType":"uint120","name":"denominator","type":"uint120"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct ISeaport.AdvancedOrder[]","name":"orders","type":"tuple[]"},{"components":[{"internalType":"address","name":"fillTo","type":"address"},{"internalType":"address","name":"refundTo","type":"address"},{"internalType":"bool","name":"revertIfIncomplete","type":"bool"},{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct BaseExchangeModule.ERC20ListingParams","name":"params","type":"tuple"},{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct BaseExchangeModule.Fee[]","name":"fees","type":"tuple[]"}],"name":"acceptERC20Listings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"zone","type":"address"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"}],"internalType":"struct ISeaport.OfferItem[]","name":"offer","type":"tuple[]"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"internalType":"struct ISeaport.ConsiderationItem[]","name":"consideration","type":"tuple[]"},{"internalType":"enum ISeaport.OrderType","name":"orderType","type":"uint8"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bytes32","name":"zoneHash","type":"bytes32"},{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes32","name":"conduitKey","type":"bytes32"},{"internalType":"uint256","name":"totalOriginalConsiderationItems","type":"uint256"}],"internalType":"struct ISeaport.OrderParameters","name":"parameters","type":"tuple"},{"internalType":"uint120","name":"numerator","type":"uint120"},{"internalType":"uint120","name":"denominator","type":"uint120"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct ISeaport.AdvancedOrder","name":"order","type":"tuple"},{"components":[{"internalType":"uint256","name":"orderIndex","type":"uint256"},{"internalType":"enum ISeaport.Side","name":"side","type":"uint8"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"identifier","type":"uint256"},{"internalType":"bytes32[]","name":"criteriaProof","type":"bytes32[]"}],"internalType":"struct ISeaport.CriteriaResolver[]","name":"criteriaResolvers","type":"tuple[]"},{"components":[{"internalType":"address","name":"fillTo","type":"address"},{"internalType":"address","name":"refundTo","type":"address"},{"internalType":"bool","name":"revertIfIncomplete","type":"bool"}],"internalType":"struct BaseExchangeModule.OfferParams","name":"params","type":"tuple"},{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct BaseExchangeModule.Fee[]","name":"fees","type":"tuple[]"}],"name":"acceptERC721Offer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"zone","type":"address"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"}],"internalType":"struct ISeaport.OfferItem[]","name":"offer","type":"tuple[]"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"internalType":"struct ISeaport.ConsiderationItem[]","name":"consideration","type":"tuple[]"},{"internalType":"enum ISeaport.OrderType","name":"orderType","type":"uint8"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bytes32","name":"zoneHash","type":"bytes32"},{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes32","name":"conduitKey","type":"bytes32"},{"internalType":"uint256","name":"totalOriginalConsiderationItems","type":"uint256"}],"internalType":"struct ISeaport.OrderParameters","name":"parameters","type":"tuple"},{"internalType":"uint120","name":"numerator","type":"uint120"},{"internalType":"uint120","name":"denominator","type":"uint120"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct ISeaport.AdvancedOrder","name":"order","type":"tuple"},{"components":[{"internalType":"address","name":"fillTo","type":"address"},{"internalType":"address","name":"refundTo","type":"address"},{"internalType":"bool","name":"revertIfIncomplete","type":"bool"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct BaseExchangeModule.ETHListingParams","name":"params","type":"tuple"},{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct BaseExchangeModule.Fee[]","name":"fees","type":"tuple[]"}],"name":"acceptETHListing","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"components":[{"components":[{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"zone","type":"address"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"}],"internalType":"struct ISeaport.OfferItem[]","name":"offer","type":"tuple[]"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"internalType":"struct ISeaport.ConsiderationItem[]","name":"consideration","type":"tuple[]"},{"internalType":"enum ISeaport.OrderType","name":"orderType","type":"uint8"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bytes32","name":"zoneHash","type":"bytes32"},{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes32","name":"conduitKey","type":"bytes32"},{"internalType":"uint256","name":"totalOriginalConsiderationItems","type":"uint256"}],"internalType":"struct ISeaport.OrderParameters","name":"parameters","type":"tuple"},{"internalType":"uint120","name":"numerator","type":"uint120"},{"internalType":"uint120","name":"denominator","type":"uint120"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct ISeaport.AdvancedOrder","name":"order","type":"tuple"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct SeaportModule.SeaportETHListingWithPrice[]","name":"orders","type":"tuple[]"},{"components":[{"internalType":"address","name":"fillTo","type":"address"},{"internalType":"address","name":"refundTo","type":"address"},{"internalType":"bool","name":"revertIfIncomplete","type":"bool"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct BaseExchangeModule.ETHListingParams","name":"params","type":"tuple"},{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct BaseExchangeModule.Fee[]","name":"fees","type":"tuple[]"}],"name":"acceptETHListings","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"claimOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"bytes[]","name":"data","type":"bytes[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"makeCalls","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"zone","type":"address"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"}],"internalType":"struct ISeaport.OfferItem[]","name":"offer","type":"tuple[]"},{"components":[{"internalType":"enum ISeaport.ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"internalType":"struct ISeaport.ConsiderationItem[]","name":"consideration","type":"tuple[]"},{"internalType":"enum ISeaport.OrderType","name":"orderType","type":"uint8"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bytes32","name":"zoneHash","type":"bytes32"},{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes32","name":"conduitKey","type":"bytes32"},{"internalType":"uint256","name":"totalOriginalConsiderationItems","type":"uint256"}],"internalType":"struct ISeaport.OrderParameters","name":"parameters","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct ISeaport.Order[]","name":"orders","type":"tuple[]"},{"components":[{"components":[{"internalType":"uint256","name":"orderIndex","type":"uint256"},{"internalType":"uint256","name":"itemIndex","type":"uint256"}],"internalType":"struct ISeaport.FulfillmentComponent[]","name":"offerComponents","type":"tuple[]"},{"components":[{"internalType":"uint256","name":"orderIndex","type":"uint256"},{"internalType":"uint256","name":"itemIndex","type":"uint256"}],"internalType":"struct ISeaport.FulfillmentComponent[]","name":"considerationComponents","type":"tuple[]"}],"internalType":"struct ISeaport.Fulfillment[]","name":"fulfillments","type":"tuple[]"}],"name":"matchOrders","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"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":"router","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a034620000c657601f6200338f38819003918201601f19168301916001600160401b03831184841017620000cb578084926040948552833981010312620000c6576200005a60206200005283620000e1565b9201620000e1565b600080546001600160a01b0319166001600160a01b03909316928317815560405192907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a360016002556080526132989081620000f782396080518181816103bf01526113a20152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b0382168203620000c65756fe6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c806312f3a43f1461015b578063150b7a02146101525780632b8a88ec146101495780634e71e0c81461014057806359082309146101375780636baab5f71461012e57806376af66291461012557806380b102ff1461011c57806386f20e8c146101135780638da5cb5b1461010a578063a817440414610101578063b50e44b8146100f8578063e30c3978146100ef578063f23a6e61146100e6578063f2fde38b146100dd5763f887ea400361000e576100d861138b565b61000e565b506100d861133a565b506100d86112c5565b506100d861129b565b506100d8611270565b506100d86110fb565b506100d86110d1565b506100d861104d565b506100d8610eae565b506100d8610d44565b506100d8610b53565b506100d8610a4b565b506100d86109e1565b506100d86106e4565b506100d861034f565b506100d8610199565b9181601f84011215610194578235916001600160401b038311610194576020808501948460051b01011161019457565b600080fd5b50606080600319360112610194576001600160401b0390600435828111610194576101c8903690600401610164565b602493919335828111610194576101e3903690600401610164565b92604435908111610194576101fc903690600401610164565b60005491956001600160a01b03949092851633036102f35761021c6114de565b60005b818110610230576100196001600255565b807fa3f06cf374cf66be06f5fe85cdd3b13d9d9fdef6482f640d2de1d44c3ed7332c8787868c6102e68f878f81816102b7828f60019f976102b28c8e6102ac8e6102a3886102ca9f806102c29f61028b61029b938d8d6113e8565b359761029689610304565b61140d565b9690936113e8565b35933691611486565b9061159e565b6113e8565b35986102968a610304565b9590946113e8565b359160409384519687961686528c60208701528c8601916114bd565b918301520390a10161021f565b6040516282b42960e81b8152600490fd5b6001600160a01b0381160361019457565b359061032082610304565b565b9181601f84011215610194578235916001600160401b038311610194576020838186019501011161019457565b50346101945760803660031901126101945761036c600435610304565b610377602435610304565b6064356001600160401b03811161019457610396903690600401610322565b806103ae575b604051630a85bd0160e11b8152602090f35b6103e3916103bd913691611486565b7f0000000000000000000000000000000000000000000000000000000000000000611562565b388061039c565b60a090602319011261019457602490565b908160a09103126101945790565b50634e487b7160e01b600052604160045260246000fd5b60a081019081106001600160401b0382111761043b57604052565b610443610409565b604052565b6001600160401b03811161043b57604052565b606081019081106001600160401b0382111761043b57604052565b60c081019081106001600160401b0382111761043b57604052565b604081019081106001600160401b0382111761043b57604052565b90601f801991011681019081106001600160401b0382111761043b57604052565b6040519061016082018281106001600160401b0382111761043b57604052565b6020906001600160401b038111610506575b60051b0190565b61050e610409565b6104ff565b81601f820112156101945780359161052a836104ed565b9261053860405194856104ac565b808452602092838086019260051b820101928311610194578301905b828210610562575050505090565b81358152908301908301610554565b606090604319011261019457604490565b9181601f84011215610194578235916001600160401b038311610194576020808501948460061b01011161019457565b60c0600319820112610194576001600160401b039060043582811161019457816105de916004016103fb565b926024803590848211610194578360238301121561019457816004013591610605836104ed565b926040610614815195866104ac565b818552602093808587019360051b8501019388851161019457818101935b85851061066557505050505050509261064a83610571565b9260a4359182116101945761066191600401610582565b9091565b84358b81116101945782019060a0828c0360231901126101945784519061068b82610420565b8483013582526044830135600281101561019457898301526064830135868301526084830135606083015260a4830135918d8311610194576106d48d878c969587960101610513565b6080820152815201940193610632565b5034610194576106f3366105b2565b61070094919392946114de565b61072061071a6107108480611f79565b6060810190611f8f565b90611fc4565b93600361072c86612008565b61073581611ff6565b1415806109ba575b6109a85760209161075e610752848801611400565b6001600160a01b031690565b936107866107528561078061071a6107768680611f79565b6040810190612012565b01611400565b9661079086612234565b61079988611ab6565b60036107a482612008565b6107ad81611ff6565b0361098d576108466040610860920135975b604051627eeac760e11b808252306004830152602482018b9052909188918b916001600160a01b038c1691908f8587604481875afa968715610980575b60009761095a575b5060406108119101611647565b15610949576108229030908a612d69565b60405190815230600482015260248101929092529093849190829081906044820190565b03915afa91821561093c575b60009261090d575b506115d7565b9182610898575b61088e886108898b6108848b8b61087f8c8501611400565b612313565b611400565b6120e2565b6100196001600255565b60005b8181106108a85750610867565b806109078a6108c26108bd600195878b6115ec565b612081565b8051610901906108e1908a908d906001600160a01b031694015161160a565b6108fb6108ef8d8b01612309565b6001600160781b031690565b9061161d565b906120cf565b0161089b565b61092e919250873d8911610935575b61092681836104ac565b810190611708565b903861085a565b503d61091c565b610944611717565b610852565b6109559030908a612a92565b610822565b610811919750610978604091883d8a116109355761092681836104ac565b979150610804565b610988611717565b6107fc565b50610860610846606061099f89612047565b510151976107bf565b604051635863f78960e01b8152600490fd5b5060056109c686612008565b6109cf81611ff6565b141561073d565b600091031261019457565b503461019457600080600319360112610a48576001546001600160a01b03811690338290036102f35782546001600160a01b03199081168317845516600155807f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b80fd5b50346101945760e0366003190112610194576001600160401b0360043581811161019457610a7d903690600401610164565b9091610a88366103ea565b60c43591821161019457610aa3610acf923690600401610582565b91610aac6114de565b602081013594610abb86610304565b606082013596610aca88610304565b611db4565b6040516370a0823160e01b8152306004820152906020826024816001600160a01b0387165afa918215610b46575b600092610b26575b5081610b15576100196001600255565b610b1e926118ae565b38808061088e565b610b3f91925060203d81116109355761092681836104ac565b9038610b05565b610b4e611717565b610afd565b503461019457610b62366105b2565b919392610b6d6114de565b610b7d61071a6107108680611f79565b916002610b8984612008565b610b9281611ff6565b141580610d17575b6109a857602091610baf610752848601611400565b93610bc76107528561078061071a6107768c80611f79565b96610bd186612234565b610bda88611ab6565b610be660408a01611647565b15610d0657610bf790833091612d69565b6002610c0282612008565b610c0b81611ff6565b03610cf157604091500135935b6040516331a9108f60e11b8152600481018690526001600160a01b0384826024818985165afa918215610ce4575b600092610cb5575b5030911603610c75575b61088e86610889896108848989610c708a8501611400565b612150565b60005b818110610c855750610c58565b80610caf88610c9a6108bd60019587896115ec565b805190880151906001600160a01b03166120cf565b01610c78565b610cd6919250853d8711610cdd575b610cce81836104ac565b81019061206c565b9038610c4e565b503d610cc4565b610cec611717565b610c46565b50610cfd606091612047565b51015193610c18565b610d1290833091612a92565b610bf7565b506004610d2384612008565b610d2c81611ff6565b1415610b9a565b608090602319011261019457602490565b5060c0366003190112610194576001600160401b0360043581811161019457610d719036906004016103fb565b610d7a36610d33565b9160a43590811161019457610d93903690600401610582565b929091610d9e6114de565b60208083013593610dae85610304565b60608401359580610de757505050610dc7929350611682565b4780610dd7576100196001600255565b610de0916116c9565b388061088e565b919392610e2991938747926040830135610e008161163d565b15610e8c57610e2292610e11611651565b903591610e1d83610304565b612e58565b47906115d7565b60005b828110610e3f5750505050509050610dc7565b80610e6288610e5d8589610e566001978a8c6115ec565b013561160a565b61161d565b80610e6f575b5001610e2c565b610e8690610e8161088484888a6115ec565b6116c9565b38610e68565b610ea992610e98611651565b903591610ea483610304565b612ae8565b610e22565b5060c0366003190112610194576001600160401b0360043581811161019457610edb903690600401610164565b91610ee536610d33565b9060a43590811161019457610efe903690600401610582565b939092610f096114de565b60208084013594610f1986610304565b60608501359680610f3257505050610dc7939450611d11565b9291949390934792610f42611651565b610f4e60408401611647565b15610ffd5760005b848110610fbf575050505050610f6d9047906115d7565b60005b828110610f835750505050509050610dc7565b80610f9a88610e5d8589610e566001978a8c6115ec565b80610fa7575b5001610f70565b610fb990610e8161088484888a6115ec565b38610fa0565b80610ff7610fd9610fd36001948988611ccc565b80611cfc565b610fe287611400565b858d610fef868c8b611ccc565b013592612e58565b01610f56565b60005b848110611015575050505050610f6d90610e22565b80611047611029610fd36001948988611ccc565b61103287611400565b858d61103f868c8b611ccc565b013592612ae8565b01611000565b50346101945760e0366003190112610194576001600160401b036004358181116101945761107f9036906004016103fb565b90611089366103ea565b9060c435908111610194576110a5610acf913690600401610582565b906110ae6114de565b6020840135936110bd85610304565b6060810135956110cc87610304565b611724565b5034610194576000366003190112610194576000546040516001600160a01b039091168152602090f35b50346101945760406003198181360112610194576001600160401b039060043582811161019457611130903690600401610164565b9092602435908111610194579161114c85933690600401610164565b916111556114de565b8451958694632a05d10160e21b8652806044870188600489015252606486019160648260051b8801019781936000925b8484106112005789600081806111a68f8e8e8e858403016024860152612865565b0381836e6c3852cbef3e08e8df289169ede5815af180156111f3575b6111d0576100196001600255565b6111ec903d806000833e6111e481836104ac565b810190612412565b508061088e565b6111fb611717565b6111c2565b9193959697985091939861124f6001916063198d820301855261125c6112268d866127de565b916112406112348480612518565b898352898301906126d9565b906020948486809601906127ad565b91858185039101526114bd565b9b019301940191938a989796959391611185565b50346101945760003660031901126101945760206040516e6c3852cbef3e08e8df289169ede5818152f35b5034610194576000366003190112610194576001546040516001600160a01b039091168152602090f35b50346101945760a0366003190112610194576112e2600435610304565b6112ed602435610304565b6084356001600160401b0381116101945761130c903690600401610322565b80611324575b60405163f23a6e6160e01b8152602090f35b611333916103bd913691611486565b3880611312565b50346101945760203660031901126101945760043561135881610304565b6000546001600160a01b039190821633036102f357166bffffffffffffffffffffffff60a01b6001541617600155600080f35b5034610194576000366003190112610194576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b50634e487b7160e01b600052603260045260246000fd5b91908110156113f85760051b0190565b61050e6113d1565b3561140a81610304565b90565b919081101561144f575b60051b81013590601e19813603018212156101945701908135916001600160401b038311610194576020018236038113610194579190565b6114576113d1565b611417565b6020906001600160401b038111611479575b601f01601f19160190565b611481610409565b61146e565b9291926114928261145c565b916114a060405193846104ac565b829481845281830111610194578281602093846000960137010152565b908060209392818452848401376000828201840152601f01601f1916010190565b60028054146114ed5760028055565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b3d1561155d573d906115438261145c565b9161155160405193846104ac565b82523d6000602084013e565b606090565b8151600092839260209091019083906001600160a01b03165af1611584611532565b501561158c57565b6040516322092f2f60e11b8152600490fd5b8151600093849391926020909201916001600160a01b03165af1611584611532565b50634e487b7160e01b600052601160045260246000fd5b919082039182116115e457565b6103206115c0565b91908110156115fd575b60061b0190565b6116056113d1565b6115f6565b818102929181159184041417156115e457565b8115611627570490565b634e487b7160e01b600052601260045260246000fd5b8015150361019457565b3561140a8161163d565b604051602081018181106001600160401b03821117611675575b6040526000815290565b61167d610409565b61166b565b60408201356116908161163d565b156116af57610320916116a1611651565b6060823592610fef84610304565b610320916116bb611651565b606082359261103f84610304565b816116d2575050565b6000918291829182916001600160a01b03165af16116ee611532565b50156116f657565b60405163d2dcf4f360e01b8152600490fd5b90816020910312610194575190565b506040513d6000823e3d90fd5b909193929361173560608401611400565b6080840135958061174e57505050610320929350611845565b6040516370a0823160e01b8082523060048301526020969495939492936117bd936001600160a01b038716939289929091908385602481895afa948515611838575b600095611813575b50906117a391611845565b604051908152306004820152928390818060248101610846565b60005b8281106117d1575050505050509050565b806117e889610e5d858a610e566001978a8d6115ec565b806117f5575b50016117c0565b61180d9061180761088484888b6115ec565b876118ae565b386117ee565b6117a39291955061183090853d87116109355761092681836104ac565b949091611798565b611840611717565b611790565b611861606083013561185681610304565b608084013590611bb9565b604082013561186f8161163d565b156118915761032091611880611651565b90359161188c83610304565b612d69565b6103209161189d611651565b9035916118a983610304565b612a92565b60405163a9059cbb60e01b60208083019182526001600160a01b039490941660248301526044808301959095529381529192611947929160009081906118f56064866104ac565b60018060a01b0316926040519461190b86610491565b8786527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656488870152519082855af1611941611532565b91611a24565b8051908161195457505050565b82806119649383010191016119c3565b1561196c5750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b90816020910312610194575161140a8161163d565b156119df57565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b91929015611a445750815115611a38575090565b61140a903b15156119d8565b825190915015611a575750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b828510611a9d575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350611a7a565b604051636eb1769f60e11b81523060048201526e6c3852cbef3e08e8df289169ede58160248201526020916001600160a01b03168282604481845afa918215611bac575b600092611b8d575b506000198210611b1157505050565b60405163095ea7b360e01b81526e6c3852cbef3e08e8df289169ede5816004820152911960248301528290829060449082906000905af18015611b80575b611b57575050565b81611b7692903d10611b79575b611b6e81836104ac565b8101906119c3565b50565b503d611b64565b611b88611717565b611b4f565b611ba5919250833d85116109355761092681836104ac565b9038611b02565b611bb4611717565b611afa565b604051636eb1769f60e11b81523060048201526e6c3852cbef3e08e8df289169ede58160248201526020926001600160a01b039290921691908381604481865afa908115611cbf575b600091611ca2575b50818110611c19575b50505050565b600092611c2a611c609286946115d7565b60405194858094819363095ea7b360e01b8352600483019190602060408401936e6c3852cbef3e08e8df289169ede58181520152565b03925af18015611c95575b611c77575b8080611c13565b81611c8d92903d10611b7957611b6e81836104ac565b503880611c70565b611c9d611717565b611c6b565b611cb99150843d86116109355761092681836104ac565b38611c0a565b611cc7611717565b611c02565b9190811015611cef575b60051b81013590603e1981360301821215610194570190565b611cf76113d1565b611cd6565b903590609e1981360301821215610194570190565b909291611d1c611651565b91611d2960408301611647565b15611d715760005b858110611d4057505050509050565b80611d6b611d54610fd36001948a87611ccc565b611d5d86611400565b876020610fef868d8a611ccc565b01611d31565b60005b858110611d8357505050509050565b80611dae611d97610fd36001948a87611ccc565b611da086611400565b87602061103f868d8a611ccc565b01611d74565b909192949394611dc660608501611400565b60808501359680611ddf57505050610320939450611ede565b6040516370a0823160e01b808252306004830152602097949693959294611e34946001600160a01b038816948a9392919084866024818a5afa958615611eab575b600096611e84575b50906117a39291611ede565b60005b828110611e48575050505050509050565b80611e5f89610e5d858a610e566001978a8d6115ec565b80611e6c575b5001611e37565b611e7e9061180761088484888b6115ec565b38611e65565b6117a39392919650611ea290863d88116109355761092681836104ac565b95909192611e28565b611eb3611717565b611e20565b909161140a92811015611ed1575b60051b810190611cfc565b611ed96113d1565b611ec6565b9190611eef61185660608401611400565b611ef7611651565b90611f0460408401611647565b15611f415760005b818110611f1a575050505050565b80611f3b611f2b6001938589611eb8565b85611f3588611400565b91612d69565b01611f0c565b60005b818110611f52575050505050565b80611f73611f636001938589611eb8565b85611f6d88611400565b91612a92565b01611f44565b90359061015e1981360301821215610194570190565b903590601e198136030182121561019457018035906001600160401b038211610194576020019160c082023603831361019457565b9015611fcd5790565b61140a6113d1565b6006111561019457565b50634e487b7160e01b600052602160045260246000fd5b6006111561200057565b610320611fdf565b3561140a81611fd5565b903590601e198136030182121561019457018035906001600160401b038211610194576020019160a082023603831361019457565b602090805115612055570190565b61205d6113d1565b0190565b519061032082610304565b90816020910312610194575161140a81610304565b60408136031261019457602060405191604083018381106001600160401b038211176120c2575b60405280356120b681610304565b83520135602082015290565b6120ca610409565b6120a8565b816120d957505050565b610320926118ae565b6040516370a0823160e01b8152306004820152906020826024816001600160a01b0387165afa918215612143575b600092612123575b50816120d957505050565b61213c91925060203d81116109355761092681836104ac565b9038612118565b61214b611717565b612110565b6040516331a9108f60e11b8152600481018490526001600160a01b03928316939192602082602481885afa918215612227575b600092612207575b5016301461219857505050565b823b1561019457604051632142170760e11b81523060048201526001600160a01b0390921660248301526044820152906000908290818381606481015b03925af180156121fa575b6121e75750565b806121f461032092610448565b806109d6565b612202611717565b6121e0565b61222091925060203d8111610cdd57610cce81836104ac565b903861218b565b61222f611717565b612183565b60405163e985e9c560e01b81523060048201526e6c3852cbef3e08e8df289169ede58160248201526001600160a01b039190911690602081604481855afa9081156122eb575b6000916122cd575b501561228b5750565b803b156101945760405163a22cb46560e01b81526e6c3852cbef3e08e8df289169ede581600482015260016024820152906000908290818381604481016121d5565b6122e5915060203d8111611b7957611b6e81836104ac565b38612282565b6122f3611717565b61227a565b6001600160781b0381160361019457565b3561140a816122f8565b604051627eeac760e11b81523060048201526024810184905290916001600160a01b0316602082604481845afa918215612405575b6000926123e5575b508161235c5750505050565b803b1561019457604051637921219560e11b81523060048201526001600160a01b039390931660248401526044830193909352606482015260a06084820152600060a482018190529091829060c490829084905af180156123d8575b6123c5575b808080611c13565b806121f46123d292610448565b386123bd565b6123e0611717565b6123b8565b6123fe91925060203d81116109355761092681836104ac565b9038612350565b61240d611717565b612348565b6020908181840312610194578051906001600160401b038211610194570182601f8201121561019457805191612447836104ed565b936040612456815196876104ac565b848652828601918360e080970286010194818611610194578401925b858410612483575050505050505090565b838203878112610194578351916124998361045b565b60a0809212610194578892612500889387516124b481610420565b89516124bf81611fd5565b8152858a01516124ce81610304565b86820152888a0151898201526060808b0151908201526080808b0151906124f482610304565b82015283528801612061565b8382015260c087015186820152815201930192612472565b903561015e1982360301811215610194570190565b9035601e19823603018112156101945701602081359101916001600160401b0382116101945760a082023603831361019457565b90600682101561256e5752565b612576611fdf565b52565b9190808252602080920192916000905b828210612597575050505090565b90919293806125b260019287356125ad81611fd5565b612561565b828601356125bf81610304565b828060a01b03168382015260408087013590820152606080870135908201526080808701359082015260a08091019501920190929192612589565b9035601e19823603018112156101945701602081359101916001600160401b0382116101945760c082023603831361019457565b9190808252602080920192916000905b82821061264c575050505090565b909192938061266260019287356125ad81611fd5565b8286013561266f81610304565b828060a01b038091168483015260408088013590830152606080880135908301526080808801359083015260a090818801356126aa81610304565b169082015260c090810195019392019061263e565b3590600482101561019457565b90600482101561256e5752565b906126f4816126e784610315565b6001600160a01b03169052565b61271361270360208401610315565b6001600160a01b03166020830152565b612752612737612726604085018561252d565b610160806040870152850191612579565b61274460608501856125fa565b90848303606086015261262e565b9161276c612762608083016126bf565b60808401906126cc565b60a081013560a083015260c081013560c083015260e081013560e0830152610100808201359083015261012080820135908301526101408091013591015290565b9035601e19823603018112156101945701602081359101916001600160401b03821161019457813603831361019457565b9035603e1982360301811215610194570190565b9035601e19823603018112156101945701602081359101916001600160401b038211610194578160061b3603831361019457565b9190808252602080920192916000905b828210612844575050505090565b83358552838101358582015260409485019490930192600190910190612836565b90808352602080930192838260051b850194846000925b85841061288d575050505050505090565b9091929394959685806128e083856001950388526128ab8c886127de565b906128d36128c96128bc84806127f2565b6040808652850191612826565b92858101906127f2565b9185818503910152612826565b99019401940192959493919061287c565b90815180825260208092019182818360051b8201950193600080925b85841061291e575050505050505090565b9091929394959681810384528751908660c060a09283810193855182528386015160028110156129b6575b8483015260408087015190830152606080870151908301526080958601519582015284519384905291939101919083019085905b80821061299d57505050908060019299019401940192959493919061290d565b919380600192948651815201940192018893929161297d565b6129be611fdf565b612949565b939290612a7861032093612a6a6060936080895288612a5a612a4f6129fd6129eb8580612518565b60a060808601526101208501906126d9565b6020850135612a0b816122f8565b6001600160781b0380911660a08601526040860135612a29816122f8565b1660c0850152612a3b898601866127ad565b90607f199560e087828603019101526114bd565b9260808101906127ad565b918b8403016101008c01526114bd565b9087820360208901526128f1565b600060408701526001600160a01b03909216940193909352565b90602091612ab460405194859384936339eb2ac960e21b8552600485016129c3565b038160006e6c3852cbef3e08e8df289169ede5815af1612ad15750565b611b769060203d8111611b7957611b6e81836104ac565b9260209291612b0e94604051958694859384936339eb2ac960e21b8552600485016129c3565b03916e6c3852cbef3e08e8df289169ede5815af1612ad15750565b81601f8201121561019457803590612b40826104ed565b92604090612b50825195866104ac565b838552602091828601918360a080970286010194818611610194578401925b858410612b80575050505050505090565b8684830312610194578487918451612b9781610420565b8635612ba281611fd5565b815282870135612bb181610304565b8382015285870135868201526060808801359082015260808088013590820152815201930192612b6f565b81601f8201121561019457803590612bf3826104ed565b92604090612c03825195866104ac565b838552602091828601918360c080970286010194818611610194578401925b858410612c33575050505050505090565b8684830312610194578487918451612c4a81610476565b8635612c5581611fd5565b815282870135612c6481610304565b838201528587013586820152606080880135908201526080808801359082015260a08088013590612c9482610304565b820152815201930192612c22565b6101608136031261019457612cb56104cd565b90612cbf81610315565b8252612ccd60208201610315565b60208301526001600160401b03604082013581811161019457612cf39036908401612b29565b6040840152606082013590811161019457612d119036908301612bdc565b6060830152612d22608082016126bf565b608083015260a081013560a083015260c081013560c083015260e081013560e083015261010080820135908301526101208082013590830152610140809101359082015290565b9190612db4612d88612d83612d7e8680611f79565b612ca2565b6130df565b916020612d94846131ce565b9460009260405194859283926339eb2ac960e21b84528a600485016129c3565b0381846e6c3852cbef3e08e8df289169ede5815af1909181612e38575b50612de857604051631298f31b60e11b8152600490fd5b612dfe57604051631298f31b60e11b8152600490fd5b6020612e18612e1f93612e136108ef946131ce565b6115d7565b9301612309565b03612e2657565b604051631298f31b60e11b8152600490fd5b612e5191925060203d8111611b7957611b6e81836104ac565b9038612dd1565b929190612e9c906020612e71612d83612d7e8880611f79565b93612e7b856131ce565b956000936040518096819482936339eb2ac960e21b84528c600485016129c3565b03916e6c3852cbef3e08e8df289169ede5815af1909181612e385750612de857604051631298f31b60e11b8152600490fd5b6040519061016082018281106001600160401b03821117612f34575b60405281610140600091828152826020820152606060408201526060808201528260808201528260a08201528260c08201528260e082015282610100820152826101208201520152565b612f3c610409565b612eea565b90815180825260208080930193019160005b828110612f61575050505090565b909192938260a06001928751612f78828251612561565b8084015185841b869003168285015260408082015190830152606080820151908301526080908101519082015201950193929101612f53565b90815180825260208080930193019160005b828110612fd1575050505090565b909192938260c06001928751612fe8828251612561565b848060a01b038085830151168584015260408083015190840152606080830151908401526080808301519084015260a0809201511690820152019501910192919092612fc3565b602080825282516001600160a01b03169082015260208201516001600160a01b03166040820152604082015161308c61307661016092836060860152610180850190612f41565b6060850151848203601f19016080860152612fb1565b9261309f608082015160a08501906126cc565b60a081015160c084015260c081015160e084015260e081015161010090818501528101516101209081850152810151906101409182850152015191015290565b61316961311e916130ee612ece565b50805160405163f07ec37360e01b81526001600160a01b0390911660048201526020938492919081906024820190565b039083816e6c3852cbef3e08e8df289169ede5819381855afa9081156131c1575b6000916131a4575b5061014083015260405180809581946379df72bd60e01b83526004830161302f565b03915afa918215613197575b60009261318157505090565b61140a9250803d106109355761092681836104ac565b61319f611717565b613175565b6131bb9150843d86116109355761092681836104ac565b38613147565b6131c9611717565b61313f565b604051906346423aa760e01b825260048201526080816024816e6c3852cbef3e08e8df289169ede5815afa908115613255575b60009161320c575090565b906080823d821161324d575b81613225608093836104ac565b81010312610a4857508061323b6040925161163d565b613248602082015161163d565b015190565b3d9150613218565b61325d611717565b61320156fea2646970667358221220f080701c8acb371824bfd69353dba27556e01e11808ef17cdda2fce3387e72d264736f6c63430008110033000000000000000000000000f3d63166f0ca56c3c1a3508fce03ff0cf3fb691e000000000000000000000000178a86d36d89c7fdebea90b739605da7b131ff6a

Deployed Bytecode

0x6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c806312f3a43f1461015b578063150b7a02146101525780632b8a88ec146101495780634e71e0c81461014057806359082309146101375780636baab5f71461012e57806376af66291461012557806380b102ff1461011c57806386f20e8c146101135780638da5cb5b1461010a578063a817440414610101578063b50e44b8146100f8578063e30c3978146100ef578063f23a6e61146100e6578063f2fde38b146100dd5763f887ea400361000e576100d861138b565b61000e565b506100d861133a565b506100d86112c5565b506100d861129b565b506100d8611270565b506100d86110fb565b506100d86110d1565b506100d861104d565b506100d8610eae565b506100d8610d44565b506100d8610b53565b506100d8610a4b565b506100d86109e1565b506100d86106e4565b506100d861034f565b506100d8610199565b9181601f84011215610194578235916001600160401b038311610194576020808501948460051b01011161019457565b600080fd5b50606080600319360112610194576001600160401b0390600435828111610194576101c8903690600401610164565b602493919335828111610194576101e3903690600401610164565b92604435908111610194576101fc903690600401610164565b60005491956001600160a01b03949092851633036102f35761021c6114de565b60005b818110610230576100196001600255565b807fa3f06cf374cf66be06f5fe85cdd3b13d9d9fdef6482f640d2de1d44c3ed7332c8787868c6102e68f878f81816102b7828f60019f976102b28c8e6102ac8e6102a3886102ca9f806102c29f61028b61029b938d8d6113e8565b359761029689610304565b61140d565b9690936113e8565b35933691611486565b9061159e565b6113e8565b35986102968a610304565b9590946113e8565b359160409384519687961686528c60208701528c8601916114bd565b918301520390a10161021f565b6040516282b42960e81b8152600490fd5b6001600160a01b0381160361019457565b359061032082610304565b565b9181601f84011215610194578235916001600160401b038311610194576020838186019501011161019457565b50346101945760803660031901126101945761036c600435610304565b610377602435610304565b6064356001600160401b03811161019457610396903690600401610322565b806103ae575b604051630a85bd0160e11b8152602090f35b6103e3916103bd913691611486565b7f000000000000000000000000178a86d36d89c7fdebea90b739605da7b131ff6a611562565b388061039c565b60a090602319011261019457602490565b908160a09103126101945790565b50634e487b7160e01b600052604160045260246000fd5b60a081019081106001600160401b0382111761043b57604052565b610443610409565b604052565b6001600160401b03811161043b57604052565b606081019081106001600160401b0382111761043b57604052565b60c081019081106001600160401b0382111761043b57604052565b604081019081106001600160401b0382111761043b57604052565b90601f801991011681019081106001600160401b0382111761043b57604052565b6040519061016082018281106001600160401b0382111761043b57604052565b6020906001600160401b038111610506575b60051b0190565b61050e610409565b6104ff565b81601f820112156101945780359161052a836104ed565b9261053860405194856104ac565b808452602092838086019260051b820101928311610194578301905b828210610562575050505090565b81358152908301908301610554565b606090604319011261019457604490565b9181601f84011215610194578235916001600160401b038311610194576020808501948460061b01011161019457565b60c0600319820112610194576001600160401b039060043582811161019457816105de916004016103fb565b926024803590848211610194578360238301121561019457816004013591610605836104ed565b926040610614815195866104ac565b818552602093808587019360051b8501019388851161019457818101935b85851061066557505050505050509261064a83610571565b9260a4359182116101945761066191600401610582565b9091565b84358b81116101945782019060a0828c0360231901126101945784519061068b82610420565b8483013582526044830135600281101561019457898301526064830135868301526084830135606083015260a4830135918d8311610194576106d48d878c969587960101610513565b6080820152815201940193610632565b5034610194576106f3366105b2565b61070094919392946114de565b61072061071a6107108480611f79565b6060810190611f8f565b90611fc4565b93600361072c86612008565b61073581611ff6565b1415806109ba575b6109a85760209161075e610752848801611400565b6001600160a01b031690565b936107866107528561078061071a6107768680611f79565b6040810190612012565b01611400565b9661079086612234565b61079988611ab6565b60036107a482612008565b6107ad81611ff6565b0361098d576108466040610860920135975b604051627eeac760e11b808252306004830152602482018b9052909188918b916001600160a01b038c1691908f8587604481875afa968715610980575b60009761095a575b5060406108119101611647565b15610949576108229030908a612d69565b60405190815230600482015260248101929092529093849190829081906044820190565b03915afa91821561093c575b60009261090d575b506115d7565b9182610898575b61088e886108898b6108848b8b61087f8c8501611400565b612313565b611400565b6120e2565b6100196001600255565b60005b8181106108a85750610867565b806109078a6108c26108bd600195878b6115ec565b612081565b8051610901906108e1908a908d906001600160a01b031694015161160a565b6108fb6108ef8d8b01612309565b6001600160781b031690565b9061161d565b906120cf565b0161089b565b61092e919250873d8911610935575b61092681836104ac565b810190611708565b903861085a565b503d61091c565b610944611717565b610852565b6109559030908a612a92565b610822565b610811919750610978604091883d8a116109355761092681836104ac565b979150610804565b610988611717565b6107fc565b50610860610846606061099f89612047565b510151976107bf565b604051635863f78960e01b8152600490fd5b5060056109c686612008565b6109cf81611ff6565b141561073d565b600091031261019457565b503461019457600080600319360112610a48576001546001600160a01b03811690338290036102f35782546001600160a01b03199081168317845516600155807f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b80fd5b50346101945760e0366003190112610194576001600160401b0360043581811161019457610a7d903690600401610164565b9091610a88366103ea565b60c43591821161019457610aa3610acf923690600401610582565b91610aac6114de565b602081013594610abb86610304565b606082013596610aca88610304565b611db4565b6040516370a0823160e01b8152306004820152906020826024816001600160a01b0387165afa918215610b46575b600092610b26575b5081610b15576100196001600255565b610b1e926118ae565b38808061088e565b610b3f91925060203d81116109355761092681836104ac565b9038610b05565b610b4e611717565b610afd565b503461019457610b62366105b2565b919392610b6d6114de565b610b7d61071a6107108680611f79565b916002610b8984612008565b610b9281611ff6565b141580610d17575b6109a857602091610baf610752848601611400565b93610bc76107528561078061071a6107768c80611f79565b96610bd186612234565b610bda88611ab6565b610be660408a01611647565b15610d0657610bf790833091612d69565b6002610c0282612008565b610c0b81611ff6565b03610cf157604091500135935b6040516331a9108f60e11b8152600481018690526001600160a01b0384826024818985165afa918215610ce4575b600092610cb5575b5030911603610c75575b61088e86610889896108848989610c708a8501611400565b612150565b60005b818110610c855750610c58565b80610caf88610c9a6108bd60019587896115ec565b805190880151906001600160a01b03166120cf565b01610c78565b610cd6919250853d8711610cdd575b610cce81836104ac565b81019061206c565b9038610c4e565b503d610cc4565b610cec611717565b610c46565b50610cfd606091612047565b51015193610c18565b610d1290833091612a92565b610bf7565b506004610d2384612008565b610d2c81611ff6565b1415610b9a565b608090602319011261019457602490565b5060c0366003190112610194576001600160401b0360043581811161019457610d719036906004016103fb565b610d7a36610d33565b9160a43590811161019457610d93903690600401610582565b929091610d9e6114de565b60208083013593610dae85610304565b60608401359580610de757505050610dc7929350611682565b4780610dd7576100196001600255565b610de0916116c9565b388061088e565b919392610e2991938747926040830135610e008161163d565b15610e8c57610e2292610e11611651565b903591610e1d83610304565b612e58565b47906115d7565b60005b828110610e3f5750505050509050610dc7565b80610e6288610e5d8589610e566001978a8c6115ec565b013561160a565b61161d565b80610e6f575b5001610e2c565b610e8690610e8161088484888a6115ec565b6116c9565b38610e68565b610ea992610e98611651565b903591610ea483610304565b612ae8565b610e22565b5060c0366003190112610194576001600160401b0360043581811161019457610edb903690600401610164565b91610ee536610d33565b9060a43590811161019457610efe903690600401610582565b939092610f096114de565b60208084013594610f1986610304565b60608501359680610f3257505050610dc7939450611d11565b9291949390934792610f42611651565b610f4e60408401611647565b15610ffd5760005b848110610fbf575050505050610f6d9047906115d7565b60005b828110610f835750505050509050610dc7565b80610f9a88610e5d8589610e566001978a8c6115ec565b80610fa7575b5001610f70565b610fb990610e8161088484888a6115ec565b38610fa0565b80610ff7610fd9610fd36001948988611ccc565b80611cfc565b610fe287611400565b858d610fef868c8b611ccc565b013592612e58565b01610f56565b60005b848110611015575050505050610f6d90610e22565b80611047611029610fd36001948988611ccc565b61103287611400565b858d61103f868c8b611ccc565b013592612ae8565b01611000565b50346101945760e0366003190112610194576001600160401b036004358181116101945761107f9036906004016103fb565b90611089366103ea565b9060c435908111610194576110a5610acf913690600401610582565b906110ae6114de565b6020840135936110bd85610304565b6060810135956110cc87610304565b611724565b5034610194576000366003190112610194576000546040516001600160a01b039091168152602090f35b50346101945760406003198181360112610194576001600160401b039060043582811161019457611130903690600401610164565b9092602435908111610194579161114c85933690600401610164565b916111556114de565b8451958694632a05d10160e21b8652806044870188600489015252606486019160648260051b8801019781936000925b8484106112005789600081806111a68f8e8e8e858403016024860152612865565b0381836e6c3852cbef3e08e8df289169ede5815af180156111f3575b6111d0576100196001600255565b6111ec903d806000833e6111e481836104ac565b810190612412565b508061088e565b6111fb611717565b6111c2565b9193959697985091939861124f6001916063198d820301855261125c6112268d866127de565b916112406112348480612518565b898352898301906126d9565b906020948486809601906127ad565b91858185039101526114bd565b9b019301940191938a989796959391611185565b50346101945760003660031901126101945760206040516e6c3852cbef3e08e8df289169ede5818152f35b5034610194576000366003190112610194576001546040516001600160a01b039091168152602090f35b50346101945760a0366003190112610194576112e2600435610304565b6112ed602435610304565b6084356001600160401b0381116101945761130c903690600401610322565b80611324575b60405163f23a6e6160e01b8152602090f35b611333916103bd913691611486565b3880611312565b50346101945760203660031901126101945760043561135881610304565b6000546001600160a01b039190821633036102f357166bffffffffffffffffffffffff60a01b6001541617600155600080f35b5034610194576000366003190112610194576040517f000000000000000000000000178a86d36d89c7fdebea90b739605da7b131ff6a6001600160a01b03168152602090f35b50634e487b7160e01b600052603260045260246000fd5b91908110156113f85760051b0190565b61050e6113d1565b3561140a81610304565b90565b919081101561144f575b60051b81013590601e19813603018212156101945701908135916001600160401b038311610194576020018236038113610194579190565b6114576113d1565b611417565b6020906001600160401b038111611479575b601f01601f19160190565b611481610409565b61146e565b9291926114928261145c565b916114a060405193846104ac565b829481845281830111610194578281602093846000960137010152565b908060209392818452848401376000828201840152601f01601f1916010190565b60028054146114ed5760028055565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b3d1561155d573d906115438261145c565b9161155160405193846104ac565b82523d6000602084013e565b606090565b8151600092839260209091019083906001600160a01b03165af1611584611532565b501561158c57565b6040516322092f2f60e11b8152600490fd5b8151600093849391926020909201916001600160a01b03165af1611584611532565b50634e487b7160e01b600052601160045260246000fd5b919082039182116115e457565b6103206115c0565b91908110156115fd575b60061b0190565b6116056113d1565b6115f6565b818102929181159184041417156115e457565b8115611627570490565b634e487b7160e01b600052601260045260246000fd5b8015150361019457565b3561140a8161163d565b604051602081018181106001600160401b03821117611675575b6040526000815290565b61167d610409565b61166b565b60408201356116908161163d565b156116af57610320916116a1611651565b6060823592610fef84610304565b610320916116bb611651565b606082359261103f84610304565b816116d2575050565b6000918291829182916001600160a01b03165af16116ee611532565b50156116f657565b60405163d2dcf4f360e01b8152600490fd5b90816020910312610194575190565b506040513d6000823e3d90fd5b909193929361173560608401611400565b6080840135958061174e57505050610320929350611845565b6040516370a0823160e01b8082523060048301526020969495939492936117bd936001600160a01b038716939289929091908385602481895afa948515611838575b600095611813575b50906117a391611845565b604051908152306004820152928390818060248101610846565b60005b8281106117d1575050505050509050565b806117e889610e5d858a610e566001978a8d6115ec565b806117f5575b50016117c0565b61180d9061180761088484888b6115ec565b876118ae565b386117ee565b6117a39291955061183090853d87116109355761092681836104ac565b949091611798565b611840611717565b611790565b611861606083013561185681610304565b608084013590611bb9565b604082013561186f8161163d565b156118915761032091611880611651565b90359161188c83610304565b612d69565b6103209161189d611651565b9035916118a983610304565b612a92565b60405163a9059cbb60e01b60208083019182526001600160a01b039490941660248301526044808301959095529381529192611947929160009081906118f56064866104ac565b60018060a01b0316926040519461190b86610491565b8786527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656488870152519082855af1611941611532565b91611a24565b8051908161195457505050565b82806119649383010191016119c3565b1561196c5750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b90816020910312610194575161140a8161163d565b156119df57565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b91929015611a445750815115611a38575090565b61140a903b15156119d8565b825190915015611a575750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b828510611a9d575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350611a7a565b604051636eb1769f60e11b81523060048201526e6c3852cbef3e08e8df289169ede58160248201526020916001600160a01b03168282604481845afa918215611bac575b600092611b8d575b506000198210611b1157505050565b60405163095ea7b360e01b81526e6c3852cbef3e08e8df289169ede5816004820152911960248301528290829060449082906000905af18015611b80575b611b57575050565b81611b7692903d10611b79575b611b6e81836104ac565b8101906119c3565b50565b503d611b64565b611b88611717565b611b4f565b611ba5919250833d85116109355761092681836104ac565b9038611b02565b611bb4611717565b611afa565b604051636eb1769f60e11b81523060048201526e6c3852cbef3e08e8df289169ede58160248201526020926001600160a01b039290921691908381604481865afa908115611cbf575b600091611ca2575b50818110611c19575b50505050565b600092611c2a611c609286946115d7565b60405194858094819363095ea7b360e01b8352600483019190602060408401936e6c3852cbef3e08e8df289169ede58181520152565b03925af18015611c95575b611c77575b8080611c13565b81611c8d92903d10611b7957611b6e81836104ac565b503880611c70565b611c9d611717565b611c6b565b611cb99150843d86116109355761092681836104ac565b38611c0a565b611cc7611717565b611c02565b9190811015611cef575b60051b81013590603e1981360301821215610194570190565b611cf76113d1565b611cd6565b903590609e1981360301821215610194570190565b909291611d1c611651565b91611d2960408301611647565b15611d715760005b858110611d4057505050509050565b80611d6b611d54610fd36001948a87611ccc565b611d5d86611400565b876020610fef868d8a611ccc565b01611d31565b60005b858110611d8357505050509050565b80611dae611d97610fd36001948a87611ccc565b611da086611400565b87602061103f868d8a611ccc565b01611d74565b909192949394611dc660608501611400565b60808501359680611ddf57505050610320939450611ede565b6040516370a0823160e01b808252306004830152602097949693959294611e34946001600160a01b038816948a9392919084866024818a5afa958615611eab575b600096611e84575b50906117a39291611ede565b60005b828110611e48575050505050509050565b80611e5f89610e5d858a610e566001978a8d6115ec565b80611e6c575b5001611e37565b611e7e9061180761088484888b6115ec565b38611e65565b6117a39392919650611ea290863d88116109355761092681836104ac565b95909192611e28565b611eb3611717565b611e20565b909161140a92811015611ed1575b60051b810190611cfc565b611ed96113d1565b611ec6565b9190611eef61185660608401611400565b611ef7611651565b90611f0460408401611647565b15611f415760005b818110611f1a575050505050565b80611f3b611f2b6001938589611eb8565b85611f3588611400565b91612d69565b01611f0c565b60005b818110611f52575050505050565b80611f73611f636001938589611eb8565b85611f6d88611400565b91612a92565b01611f44565b90359061015e1981360301821215610194570190565b903590601e198136030182121561019457018035906001600160401b038211610194576020019160c082023603831361019457565b9015611fcd5790565b61140a6113d1565b6006111561019457565b50634e487b7160e01b600052602160045260246000fd5b6006111561200057565b610320611fdf565b3561140a81611fd5565b903590601e198136030182121561019457018035906001600160401b038211610194576020019160a082023603831361019457565b602090805115612055570190565b61205d6113d1565b0190565b519061032082610304565b90816020910312610194575161140a81610304565b60408136031261019457602060405191604083018381106001600160401b038211176120c2575b60405280356120b681610304565b83520135602082015290565b6120ca610409565b6120a8565b816120d957505050565b610320926118ae565b6040516370a0823160e01b8152306004820152906020826024816001600160a01b0387165afa918215612143575b600092612123575b50816120d957505050565b61213c91925060203d81116109355761092681836104ac565b9038612118565b61214b611717565b612110565b6040516331a9108f60e11b8152600481018490526001600160a01b03928316939192602082602481885afa918215612227575b600092612207575b5016301461219857505050565b823b1561019457604051632142170760e11b81523060048201526001600160a01b0390921660248301526044820152906000908290818381606481015b03925af180156121fa575b6121e75750565b806121f461032092610448565b806109d6565b612202611717565b6121e0565b61222091925060203d8111610cdd57610cce81836104ac565b903861218b565b61222f611717565b612183565b60405163e985e9c560e01b81523060048201526e6c3852cbef3e08e8df289169ede58160248201526001600160a01b039190911690602081604481855afa9081156122eb575b6000916122cd575b501561228b5750565b803b156101945760405163a22cb46560e01b81526e6c3852cbef3e08e8df289169ede581600482015260016024820152906000908290818381604481016121d5565b6122e5915060203d8111611b7957611b6e81836104ac565b38612282565b6122f3611717565b61227a565b6001600160781b0381160361019457565b3561140a816122f8565b604051627eeac760e11b81523060048201526024810184905290916001600160a01b0316602082604481845afa918215612405575b6000926123e5575b508161235c5750505050565b803b1561019457604051637921219560e11b81523060048201526001600160a01b039390931660248401526044830193909352606482015260a06084820152600060a482018190529091829060c490829084905af180156123d8575b6123c5575b808080611c13565b806121f46123d292610448565b386123bd565b6123e0611717565b6123b8565b6123fe91925060203d81116109355761092681836104ac565b9038612350565b61240d611717565b612348565b6020908181840312610194578051906001600160401b038211610194570182601f8201121561019457805191612447836104ed565b936040612456815196876104ac565b848652828601918360e080970286010194818611610194578401925b858410612483575050505050505090565b838203878112610194578351916124998361045b565b60a0809212610194578892612500889387516124b481610420565b89516124bf81611fd5565b8152858a01516124ce81610304565b86820152888a0151898201526060808b0151908201526080808b0151906124f482610304565b82015283528801612061565b8382015260c087015186820152815201930192612472565b903561015e1982360301811215610194570190565b9035601e19823603018112156101945701602081359101916001600160401b0382116101945760a082023603831361019457565b90600682101561256e5752565b612576611fdf565b52565b9190808252602080920192916000905b828210612597575050505090565b90919293806125b260019287356125ad81611fd5565b612561565b828601356125bf81610304565b828060a01b03168382015260408087013590820152606080870135908201526080808701359082015260a08091019501920190929192612589565b9035601e19823603018112156101945701602081359101916001600160401b0382116101945760c082023603831361019457565b9190808252602080920192916000905b82821061264c575050505090565b909192938061266260019287356125ad81611fd5565b8286013561266f81610304565b828060a01b038091168483015260408088013590830152606080880135908301526080808801359083015260a090818801356126aa81610304565b169082015260c090810195019392019061263e565b3590600482101561019457565b90600482101561256e5752565b906126f4816126e784610315565b6001600160a01b03169052565b61271361270360208401610315565b6001600160a01b03166020830152565b612752612737612726604085018561252d565b610160806040870152850191612579565b61274460608501856125fa565b90848303606086015261262e565b9161276c612762608083016126bf565b60808401906126cc565b60a081013560a083015260c081013560c083015260e081013560e0830152610100808201359083015261012080820135908301526101408091013591015290565b9035601e19823603018112156101945701602081359101916001600160401b03821161019457813603831361019457565b9035603e1982360301811215610194570190565b9035601e19823603018112156101945701602081359101916001600160401b038211610194578160061b3603831361019457565b9190808252602080920192916000905b828210612844575050505090565b83358552838101358582015260409485019490930192600190910190612836565b90808352602080930192838260051b850194846000925b85841061288d575050505050505090565b9091929394959685806128e083856001950388526128ab8c886127de565b906128d36128c96128bc84806127f2565b6040808652850191612826565b92858101906127f2565b9185818503910152612826565b99019401940192959493919061287c565b90815180825260208092019182818360051b8201950193600080925b85841061291e575050505050505090565b9091929394959681810384528751908660c060a09283810193855182528386015160028110156129b6575b8483015260408087015190830152606080870151908301526080958601519582015284519384905291939101919083019085905b80821061299d57505050908060019299019401940192959493919061290d565b919380600192948651815201940192018893929161297d565b6129be611fdf565b612949565b939290612a7861032093612a6a6060936080895288612a5a612a4f6129fd6129eb8580612518565b60a060808601526101208501906126d9565b6020850135612a0b816122f8565b6001600160781b0380911660a08601526040860135612a29816122f8565b1660c0850152612a3b898601866127ad565b90607f199560e087828603019101526114bd565b9260808101906127ad565b918b8403016101008c01526114bd565b9087820360208901526128f1565b600060408701526001600160a01b03909216940193909352565b90602091612ab460405194859384936339eb2ac960e21b8552600485016129c3565b038160006e6c3852cbef3e08e8df289169ede5815af1612ad15750565b611b769060203d8111611b7957611b6e81836104ac565b9260209291612b0e94604051958694859384936339eb2ac960e21b8552600485016129c3565b03916e6c3852cbef3e08e8df289169ede5815af1612ad15750565b81601f8201121561019457803590612b40826104ed565b92604090612b50825195866104ac565b838552602091828601918360a080970286010194818611610194578401925b858410612b80575050505050505090565b8684830312610194578487918451612b9781610420565b8635612ba281611fd5565b815282870135612bb181610304565b8382015285870135868201526060808801359082015260808088013590820152815201930192612b6f565b81601f8201121561019457803590612bf3826104ed565b92604090612c03825195866104ac565b838552602091828601918360c080970286010194818611610194578401925b858410612c33575050505050505090565b8684830312610194578487918451612c4a81610476565b8635612c5581611fd5565b815282870135612c6481610304565b838201528587013586820152606080880135908201526080808801359082015260a08088013590612c9482610304565b820152815201930192612c22565b6101608136031261019457612cb56104cd565b90612cbf81610315565b8252612ccd60208201610315565b60208301526001600160401b03604082013581811161019457612cf39036908401612b29565b6040840152606082013590811161019457612d119036908301612bdc565b6060830152612d22608082016126bf565b608083015260a081013560a083015260c081013560c083015260e081013560e083015261010080820135908301526101208082013590830152610140809101359082015290565b9190612db4612d88612d83612d7e8680611f79565b612ca2565b6130df565b916020612d94846131ce565b9460009260405194859283926339eb2ac960e21b84528a600485016129c3565b0381846e6c3852cbef3e08e8df289169ede5815af1909181612e38575b50612de857604051631298f31b60e11b8152600490fd5b612dfe57604051631298f31b60e11b8152600490fd5b6020612e18612e1f93612e136108ef946131ce565b6115d7565b9301612309565b03612e2657565b604051631298f31b60e11b8152600490fd5b612e5191925060203d8111611b7957611b6e81836104ac565b9038612dd1565b929190612e9c906020612e71612d83612d7e8880611f79565b93612e7b856131ce565b956000936040518096819482936339eb2ac960e21b84528c600485016129c3565b03916e6c3852cbef3e08e8df289169ede5815af1909181612e385750612de857604051631298f31b60e11b8152600490fd5b6040519061016082018281106001600160401b03821117612f34575b60405281610140600091828152826020820152606060408201526060808201528260808201528260a08201528260c08201528260e082015282610100820152826101208201520152565b612f3c610409565b612eea565b90815180825260208080930193019160005b828110612f61575050505090565b909192938260a06001928751612f78828251612561565b8084015185841b869003168285015260408082015190830152606080820151908301526080908101519082015201950193929101612f53565b90815180825260208080930193019160005b828110612fd1575050505090565b909192938260c06001928751612fe8828251612561565b848060a01b038085830151168584015260408083015190840152606080830151908401526080808301519084015260a0809201511690820152019501910192919092612fc3565b602080825282516001600160a01b03169082015260208201516001600160a01b03166040820152604082015161308c61307661016092836060860152610180850190612f41565b6060850151848203601f19016080860152612fb1565b9261309f608082015160a08501906126cc565b60a081015160c084015260c081015160e084015260e081015161010090818501528101516101209081850152810151906101409182850152015191015290565b61316961311e916130ee612ece565b50805160405163f07ec37360e01b81526001600160a01b0390911660048201526020938492919081906024820190565b039083816e6c3852cbef3e08e8df289169ede5819381855afa9081156131c1575b6000916131a4575b5061014083015260405180809581946379df72bd60e01b83526004830161302f565b03915afa918215613197575b60009261318157505090565b61140a9250803d106109355761092681836104ac565b61319f611717565b613175565b6131bb9150843d86116109355761092681836104ac565b38613147565b6131c9611717565b61313f565b604051906346423aa760e01b825260048201526080816024816e6c3852cbef3e08e8df289169ede5815afa908115613255575b60009161320c575090565b906080823d821161324d575b81613225608093836104ac565b81010312610a4857508061323b6040925161163d565b613248602082015161163d565b015190565b3d9150613218565b61325d611717565b61320156fea2646970667358221220f080701c8acb371824bfd69353dba27556e01e11808ef17cdda2fce3387e72d264736f6c63430008110033

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

000000000000000000000000f3d63166f0ca56c3c1a3508fce03ff0cf3fb691e000000000000000000000000178a86d36d89c7fdebea90b739605da7b131ff6a

-----Decoded View---------------
Arg [0] : owner (address): 0xf3d63166F0Ca56C3c1A3508FcE03Ff0Cf3Fb691e
Arg [1] : router (address): 0x178A86D36D89c7FDeBeA90b739605da7B131ff6A

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000f3d63166f0ca56c3c1a3508fce03ff0cf3fb691e
Arg [1] : 000000000000000000000000178a86d36d89c7fdebea90b739605da7b131ff6a


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.