ETH Price: $3,402.80 (+3.77%)
Gas: 8.63 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Emergency Sh...183452392023-10-14 1:06:47475 days ago1697245607IN
0x55559840...5F6445555
0 ETH0.000143935.01934988
Cancel Nonces179842202023-08-24 11:19:11526 days ago1692875951IN
0x55559840...5F6445555
0 ETH0.000529120.24909235
Cancel Nonces179799062023-08-23 20:50:35526 days ago1692823835IN
0x55559840...5F6445555
0 ETH0.0010091121.92304863
Cancel Nonces167396902023-03-02 8:27:23701 days ago1677745643IN
0x55559840...5F6445555
0 ETH0.0008718718.94144706
Cancel Nonces163623792023-01-08 13:30:35754 days ago1673184635IN
0x55559840...5F6445555
0 ETH0.0007096915.41820362
Cancel Nonces162113972022-12-18 11:52:23775 days ago1671364343IN
0x55559840...5F6445555
0 ETH0.0008559316.19122145
Cancel Nonces162069482022-12-17 20:57:11775 days ago1671310631IN
0x55559840...5F6445555
0 ETH0.0005398711.72871207
Fill Order161666102022-12-12 5:41:59781 days ago1670823719IN
0x55559840...5F6445555
0 ETH0.0039179114.47086342
Cancel Nonces161628442022-12-11 17:04:47781 days ago1670778287IN
0x55559840...5F6445555
0 ETH0.0006669414.48942017
Fill Order161594192022-12-11 5:36:47782 days ago1670737007IN
0x55559840...5F6445555
0 ETH0.0040073312.93136514
Cancel Nonces161505582022-12-09 23:55:11783 days ago1670630111IN
0x55559840...5F6445555
0 ETH0.0007039615.29371802
Cancel Nonces161420402022-12-08 19:20:23784 days ago1670527223IN
0x55559840...5F6445555
0 ETH0.001010121.94459647
Cancel Nonces161285142022-12-06 21:43:23786 days ago1670363003IN
0x55559840...5F6445555
0 ETH0.0007528416.35559168
Fill Order161262162022-12-06 14:01:23787 days ago1670335283IN
0x55559840...5F6445555
0 ETH0.0097777135.00015368
Fill Order161237262022-12-06 5:41:23787 days ago1670305283IN
0x55559840...5F6445555
0 ETH0.0043043714.76322144
Cancel Nonces161207862022-12-05 19:51:23787 days ago1670269883IN
0x55559840...5F6445555
0 ETH0.0006012613.06244722
Cancel Nonces161207472022-12-05 19:43:23787 days ago1670269403IN
0x55559840...5F6445555
0 ETH0.0007739316.81362567
Cancel Nonces161198822022-12-05 16:48:11788 days ago1670258891IN
0x55559840...5F6445555
0 ETH0.0004568217.48288776
Cancel Nonces161198762022-12-05 16:46:59788 days ago1670258819IN
0x55559840...5F6445555
0 ETH0.0008594418.67130188
Cancel Nonces161194132022-12-05 15:11:11788 days ago1670253071IN
0x55559840...5F6445555
0 ETH0.0011178439.34970392
Cancel Nonces161194072022-12-05 15:09:59788 days ago1670252999IN
0x55559840...5F6445555
0 ETH0.0018867739.05710922
Cancel Nonces161168402022-12-05 6:34:11788 days ago1670222051IN
0x55559840...5F6445555
0 ETH0.0005789512.57786746
Cancel Nonces161148372022-12-04 23:51:11788 days ago1670197871IN
0x55559840...5F6445555
0 ETH0.0005618912.20709018
Fill Order161103742022-12-04 8:52:23789 days ago1670143943IN
0x55559840...5F6445555
0 ETH0.003218411.99836483
Cancel Nonces161057322022-12-03 17:18:59789 days ago1670087939IN
0x55559840...5F6445555
0 ETH0.000538111.69031403
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x3F8d41e0...383386EB8
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
ArchipelagoMarket

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200000 runs

Other Settings:
default evmVersion
File 1 of 12 : ArchipelagoMarket.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

import "./ITraitOracle.sol";
import "./IRoyaltyOracle.sol";
import "./IWeth.sol";
import "./MarketMessages.sol";
import "./SignatureChecker.sol";

