ETH Price: $3,437.41 (-6.46%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Pause173170042023-05-22 19:46:59595 days ago1684784819IN
0x5eacD383...a7Ed89610
0 ETH0.0016717956.04208676
Complete Offer172762532023-05-17 1:58:35601 days ago1684288715IN
0x5eacD383...a7Ed89610
0 ETH0.0086369540.26138081
Complete Offer172762392023-05-17 1:55:47601 days ago1684288547IN
0x5eacD383...a7Ed89610
0 ETH0.0097232741.98341835
Complete Offer172537512023-05-13 21:36:35604 days ago1684013795IN
0x5eacD383...a7Ed89610
0 ETH0.0103151444.53402317
Complete Offer171778202023-05-03 4:25:59615 days ago1683087959IN
0x5eacD383...a7Ed89610
0 ETH0.0174924975.52173375
Complete Offer171586842023-04-30 11:52:35618 days ago1682855555IN
0x5eacD383...a7Ed89610
0 ETH0.0075212229.60889368
Complete Offer171586722023-04-30 11:50:11618 days ago1682855411IN
0x5eacD383...a7Ed89610
0 ETH0.0077665631.22588962
Complete Offer171202522023-04-25 2:17:23623 days ago1682389043IN
0x5eacD383...a7Ed89610
0 ETH0.007227933.69495646
Complete Offer171202272023-04-25 2:12:23623 days ago1682388743IN
0x5eacD383...a7Ed89610
0 ETH0.0079561737.08498219
Complete Offer170539732023-04-15 17:48:47633 days ago1681580927IN
0x5eacD383...a7Ed89610
0 ETH0.0052918325.23299731
Complete Offer170430822023-04-14 4:29:35634 days ago1681446575IN
0x5eacD383...a7Ed89610
0 ETH0.0049972224.04973245
Complete Offer170430792023-04-14 4:28:59634 days ago1681446539IN
0x5eacD383...a7Ed89610
0 ETH0.0060591225.7955752
Complete Offer170430772023-04-14 4:28:35634 days ago1681446515IN
0x5eacD383...a7Ed89610
0 ETH0.0062337926.29471462
Complete Offer170354402023-04-13 0:42:59635 days ago1681346579IN
0x5eacD383...a7Ed89610
0 ETH0.0056631726.39758044
Complete Offer170346182023-04-12 21:36:59635 days ago1681335419IN
0x5eacD383...a7Ed89610
0 ETH0.0046369721.61417191
Complete Offer170068152023-04-08 23:08:23639 days ago1680995303IN
0x5eacD383...a7Ed89610
0 ETH0.0044516320.75140141
Complete Offer170068082023-04-08 23:06:59639 days ago1680995219IN
0x5eacD383...a7Ed89610
0 ETH0.0049909920.06794351
Complete Offer170025342023-04-08 8:35:23640 days ago1680942923IN
0x5eacD383...a7Ed89610
0 ETH0.0038425820.15125625
Complete Offer169875452023-04-06 5:24:35642 days ago1680758675IN
0x5eacD383...a7Ed89610
0 ETH0.0055697925.96726322
Complete Offer169875402023-04-06 5:23:35642 days ago1680758615IN
0x5eacD383...a7Ed89610
0 ETH0.006651728.72154133
Complete Offer169874592023-04-06 5:06:59642 days ago1680757619IN
0x5eacD383...a7Ed89610
0 ETH0.0052955924.68359714
Complete Offer169874292023-04-06 5:00:59642 days ago1680757259IN
0x5eacD383...a7Ed89610
0 ETH0.0074538632.18045239
Complete Offer169567462023-04-01 20:43:47646 days ago1680381827IN
0x5eacD383...a7Ed89610
0 ETH0.0043986320.50502321
Complete Offer169458092023-03-31 7:49:59648 days ago1680248999IN
0x5eacD383...a7Ed89610
0 ETH0.0059745425.79436098
Complete Offer169372782023-03-30 3:06:11649 days ago1680145571IN
0x5eacD383...a7Ed89610
0 ETH0.0076075935.46496681
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Exchange

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 19 : Exchange.sol
import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC1155/IERC1155.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';

import '../libraries/ECDSA.sol';

import '../Admin.sol';

import '../libraries/royalties.sol';
import '../royalties/IRoyaltyEngineV1.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';

pragma experimental ABIEncoderV2;

interface Arbiter {
    function getToken(uint8 id) external returns (address, uint8);

    function getTokenAddress(uint8 id) external returns (address);
}

contract ExchangeAdmin is Admin {
    bytes32 public constant PURCHASER = keccak256('PURCHASER');
    modifier onlyPurchaser() {
        require(hasRole(PURCHASER, _msgSender()), 'sender must have the purchase role');
        _;
    }

    constructor() Admin(tx.origin) {}
}

error ExpiredOffer();
error InvalidNonce();
error CancelledOffer();
error InvalidSignature();
error SenderIsNotSigner();
error InvalidSender();
error OfferMustBeSale();

contract Exchange is ExchangeAdmin {
    using ECDSA for bytes32;
    using royalties for address;
    using SafeERC20 for IERC20;

    address public feeReceiver;
    address public royaltyRegistry;
    struct Offer {
        address signer;
        bytes32 nonce;
        uint256 tokenId;
        address contractAddress;
        uint256 price;
        uint256 quantity;
        uint256 expirationDate;
        ContractInterface contractInterface;
        bool isSeller;
        uint8 paymentType;
    }
    struct Actors {
        address buyer;
        address seller;
        address receiver;
    }

    enum ContractInterface {
        ERC1155,
        ERC721
    }

    event canceledOffer(bytes32 nonce, address signer);

    event completedOffer(bytes32 nonce, address signer, address counterParty, uint256 fee);

    mapping(address => mapping(bytes32 => bool)) public nonces;

    mapping(bytes32 => bool) public canceled;

    uint8 public paymentTokensAdded;

    uint256 public feePercentage = 100;
    uint256 public feeDecimals = 10000;
    address public paymentArbiter;

    constructor(address _paymentArbiter, address _registry) ExchangeAdmin() {
        paymentArbiter = _paymentArbiter;
        royaltyRegistry = _registry;
    }

    function getContractHash() public view returns (bytes32) {
        return keccak256(abi.encode(block.chainid, address(this)));
    }

    function setFeeReceiver(address a) public isAdmin {
        feeReceiver = a;
    }

    function setPaymentArbiter(address a) public isAdmin {
        paymentArbiter = a;
    }

    function setFeePercentage(uint256 _feePercentage) public isAdmin {
        feePercentage = _feePercentage;
    }

    function setRoyaltyRegistry(address _registry) public isAdmin {
        royaltyRegistry = _registry;
    }

    function cancelOffer(Offer memory offer) public {
        if (_msgSender() != offer.signer) revert SenderIsNotSigner();
        bytes32 hashed = keccak256(abi.encode(offer));
        canceled[hashed] = true;
        emit canceledOffer(offer.nonce, offer.signer);
    }

    function getFee(uint256 price) public view returns (uint256) {
        return (price * feePercentage) / feeDecimals;
    }

    function validateOffer(Offer calldata offer, bytes calldata signature) internal {
        if (canceled[keccak256(abi.encode(offer))]) revert CancelledOffer();

        if (block.timestamp > offer.expirationDate) revert ExpiredOffer();

        if (nonces[offer.signer][offer.nonce]) revert InvalidNonce();
        nonces[offer.signer][offer.nonce] = true;

        if (!validateOfferSignature(offer, signature)) revert InvalidSignature();
    }

    function validateOfferSignature(Offer memory offer, bytes memory sig)
        public
        view
        returns (bool)
    {
        address signer = hashOffer(offer).toEthSignedMessageHash().recover(sig);

        bool valid = (signer == offer.signer);

        return valid;
    }

    function getOfferSigner(Offer memory offer, bytes memory sig) public view returns (address) {
        address signer = hashOffer(offer).toEthSignedMessageHash().recover(sig);

        return signer;
    }

    function hashOffer(Offer memory offer) public view returns (bytes32) {
        bytes32 hashedOffer = keccak256(abi.encode(offer));
        return keccak256(abi.encode(getContractHash(), hashedOffer));
    }

    function hashNIFTYOffer(Offer memory offer, address counterParty)
        public
        view
        returns (bytes32)
    {
        bytes32 nifty = keccak256(abi.encode(counterParty, abi.encode(offer)));
        return keccak256(abi.encode(getContractHash(), nifty));
    }

    function getNiftyOfferSigner(
        Offer memory sellOffer,
        address counterParty,
        bytes memory sig
    ) public view returns (address) {
        bytes32 niftyHash = hashNIFTYOffer(sellOffer, counterParty);
        address signer = niftyHash.toEthSignedMessageHash().recover(sig);
        return signer;
    }

    function validateNiftySignature(
        Offer memory offer,
        address counterParty,
        bytes memory sig
    ) public view returns (bool) {
        address signer = getNiftyOfferSigner(offer, counterParty, sig);
        return hasRole(SIGNER, signer);
    }

    function completeOffer(
        Offer calldata offer,
        bytes calldata signature,
        bytes calldata niftysSig
    ) external whenNotPaused {
        validateOffer(offer, signature);

        if (_msgSender() == offer.signer) revert InvalidSender();

        if (!validateNiftySignature(offer, _msgSender(), niftysSig)) revert InvalidSignature();

        address buyer = offer.isSeller ? _msgSender() : offer.signer;
        address seller = offer.isSeller ? offer.signer : _msgSender();

        uint256 fee = handleAssetTransfer(
            Actors(buyer, seller, buyer),
            offer.contractAddress,
            offer.tokenId,
            offer.contractInterface,
            offer.price,
            offer.paymentType,
            offer.quantity
        );
        emit completedOffer(offer.nonce, offer.signer, _msgSender(), fee);
    }

    function completePurchaseFor(
        Offer calldata offer,
        bytes calldata signature,
        address receiver
    ) external whenNotPaused onlyPurchaser {
        validateOffer(offer, signature);

        if (!offer.isSeller) revert OfferMustBeSale();
        address buyer = _msgSender();
        address seller = offer.signer;

        uint256 fee = handleAssetTransfer(
            Actors(buyer, seller, receiver),
            offer.contractAddress,
            offer.tokenId,
            offer.contractInterface,
            offer.price,
            offer.paymentType,
            offer.quantity
        );
        emit completedOffer(offer.nonce, offer.signer, _msgSender(), fee);
    }

    function handleAssetTransfer(
        Actors memory actors,
        address contractAddress,
        uint256 tokenId,
        ContractInterface contractInterface,
        uint256 price,
        uint8 paymentType,
        uint256 quantity
    ) internal returns (uint256) {
        uint256 fee = getFee(price);
        address feeToken = Arbiter(paymentArbiter).getTokenAddress(paymentType);

        uint256 royalty;
        bool success;

        if (royalties.checkRoyalties(ERC2981(contractAddress))) {
            (royalty, success) = contractAddress.royaltyTransferFrom(
                feeToken,
                actors.buyer,
                price,
                tokenId
            );
        } else {
            (royalty, success) = contractAddress.royaltyTransferFromRegistry(
                royalties.registryInput(price, tokenId, feeToken, royaltyRegistry, actors.buyer)
            );
        }

        if (success == false) {
            royalty = 0;
        }

        IERC20(feeToken).safeTransferFrom(actors.buyer, feeReceiver, fee);

        IERC20(feeToken).safeTransferFrom(actors.buyer, actors.seller, price - (fee + royalty));

        if (contractInterface == ContractInterface.ERC721) {
            IERC721(contractAddress).safeTransferFrom(actors.seller, actors.receiver, tokenId);
        }

        if (contractInterface == ContractInterface.ERC1155) {
            IERC1155(contractAddress).safeTransferFrom(
                actors.seller,
                actors.receiver,
                tokenId,
                quantity,
                ''
            );
        }

        return fee;
    }
}

File 2 of 19 : IERC721.sol
// SPDX-License-Identifier: MIT

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`, 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 be 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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * 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 Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

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

File 3 of 19 : IERC1155.sol
// SPDX-License-Identifier: MIT

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 be 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 19 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

        return signer;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked('\x19Ethereum Signed Message:\n32', hash));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash)
        internal
        pure
        returns (bytes32)
    {
        return keccak256(abi.encodePacked('\x19\x01', domainSeparator, structHash));
    }
}

File 6 of 19 : Admin.sol
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/access/AccessControl.sol';
import '@openzeppelin/contracts/security/Pausable.sol';

contract Admin is AccessControl, Pausable {
    bytes32 public constant ADMIN = keccak256('ADMIN');

    bytes32 public constant SIGNER = keccak256('SIGNER');

    modifier isAdmin() {
        require(hasRole(ADMIN, _msgSender()), 'sender must have the ADMIN role');
        _;
    }

    modifier isGlobalAdmin() {
        require(
            hasRole(DEFAULT_ADMIN_ROLE, _msgSender()),
            'sender must hae the DEFAULT ADMIN ROLE'
        );
        _;
    }

    function pause() public isGlobalAdmin {
        _pause();
    }

    function unpause() public isGlobalAdmin {
        _unpause();
    }

    constructor(address globalAdmin) {
        _setupRole(DEFAULT_ADMIN_ROLE, globalAdmin);
        _setupRole(ADMIN, globalAdmin);
    }
}

File 7 of 19 : royalties.sol
import '../royalties/ERC2981.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '../royalties/IRoyaltyEngineV1.sol';
pragma solidity ^0.8.0;

/**
 * @dev royalty Token Validation functions
 *
 
 */
library royalties {
    bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;
    using SafeERC20 for IERC20;

    function checkRoyalties(ERC2981 _contract) internal view returns (bool) {
        try _contract.supportsInterface(_INTERFACE_ID_ERC2981) returns (bool result) {
            return result;
        } catch {
            return false;
        }
    }

    function getRoyalty(
        ERC2981 tokenContract,
        uint256 tokenID,
        uint256 price
    ) internal returns (address, uint256) {
        try tokenContract.royaltyInfo(tokenID, price) returns (address receiver, uint256 royalty) {
            return (receiver, royalty);
        } catch {
            return (address(0), 0);
        }
    }

    function royaltyTransfer(
        address nft,
        address feeToken,
        uint256 price,
        uint256 tokenID
    ) internal returns (uint256 royalty) {
        (address recipient, uint256 _royalty) = getRoyalty(ERC2981(nft), tokenID, price);

        if (_royalty > 0 && recipient != address(0)) {
            IERC20(feeToken).safeTransfer(recipient, _royalty);
        }

        return _royalty;
    }

    function royaltyTransferFrom(
        address nft,
        address feeToken,
        address buyer,
        uint256 price,
        uint256 tokenID
    ) internal returns (uint256 royalty, bool success) {
        (address recipient, uint256 _royalty) = getRoyalty(ERC2981(nft), tokenID, price);

        if (_royalty > 0 && recipient != address(0)) {
            IERC20(feeToken).safeTransferFrom(buyer, recipient, _royalty);
            success = true;
        }

        return (_royalty, success);
    }

    struct registryInput {
        uint256 price;
        uint256 tokenID;
        address feeToken;
        address royaltyRegistry;
        address buyer;
    }

    function royaltyTransferFromRegistry(address nft, registryInput memory input)
        internal
        returns (uint256 royalty, bool success)
    {
        return
            queryRoyaltyEngine(
                nft,
                input.royaltyRegistry,
                input.feeToken,
                input.buyer,
                input.tokenID,
                input.price
            );
    }

    function queryRoyaltyEngine(
        address nft,
        address royaltyRegistry,
        address feeToken,
        address buyer,
        uint256 tokenID,
        uint256 price
    ) internal returns (uint256, bool) {
        uint256 royaltySum;
        (address payable[] memory recipients, uint256[] memory amounts) = IRoyaltyEngineV1(
            royaltyRegistry
        ).getRoyalty(nft, tokenID, price);
        for (uint256 i = 0; i < recipients.length; i++) {
            IERC20(feeToken).safeTransferFrom(buyer, recipients[i], amounts[i]);

            royaltySum += amounts[i];
        }

        return (royaltySum, true);
    }
}

File 8 of 19 : IRoyaltyEngineV1.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import '@openzeppelin/contracts/utils/introspection/IERC165.sol';

/**
 * @dev Lookup engine interface
 */
interface IRoyaltyEngineV1 is IERC165 {
    /**
     * Get the royalty for a given token (address, id) and value amount.  Does not cache the bps/amounts.  Caches the spec for a given token address
     *
     * @param tokenAddress - The address of the token
     * @param tokenId      - The id of the token
     * @param value        - The value you wish to get the royalty of
     *
     * returns Two arrays of equal length, royalty recipients and the corresponding amount each recipient should get
     */
    function getRoyalty(
        address tokenAddress,
        uint256 tokenId,
        uint256 value
    ) external returns (address payable[] memory recipients, uint256[] memory amounts);

    /**
     * View only version of getRoyalty
     *
     * @param tokenAddress - The address of the token
     * @param tokenId      - The id of the token
     * @param value        - The value you wish to get the royalty of
     *
     * returns Two arrays of equal length, royalty recipients and the corresponding amount each recipient should get
     */
    function getRoyaltyView(
        address tokenAddress,
        uint256 tokenId,
        uint256 value
    ) external view returns (address payable[] memory recipients, uint256[] memory amounts);
}

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

pragma solidity ^0.8.0;

import "../IERC20.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));
        }
    }

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

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 11 of 19 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 12 of 19 : Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 13 of 19 : IAccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 14 of 19 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 15 of 19 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

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

File 16 of 19 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 17 of 19 : ERC2981.sol
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/utils/introspection/ERC165.sol';
import './IERC2981.sol';

abstract contract ERC2981 is ERC165, IERC2981 {
    function royaltyInfo(uint256 _tokenId, uint256 _value)
        external
        virtual
        override
        returns (address _receiver, uint256 _royaltyAmount);

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC165)
        returns (bool)
    {
        return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);
    }
}

File 18 of 19 : IERC2981.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// https://eips.ethereum.org/EIPS/eip-2981

/// @dev Interface for the NFT Royalty Standard
interface IERC2981 {
    /**
     * @notice Called with the sale price to determine how much royalty
     *         is owed and to whom.
     * @param tokenId - the NFT asset queried for royalty information
     * @param value - the sale price of the NFT asset specified by _tokenId
     * @return receiver - address of who should be sent the royalty payment
     * @return royaltyAmount - the royalty payment amount for _value sale price
     */
    function royaltyInfo(uint256 tokenId, uint256 value)
        external
        returns (address receiver, uint256 royaltyAmount);
}

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

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason 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 {
            // 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_paymentArbiter","type":"address"},{"internalType":"address","name":"_registry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CancelledOffer","type":"error"},{"inputs":[],"name":"ExpiredOffer","type":"error"},{"inputs":[],"name":"InvalidNonce","type":"error"},{"inputs":[],"name":"InvalidSender","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[],"name":"OfferMustBeSale","type":"error"},{"inputs":[],"name":"SenderIsNotSigner","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"nonce","type":"bytes32"},{"indexed":false,"internalType":"address","name":"signer","type":"address"}],"name":"canceledOffer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"nonce","type":"bytes32"},{"indexed":false,"internalType":"address","name":"signer","type":"address"},{"indexed":false,"internalType":"address","name":"counterParty","type":"address"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"completedOffer","type":"event"},{"inputs":[],"name":"ADMIN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PURCHASER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SIGNER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"expirationDate","type":"uint256"},{"internalType":"enum Exchange.ContractInterface","name":"contractInterface","type":"uint8"},{"internalType":"bool","name":"isSeller","type":"bool"},{"internalType":"uint8","name":"paymentType","type":"uint8"}],"internalType":"struct Exchange.Offer","name":"offer","type":"tuple"}],"name":"cancelOffer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"canceled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"expirationDate","type":"uint256"},{"internalType":"enum Exchange.ContractInterface","name":"contractInterface","type":"uint8"},{"internalType":"bool","name":"isSeller","type":"bool"},{"internalType":"uint8","name":"paymentType","type":"uint8"}],"internalType":"struct Exchange.Offer","name":"offer","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"niftysSig","type":"bytes"}],"name":"completeOffer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"expirationDate","type":"uint256"},{"internalType":"enum Exchange.ContractInterface","name":"contractInterface","type":"uint8"},{"internalType":"bool","name":"isSeller","type":"bool"},{"internalType":"uint8","name":"paymentType","type":"uint8"}],"internalType":"struct Exchange.Offer","name":"offer","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"address","name":"receiver","type":"address"}],"name":"completePurchaseFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeDecimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getContractHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"name":"getFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"expirationDate","type":"uint256"},{"internalType":"enum Exchange.ContractInterface","name":"contractInterface","type":"uint8"},{"internalType":"bool","name":"isSeller","type":"bool"},{"internalType":"uint8","name":"paymentType","type":"uint8"}],"internalType":"struct Exchange.Offer","name":"sellOffer","type":"tuple"},{"internalType":"address","name":"counterParty","type":"address"},{"internalType":"bytes","name":"sig","type":"bytes"}],"name":"getNiftyOfferSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"expirationDate","type":"uint256"},{"internalType":"enum Exchange.ContractInterface","name":"contractInterface","type":"uint8"},{"internalType":"bool","name":"isSeller","type":"bool"},{"internalType":"uint8","name":"paymentType","type":"uint8"}],"internalType":"struct Exchange.Offer","name":"offer","type":"tuple"},{"internalType":"bytes","name":"sig","type":"bytes"}],"name":"getOfferSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"expirationDate","type":"uint256"},{"internalType":"enum Exchange.ContractInterface","name":"contractInterface","type":"uint8"},{"internalType":"bool","name":"isSeller","type":"bool"},{"internalType":"uint8","name":"paymentType","type":"uint8"}],"internalType":"struct Exchange.Offer","name":"offer","type":"tuple"},{"internalType":"address","name":"counterParty","type":"address"}],"name":"hashNIFTYOffer","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"expirationDate","type":"uint256"},{"internalType":"enum Exchange.ContractInterface","name":"contractInterface","type":"uint8"},{"internalType":"bool","name":"isSeller","type":"bool"},{"internalType":"uint8","name":"paymentType","type":"uint8"}],"internalType":"struct Exchange.Offer","name":"offer","type":"tuple"}],"name":"hashOffer","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"nonces","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paymentArbiter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paymentTokensAdded","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royaltyRegistry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_feePercentage","type":"uint256"}],"name":"setFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"a","type":"address"}],"name":"setFeeReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"a","type":"address"}],"name":"setPaymentArbiter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_registry","type":"address"}],"name":"setRoyaltyRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"expirationDate","type":"uint256"},{"internalType":"enum Exchange.ContractInterface","name":"contractInterface","type":"uint8"},{"internalType":"bool","name":"isSeller","type":"bool"},{"internalType":"uint8","name":"paymentType","type":"uint8"}],"internalType":"struct Exchange.Offer","name":"offer","type":"tuple"},{"internalType":"address","name":"counterParty","type":"address"},{"internalType":"bytes","name":"sig","type":"bytes"}],"name":"validateNiftySignature","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"expirationDate","type":"uint256"},{"internalType":"enum Exchange.ContractInterface","name":"contractInterface","type":"uint8"},{"internalType":"bool","name":"isSeller","type":"bool"},{"internalType":"uint8","name":"paymentType","type":"uint8"}],"internalType":"struct Exchange.Offer","name":"offer","type":"tuple"},{"internalType":"bytes","name":"sig","type":"bytes"}],"name":"validateOfferSignature","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

608060405260646006556127106007553480156200001c57600080fd5b5060405162002c2838038062002c288339810160408190526200003f9162000183565b6001805460ff191690553262000057600082620000b6565b620000837fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4282620000b6565b50600880546001600160a01b039384166001600160a01b03199182161790915560028054929093169116179055620001ba565b620000c28282620000c6565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620000c2576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001223390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b80516001600160a01b03811681146200017e57600080fd5b919050565b6000806040838503121562000196578182fd5b620001a18362000166565b9150620001b16020840162000166565b90509250929050565b612a5e80620001ca6000396000f3fe608060405234801561001057600080fd5b506004361061021c5760003560e01c80638456cb5911610125578063b3f00674116100ad578063d547741f1161007c578063d547741f146104e0578063d7233651146104f3578063e01e911b14610521578063efdcd97414610534578063fcee45f41461054757600080fd5b8063b3f0067414610485578063c1ef52711461049d578063c398b602146104b0578063cc0f1786146104d757600080fd5b8063970d0f22116100f4578063970d0f221461043b578063a001ecdd1461044e578063a11b071214610457578063a217fddf1461046a578063ae06c1b71461047257600080fd5b80638456cb59146103fa57806384a608e2146104025780638a1283c31461041557806391d148541461042857600080fd5b80632f2ff15d116101a85780633c611d74116101775780633c611d741461039a5780633f4ba83a146103ad5780634445e439146103b5578063582abd12146103c85780635c975abb146103ef57600080fd5b80632f2ff15d1461034c57806336568abe14610361578063392d8f0e146103745780633b4a01951461038757600080fd5b80631c439266116101ef5780631c439266146102bf5780631df8749b146102e2578063248a9ca3146102f557806327b9aad1146103185780632a0acc6a1461033757600080fd5b806301ffc9a7146102215780630770e238146102495780630df6d3aa14610281578063100ef02514610294575b600080fd5b61023461022f36600461232a565b61055a565b60405190151581526020015b60405180910390f35b60408051466020808301919091523082840152825180830384018152606090920190925280519101205b604051908152602001610240565b61023461028f3660046124a0565b610591565b6102a76102a23660046124a0565b6105d6565b6040516001600160a01b039091168152602001610240565b6102346102cd3660046122e3565b60046020526000908152604090205460ff1681565b6102346102f0366004612502565b610604565b6102736103033660046122e3565b60009081526020819052604090206001015490565b6005546103259060ff1681565b60405160ff9091168152602001610240565b610273600080516020612a0983398151915281565b61035f61035a3660046122fb565b610635565b005b61035f61036f3660046122fb565b610660565b610273610382366004612472565b6106e3565b61035f61039536600461236c565b61077a565b61035f6103a83660046123d4565b61095a565b61035f610b81565b6102a76103c3366004612502565b610bb2565b6102737f2aeb38be3df14d720aeb10a2de6df09b0fb3cd5c5ec256283a22d4593110ca4081565b60015460ff16610234565b61035f610bcd565b61035f610410366004612155565b610bfc565b61035f610423366004612456565b610c52565b6102346104363660046122fb565b610d1a565b6008546102a7906001600160a01b031681565b61027360065481565b6002546102a7906001600160a01b031681565b610273600081565b61035f6104803660046122e3565b610d43565b6001546102a79061010090046001600160a01b031681565b6102736104ab366004612456565b610d7c565b6102737f8654b55daeed86ba3c7fbcfbe4538a4b3b1db27fe023d3c19acd1ecb09a8336f81565b61027360075481565b61035f6104ee3660046122fb565b610df3565b61023461050136600461218d565b600360209081526000928352604080842090915290825290205460ff1681565b61035f61052f366004612155565b610e19565b61035f610542366004612155565b610e6f565b6102736105553660046122e3565b610ecb565b60006001600160e01b03198216637965db0b60e01b148061058b57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60008061059f8585856105d6565b90506105cb7f2aeb38be3df14d720aeb10a2de6df09b0fb3cd5c5ec256283a22d4593110ca4082610d1a565b9150505b9392505050565b6000806105e385856106e3565b905060006105fa846105f484610ee8565b90610f3b565b9695505050505050565b60008061061c836105f461061787610d7c565b610ee8565b84516001600160a01b0391821691161491505092915050565b6000828152602081905260409020600101546106518133610fac565b61065b8383611010565b505050565b6001600160a01b03811633146106d55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6106df8282611094565b5050565b60008082846040516020016106f891906127d8565b60408051601f19818403018152908290526107169291602001612640565b60408051808303601f19018152828252805160209182012046828501523084840152825180850384018152606085018452805190830120608085015260a0808501919091528251808503909101815260c09093019091528151910120949350505050565b60015460ff161561079d5760405162461bcd60e51b81526004016106cc90612677565b6107c77f8654b55daeed86ba3c7fbcfbe4538a4b3b1db27fe023d3c19acd1ecb09a8336f33610d1a565b61081e5760405162461bcd60e51b815260206004820152602260248201527f73656e646572206d75737420686176652074686520707572636861736520726f6044820152616c6560f01b60648201526084016106cc565b6108298484846110f9565b61083b610120850161010086016122ab565b610858576040516365aa82e160e11b815260040160405180910390fd5b3360006108686020870187612155565b905060006108ef6040518060600160405280856001600160a01b03168152602001846001600160a01b03168152602001866001600160a01b03168152508860600160208101906108b89190612155565b60408a01356108ce6101008c0160e08d01612352565b60808c01356108e56101408e016101208f01612547565b8d60a0013561128c565b90507f05d3642c36fde0d14be6c2018af2ebd4d1dd5a6b90d56da4214512f39242270e60208801803590610923908a612155565b604080519283526001600160a01b03919091166020830152338282015260608201849052519081900360800190a150505050505050565b60015460ff161561097d5760405162461bcd60e51b81526004016106cc90612677565b6109888585856110f9565b6109956020860186612155565b6001600160a01b0316336001600160a01b031614156109c757604051636edaef2f60e11b815260040160405180910390fd5b610a166109d936879003870187612456565b3384848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061059192505050565b610a3357604051638baa579f60e01b815260040160405180910390fd5b6000610a47610120870161010088016122ab565b610a5d57610a586020870187612155565b610a5f565b335b90506000610a75610120880161010089016122ab565b610a7f5733610a8c565b610a8c6020880188612155565b90506000610b156040518060600160405280856001600160a01b03168152602001846001600160a01b03168152602001856001600160a01b0316815250896060016020810190610adc9190612155565b60408b0135610af26101008d0160e08e01612352565b8c608001358d610120016020810190610b0b9190612547565b8e60a0013561128c565b90507f05d3642c36fde0d14be6c2018af2ebd4d1dd5a6b90d56da4214512f39242270e60208901803590610b49908b612155565b604080519283526001600160a01b03919091166020830152338282015260608201849052519081900360800190a15050505050505050565b610b8c600033610d1a565b610ba85760405162461bcd60e51b81526004016106cc906126d8565b610bb061155e565b565b600080610bc5836105f461061787610d7c565b949350505050565b610bd8600033610d1a565b610bf45760405162461bcd60e51b81526004016106cc906126d8565b610bb06115f1565b610c14600080516020612a0983398151915233610d1a565b610c305760405162461bcd60e51b81526004016106cc906126a1565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b80516001600160a01b0316336001600160a01b031614610c8557604051636b01bb7f60e11b815260040160405180910390fd5b600081604051602001610c9891906127d8565b60408051601f19818403018152828252805160209182012060008181526004835292909220805460ff1916600117905584015184519193507f05f4d85213243bbb82720a86f0e6c99b8445f46da7e382031e4915cff0ad8d5392610d0e92909182526001600160a01b0316602082015260400190565b60405180910390a15050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b610d5b600080516020612a0983398151915233610d1a565b610d775760405162461bcd60e51b81526004016106cc906126a1565b600655565b60008082604051602001610d9091906127d8565b60408051808303601f19018152828252805160209182012046828501523084840152825180850384018152606085018452805190830120608085015260a0808501919091528251808503909101815260c090930190915281519101209392505050565b600082815260208190526040902060010154610e0f8133610fac565b61065b8383611094565b610e31600080516020612a0983398151915233610d1a565b610e4d5760405162461bcd60e51b81526004016106cc906126a1565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b610e87600080516020612a0983398151915233610d1a565b610ea35760405162461bcd60e51b81526004016106cc906126a1565b600180546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b600060075460065483610ede9190612922565b61058b9190612902565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b60008151604114610f8e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016106cc565b60208201516040830151606084015160001a6105fa86828585611647565b610fb68282610d1a565b6106df57610fce816001600160a01b0316601461180a565b610fd983602061180a565b604051602001610fea9291906125cb565b60408051601f198184030181529082905262461bcd60e51b82526106cc91600401612664565b61101a8282610d1a565b6106df576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556110503390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61109e8282610d1a565b156106df576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600460008460405160200161110e919061271e565b60408051601f198184030181529181528151602092830120835290820192909252016000205460ff1615611155576040516361792dfd60e01b815260040160405180910390fd5b8260c0013542111561117a576040516303d0974960e21b815260040160405180910390fd5b6003600061118b6020860186612155565b6001600160a01b031681526020808201929092526040908101600090812086840135825290925290205460ff16156111d657604051633ab3447f60e11b815260040160405180910390fd5b6001600360006111e96020870187612155565b6001600160a01b03168152602080820192909252604090810160009081208784013582529092529020805460ff191691151591909117905561126f61123336859003850185612456565b83838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061060492505050565b61065b57604051638baa579f60e01b815260040160405180910390fd5b60008061129885610ecb565b600854604051630b5a7f2360e31b815260ff871660048201529192506000916001600160a01b0390911690635ad3f91890602401602060405180830381600087803b1580156112e657600080fd5b505af11580156112fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131e9190612171565b905060008061132c8b6119ec565b15611355578b5161134b906001600160a01b038d169085908b8e611a76565b90925090506113a0565b6040805160a081018252898152602081018c90526001600160a01b0380861692820192909252600254821660608201528d518216608082015261139a918d1690611acf565b90925090505b806113aa57600091505b8b516001546113cb916001600160a01b038681169261010090041687611b00565b8b5160208d01516113fd91906113e185886128ea565b6113eb908c612941565b6001600160a01b038716929190611b00565b600189600181111561141f57634e487b7160e01b600052602160045260246000fd5b141561149b5760208c01516040808e01519051632142170760e11b81526001600160a01b0392831660048201529082166024820152604481018c9052908c16906342842e0e90606401600060405180830381600087803b15801561148257600080fd5b505af1158015611496573d6000803e3d6000fd5b505050505b60008960018111156114bd57634e487b7160e01b600052602160045260246000fd5b141561154e5760208c01516040808e01519051637921219560e11b81526001600160a01b0392831660048201529082166024820152604481018c90526064810188905260a06084820152600060a4820152908c169063f242432a9060c401600060405180830381600087803b15801561153557600080fd5b505af1158015611549573d6000803e3d6000fd5b505050505b50919a9950505050505050505050565b60015460ff166115a75760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106cc565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60015460ff16156116145760405162461bcd60e51b81526004016106cc90612677565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258336115d4565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156116c45760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016106cc565b8360ff16601b14806116d957508360ff16601c145b806116e5575060ff8416155b806116f357508360ff166001145b61174a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016106cc565b6040805160008082526020820180845288905260ff871692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa15801561179e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166118015760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016106cc565b95945050505050565b60606000611819836002612922565b6118249060026128ea565b67ffffffffffffffff81111561184a57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611874576020820181803683370190505b509050600360fc1b8160008151811061189d57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106118da57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006118fe846002612922565b6119099060016128ea565b90505b600181111561199d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061194b57634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061196f57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361199681612984565b905061190c565b5083156105cf5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106cc565b6040516301ffc9a760e01b815263152a902d60e11b60048201526000906001600160a01b038316906301ffc9a79060240160206040518083038186803b158015611a3557600080fd5b505afa925050508015611a65575060408051601f3d908101601f19168201909252611a62918101906122c7565b60015b61058b57506000919050565b919050565b600080600080611a87898688611b60565b91509150600081118015611aa357506001600160a01b03821615155b15611ac257611abd6001600160a01b038916888484611b00565b600192505b9250509550959350505050565b600080611af48484606001518560400151866080015187602001518860000151611bfa565b915091505b9250929050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611b5a908590611d6b565b50505050565b60405163152a902d60e11b8152600481018390526024810182905260009081906001600160a01b03861690632a55205a906044016040805180830381600087803b158015611bad57600080fd5b505af1925050508015611bdd575060408051601f3d908101601f19168201909252611bda918101906121b8565b60015b611bec57506000905080611bf2565b90925090505b935093915050565b604051637a99dc0160e11b81526001600160a01b03878116600483015260248201849052604482018390526000918291829182918291908b169063f533b80290606401600060405180830381600087803b158015611c5757600080fd5b505af1158015611c6b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611c9391908101906121e5565b9150915060005b8251811015611d5857611d1189848381518110611cc757634e487b7160e01b600052603260045260246000fd5b6020026020010151848481518110611cef57634e487b7160e01b600052603260045260246000fd5b60200260200101518d6001600160a01b0316611b00909392919063ffffffff16565b818181518110611d3157634e487b7160e01b600052603260045260246000fd5b602002602001015184611d4491906128ea565b935080611d508161299b565b915050611c9a565b50919a60019a5098505050505050505050565b6000611dc0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611e3d9092919063ffffffff16565b80519091501561065b5780806020019051810190611dde91906122c7565b61065b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106cc565b6060610bc5848460008585843b611e965760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106cc565b600080866001600160a01b03168587604051611eb291906125af565b60006040518083038185875af1925050503d8060008114611eef576040519150601f19603f3d011682016040523d82523d6000602084013e611ef4565b606091505b5091509150611f04828286611f0f565b979650505050505050565b60608315611f1e5750816105cf565b825115611f2e5782518084602001fd5b8160405162461bcd60e51b81526004016106cc9190612664565b8035611a71816129e2565b600082601f830112611f63578081fd5b81516020611f78611f73836128c6565b612895565b80838252828201915082860187848660051b8901011115611f97578586fd5b855b85811015611fb557815184529284019290840190600101611f99565b5090979650505050505050565b8035611a71816129fa565b60008083601f840112611fde578182fd5b50813567ffffffffffffffff811115611ff5578182fd5b602083019150836020828501011115611af957600080fd5b600082601f83011261201d578081fd5b813567ffffffffffffffff811115612037576120376129cc565b61204a601f8201601f1916602001612895565b81815284602083860101111561205e578283fd5b816020850160208301379081016020019190915292915050565b803560028110611a7157600080fd5b60006101408284031215612099578081fd5b50919050565b600061014082840312156120b1578081fd5b6120b961286b565b90506120c482611f48565b815260208201356020820152604082013560408201526120e660608301611f48565b60608201526080820135608082015260a082013560a082015260c082013560c082015261211560e08301612078565b60e0820152610100612128818401611fc2565b9082015261012061213a838201612144565b9082015292915050565b803560ff81168114611a7157600080fd5b600060208284031215612166578081fd5b81356105cf816129e2565b600060208284031215612182578081fd5b81516105cf816129e2565b6000806040838503121561219f578081fd5b82356121aa816129e2565b946020939093013593505050565b600080604083850312156121ca578182fd5b82516121d5816129e2565b6020939093015192949293505050565b600080604083850312156121f7578182fd5b825167ffffffffffffffff8082111561220e578384fd5b818501915085601f830112612221578384fd5b81516020612231611f73836128c6565b8083825282820191508286018a848660051b8901011115612250578889fd5b8896505b8487101561227b578051612267816129e2565b835260019690960195918301918301612254565b5091880151919650909350505080821115612294578283fd5b506122a185828601611f53565b9150509250929050565b6000602082840312156122bc578081fd5b81356105cf816129fa565b6000602082840312156122d8578081fd5b81516105cf816129fa565b6000602082840312156122f4578081fd5b5035919050565b6000806040838503121561230d578182fd5b82359150602083013561231f816129e2565b809150509250929050565b60006020828403121561233b578081fd5b81356001600160e01b0319811681146105cf578182fd5b600060208284031215612363578081fd5b6105cf82612078565b6000806000806101808587031215612382578182fd5b61238c8686612087565b935061014085013567ffffffffffffffff8111156123a8578283fd5b6123b487828801611fcd565b9094509250506101608501356123c9816129e2565b939692955090935050565b600080600080600061018086880312156123ec578283fd5b6123f68787612087565b945061014086013567ffffffffffffffff80821115612413578485fd5b61241f89838a01611fcd565b9096509450610160880135915080821115612438578283fd5b5061244588828901611fcd565b969995985093965092949392505050565b60006101408284031215612468578081fd5b6105cf838361209f565b6000806101608385031215612485578182fd5b61248f848461209f565b915061014083013561231f816129e2565b600080600061018084860312156124b5578081fd5b6124bf858561209f565b92506101408401356124d0816129e2565b915061016084013567ffffffffffffffff8111156124ec578182fd5b6124f88682870161200d565b9150509250925092565b6000806101608385031215612515578182fd5b61251f848461209f565b915061014083013567ffffffffffffffff81111561253b578182fd5b6122a18582860161200d565b600060208284031215612558578081fd5b6105cf82612144565b60008151808452612579816020860160208601612958565b601f01601f19169290920160200192915050565b600281106125ab57634e487b7160e01b600052602160045260246000fd5b9052565b600082516125c1818460208701612958565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612603816017850160208801612958565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612634816028840160208801612958565b01602801949350505050565b6001600160a01b0383168152604060208201819052600090610bc590830184612561565b6020815260006105cf6020830184612561565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252601f908201527f73656e646572206d7573742068617665207468652041444d494e20726f6c6500604082015260600190565b60208082526026908201527f73656e646572206d75737420686165207468652044454641554c542041444d496040820152654e20524f4c4560d01b606082015260800190565b610140810161273d8261273085611f48565b6001600160a01b03169052565b602083013560208301526040830135604083015261275d60608401611f48565b6001600160a01b0381166060840152506080830135608083015260a083013560a083015260c083013560c083015261279760e08401612078565b6127a460e084018261258d565b506101006127b3818501611fc2565b1515908301526101206127c7848201612144565b60ff8116848301525b505092915050565b81516001600160a01b0316815261014081016020830151602083015260408301516040830152606083015161281860608401826001600160a01b03169052565b506080830151608083015260a083015160a083015260c083015160c083015260e083015161284960e084018261258d565b50610100838101511515908301526101208084015160ff8116828501526127d0565b604051610140810167ffffffffffffffff8111828210171561288f5761288f6129cc565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156128be576128be6129cc565b604052919050565b600067ffffffffffffffff8211156128e0576128e06129cc565b5060051b60200190565b600082198211156128fd576128fd6129b6565b500190565b60008261291d57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561293c5761293c6129b6565b500290565b600082821015612953576129536129b6565b500390565b60005b8381101561297357818101518382015260200161295b565b83811115611b5a5750506000910152565b600081612993576129936129b6565b506000190190565b60006000198214156129af576129af6129b6565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146129f757600080fd5b50565b80151581146129f757600080fdfedf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42a26469706673582212203e61b03d6a0e76496c89cde860e416765deacfec34159fad1299c1c884b9aaaa64736f6c63430008040033000000000000000000000000eeb07bb6ca37f23a82719d523a2e96cd3ad6e10c000000000000000000000000ad2184fb5dbcfc05d8f056542fb25b04fa32a95d

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061021c5760003560e01c80638456cb5911610125578063b3f00674116100ad578063d547741f1161007c578063d547741f146104e0578063d7233651146104f3578063e01e911b14610521578063efdcd97414610534578063fcee45f41461054757600080fd5b8063b3f0067414610485578063c1ef52711461049d578063c398b602146104b0578063cc0f1786146104d757600080fd5b8063970d0f22116100f4578063970d0f221461043b578063a001ecdd1461044e578063a11b071214610457578063a217fddf1461046a578063ae06c1b71461047257600080fd5b80638456cb59146103fa57806384a608e2146104025780638a1283c31461041557806391d148541461042857600080fd5b80632f2ff15d116101a85780633c611d74116101775780633c611d741461039a5780633f4ba83a146103ad5780634445e439146103b5578063582abd12146103c85780635c975abb146103ef57600080fd5b80632f2ff15d1461034c57806336568abe14610361578063392d8f0e146103745780633b4a01951461038757600080fd5b80631c439266116101ef5780631c439266146102bf5780631df8749b146102e2578063248a9ca3146102f557806327b9aad1146103185780632a0acc6a1461033757600080fd5b806301ffc9a7146102215780630770e238146102495780630df6d3aa14610281578063100ef02514610294575b600080fd5b61023461022f36600461232a565b61055a565b60405190151581526020015b60405180910390f35b60408051466020808301919091523082840152825180830384018152606090920190925280519101205b604051908152602001610240565b61023461028f3660046124a0565b610591565b6102a76102a23660046124a0565b6105d6565b6040516001600160a01b039091168152602001610240565b6102346102cd3660046122e3565b60046020526000908152604090205460ff1681565b6102346102f0366004612502565b610604565b6102736103033660046122e3565b60009081526020819052604090206001015490565b6005546103259060ff1681565b60405160ff9091168152602001610240565b610273600080516020612a0983398151915281565b61035f61035a3660046122fb565b610635565b005b61035f61036f3660046122fb565b610660565b610273610382366004612472565b6106e3565b61035f61039536600461236c565b61077a565b61035f6103a83660046123d4565b61095a565b61035f610b81565b6102a76103c3366004612502565b610bb2565b6102737f2aeb38be3df14d720aeb10a2de6df09b0fb3cd5c5ec256283a22d4593110ca4081565b60015460ff16610234565b61035f610bcd565b61035f610410366004612155565b610bfc565b61035f610423366004612456565b610c52565b6102346104363660046122fb565b610d1a565b6008546102a7906001600160a01b031681565b61027360065481565b6002546102a7906001600160a01b031681565b610273600081565b61035f6104803660046122e3565b610d43565b6001546102a79061010090046001600160a01b031681565b6102736104ab366004612456565b610d7c565b6102737f8654b55daeed86ba3c7fbcfbe4538a4b3b1db27fe023d3c19acd1ecb09a8336f81565b61027360075481565b61035f6104ee3660046122fb565b610df3565b61023461050136600461218d565b600360209081526000928352604080842090915290825290205460ff1681565b61035f61052f366004612155565b610e19565b61035f610542366004612155565b610e6f565b6102736105553660046122e3565b610ecb565b60006001600160e01b03198216637965db0b60e01b148061058b57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60008061059f8585856105d6565b90506105cb7f2aeb38be3df14d720aeb10a2de6df09b0fb3cd5c5ec256283a22d4593110ca4082610d1a565b9150505b9392505050565b6000806105e385856106e3565b905060006105fa846105f484610ee8565b90610f3b565b9695505050505050565b60008061061c836105f461061787610d7c565b610ee8565b84516001600160a01b0391821691161491505092915050565b6000828152602081905260409020600101546106518133610fac565b61065b8383611010565b505050565b6001600160a01b03811633146106d55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6106df8282611094565b5050565b60008082846040516020016106f891906127d8565b60408051601f19818403018152908290526107169291602001612640565b60408051808303601f19018152828252805160209182012046828501523084840152825180850384018152606085018452805190830120608085015260a0808501919091528251808503909101815260c09093019091528151910120949350505050565b60015460ff161561079d5760405162461bcd60e51b81526004016106cc90612677565b6107c77f8654b55daeed86ba3c7fbcfbe4538a4b3b1db27fe023d3c19acd1ecb09a8336f33610d1a565b61081e5760405162461bcd60e51b815260206004820152602260248201527f73656e646572206d75737420686176652074686520707572636861736520726f6044820152616c6560f01b60648201526084016106cc565b6108298484846110f9565b61083b610120850161010086016122ab565b610858576040516365aa82e160e11b815260040160405180910390fd5b3360006108686020870187612155565b905060006108ef6040518060600160405280856001600160a01b03168152602001846001600160a01b03168152602001866001600160a01b03168152508860600160208101906108b89190612155565b60408a01356108ce6101008c0160e08d01612352565b60808c01356108e56101408e016101208f01612547565b8d60a0013561128c565b90507f05d3642c36fde0d14be6c2018af2ebd4d1dd5a6b90d56da4214512f39242270e60208801803590610923908a612155565b604080519283526001600160a01b03919091166020830152338282015260608201849052519081900360800190a150505050505050565b60015460ff161561097d5760405162461bcd60e51b81526004016106cc90612677565b6109888585856110f9565b6109956020860186612155565b6001600160a01b0316336001600160a01b031614156109c757604051636edaef2f60e11b815260040160405180910390fd5b610a166109d936879003870187612456565b3384848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061059192505050565b610a3357604051638baa579f60e01b815260040160405180910390fd5b6000610a47610120870161010088016122ab565b610a5d57610a586020870187612155565b610a5f565b335b90506000610a75610120880161010089016122ab565b610a7f5733610a8c565b610a8c6020880188612155565b90506000610b156040518060600160405280856001600160a01b03168152602001846001600160a01b03168152602001856001600160a01b0316815250896060016020810190610adc9190612155565b60408b0135610af26101008d0160e08e01612352565b8c608001358d610120016020810190610b0b9190612547565b8e60a0013561128c565b90507f05d3642c36fde0d14be6c2018af2ebd4d1dd5a6b90d56da4214512f39242270e60208901803590610b49908b612155565b604080519283526001600160a01b03919091166020830152338282015260608201849052519081900360800190a15050505050505050565b610b8c600033610d1a565b610ba85760405162461bcd60e51b81526004016106cc906126d8565b610bb061155e565b565b600080610bc5836105f461061787610d7c565b949350505050565b610bd8600033610d1a565b610bf45760405162461bcd60e51b81526004016106cc906126d8565b610bb06115f1565b610c14600080516020612a0983398151915233610d1a565b610c305760405162461bcd60e51b81526004016106cc906126a1565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b80516001600160a01b0316336001600160a01b031614610c8557604051636b01bb7f60e11b815260040160405180910390fd5b600081604051602001610c9891906127d8565b60408051601f19818403018152828252805160209182012060008181526004835292909220805460ff1916600117905584015184519193507f05f4d85213243bbb82720a86f0e6c99b8445f46da7e382031e4915cff0ad8d5392610d0e92909182526001600160a01b0316602082015260400190565b60405180910390a15050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b610d5b600080516020612a0983398151915233610d1a565b610d775760405162461bcd60e51b81526004016106cc906126a1565b600655565b60008082604051602001610d9091906127d8565b60408051808303601f19018152828252805160209182012046828501523084840152825180850384018152606085018452805190830120608085015260a0808501919091528251808503909101815260c090930190915281519101209392505050565b600082815260208190526040902060010154610e0f8133610fac565b61065b8383611094565b610e31600080516020612a0983398151915233610d1a565b610e4d5760405162461bcd60e51b81526004016106cc906126a1565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b610e87600080516020612a0983398151915233610d1a565b610ea35760405162461bcd60e51b81526004016106cc906126a1565b600180546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b600060075460065483610ede9190612922565b61058b9190612902565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b60008151604114610f8e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016106cc565b60208201516040830151606084015160001a6105fa86828585611647565b610fb68282610d1a565b6106df57610fce816001600160a01b0316601461180a565b610fd983602061180a565b604051602001610fea9291906125cb565b60408051601f198184030181529082905262461bcd60e51b82526106cc91600401612664565b61101a8282610d1a565b6106df576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556110503390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61109e8282610d1a565b156106df576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600460008460405160200161110e919061271e565b60408051601f198184030181529181528151602092830120835290820192909252016000205460ff1615611155576040516361792dfd60e01b815260040160405180910390fd5b8260c0013542111561117a576040516303d0974960e21b815260040160405180910390fd5b6003600061118b6020860186612155565b6001600160a01b031681526020808201929092526040908101600090812086840135825290925290205460ff16156111d657604051633ab3447f60e11b815260040160405180910390fd5b6001600360006111e96020870187612155565b6001600160a01b03168152602080820192909252604090810160009081208784013582529092529020805460ff191691151591909117905561126f61123336859003850185612456565b83838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061060492505050565b61065b57604051638baa579f60e01b815260040160405180910390fd5b60008061129885610ecb565b600854604051630b5a7f2360e31b815260ff871660048201529192506000916001600160a01b0390911690635ad3f91890602401602060405180830381600087803b1580156112e657600080fd5b505af11580156112fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131e9190612171565b905060008061132c8b6119ec565b15611355578b5161134b906001600160a01b038d169085908b8e611a76565b90925090506113a0565b6040805160a081018252898152602081018c90526001600160a01b0380861692820192909252600254821660608201528d518216608082015261139a918d1690611acf565b90925090505b806113aa57600091505b8b516001546113cb916001600160a01b038681169261010090041687611b00565b8b5160208d01516113fd91906113e185886128ea565b6113eb908c612941565b6001600160a01b038716929190611b00565b600189600181111561141f57634e487b7160e01b600052602160045260246000fd5b141561149b5760208c01516040808e01519051632142170760e11b81526001600160a01b0392831660048201529082166024820152604481018c9052908c16906342842e0e90606401600060405180830381600087803b15801561148257600080fd5b505af1158015611496573d6000803e3d6000fd5b505050505b60008960018111156114bd57634e487b7160e01b600052602160045260246000fd5b141561154e5760208c01516040808e01519051637921219560e11b81526001600160a01b0392831660048201529082166024820152604481018c90526064810188905260a06084820152600060a4820152908c169063f242432a9060c401600060405180830381600087803b15801561153557600080fd5b505af1158015611549573d6000803e3d6000fd5b505050505b50919a9950505050505050505050565b60015460ff166115a75760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106cc565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60015460ff16156116145760405162461bcd60e51b81526004016106cc90612677565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258336115d4565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156116c45760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016106cc565b8360ff16601b14806116d957508360ff16601c145b806116e5575060ff8416155b806116f357508360ff166001145b61174a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016106cc565b6040805160008082526020820180845288905260ff871692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa15801561179e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166118015760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016106cc565b95945050505050565b60606000611819836002612922565b6118249060026128ea565b67ffffffffffffffff81111561184a57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611874576020820181803683370190505b509050600360fc1b8160008151811061189d57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106118da57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006118fe846002612922565b6119099060016128ea565b90505b600181111561199d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061194b57634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061196f57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361199681612984565b905061190c565b5083156105cf5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106cc565b6040516301ffc9a760e01b815263152a902d60e11b60048201526000906001600160a01b038316906301ffc9a79060240160206040518083038186803b158015611a3557600080fd5b505afa925050508015611a65575060408051601f3d908101601f19168201909252611a62918101906122c7565b60015b61058b57506000919050565b919050565b600080600080611a87898688611b60565b91509150600081118015611aa357506001600160a01b03821615155b15611ac257611abd6001600160a01b038916888484611b00565b600192505b9250509550959350505050565b600080611af48484606001518560400151866080015187602001518860000151611bfa565b915091505b9250929050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611b5a908590611d6b565b50505050565b60405163152a902d60e11b8152600481018390526024810182905260009081906001600160a01b03861690632a55205a906044016040805180830381600087803b158015611bad57600080fd5b505af1925050508015611bdd575060408051601f3d908101601f19168201909252611bda918101906121b8565b60015b611bec57506000905080611bf2565b90925090505b935093915050565b604051637a99dc0160e11b81526001600160a01b03878116600483015260248201849052604482018390526000918291829182918291908b169063f533b80290606401600060405180830381600087803b158015611c5757600080fd5b505af1158015611c6b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611c9391908101906121e5565b9150915060005b8251811015611d5857611d1189848381518110611cc757634e487b7160e01b600052603260045260246000fd5b6020026020010151848481518110611cef57634e487b7160e01b600052603260045260246000fd5b60200260200101518d6001600160a01b0316611b00909392919063ffffffff16565b818181518110611d3157634e487b7160e01b600052603260045260246000fd5b602002602001015184611d4491906128ea565b935080611d508161299b565b915050611c9a565b50919a60019a5098505050505050505050565b6000611dc0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611e3d9092919063ffffffff16565b80519091501561065b5780806020019051810190611dde91906122c7565b61065b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106cc565b6060610bc5848460008585843b611e965760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106cc565b600080866001600160a01b03168587604051611eb291906125af565b60006040518083038185875af1925050503d8060008114611eef576040519150601f19603f3d011682016040523d82523d6000602084013e611ef4565b606091505b5091509150611f04828286611f0f565b979650505050505050565b60608315611f1e5750816105cf565b825115611f2e5782518084602001fd5b8160405162461bcd60e51b81526004016106cc9190612664565b8035611a71816129e2565b600082601f830112611f63578081fd5b81516020611f78611f73836128c6565b612895565b80838252828201915082860187848660051b8901011115611f97578586fd5b855b85811015611fb557815184529284019290840190600101611f99565b5090979650505050505050565b8035611a71816129fa565b60008083601f840112611fde578182fd5b50813567ffffffffffffffff811115611ff5578182fd5b602083019150836020828501011115611af957600080fd5b600082601f83011261201d578081fd5b813567ffffffffffffffff811115612037576120376129cc565b61204a601f8201601f1916602001612895565b81815284602083860101111561205e578283fd5b816020850160208301379081016020019190915292915050565b803560028110611a7157600080fd5b60006101408284031215612099578081fd5b50919050565b600061014082840312156120b1578081fd5b6120b961286b565b90506120c482611f48565b815260208201356020820152604082013560408201526120e660608301611f48565b60608201526080820135608082015260a082013560a082015260c082013560c082015261211560e08301612078565b60e0820152610100612128818401611fc2565b9082015261012061213a838201612144565b9082015292915050565b803560ff81168114611a7157600080fd5b600060208284031215612166578081fd5b81356105cf816129e2565b600060208284031215612182578081fd5b81516105cf816129e2565b6000806040838503121561219f578081fd5b82356121aa816129e2565b946020939093013593505050565b600080604083850312156121ca578182fd5b82516121d5816129e2565b6020939093015192949293505050565b600080604083850312156121f7578182fd5b825167ffffffffffffffff8082111561220e578384fd5b818501915085601f830112612221578384fd5b81516020612231611f73836128c6565b8083825282820191508286018a848660051b8901011115612250578889fd5b8896505b8487101561227b578051612267816129e2565b835260019690960195918301918301612254565b5091880151919650909350505080821115612294578283fd5b506122a185828601611f53565b9150509250929050565b6000602082840312156122bc578081fd5b81356105cf816129fa565b6000602082840312156122d8578081fd5b81516105cf816129fa565b6000602082840312156122f4578081fd5b5035919050565b6000806040838503121561230d578182fd5b82359150602083013561231f816129e2565b809150509250929050565b60006020828403121561233b578081fd5b81356001600160e01b0319811681146105cf578182fd5b600060208284031215612363578081fd5b6105cf82612078565b6000806000806101808587031215612382578182fd5b61238c8686612087565b935061014085013567ffffffffffffffff8111156123a8578283fd5b6123b487828801611fcd565b9094509250506101608501356123c9816129e2565b939692955090935050565b600080600080600061018086880312156123ec578283fd5b6123f68787612087565b945061014086013567ffffffffffffffff80821115612413578485fd5b61241f89838a01611fcd565b9096509450610160880135915080821115612438578283fd5b5061244588828901611fcd565b969995985093965092949392505050565b60006101408284031215612468578081fd5b6105cf838361209f565b6000806101608385031215612485578182fd5b61248f848461209f565b915061014083013561231f816129e2565b600080600061018084860312156124b5578081fd5b6124bf858561209f565b92506101408401356124d0816129e2565b915061016084013567ffffffffffffffff8111156124ec578182fd5b6124f88682870161200d565b9150509250925092565b6000806101608385031215612515578182fd5b61251f848461209f565b915061014083013567ffffffffffffffff81111561253b578182fd5b6122a18582860161200d565b600060208284031215612558578081fd5b6105cf82612144565b60008151808452612579816020860160208601612958565b601f01601f19169290920160200192915050565b600281106125ab57634e487b7160e01b600052602160045260246000fd5b9052565b600082516125c1818460208701612958565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612603816017850160208801612958565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612634816028840160208801612958565b01602801949350505050565b6001600160a01b0383168152604060208201819052600090610bc590830184612561565b6020815260006105cf6020830184612561565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252601f908201527f73656e646572206d7573742068617665207468652041444d494e20726f6c6500604082015260600190565b60208082526026908201527f73656e646572206d75737420686165207468652044454641554c542041444d496040820152654e20524f4c4560d01b606082015260800190565b610140810161273d8261273085611f48565b6001600160a01b03169052565b602083013560208301526040830135604083015261275d60608401611f48565b6001600160a01b0381166060840152506080830135608083015260a083013560a083015260c083013560c083015261279760e08401612078565b6127a460e084018261258d565b506101006127b3818501611fc2565b1515908301526101206127c7848201612144565b60ff8116848301525b505092915050565b81516001600160a01b0316815261014081016020830151602083015260408301516040830152606083015161281860608401826001600160a01b03169052565b506080830151608083015260a083015160a083015260c083015160c083015260e083015161284960e084018261258d565b50610100838101511515908301526101208084015160ff8116828501526127d0565b604051610140810167ffffffffffffffff8111828210171561288f5761288f6129cc565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156128be576128be6129cc565b604052919050565b600067ffffffffffffffff8211156128e0576128e06129cc565b5060051b60200190565b600082198211156128fd576128fd6129b6565b500190565b60008261291d57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561293c5761293c6129b6565b500290565b600082821015612953576129536129b6565b500390565b60005b8381101561297357818101518382015260200161295b565b83811115611b5a5750506000910152565b600081612993576129936129b6565b506000190190565b60006000198214156129af576129af6129b6565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146129f757600080fd5b50565b80151581146129f757600080fdfedf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42a26469706673582212203e61b03d6a0e76496c89cde860e416765deacfec34159fad1299c1c884b9aaaa64736f6c63430008040033

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

000000000000000000000000eeb07bb6ca37f23a82719d523a2e96cd3ad6e10c000000000000000000000000ad2184fb5dbcfc05d8f056542fb25b04fa32a95d

-----Decoded View---------------
Arg [0] : _paymentArbiter (address): 0xEeb07BB6ca37F23a82719d523A2E96CD3aD6e10c
Arg [1] : _registry (address): 0xaD2184FB5DBcfC05d8f056542fB25b04fa32A95D

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000eeb07bb6ca37f23a82719d523a2e96cd3ad6e10c
Arg [1] : 000000000000000000000000ad2184fb5dbcfc05d8f056542fb25b04fa32a95d


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.