contract ArchipelagoMarket is Ownable {
    using MarketMessages for Ask;
    using MarketMessages for Bid;
    using MarketMessages for OrderAgreement;

    event NonceCancellation(address indexed participant, uint256 indexed nonce);

    event BidApproval(
        address indexed participant,
        bytes32 indexed bidHash,
        bool approved,
        Bid bid
    );
    event AskApproval(
        address indexed participant,
        bytes32 indexed askHash,
        bool approved,
        Ask ask
    );

    event Trade(
        bytes32 indexed tradeId,
        address indexed buyer,
        address indexed seller,
        uint256 price,
        uint256 proceeds,
        uint256 cost,
        IERC20 currency
    );
    /// Emitted in one-to-one correspondence with `Trade` events. This is a
    /// separate event just so that we can index more fields.
    event TokenTrade(
        bytes32 indexed tradeId,
        IERC721 indexed tokenAddress,
        uint256 indexed tokenId
    );

    event RoyaltyPayment(
        bytes32 indexed tradeId,
        address indexed payer,
        address indexed recipient,
        uint256 micros,
        uint256 amount,
        IERC20 currency
    );

    mapping(address => mapping(uint256 => bool)) public nonceCancelled;

    /// `onChainApproval[address][structHash]` is `true` if `address` has
    /// provided on-chain approval of a message with hash `structHash`.
    ///
    /// These approvals are not bounded by a domain separator; the contract
    /// storage itself is the signing domain.
    mapping(address => mapping(bytes32 => bool)) public onChainApproval;

    /// Whether the market is in emergencyShutdown mode (in which case, no trades
    /// can be made).
    bool public emergencyShutdown;

    /// Address of the Archipelago protocol treasury (to which hardcoded
    /// royalties accrue)
    address public archipelagoRoyaltyAddress;

    /// Royalty rate that accrues to the Archipelago protocol treasury
    /// (expressed as millionths of each transaction value)
    uint256 public archipelagoRoyaltyMicros;

    /// Hardcap the Archipelago royalty rate at 50 basis points.
    /// Prevents "rug" attacks where the contract owner unexpectedly
    /// spikes the royalty rate, abusing existing asks. Also, it's a nice
    /// commitment to our users.
    uint256 constant MAX_ARCHIPELAGO_ROYALTY_MICROS = 5000;

    uint256 constant ONE_MILLION = 1000000;

    string constant ORDER_CANCELLED_OR_EXPIRED =
        "Market: order cancelled or expired";

    string constant AGREEMENT_MISMATCH =
        "Market: bid/ask agreement hash doesn't match order agreement";

    string constant TRANSFER_FAILED = "Market: transfer failed";

    bytes32 constant TYPEHASH_DOMAIN_SEPARATOR =
        keccak256(
            "EIP712Domain(string name,uint256 chainId,address verifyingContract)"
        );

    /// Needs to be present so that the WETH contract can send ETH here for
    /// automatic unwrapping on behalf of sellers. No-one else should send
    /// ETH to this contract.
    receive() external payable {}

    /// Shut down the market. Should be used if a critical security
    /// flaw is discovered.
    function setEmergencyShutdown(bool isShutdown) external onlyOwner {
        emergencyShutdown = isShutdown;
    }

    function setArchipelagoRoyaltyAddress(address newRoyaltyAddress)
        external
        onlyOwner
    {
        archipelagoRoyaltyAddress = newRoyaltyAddress;
    }

    function setArchipelagoRoyaltyMicros(uint256 newRoyaltyMicros)
        external
        onlyOwner
    {
        require(
            newRoyaltyMicros <= MAX_ARCHIPELAGO_ROYALTY_MICROS,
            "Market: protocol royalty too high"
        );
        archipelagoRoyaltyMicros = newRoyaltyMicros;
    }

    function computeDomainSeparator() internal view returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    TYPEHASH_DOMAIN_SEPARATOR,
                    keccak256("ArchipelagoMarket"),
                    block.chainid,
                    address(this)
                )
            );
    }

    function verify(
        bytes32 domainSeparator,
        bytes32 structHash,
        bytes memory signature,
        SignatureKind signatureKind
    ) internal view returns (address) {
        if (signatureKind != SignatureKind.EXTERNAL) {
            return
                SignatureChecker.recover(
                    domainSeparator,
                    structHash,
                    signature,
                    signatureKind
                );
        }
        address signer = abi.decode(signature, (address));
        require(
            signer == msg.sender || onChainApproval[signer][structHash],
            "Market: on-chain approval missing"
        );
        return signer;
    }

    function setOnChainBidApproval(Bid memory bid, bool approved) external {
        bytes32 hash = bid.structHash();
        onChainApproval[msg.sender][hash] = approved;
        emit BidApproval(msg.sender, hash, approved, bid);
    }

    function setOnChainAskApproval(Ask memory ask, bool approved) external {
        bytes32 hash = ask.structHash();
        onChainApproval[msg.sender][hash] = approved;
        emit AskApproval(msg.sender, hash, approved, ask);
    }

    /// Computes the EIP-712 struct hash of the given bid. The resulting hash
    /// can be passed to `onChainApproval(address, bytes32)` to check whether
    /// a given account has signed this bid.
    function bidHash(Bid memory bid) external pure returns (bytes32) {
        return bid.structHash();
    }

    /// Computes the EIP-712 struct hash of the given ask. The resulting hash
    /// can be passed to `onChainApproval(address, bytes32)` to check whether
    /// a given account has signed this ask.
    function askHash(Ask memory ask) external pure returns (bytes32) {
        return ask.structHash();
    }

    /// Computes the EIP-712 struct hash of the parts of an order that must be
    /// shared between a bid and an ask. The resulting hash should appear as
    /// the `agreementHash` field of both the `Bid` and the `Ask` structs.
    function orderAgreementHash(OrderAgreement memory agreement)
        external
        pure
        returns (bytes32)
    {
        return agreement.structHash();
    }

    function cancelNonces(uint256[] calldata nonces) external {
        for (uint256 i; i < nonces.length; i++) {
            uint256 nonce = nonces[i];
            nonceCancelled[msg.sender][nonce] = true;
            emit NonceCancellation(msg.sender, nonce);
        }
    }

    function _verifyOrder(
        OrderAgreement memory agreement,
        Bid memory bid,
        bytes memory bidSignature,
        SignatureKind bidSignatureKind,
        Ask memory ask,
        bytes memory askSignature,
        SignatureKind askSignatureKind
    ) internal view returns (address bidder, address asker) {
        bytes32 agreementHash = agreement.structHash();
        require(bid.agreementHash == agreementHash, AGREEMENT_MISMATCH);
        require(ask.agreementHash == agreementHash, AGREEMENT_MISMATCH);

        bytes32 domainSeparator = computeDomainSeparator();
        bidder = verify(
            domainSeparator,
            bid.structHash(),
            bidSignature,
            bidSignatureKind
        );
        asker = verify(
            domainSeparator,
            ask.structHash(),
            askSignature,
            askSignatureKind
        );
    }

    function fillOrder(
        OrderAgreement memory agreement,
        Bid memory bid,
        bytes memory bidSignature,
        SignatureKind bidSignatureKind,
        Ask memory ask,
        bytes memory askSignature,
        SignatureKind askSignatureKind
    ) external {
        (address bidder, address asker) = _verifyOrder(
            agreement,
            bid,
            bidSignature,
            bidSignatureKind,
            ask,
            askSignature,
            askSignatureKind
        );
        _fillOrder(agreement, bid, bidder, ask, asker);
    }

    /// Variant of fill order where the buyer pays in ETH (which is converted to
    /// WETH under the hood). Added as a convenience. Code is mostly a repeat of
    /// fillOrder, since we need to get the bidder from the signature, and then
    /// convert the paid ETH to WETH.
    ///
    /// We don't know exactly how much the order will cost the bidder upfront
    /// (we'd need to calculate royalties). So instead, the bidder just provides
    /// any amount of ETH they want, which will be added to their WETH balance
    /// before attempting to fill the transaction. If they haven't sent enough,
    /// the tx will fail; if they sent extra, they wil have a remaining WETH
    /// balance afterwards, which we assume was their intent (maybe they have
    /// other bids outstanding).
    function fillOrderEth(
        OrderAgreement memory agreement,
        Bid memory bid,
        bytes memory bidSignature,
        SignatureKind bidSignatureKind,
        Ask memory ask,
        bytes memory askSignature,
        SignatureKind askSignatureKind
    ) external payable {
        (address bidder, address asker) = _verifyOrder(
            agreement,
            bid,
            bidSignature,
            bidSignatureKind,
            ask,
            askSignature,
            askSignatureKind
        );
        require(msg.sender == bidder, "Market: only bidder may fill with ETH");
        IWeth currency = IWeth(address(agreement.currencyAddress));
        currency.deposit{value: msg.value}();
        require(currency.transfer(bidder, msg.value), TRANSFER_FAILED);
        _fillOrder(agreement, bid, bidder, ask, asker);
    }

    function _fillOrder(
        OrderAgreement memory agreement,
        Bid memory bid,
        address bidder,
        Ask memory ask,
        address asker
    ) internal {
        require(!emergencyShutdown, "Market: shut down");

        IERC721 token = agreement.tokenAddress;
        uint256 price = agreement.price;
        IERC20 currency = agreement.currencyAddress;

        uint256 tokenId = ask.tokenId;

        require(
            ask.authorizedBidder == address(0) ||
                ask.authorizedBidder == bidder,
            "Market: bidder is not authorized"
        );

        require(block.timestamp <= bid.deadline, ORDER_CANCELLED_OR_EXPIRED);
        require(block.timestamp <= ask.deadline, ORDER_CANCELLED_OR_EXPIRED);

        require(!nonceCancelled[bidder][bid.nonce], ORDER_CANCELLED_OR_EXPIRED);
        require(!nonceCancelled[asker][ask.nonce], ORDER_CANCELLED_OR_EXPIRED);

        // Bids and asks are cancelled on execution, to prevent replays. Cancel
        // upfront so that external calls (`transferFrom`, `safeTransferFrom`,
        // the ERC-721 receive hook) only observe the cancelled state.
        nonceCancelled[bidder][bid.nonce] = true;
        nonceCancelled[asker][ask.nonce] = true;
        emit NonceCancellation(bidder, bid.nonce);
        emit NonceCancellation(asker, ask.nonce);

        bytes32 tradeId = keccak256(
            abi.encode(bidder, bid.nonce, asker, ask.nonce)
        );
        // amount paid to seller, after subtracting asker royalties
        uint256 proceeds = price;
        // amount spent by the buyer, after including bidder royalties
        uint256 cost = price;

        if (address(bid.traitOracle) == address(0)) {
            uint256 expectedTokenId = uint256(bytes32(bid.trait));
            require(expectedTokenId == tokenId, "Market: token ID mismatch");
        } else {
            require(
                bid.traitOracle.hasTrait(token, tokenId, bid.trait),
                "Market: missing trait"
            );
        }

        for (uint256 i = 0; i < agreement.requiredRoyalties.length; i++) {
            proceeds -= _payRoyalty(
                agreement.requiredRoyalties[i],
                bidder,
                asker,
                price,
                tradeId,
                currency,
                token,
                tokenId
            );
        }
        // Note that the extra royalties on the ask is basically duplicated
        // from the required royalties. If you make a change to one code path,
        // you should also change the other.
        // We're support "extra" asker royalties so that the seller can reward
        // an agent, broker, or advisor, as appropriate.
        for (uint256 i = 0; i < ask.extraRoyalties.length; i++) {
            proceeds -= _payRoyalty(
                ask.extraRoyalties[i],
                bidder,
                asker,
                price,
                tradeId,
                currency,
                token,
                tokenId
            );
        }

        // Finally, we pay the hardcoded protocol royalty. It also comes from
        // the asker, so it's in the same style as the required royalties and
        // asker's extra royalties.
        if (archipelagoRoyaltyAddress != address(0)) {
            uint256 amt = (archipelagoRoyaltyMicros * price) / 1000000;
            proceeds -= amt;
            require(
                currency.transferFrom(bidder, archipelagoRoyaltyAddress, amt),
                TRANSFER_FAILED
            );
            emit RoyaltyPayment(
                tradeId,
                asker,
                archipelagoRoyaltyAddress,
                archipelagoRoyaltyMicros,
                amt,
                currency
            );
        }

        for (uint256 i = 0; i < bid.extraRoyalties.length; i++) {
            // Now we handle bid extra royalties.
            // This time we are increasing the cost (not decreasing the
            // proceeds) and the RoyaltyPayment event will specify the bidder
            // as the entity paying the royalty.
            cost += _payRoyalty(
                bid.extraRoyalties[i],
                bidder,
                bidder,
                price,
                tradeId,
                currency,
                token,
                tokenId
            );
        }

        bool ownerOrApproved;
        address tokenOwner = token.ownerOf(tokenId);
        if (tokenOwner == asker) {
            ownerOrApproved = true;
        } else if (token.getApproved(tokenId) == asker) {
            ownerOrApproved = true;
        } else if (token.isApprovedForAll(tokenOwner, asker)) {
            ownerOrApproved = true;
        }
        require(ownerOrApproved, "Market: asker is not owner or approved");
        token.safeTransferFrom(tokenOwner, bidder, tokenId);
        if (ask.unwrapWeth) {
            require(
                currency.transferFrom(bidder, address(this), proceeds),
                TRANSFER_FAILED
            );
            IWeth(address(currency)).withdraw(proceeds);
            // Note: This invokes the asker's fallback function. Be careful of
            // re-entrancy attacks. We deliberately invalidate the bid and ask
            // nonces before this point, to prevent replay attacks.
            payable(asker).transfer(proceeds);
        } else {
            require(
                currency.transferFrom(bidder, asker, proceeds),
                TRANSFER_FAILED
            );
        }

        emit Trade(tradeId, bidder, asker, price, proceeds, cost, currency);
        emit TokenTrade(tradeId, token, tokenId);
    }

    function _computeRoyalty(
        bytes32 royalty,
        IERC721 tokenContract,
        uint256 tokenId
    ) internal view returns (RoyaltyResult[] memory) {
        address target = address(bytes20(royalty));
        uint32 micros = uint32(uint256(royalty));
        uint32 staticBit = 1 << 31;
        bool isStatic = (micros & (staticBit)) != 0;
        micros &= ~staticBit;
        if (isStatic) {
            RoyaltyResult[] memory results = new RoyaltyResult[](1);
            results[0].micros = micros;
            results[0].recipient = target;
            return results;
        } else {
            uint64 data = uint64(uint256(royalty) >> 32);
            RoyaltyResult[] memory results = IRoyaltyOracle(target).royalties(
                tokenContract,
                tokenId,
                micros,
                data
            );
            uint256 totalMicros = 0;
            for (uint256 i = 0; i < results.length; i++) {
                totalMicros += results[i].micros;
            }
            require(
                totalMicros <= micros,
                "Market: oracle would overspend royalty allotment"
            );
            return results;
        }
    }

    function _payComputedRoyalties(
        RoyaltyResult[] memory results,
        address bidder,
        // `logicalPayer` is either the bidder or the asker, depending on who
        // semantically is bearing the cost of this royalty. In all cases, the
        // funds will actually be transferred from the bidder; this only
        // affects the emitted event.
        address logicalPayer,
        uint256 price,
        bytes32 tradeId,
        IERC20 currency
    ) internal returns (uint256) {
        uint256 totalAmount;
        for (uint256 i = 0; i < results.length; i++) {
            RoyaltyResult memory result = results[i];
            uint256 amt = (result.micros * price) / ONE_MILLION;
            totalAmount += amt;
            require(
                currency.transferFrom(bidder, result.recipient, amt),
                TRANSFER_FAILED
            );
            emit RoyaltyPayment(
                tradeId,
                logicalPayer,
                result.recipient,
                result.micros,
                amt,
                currency
            );
        }
        return totalAmount;
    }

    function _payRoyalty(
        bytes32 royalty,
        address bidder,
        address logicalPayer,
        uint256 price,
        bytes32 tradeId,
        IERC20 currency,
        IERC721 tokenContract,
        uint256 tokenId
    ) internal returns (uint256) {
        RoyaltyResult[] memory results = _computeRoyalty(
            royalty,
            tokenContract,
            tokenId
        );
        return
            _payComputedRoyalties(
                results,
                bidder,
                logicalPayer,
                price,
                tradeId,
                currency
            );
    }
}

File 2 of 12 : 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 12 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 4 of 12 : ITraitOracle.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

interface ITraitOracle {
    /// Queries whether the given ERC-721 token has the given trait.
    ///
    /// The interpretation of the trait bytestring may be domain-specific and
    /// is at the discretion of the trait oracle. For example, an oracle might
    /// choose to encode traits called "Normal" and "Rare" as `"\x00"` and
    /// `"\x01"` respectively, or as `bytes(keccak256("Normal"))` and
    /// `bytes(keccak256("Rare"))`, or as something else. The trait oracle may
    /// expose other domain-specific methods to describe these traits.
    function hasTrait(
        IERC721 _tokenContract,
        uint256 _tokenId,
        bytes calldata _trait
    ) external view returns (bool);
}

File 5 of 12 : IRoyaltyOracle.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

interface IRoyaltyOracle {
    function royalties(
        IERC721 _tokenContract,
        uint256 _tokenId,
        uint32 _micros,
        uint64 _data
    ) external view returns (RoyaltyResult[] memory);
}

struct RoyaltyResult {
    address recipient;
    uint32 micros;
}

File 6 of 12 : IWeth.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IWeth is IERC20 {
    function deposit() external payable;

    function withdraw(uint256) external;
}

File 7 of 12 : MarketMessages.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "./ITraitOracle.sol";

/// On Royalty Representations
///
/// Royalties take two possible forms. There are "static" and "dynamic"
/// royalties.
///
/// Static royalties consist of a specific recipient address, and a uint32
/// number of micros of royalty payment. Each micro corresponds to one
/// millionth of the purchase price.
///
/// Dynamic royalties have a royalty oracle address, and a uint32 max number
/// of micros that the oracle may allocate. The dynamic royalty also includes
/// a uint64 of arbitrary data that may be passed to the royalty oracle.
///
/// Whether a royalty is static or dynamic is encoded in the most significant
/// bit of the royalty micros value. Thus, while micros are encoded as a
/// uint32, there are only actually 31 bits available. This only rules out
/// unreasonably massive royalty values (billions of micros, or 1000x the total
/// purchase price), so it's not a serious limitation in practice. The sdk
/// prohibits setting the most significant bit in royalty micros.
///
/// Representationally, each royalty is a bytes32 where the first 20 bytes are
/// the recipient or oracle address, the next 8 bytes are the royalty oracle
/// calldata, and the final 4 bytes are the micros value.

/// Fields that a bid and ask must agree upon exactly for an order to be
/// filled.
struct OrderAgreement {
    /// Address of the ERC-20 contract being used as payment currency
    /// (typically WETH).
    IERC20 currencyAddress;
    /// Order price, in units of the ERC-20 given by `currencyAddress`.
    uint256 price;
    /// Address of the ERC-721 whose tokens are being traded.
    IERC721 tokenAddress;
    /// Royalties paid by the seller. This typically includes a royalty to the
    /// artist and to platforms supporting the token or the order.
    ///
    /// This is separated from the extra royalties on the ask to prevent token
    /// holders from taking an open bid on the orderbook and filling it without
    /// the conventional seller royalties.
    bytes32[] requiredRoyalties;
}

struct Bid {
    /// EIP-712 struct hash of the parts of this order shared between the bid
    /// and the ask, as an `OrderAgreement` struct.
    bytes32 agreementHash;
    uint256 nonce;
    /// Timestamp past which this order is no longer valid.
    uint40 deadline;
    /// Extra royalties specified by the participant who created this order.
    /// If the extra royalties are added on an Ask, they will be paid by the
    /// seller; extra royalties on a Bid are paid by the buyer (i.e. on top of
    /// the listed sale price).
    bytes32[] extraRoyalties;
    /// This is either: an encoding of the trait data that will be passed to
    /// the trait oracle (if one is provided), or the raw token id for the token
    /// being bid on (if the traitOracle is address zero).
    bytes trait;
    /// The address of the trait oracle used to interpret the trait data.
    /// If this is the zero address, the trait must be a uint256 token ID.
    ITraitOracle traitOracle;
}

struct Ask {
    /// EIP-712 struct hash of the parts of this order shared between the bid
    /// and the ask, as an `OrderAgreement` struct.
    bytes32 agreementHash;
    uint256 nonce;
    /// Timestamp past which this order is no longer valid.
    uint40 deadline;
    /// Extra royalties specified by the participant who created this order.
    /// If the extra royalties are added on an Ask, they will be paid by the
    /// seller; extra royalties on a Bid are paid by the buyer (i.e. on top of
    /// the listed sale price).
    bytes32[] extraRoyalties;
    /// The token ID listed for sale, under the token contract given by
    /// `orderAgreement.tokenAddress`.
    uint256 tokenId;
    /// Whether the asker would like their WETH proceeds to be automatically
    /// unwrapped to ETH on order execution.
    /// Purely a convenience for people who prefer ETH to WETH.
    bool unwrapWeth;
    /// The address of the account that is allowed to fill this order.
    /// If this address is the zero address, then anyone's bid may match.
    /// If this address is nonzero, they are the only address allowed to match
    /// this ask.
    address authorizedBidder;
}

library MarketMessages {
    using MarketMessages for OrderAgreement;
    using MarketMessages for bytes32[];

    bytes32 internal constant TYPEHASH_BID =
        keccak256(
            "Bid(bytes32 agreementHash,uint256 nonce,uint40 deadline,bytes32[] extraRoyalties,bytes trait,address traitOracle)"
        );
    bytes32 internal constant TYPEHASH_ASK =
        keccak256(
            "Ask(bytes32 agreementHash,uint256 nonce,uint40 deadline,bytes32[] extraRoyalties,uint256 tokenId,bool unwrapWeth,address authorizedBidder)"
        );
    bytes32 internal constant TYPEHASH_ORDER_AGREEMENT =
        keccak256(
            "OrderAgreement(address currencyAddress,uint256 price,address tokenAddress,bytes32[] requiredRoyalties)"
        );

    function structHash(Bid memory _self) internal pure returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    TYPEHASH_BID,
                    _self.agreementHash,
                    _self.nonce,
                    _self.deadline,
                    _self.extraRoyalties.structHash(),
                    keccak256(_self.trait),
                    _self.traitOracle
                )
            );
    }

    function structHash(Ask memory _self) internal pure returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    TYPEHASH_ASK,
                    _self.agreementHash,
                    _self.nonce,
                    _self.deadline,
                    _self.extraRoyalties.structHash(),
                    _self.tokenId,
                    _self.unwrapWeth,
                    _self.authorizedBidder
                )
            );
    }

    function structHash(OrderAgreement memory _self)
        internal
        pure
        returns (bytes32)
    {
        return
            keccak256(
                abi.encode(
                    TYPEHASH_ORDER_AGREEMENT,
                    _self.currencyAddress,
                    _self.price,
                    _self.tokenAddress,
                    _self.requiredRoyalties.structHash()
                )
            );
    }

    function structHash(bytes32[] memory _self)
        internal
        pure
        returns (bytes32)
    {
        return keccak256(abi.encodePacked(_self));
    }
}

File 8 of 12 : SignatureChecker.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";

enum SignatureKind {
    /// A message for which authorization is handled specially by the verifying
    /// contract. Signatures with this kind will always be rejected by
    /// `SignatureChecker.recover`; this enum variant exists to let callers
    /// handle other types of authorization, such as pre-authorization in
    /// contract storage or association with `msg.sender`.
    EXTERNAL,
    /// A message that starts with "\x19Ethereum Signed Message[...]", as
    /// implemented by the `personal_sign` JSON-RPC method.
    ETHEREUM_SIGNED_MESSAGE,
    /// A message that starts with "\x19\x01" and follows the EIP-712 typed
    /// data specification.
    EIP_712
}

library SignatureChecker {
    function recover(
        bytes32 _domainSeparator,
        bytes32 _structHash,
        bytes memory _signature,
        SignatureKind _kind
    ) internal pure returns (address) {
        bytes32 _hash;
        if (_kind == SignatureKind.ETHEREUM_SIGNED_MESSAGE) {
            _hash = ECDSA.toEthSignedMessageHash(
                keccak256(abi.encode(_domainSeparator, _structHash))
            );
        } else if (_kind == SignatureKind.EIP_712) {
            _hash = ECDSA.toTypedDataHash(_domainSeparator, _structHash);
        } else {
            revert("SignatureChecker: no signature given");
        }
        return ECDSA.recover(_hash, _signature);
    }
}

File 9 of 12 : 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 10 of 12 : 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 11 of 12 : 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 12 of 12 : 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 {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. 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.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @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) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 27)
        }
        return tryRecover(hash, v, r, s);
    }

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"participant","type":"address"},{"indexed":true,"internalType":"bytes32","name":"askHash","type":"bytes32"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"},{"components":[{"internalType":"bytes32","name":"agreementHash","type":"bytes32"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint40","name":"deadline","type":"uint40"},{"internalType":"bytes32[]","name":"extraRoyalties","type":"bytes32[]"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"unwrapWeth","type":"bool"},{"internalType":"address","name":"authorizedBidder","type":"address"}],"indexed":false,"internalType":"struct Ask","name":"ask","type":"tuple"}],"name":"AskApproval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"participant","type":"address"},{"indexed":true,"internalType":"bytes32","name":"bidHash","type":"bytes32"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"},{"components":[{"internalType":"bytes32","name":"agreementHash","type":"bytes32"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint40","name":"deadline","type":"uint40"},{"internalType":"bytes32[]","name":"extraRoyalties","type":"bytes32[]"},{"internalType":"bytes","name":"trait","type":"bytes"},{"internalType":"contract ITraitOracle","name":"traitOracle","type":"address"}],"indexed":false,"internalType":"struct Bid","name":"bid","type":"tuple"}],"name":"BidApproval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"participant","type":"address"},{"indexed":true,"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"NonceCancellation","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"tradeId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"payer","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"micros","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"contract IERC20","name":"currency","type":"address"}],"name":"RoyaltyPayment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"tradeId","type":"bytes32"},{"indexed":true,"internalType":"contract IERC721","name":"tokenAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenTrade","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"tradeId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"proceeds","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"cost","type":"uint256"},{"indexed":false,"internalType":"contract IERC20","name":"currency","type":"address"}],"name":"Trade","type":"event"},{"inputs":[],"name":"archipelagoRoyaltyAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"archipelagoRoyaltyMicros","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"agreementHash","type":"bytes32"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint40","name":"deadline","type":"uint40"},{"internalType":"bytes32[]","name":"extraRoyalties","type":"bytes32[]"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"unwrapWeth","type":"bool"},{"internalType":"address","name":"authorizedBidder","type":"address"}],"internalType":"struct Ask","name":"ask","type":"tuple"}],"name":"askHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"agreementHash","type":"bytes32"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint40","name":"deadline","type":"uint40"},{"internalType":"bytes32[]","name":"extraRoyalties","type":"bytes32[]"},{"internalType":"bytes","name":"trait","type":"bytes"},{"internalType":"contract ITraitOracle","name":"traitOracle","type":"address"}],"internalType":"struct Bid","name":"bid","type":"tuple"}],"name":"bidHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"nonces","type":"uint256[]"}],"name":"cancelNonces","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyShutdown","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20","name":"currencyAddress","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"contract IERC721","name":"tokenAddress","type":"address"},{"internalType":"bytes32[]","name":"requiredRoyalties","type":"bytes32[]"}],"internalType":"struct OrderAgreement","name":"agreement","type":"tuple"},{"components":[{"internalType":"bytes32","name":"agreementHash","type":"bytes32"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint40","name":"deadline","type":"uint40"},{"internalType":"bytes32[]","name":"extraRoyalties","type":"bytes32[]"},{"internalType":"bytes","name":"trait","type":"bytes"},{"internalType":"contract ITraitOracle","name":"traitOracle","type":"address"}],"internalType":"struct Bid","name":"bid","type":"tuple"},{"internalType":"bytes","name":"bidSignature","type":"bytes"},{"internalType":"enum SignatureKind","name":"bidSignatureKind","type":"uint8"},{"components":[{"internalType":"bytes32","name":"agreementHash","type":"bytes32"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint40","name":"deadline","type":"uint40"},{"internalType":"bytes32[]","name":"extraRoyalties","type":"bytes32[]"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"unwrapWeth","type":"bool"},{"internalType":"address","name":"authorizedBidder","type":"address"}],"internalType":"struct Ask","name":"ask","type":"tuple"},{"internalType":"bytes","name":"askSignature","type":"bytes"},{"internalType":"enum SignatureKind","name":"askSignatureKind","type":"uint8"}],"name":"fillOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20","name":"currencyAddress","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"contract IERC721","name":"tokenAddress","type":"address"},{"internalType":"bytes32[]","name":"requiredRoyalties","type":"bytes32[]"}],"internalType":"struct OrderAgreement","name":"agreement","type":"tuple"},{"components":[{"internalType":"bytes32","name":"agreementHash","type":"bytes32"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint40","name":"deadline","type":"uint40"},{"internalType":"bytes32[]","name":"extraRoyalties","type":"bytes32[]"},{"internalType":"bytes","name":"trait","type":"bytes"},{"internalType":"contract ITraitOracle","name":"traitOracle","type":"address"}],"internalType":"struct Bid","name":"bid","type":"tuple"},{"internalType":"bytes","name":"bidSignature","type":"bytes"},{"internalType":"enum SignatureKind","name":"bidSignatureKind","type":"uint8"},{"components":[{"internalType":"bytes32","name":"agreementHash","type":"bytes32"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint40","name":"deadline","type":"uint40"},{"internalType":"bytes32[]","name":"extraRoyalties","type":"bytes32[]"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"unwrapWeth","type":"bool"},{"internalType":"address","name":"authorizedBidder","type":"address"}],"internalType":"struct Ask","name":"ask","type":"tuple"},{"internalType":"bytes","name":"askSignature","type":"bytes"},{"internalType":"enum SignatureKind","name":"askSignatureKind","type":"uint8"}],"name":"fillOrderEth","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"nonceCancelled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"onChainApproval","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20","name":"currencyAddress","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"contract IERC721","name":"tokenAddress","type":"address"},{"internalType":"bytes32[]","name":"requiredRoyalties","type":"bytes32[]"}],"internalType":"struct OrderAgreement","name":"agreement","type":"tuple"}],"name":"orderAgreementHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newRoyaltyAddress","type":"address"}],"name":"setArchipelagoRoyaltyAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newRoyaltyMicros","type":"uint256"}],"name":"setArchipelagoRoyaltyMicros","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"isShutdown","type":"bool"}],"name":"setEmergencyShutdown","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"agreementHash","type":"bytes32"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint40","name":"deadline","type":"uint40"},{"internalType":"bytes32[]","name":"extraRoyalties","type":"bytes32[]"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"unwrapWeth","type":"bool"},{"internalType":"address","name":"authorizedBidder","type":"address"}],"internalType":"struct Ask","name":"ask","type":"tuple"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setOnChainAskApproval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"agreementHash","type":"bytes32"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint40","name":"deadline","type":"uint40"},{"internalType":"bytes32[]","name":"extraRoyalties","type":"bytes32[]"},{"internalType":"bytes","name":"trait","type":"bytes"},{"internalType":"contract ITraitOracle","name":"traitOracle","type":"address"}],"internalType":"struct Bid","name":"bid","type":"tuple"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setOnChainBidApproval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

Deployed Bytecode

0x6080604052600436106101485760003560e01c80638da5cb5b116100c0578063e9ef5d8b11610074578063f6e5e81711610059578063f6e5e817146103c5578063f9b17d9a146103e5578063fd1711e51461040557600080fd5b8063e9ef5d8b14610385578063f2fde38b146103a557600080fd5b8063967acdac116100a5578063967acdac1461031d5780639fb28faf1461034f578063bd3686821461036f57600080fd5b80638da5cb5b146102be5780638de1132d1461030a57600080fd5b80635f56dfd311610117578063715018a6116100fc578063715018a6146102695780637e7ee88b1461027e578063828878041461029e57600080fd5b80635f56dfd31461021b5780636872a84d1461024957600080fd5b806314c6440214610154578063268171b8146101765780633403c2fc146101c657806356ed83d5146101e057600080fd5b3661014f57005b600080fd5b34801561016057600080fd5b5061017461016f366004612dab565b610425565b005b34801561018257600080fd5b506101b1610191366004612df5565b600260209081526000928352604080842090915290825290205460ff1681565b60405190151581526020015b60405180910390f35b3480156101d257600080fd5b506003546101b19060ff1681565b3480156101ec57600080fd5b506101b16101fb366004612df5565b600160209081526000928352604080842090915290825290205460ff1681565b34801561022757600080fd5b5061023b6102363660046130e5565b6104dc565b6040519081526020016101bd565b34801561025557600080fd5b5061023b6102643660046131b3565b6104ed565b34801561027557600080fd5b506101746104f8565b34801561028a57600080fd5b5061023b610299366004613283565b610585565b3480156102aa57600080fd5b506101746102b93660046132c7565b610590565b3480156102ca57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101bd565b6101746103183660046132c7565b6105be565b34801561032957600080fd5b506003546102e590610100900473ffffffffffffffffffffffffffffffffffffffff1681565b34801561035b57600080fd5b5061017461036a3660046133ba565b610814565b34801561037b57600080fd5b5061023b60045481565b34801561039157600080fd5b506101746103a036600461342f565b6108c4565b3480156103b157600080fd5b506101746103c036600461342f565b610991565b3480156103d157600080fd5b506101746103e036600461344c565b610ac1565b3480156103f157600080fd5b5061017461040036600461349e565b610b54565b34801561041157600080fd5b506101746104203660046134b7565b610c6c565b60005473ffffffffffffffffffffffffffffffffffffffff1633146104ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b60006104e782610cf2565b92915050565b60006104e782610dba565b60005473ffffffffffffffffffffffffffffffffffffffff163314610579576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a2565b6105836000610e6f565b565b60006104e782610ee4565b6000806105a289898989898989610f68565b915091506105b389898488856110ea565b505050505050505050565b6000806105d089898989898989610f68565b90925090503373ffffffffffffffffffffffffffffffffffffffff83161461067a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4d61726b65743a206f6e6c7920626964646572206d61792066696c6c2077697460448201527f682045544800000000000000000000000000000000000000000000000000000060648201526084016104a2565b6000896000015190508073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156106cb57600080fd5b505af11580156106df573d6000803e3d6000fd5b50506040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87811660048301523460248301528516935063a9059cbb92506044019050602060405180830381600087803b15801561075457600080fd5b505af1158015610768573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061078c91906134ed565b6040518060400160405280601781526020017f4d61726b65743a207472616e73666572206661696c6564000000000000000000815250906107fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a29190613575565b506108088a8a8589866110ea565b50505050505050505050565b60005b818110156108bf57600083838381811061083357610833613588565b336000818152600160208181526040808420958202979097013580845294905285822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169091179055935191945084939092507f35d8fd1186a8d5a470d6c39bac424b9b7e3b2bbfe1fd771fbefe09f98596350591a350806108b7816135e6565b915050610817565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610945576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a2565b6003805473ffffffffffffffffffffffffffffffffffffffff909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a2565b73ffffffffffffffffffffffffffffffffffffffff8116610ab5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104a2565b610abe81610e6f565b50565b6000610acc83610dba565b3360008181526002602090815260408083208584529091529081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168615151790555191925082917f6f3de911b0f99f640ea02152b40d904d2c9913b2a056c48f8ca6fed7a83183a090610b47908690889061365a565b60405180910390a3505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610bd5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a2565b611388811115610c67576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4d61726b65743a2070726f746f636f6c20726f79616c747920746f6f2068696760448201527f680000000000000000000000000000000000000000000000000000000000000060648201526084016104a2565b600455565b6000610c7783610cf2565b3360008181526002602090815260408083208584529091529081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168615151790555191925082917f214a170e73e2a383db493e7149b4d064fa17ab5bd300a2e57dcc011d3e6ef02390610b4790869088906136e8565b60007f31f9468f5d1e7eb4237db6d4f45aa4ca2c44fd2c8cbc5f1cd4c2178ed1922c9f826000015183602001518460400151610d318660600151612112565b6080870151805160209182012060a0890151604051610d9d989796959493019687526020870195909552604086019390935264ffffffffff919091166060850152608084015260a083015273ffffffffffffffffffffffffffffffffffffffff1660c082015260e00190565b604051602081830303815290604052805190602001209050919050565b60007f391e27022501bf610123a796e8a213ce549369b3bc887d452f524d17ca711c0f826000015183602001518460400151610df98660600151612112565b86608001518760a001518860c00151604051602001610d9d9897969594939291909788526020880196909652604087019490945264ffffffffff929092166060860152608085015260a0840152151560c083015273ffffffffffffffffffffffffffffffffffffffff1660e08201526101000190565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60007f91ae5aeaa8c54e77d27efff9c5621ce1113d43c961e101869142bddaa8596546826000015183602001518460400151610f238660600151612112565b60408051602081019690965273ffffffffffffffffffffffffffffffffffffffff948516908601526060850192909252909116608083015260a082015260c001610d9d565b6000806000610f768a610ee4565b9050808960000151146040518060600160405280603c8152602001613a3d603c913990610fd0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a29190613575565b50808660000151146040518060600160405280603c8152602001613a3d603c913990611029576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a29190613575565b5060006110ae604080517f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86660208201527ffac22429634c4b83835d76f0b27b35ad0d97c5dfbdffb309216cd7e62efe2e9b9181019190915246606082015230608082015260009060a00160405160208183030381529060405280519060200120905090565b90506110c4816110bd8c610cf2565b8b8b612125565b93506110da816110d389610dba565b8888612125565b9250505097509795505050505050565b60035460ff1615611157576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4d61726b65743a207368757420646f776e00000000000000000000000000000060448201526064016104a2565b604085015160208601518651608085015160c086015173ffffffffffffffffffffffffffffffffffffffff1615806111be57508673ffffffffffffffffffffffffffffffffffffffff168660c0015173ffffffffffffffffffffffffffffffffffffffff16145b611224576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4d61726b65743a20626964646572206973206e6f7420617574686f72697a656460448201526064016104a2565b876040015164ffffffffff16421115604051806060016040528060228152602001613a1b6022913990611284576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a29190613575565b50856040015164ffffffffff16421115604051806060016040528060228152602001613a1b60229139906112e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a29190613575565b5073ffffffffffffffffffffffffffffffffffffffff871660009081526001602090815260408083208b830151845282529182902054825160608101909352602280845260ff909116159291613a1b9083013990611370576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a29190613575565b5073ffffffffffffffffffffffffffffffffffffffff8516600090815260016020908152604080832089830151845282529182902054825160608101909352602280845260ff909116159291613a1b90830139906113fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a29190613575565b5073ffffffffffffffffffffffffffffffffffffffff80881660008181526001602081815260408084208e83018051865290835281852080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff009081168617909155968c1685528383528185208d84015186529092528084208054909616909217909455925192517f35d8fd1186a8d5a470d6c39bac424b9b7e3b2bbfe1fd771fbefe09f9859635059190a3602086015160405173ffffffffffffffffffffffffffffffffffffffff8716907f35d8fd1186a8d5a470d6c39bac424b9b7e3b2bbfe1fd771fbefe09f98596350590600090a3602088810151878201516040805173ffffffffffffffffffffffffffffffffffffffff8c8116828701528183019490945289841660608201526080808201939093528151808203909301835260a090810190915281519190930120918a015185918291166115d65760008b608001516115659061379b565b90508481146115d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4d61726b65743a20746f6b656e204944206d69736d617463680000000000000060448201526064016104a2565b506116eb565b60a08b015160808c01516040517f94d487b700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909216916394d487b791611635918b9189916004016137e0565b60206040518083038186803b15801561164d57600080fd5b505afa158015611661573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061168591906134ed565b6116eb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4d61726b65743a206d697373696e67207472616974000000000000000000000060448201526064016104a2565b60005b8c6060015151811015611746576117288d60600151828151811061171457611714613588565b60200260200101518c8b8a888b8e8c612255565b611732908461381e565b92508061173e816135e6565b9150506116ee565b5060005b89606001515181101561178e576117708a60600151828151811061171457611714613588565b61177a908461381e565b925080611786816135e6565b91505061174a565b50600354610100900473ffffffffffffffffffffffffffffffffffffffff1615611973576000620f4240876004546117c69190613835565b6117d09190613872565b90506117dc818461381e565b6003546040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8e8116600483015261010090920482166024820152604481018490529194508716906323b872dd90606401602060405180830381600087803b15801561185f57600080fd5b505af1158015611873573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061189791906134ed565b6040518060400160405280601781526020017f4d61726b65743a207472616e73666572206661696c656400000000000000000081525090611905576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a29190613575565b50600354600454604080519182526020820184905273ffffffffffffffffffffffffffffffffffffffff898116838301529051610100909304811692908c169187917ff524c74bf2303c29e6511dc690bf20aa7408a9c6428d5678eb931b28bc3b0a089181900360600190a4505b60005b8b60600151518110156119ce576119b08c60600151828151811061199c5761199c613588565b60200260200101518c8d8a888b8e8c612255565b6119ba90836138ad565b9150806119c6816135e6565b915050611976565b506040517f6352211e00000000000000000000000000000000000000000000000000000000815260048101859052600090819073ffffffffffffffffffffffffffffffffffffffff8a1690636352211e9060240160206040518083038186803b158015611a3a57600080fd5b505afa158015611a4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a7291906138c5565b90508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611ab15760019150611c2a565b6040517f081812fc0000000000000000000000000000000000000000000000000000000081526004810187905273ffffffffffffffffffffffffffffffffffffffff808c1691908b169063081812fc9060240160206040518083038186803b158015611b1c57600080fd5b505afa158015611b30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5491906138c5565b73ffffffffffffffffffffffffffffffffffffffff161415611b795760019150611c2a565b6040517fe985e9c500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301528b811660248301528a169063e985e9c59060440160206040518083038186803b158015611be857600080fd5b505afa158015611bfc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c2091906134ed565b15611c2a57600191505b81611cb7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4d61726b65743a2061736b6572206973206e6f74206f776e6572206f7220617060448201527f70726f766564000000000000000000000000000000000000000000000000000060648201526084016104a2565b6040517f42842e0e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301528d81166024830152604482018890528a16906342842e0e90606401600060405180830381600087803b158015611d2f57600080fd5b505af1158015611d43573d6000803e3d6000fd5b505050508a60a0015115611f37576040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8d81166004830152306024830152604482018690528816906323b872dd90606401602060405180830381600087803b158015611dc757600080fd5b505af1158015611ddb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dff91906134ed565b6040518060400160405280601781526020017f4d61726b65743a207472616e73666572206661696c656400000000000000000081525090611e6d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a29190613575565b506040517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810185905273ffffffffffffffffffffffffffffffffffffffff881690632e1a7d4d90602401600060405180830381600087803b158015611ed657600080fd5b505af1158015611eea573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff8d16925086156108fc02915086906000818181858888f19350505050158015611f31573d6000803e3d6000fd5b50612057565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8d811660048301528b81166024830152604482018690528816906323b872dd90606401602060405180830381600087803b158015611faf57600080fd5b505af1158015611fc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe791906134ed565b6040518060400160405280601781526020017f4d61726b65743a207472616e73666572206661696c656400000000000000000081525090612055576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a29190613575565b505b604080518981526020810186905280820185905273ffffffffffffffffffffffffffffffffffffffff898116606083015291518c8316928f169188917f446ea7816fd82a3e830f82ef187f55d7718a739e8ecfcd33e456f69cfa164cb59181900360800190a4858973ffffffffffffffffffffffffffffffffffffffff16867f1db01bf65e5b6e3e603931112bbd1714e830813bdcf0b6ebf7b5dcf44542ca3160405160405180910390a45050505050505050505050505050565b600081604051602001610d9d91906138e2565b60008082600281111561213a5761213a613918565b146121525761214b85858585612281565b905061224d565b60008380602001905181019061216891906138c5565b905073ffffffffffffffffffffffffffffffffffffffff81163314806121be575073ffffffffffffffffffffffffffffffffffffffff8116600090815260026020908152604080832088845290915290205460ff165b61224a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4d61726b65743a206f6e2d636861696e20617070726f76616c206d697373696e60448201527f670000000000000000000000000000000000000000000000000000000000000060648201526084016104a2565b90505b949350505050565b6000806122638a85856123e6565b9050612273818a8a8a8a8a6126c0565b9a9950505050505050505050565b600080600183600281111561229857612298613918565b14156122d85760408051602081018890529081018690526122d19060600160405160208183030381529060405280519060200120612905565b90506123d2565b60028360028111156122ec576122ec613918565b141561234b57604080517f190100000000000000000000000000000000000000000000000000000000000060208083019190915260228201899052604280830189905283518084039091018152606290920190925280519101206122d1565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f5369676e6174757265436865636b65723a206e6f207369676e6174757265206760448201527f6976656e0000000000000000000000000000000000000000000000000000000060648201526084016104a2565b6123dc8185612940565b9695505050505050565b606083811c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffff85166380000000808716158015906124d557604080516001808252818301909252600091816020015b6040805180820190915260008082526020820152815260200190600190039081612435579050509050838160008151811061247257612472613588565b60200260200101516020019063ffffffff16908163ffffffff168152505084816000815181106124a4576124a4613588565b602090810291909101015173ffffffffffffffffffffffffffffffffffffffff909116905294506126b99350505050565b6040517fec10efb200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301526024820188905263ffffffff8516604483015260208a901c67ffffffffffffffff811660648401529160009187169063ec10efb29060840160006040518083038186803b15801561256857600080fd5b505afa15801561257c573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526125c29190810190613947565b90506000805b8251811015612614578281815181106125e3576125e3613588565b60200260200101516020015163ffffffff168261260091906138ad565b91508061260c816135e6565b9150506125c8565b508563ffffffff168111156126ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f4d61726b65743a206f7261636c6520776f756c64206f7665727370656e64207260448201527f6f79616c747920616c6c6f746d656e740000000000000000000000000000000060648201526084016104a2565b5095506126b9945050505050565b9392505050565b60008060005b88518110156128f95760008982815181106126e3576126e3613588565b602002602001015190506000620f424088836020015163ffffffff166127099190613835565b6127139190613872565b905061271f81856138ad565b82516040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8d811660048301529182166024820152604481018490529195508716906323b872dd90606401602060405180830381600087803b15801561279c57600080fd5b505af11580156127b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127d491906134ed565b6040518060400160405280601781526020017f4d61726b65743a207472616e73666572206661696c656400000000000000000081525090612842576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a29190613575565b50816000015173ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff16887ff524c74bf2303c29e6511dc690bf20aa7408a9c6428d5678eb931b28bc3b0a088560200151858b6040516128dc9392919063ffffffff939093168352602083019190915273ffffffffffffffffffffffffffffffffffffffff16604082015260600190565b60405180910390a4505080806128f1906135e6565b9150506126c6565b50979650505050505050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01610d9d565b600080600061294f8585612964565b9150915061295c816129d4565b509392505050565b60008082516041141561299b5760208301516040840151606085015160001a61298f87828585612c2d565b945094505050506129cd565b8251604014156129c557602083015160408401516129ba868383612d45565b9350935050506129cd565b506000905060025b9250929050565b60008160048111156129e8576129e8613918565b14156129f15750565b6001816004811115612a0557612a05613918565b1415612a6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104a2565b6002816004811115612a8157612a81613918565b1415612ae9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104a2565b6003816004811115612afd57612afd613918565b1415612b8b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104a2565b6004816004811115612b9f57612b9f613918565b1415610abe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104a2565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612c645750600090506003612d3c565b8460ff16601b14158015612c7c57508460ff16601c14155b15612c8d5750600090506004612d3c565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612ce1573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116612d3557600060019250925050612d3c565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b01612d7f87828885612c2d565b935093505050935093915050565b8015158114610abe57600080fd5b8035612da681612d8d565b919050565b600060208284031215612dbd57600080fd5b81356126b981612d8d565b73ffffffffffffffffffffffffffffffffffffffff81168114610abe57600080fd5b8035612da681612dc8565b60008060408385031215612e0857600080fd5b8235612e1381612dc8565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160c0810167ffffffffffffffff81118282101715612e7357612e73612e21565b60405290565b60405160e0810167ffffffffffffffff81118282101715612e7357612e73612e21565b6040805190810167ffffffffffffffff81118282101715612e7357612e73612e21565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715612f0657612f06612e21565b604052919050565b803564ffffffffff81168114612da657600080fd5b600067ffffffffffffffff821115612f3d57612f3d612e21565b5060051b60200190565b600082601f830112612f5857600080fd5b81356020612f6d612f6883612f23565b612ebf565b82815260059290921b84018101918181019086841115612f8c57600080fd5b8286015b84811015612fa75780358352918301918301612f90565b509695505050505050565b600082601f830112612fc357600080fd5b813567ffffffffffffffff811115612fdd57612fdd612e21565b61300e60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601612ebf565b81815284602083860101111561302357600080fd5b816020850160208301376000918101602001919091529392505050565b600060c0828403121561305257600080fd5b61305a612e50565b9050813581526020820135602082015261307660408301612f0e565b6040820152606082013567ffffffffffffffff8082111561309657600080fd5b6130a285838601612f47565b606084015260808401359150808211156130bb57600080fd5b506130c884828501612fb2565b6080830152506130da60a08301612dea565b60a082015292915050565b6000602082840312156130f757600080fd5b813567ffffffffffffffff81111561310e57600080fd5b61224d84828501613040565b600060e0828403121561312c57600080fd5b613134612e79565b9050813581526020820135602082015261315060408301612f0e565b6040820152606082013567ffffffffffffffff81111561316f57600080fd5b61317b84828501612f47565b6060830152506080820135608082015261319760a08301612d9b565b60a08201526131a860c08301612dea565b60c082015292915050565b6000602082840312156131c557600080fd5b813567ffffffffffffffff8111156131dc57600080fd5b61224d8482850161311a565b6000608082840312156131fa57600080fd5b6040516080810167ffffffffffffffff828210818311171561321e5761321e612e21565b816040528293508435915061323282612dc8565b818352602085013560208401526040850135915061324f82612dc8565b816040840152606085013591508082111561326957600080fd5b5061327685828601612f47565b6060830152505092915050565b60006020828403121561329557600080fd5b813567ffffffffffffffff8111156132ac57600080fd5b61224d848285016131e8565b803560038110612da657600080fd5b600080600080600080600060e0888a0312156132e257600080fd5b873567ffffffffffffffff808211156132fa57600080fd5b6133068b838c016131e8565b985060208a013591508082111561331c57600080fd5b6133288b838c01613040565b975060408a013591508082111561333e57600080fd5b61334a8b838c01612fb2565b965061335860608b016132b8565b955060808a013591508082111561336e57600080fd5b61337a8b838c0161311a565b945060a08a013591508082111561339057600080fd5b5061339d8a828b01612fb2565b9250506133ac60c089016132b8565b905092959891949750929550565b600080602083850312156133cd57600080fd5b823567ffffffffffffffff808211156133e557600080fd5b818501915085601f8301126133f957600080fd5b81358181111561340857600080fd5b8660208260051b850101111561341d57600080fd5b60209290920196919550909350505050565b60006020828403121561344157600080fd5b81356126b981612dc8565b6000806040838503121561345f57600080fd5b823567ffffffffffffffff81111561347657600080fd5b6134828582860161311a565b925050602083013561349381612d8d565b809150509250929050565b6000602082840312156134b057600080fd5b5035919050565b600080604083850312156134ca57600080fd5b823567ffffffffffffffff8111156134e157600080fd5b61348285828601613040565b6000602082840312156134ff57600080fd5b81516126b981612d8d565b6000815180845260005b8181101561353057602081850181015186830182015201613514565b81811115613542576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006126b9602083018461350a565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613618576136186135b7565b5060010190565b600081518084526020808501945080840160005b8381101561364f57815187529582019590820190600101613633565b509495945050505050565b821515815260406020820152815160408201526020820151606082015264ffffffffff60408301511660808201526000606083015160e060a08401526136a461012084018261361f565b9050608084015160c084015260a0840151151560e084015273ffffffffffffffffffffffffffffffffffffffff60c085015116610100840152809150509392505050565b821515815260406020820152815160408201526020820151606082015264ffffffffff60408301511660808201526000606083015160c060a084015261373261010084018261361f565b905060808401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08483030160c085015261376d828261350a565b91505073ffffffffffffffffffffffffffffffffffffffff60a08501511660e0840152809150509392505050565b805160208083015191908110156137da577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8160200360031b1b821691505b50919050565b73ffffffffffffffffffffffffffffffffffffffff84168152826020820152606060408201526000613815606083018461350a565b95945050505050565b600082821015613830576138306135b7565b500390565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561386d5761386d6135b7565b500290565b6000826138a8577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600082198211156138c0576138c06135b7565b500190565b6000602082840312156138d757600080fd5b81516126b981612dc8565b815160009082906020808601845b8381101561390c578151855293820193908201906001016138f0565b50929695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000602080838503121561395a57600080fd5b825167ffffffffffffffff81111561397157600080fd5b8301601f8101851361398257600080fd5b8051613990612f6882612f23565b81815260069190911b820183019083810190878311156139af57600080fd5b928401925b82841015613a0f57604084890312156139cd5760008081fd5b6139d5612e9c565b84516139e081612dc8565b81528486015163ffffffff811681146139f95760008081fd5b81870152825260409390930192908401906139b4565b97965050505050505056fe4d61726b65743a206f726465722063616e63656c6c6564206f7220657870697265644d61726b65743a206269642f61736b2061677265656d656e74206861736820646f65736e2774206d61746368206f726465722061677265656d656e74a26469706673582212209730f760521ea66edca5333e3d2baa5e805825f4180d7ce1e145df48e5b8fa9d64736f6c63430008090033

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.