ETH Price: $3,285.63 (+1.21%)
Gas: 2 Gwei

Contract

0x93425B5a58d1dD17C6BF5DBe4944039CD2656241
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Cancel Auction200099102024-06-03 7:49:1155 days ago1717400951IN
0x93425B5a...CD2656241
0 ETH0.000836288.87128977
Finalize198990982024-05-18 20:05:3571 days ago1716062735IN
0x93425B5a...CD2656241
0 ETH0.000395483.17107653
First Bid198910682024-05-17 17:05:3572 days ago1715965535IN
0x93425B5a...CD2656241
0.55 ETH0.00051397.38123571
Cancel Auction194103332024-03-11 7:22:23139 days ago1710141743IN
0x93425B5a...CD2656241
0 ETH0.0031636650.26152318
Cancel Auction190612912024-01-22 9:09:11188 days ago1705914551IN
0x93425B5a...CD2656241
0 ETH0.0008515213.52825061
Finalize188689802023-12-26 9:29:11215 days ago1703582951IN
0x93425B5a...CD2656241
0 ETH0.0021138815.37950852
First Bid188617542023-12-25 9:07:11216 days ago1703495231IN
0x93425B5a...CD2656241
2 ETH0.0011227415.5026679
Finalize188041852023-12-17 7:11:59224 days ago1702797119IN
0x93425B5a...CD2656241
0 ETH0.0035406328.1575076
First Bid187792472023-12-13 19:12:23228 days ago1702494743IN
0x93425B5a...CD2656241
0.15 ETH0.0041054158.96638049
Cancel Auction187698902023-12-12 11:45:23229 days ago1702381523IN
0x93425B5a...CD2656241
0 ETH0.001452423.07452682
Cancel Auction187297812023-12-06 20:54:11235 days ago1701896051IN
0x93425B5a...CD2656241
0 ETH0.0049086860.91008045
Cancel Auction185591852023-11-12 23:43:23259 days ago1699832603IN
0x93425B5a...CD2656241
0 ETH0.0020006731.78501587
Cancel Auction183839152023-10-19 10:55:11283 days ago1697712911IN
0x93425B5a...CD2656241
0 ETH0.00065196.79120808
Cancel Auction183622752023-10-16 10:15:47286 days ago1697451347IN
0x93425B5a...CD2656241
0 ETH0.000381176.05581256
Cancel Auction183399012023-10-13 7:12:11289 days ago1697181131IN
0x93425B5a...CD2656241
0 ETH0.000373465.93323526
Finalize182845262023-10-05 13:11:47297 days ago1696511507IN
0x93425B5a...CD2656241
0 ETH0.001253159.96588871
First Bid182737432023-10-04 1:01:47298 days ago1696381307IN
0x93425B5a...CD2656241
1.5 ETH0.000596628.56938763
Cancel Auction182484902023-09-30 12:21:47302 days ago1696076507IN
0x93425B5a...CD2656241
0 ETH0.00050847.29795447
Cancel Auction182219612023-09-26 19:14:11306 days ago1695755651IN
0x93425B5a...CD2656241
0 ETH0.0012687120.15630301
Cancel Auction182013162023-09-23 21:52:23309 days ago1695505943IN
0x93425B5a...CD2656241
0 ETH0.000457837.27371985
Cancel Auction181973512023-09-23 8:32:59309 days ago1695457979IN
0x93425B5a...CD2656241
0 ETH0.000441687.01707394
Finalize181451972023-09-16 0:36:11316 days ago1694824571IN
0x93425B5a...CD2656241
0 ETH0.001210569.62719608
First Bid181379352023-09-15 0:01:23318 days ago1694736083IN
0x93425B5a...CD2656241
0.2 ETH0.0008068711.58925964
Cancel Auction180907702023-09-08 9:21:23324 days ago1694164883IN
0x93425B5a...CD2656241
0 ETH0.0010304616.37118635
Cancel Auction180580072023-09-03 19:19:35329 days ago1693768775IN
0x93425B5a...CD2656241
0 ETH0.0011414812.40357379
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
198990982024-05-18 20:05:3571 days ago1716062735
0x93425B5a...CD2656241
0.5225 ETH
198990982024-05-18 20:05:3571 days ago1716062735
0x93425B5a...CD2656241
0.0275 ETH
188689802023-12-26 9:29:11215 days ago1703582951
0x93425B5a...CD2656241
0.3 ETH
188689802023-12-26 9:29:11215 days ago1703582951
0x93425B5a...CD2656241
1.6 ETH
188689802023-12-26 9:29:11215 days ago1703582951
0x93425B5a...CD2656241
0.1 ETH
188041852023-12-17 7:11:59224 days ago1702797119
0x93425B5a...CD2656241
0.1425 ETH
188041852023-12-17 7:11:59224 days ago1702797119
0x93425B5a...CD2656241
0.0075 ETH
182845262023-10-05 13:11:47297 days ago1696511507
0x93425B5a...CD2656241
1.425 ETH
182845262023-10-05 13:11:47297 days ago1696511507
0x93425B5a...CD2656241
0.075 ETH
181451972023-09-16 0:36:11316 days ago1694824571
0x93425B5a...CD2656241
0.19 ETH
181451972023-09-16 0:36:11316 days ago1694824571
0x93425B5a...CD2656241
0.01 ETH
179440182023-08-18 20:20:59345 days ago1692390059
0x93425B5a...CD2656241
0.95 ETH
179440182023-08-18 20:20:59345 days ago1692390059
0x93425B5a...CD2656241
0.05 ETH
179439702023-08-18 20:11:23345 days ago1692389483
0x93425B5a...CD2656241
0.38 ETH
179439702023-08-18 20:11:23345 days ago1692389483
0x93425B5a...CD2656241
0.02 ETH
176811122023-07-13 0:43:35381 days ago1689209015
0x93425B5a...CD2656241
0.18 ETH
176811122023-07-13 0:43:35381 days ago1689209015
0x93425B5a...CD2656241
0.01 ETH
176811122023-07-13 0:43:35381 days ago1689209015
0x93425B5a...CD2656241
0.01 ETH
176358032023-07-06 15:50:59388 days ago1688658659
0x93425B5a...CD2656241
0.475 ETH
176358032023-07-06 15:50:59388 days ago1688658659
0x93425B5a...CD2656241
0.025 ETH
176323332023-07-06 4:07:47388 days ago1688616467
0x93425B5a...CD2656241
0.075 ETH
176323332023-07-06 4:07:47388 days ago1688616467
0x93425B5a...CD2656241
0.4 ETH
176323332023-07-06 4:07:47388 days ago1688616467
0x93425B5a...CD2656241
0.025 ETH
176305422023-07-05 22:05:59389 days ago1688594759
0x93425B5a...CD2656241
0.2535 ETH
176305422023-07-05 22:05:59389 days ago1688594759
0x93425B5a...CD2656241
1.352 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
NinfaEnglishAuction

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 15 : NinfaEnglishAuction.sol
/*----------------------------------------------------------*|
|*          ███    ██ ██ ███    ██ ███████  █████           *|
|*          ████   ██ ██ ████   ██ ██      ██   ██          *|
|*          ██ ██  ██ ██ ██ ██  ██ █████   ███████          *|
|*          ██  ██ ██ ██ ██  ██ ██ ██      ██   ██          *|
|*          ██   ████ ██ ██   ████ ██      ██   ██          *|
|*----------------------------------------------------------*/

// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import "./utils/Counters.sol";
import "./utils/RoyaltyEngineV1.sol";
import "./access/Ownable.sol";

/*************************************************************
 * @title NinfaEnglishAuction                                *
 *                                                           *
 * @notice On-chain english auction                          *
 *                                                           *
 * @custom:security-contact [email protected]                    *
 ************************************************************/

contract NinfaEnglishAuction is Ownable, RoyaltyEngineV1 {
    using Counters for Counters.Counter;
    Counters.Counter private _auctionId;
    /// @notice Ninfa's external registry, mapping Ninfa's ERC721 sovreign collection's tokenIds to a boolean value indicating if the token has been sold on any of Ninfa's contracts, such as this marketplace or an auction contract.
    address private immutable _PRIMARY_SALES_REGISTRY;
    /**
     * @notice auctions ids mapped to NFT auction data.
     * @dev This is deleted when an auction is finalized or canceled.
     * @dev Visibility needs to be public so that it can be called by a frontend as the auction creation event only emits auction id.
     */
    mapping(uint256 => _Auction) public auctions;
    /// @notice collections MUST be manually whitelisted by Ninfa's admin or multisig account, in order to be traded on Ninfa marketplace
    mapping(address => bool) private _isWhitelisted;
    /// @notice whitelist of address codehashes of Ninfa's sovreign ERC721 collections, in order to determine if it is a primary market sale
    mapping(bytes32 => bool) private _isERC721Sovreign;
    /**
     * @notice _feeRecipient multisig for receiving trading fees
     */
    address payable private _feeRecipient;
    /// @notice factory contract for deploying self-sovreign collections.
    address private _factory;
    /**
     * @notice How long an auction lasts for once the first bid has been received.
     */
    uint256 private constant _DURATION = 1 days;
    /**
     * @notice The window for auction extensions, any bid placed in the final 15 minutes of an auction will reset the time remaining to 15 minutes.
     */
    uint256 private constant _EXTENSION_DURATION = 15 minutes;
    /**
     * @notice the last highest bid is divided by this number in order to obtain the minimum bid increment. E.g. _MIN_BID_RAISE = 10 is 10% increment, 20 is 5%, 2 is 50%. I.e. 100 / _MIN_BID_RAISE. OpenSea uses a fixed 5% increment while SuperRare between 5-10%
     */
    uint256 private constant _MIN_BID_RAISE = 20;
    /**
     * @notice 5% fee on all secondary sales paid to Ninfa (seller receives the remainder after paying 10% royalties to artist/gallery and 5% Ninfa, i.e. 85%)
     */
    uint256 private constant _MARKETPLACE_FEE = 500;
    /// @notice Ninfa Marketplace fee percentage on primary sales, expressed in basis points
    uint256 private _primaryMarketFee;
    /// @notice Ninfa Marketplace fee percentage on all secondary sales, expressed in basis points
    uint256 private _secondaryMarketFee;

    /**
     * @notice Stores the auction configuration for a specific NFT.
     * @param operator since the order creator may be a gallery, i.e. the commission receiver itself, they would not be able to cancel or update the order as there would be no way to know if the order creator was the seller or the commissionReceiver,
     * @dev therefore an additional parameter is needed to store the address of `msg.sender`
     * @param end the time at which this auction will not accept any new bids. This is `0` until the first bid is placed.
     * @param bidder highest bidder, needs to be payable in order to receive refund in case of being outbid
     * @param price reserve price, highest bid, and all bids in between
     * @param erc1155Amount 0 for erc721, 1> for erc1155
     */
    struct _Auction {
        address operator;
        address seller;
        address collection;
        address bidder;
        address commissionReceiver;
        uint256 commissionBps;
        uint256 tokenId;
        uint256 bidPrice;
        uint256 end;
    }

    /**
     * @notice Emitted when an NFT is listed for auction.
     * @param auctionId The id of the auction that was created.
     * @dev the only parameter needed is auctionId, the emitted event must trigger the backend to retrieve all auction data from a getter function and store it in DB.
     */
    event AuctionCreated(uint256 auctionId);

    /**
     * @notice Emitted when an auction is cancelled.
     * @dev This is only possible if the auction has not received any bids.
     * @param auctionId The id of the auction that was cancelled.
     */
    event AuctionCanceled(uint256 auctionId);

    /**
     * @notice Emitted when the auction's reserve price is updated.
     * @dev This is only possible if the auction has not received any bids.
     * @param auctionId The id of the auction that was updated.
     */
    event AuctionUpdated(uint256 auctionId);

    /**
     * @notice Emitted when an auction that has already ended is finalized,
     * indicating that the NFT has been transferred and revenue from the sale distributed.
     */
    event AuctionFinalized(uint256 auctionId);

    /**
     * @notice Emitted when a bid is placed.
     * @param auctionId The id of the auction this bid was for.
     */
    event Bid(uint256 auctionId);

    /**
     * @notice ERC721 and ERC1155 collections must be whitelisted.
     * @dev if the collection has not been whitelisted, check if it is one of Ninfa's factory clones (Ninfa's self-sovreign collections)
     * @dev by checking the whitelist first with nested `if`s avoids having to make an external call unnecessarily
     */
    modifier isWhitelisted(address _collection) {
        if (_isWhitelisted[_collection] == false) {
            (, bytes memory authorized) = _factory.staticcall(
                abi.encodeWithSelector(0xf6a3d24e, _collection) // function selector: 0xf6a3d24e or bytes4(keccak256("exists(address)"));
            );
            if (abi.decode(authorized, (bool)) == false) revert Unauthorized();
        }
        _;
    }

    /**
     * @notice Creates an auction for the given NFT. The NFT is held in escrow until the auction is finalized or canceled.
     * @param _id The id of the NFT.
     * @param _reservePrice The initial reserve price for the auction.
     * @dev reserve price may also be 0, clearly a mistake but not strictly required, only done in order to save gas by removing the need for a condition such as `if (_price == 0) revert InvalidAmount(_price)`
     * @param _commissionReceiver address of sale commissions receiver
     * @dev if `msg.sender` is also the `_commissionReceiver`, e.g. if `msg.sender` is a gallery, they must put their own address as the `_commissionReceiver`, and set the `_seller` parameter with the artist's/collector's address.
     * @dev if there is no commission receiver, it must be set to address(0)
     * @dev it is not required for `_commissionReceiver` and `_seller` addresses to be different (in order to save gas), although it would likely be a mistake, it cannot be exploited as the total amount paid out will never exceed the price set for the order. I.e. in the worst case the same address will receive both principal sale profit and commissions.
     */
    function _createAuction(
        address _operator, //  either the previous owner or operator, i.e. whichever address called safeTransferFrom on the ERC1155 contract
        address _from, // previous owner, i.e. seller
        uint256 _id,
        uint256 _reservePrice,
        uint256 _commissionBps,
        address _commissionReceiver
    ) private {
        _auctionId.increment(); // start counter at 1

        uint256 auctionId_ = _auctionId.current();

        auctions[auctionId_] = _Auction(
            _operator,
            _from, // auction beneficiary, needs to be payable in order to receive funds from the auction sale
            msg.sender,
            address(0), // bidder is only known once a bid has been placed. // highest bidder, needs to be payable in order to receive refund in case of being outbid
            _commissionReceiver,
            _commissionBps,
            _id,
            _reservePrice,
            0
        );

        emit AuctionCreated(auctionId_);
    }

    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     * @param _operator The address which called `safeTransferFrom` function
     * @param _from The address which previously owned the token
     * @param _tokenId The NFT identifier which is being transferred
     * @param _data Additional data with no specified format
     */
    function onERC721Received(
        address _operator,
        address _from,
        uint256 _tokenId,
        bytes calldata _data
    ) external returns (bytes4) {
        (
            uint256 reservePrice,
            uint256 commissionBps,
            address commissionReceiver
        ) = abi.decode(_data, (uint256, uint256, address));

        _createAuction(
            _operator,
            _from,
            _tokenId,
            reservePrice,
            commissionBps,
            commissionReceiver
        );

        return 0x150b7a02;
    }

    function _transferNFT(
        address _collection,
        address _from,
        address _to,
        uint256 _tokenId
    ) private {
        (bool success, ) = _collection.call(
            abi.encodeWithSelector(
                0x42842e0e, // bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e
                _from,
                _to,
                _tokenId
            )
        );

        require(success);
    }

    function firstBid(uint256 auctionId_) external payable {
        _Auction storage _auction = auctions[auctionId_];

        // hardcoded 0x0 address in order to avoid reading from storage.
        // there is no need to check whether the auction exists already, because even if someone managed to set end, price and bidder for a (yet) non-existing auction, they would be reser when an auction with the same id gets created
        // the important thing is that no one can reset these variables for auctions that have already started, and can't happen because _auction.bidder would be set after the first bid is placed by calling this function.
        if (
            _auction.bidder != 0x0000000000000000000000000000000000000000 || // if auction has started
            msg.value < _auction.bidPrice
        ) revert Unauthorized();

        // if the auction exists and this is the firsat bid, start the auction timer.
        // On the first bid, set the end to now + duration. `_DURATION` is a constant set to 24hrs therefore the below addition can't overflow.
        unchecked {
            _auction.end = block.timestamp + _DURATION;
            _auction.bidPrice = msg.value; // new highest bid
            _auction.bidder = msg.sender; // new highest bidder
        }

        emit Bid(auctionId_);
    }

    /**
     * @notice Place a bid in an auction.
     * A bidder may place a bid which is at least the amount defined by `getMinBidAmount`.
     * If this is the first bid on the auction, the countdown will begin.
     * If there is already an outstanding bid, the previous bidder will be refunded at this time
     * and if the bid is placed in the final moments of the auction, the countdown may be extended.
     * @dev bids MUST be at least 5% higher than previous bid.
     * @param auctionId_ The id of the auction to bid on.
     * @dev auctionId_ MUST exist, auction MUST have begun and MUST not have ended.
     */
    function bid(uint256 auctionId_) external payable {
        _Auction storage _auction = auctions[auctionId_];
        // if auction hasn't started or doesn't exist, i.e. no one has called firstBid() yet, _auction.end will still be 0,
        // therefore the following require statement implicitly checks that auction has started and explicitly that it has not ended

        if (
            block.timestamp > _auction.end ||
            _auction.end == 0 || // required otherwise calling this function would start a 15 minutes auction rather than 24h
            msg.value - _auction.bidPrice < _auction.bidPrice / _MIN_BID_RAISE
        ) revert Unauthorized();

        // if there is less than 15 minutes left, increment end time by 15 more. _EXTENSION_DURATION is always set to 15 minutes so the below can't overflow.
        // already checking in previous if statement that if `block.timestamp > _auction.end` the tx reverts, meaning that `block.timestamp` must be less than `_auction.end`, i.e. auction hasn't expired,
        // if you combine that with `block.timestamp + _EXTENSION_DURATION > _auction.end` that means that `block.timestamp` must be between `_auction.end` and `_auction.end - 15 minutes`, i.e. it's the last 15 minutes of the auction.
        if (block.timestamp + _EXTENSION_DURATION > _auction.end) {
            unchecked {
                _auction.end += _EXTENSION_DURATION;
            }
        }

        // refund the previous bidder
        _sendValue(_auction.bidder, _auction.bidPrice);

        // does not follow check-effects-interactions pattern so that storing previous bidder and amount in memory is not required, however there is no reentrancy exploit in this case;
        // calling back into `bid()` requires that `msg.value` is 5% higher than previous bid, meaning that the extra 5% would not be refunded because storage has not been updated yet
        // besides the bid() function, there is no other function that can be called back into which represents a security risk, namely `createAuction()` and `firstBid()`, i.e. _auction.bidPrice and _auction.bidder are not read by any other function that may be reentered
        _auction.bidPrice = msg.value; // new highest bid
        _auction.bidder = msg.sender; // new highest bidder

        emit Bid(auctionId_);
    }

    /**
     * @notice If an auction has been created but has not yet received bids, the `reservePrice` may be edited by the seller.
     * @param auctionId_ The id of the auction to change.
     * @param _newReservePrice The new reserve price for this auction, may be higher or lower than the previoius price.
     * @dev `_newReservePrice` may be equal to old price (`auctions[auctionId_].price`); although this doesn't make much sense it isn't a security requirement, hence `require(_auction.bidPrice != _price)` it has been omitted in order to save the user some gas
     * @dev `_newReservePrice` may also be 0, clearly a mistake but not a security requirement,  hence `require(_price > 0)` has been omitted in order to save the user some gas
     */
    function updateReservePrice(
        uint256 auctionId_,
        uint256 _newReservePrice
    ) external {
        _Auction storage _auction = auctions[auctionId_];
        // code duplication because modifiers can't pass variables to functions, meanining that storage pointer cannot be instantiated in modifier
        require(_auction.operator == msg.sender && _auction.end == 0);

        // Update the current reserve price.
        _auction.bidPrice = _newReservePrice;

        emit AuctionUpdated(auctionId_);
    }

    /**
     * @notice If an auction has been created but has not yet received bids, it may be canceled by the seller.
     * @dev The NFT is transferred back to the owner unless there is still a buy price set.
     * @param auctionId_ The id of the auction to cancel.
     */
    function cancelAuction(uint256 auctionId_) external {
        _Auction memory _auction = auctions[auctionId_];

        require(_auction.operator == msg.sender && _auction.end == 0);

        // Delete the _auction.
        delete auctions[auctionId_];

        _transferNFT(
            _auction.collection,
            address(this),
            msg.sender,
            _auction.tokenId
        );

        emit AuctionCanceled(auctionId_);
    }

    function finalize(uint256 auctionId_) external {
        _Auction memory auction = auctions[auctionId_];
        address payable[] memory royaltyRecipients; // declare `royaltyRecipients`, its value will be calculated based on whether it is a primary or secondary sale
        uint256[] memory royaltyAmounts; // declare `royaltyAmounts`, its value will be calculated based on whether it is a primary or secondary sale
        // sellerAmount is a security check as well as a variable assignment, because it would revert if there was an underflow
        // sellerAmount may be 0 if royalties are set too high for an external collection. If `royaltyAmount == (auction.bidPrice - marketplaceAmount)` then `sellerAmount == 0`. if royalties amount exceeds price - fees amount the transaction will revert.
        uint256 sellerAmount = auction.bidPrice;
        uint256 marketplaceAmount;

        // there must be at least one bid higher than the reserve price in order to execute the trade, no bids mean no end time
        if (block.timestamp < auction.end || auction.end == 0)
            revert Unauthorized();

        // Remove the auction.
        delete auctions[auctionId_];

        if (_isERC721Sovreign[auction.collection.codehash]) {
            /**
             * @dev The following code is equivalent to: `bool secondaryMarket = IERC721(auction.collection).secondaryMarketInfo(auction.tokenId);`
             * @dev checking the return value of `bool success` is not required because if the call reverts, the value of `secondaryMarket` will be `false`.
             * The call is not expected to fail as the function is a view function from a trusted contract.
             */
            (, bytes memory secondaryMarket) = _PRIMARY_SALES_REGISTRY.call(
                abi.encodeWithSelector(
                    0x7abab711,
                    auction.collection,
                    auction.tokenId
                ) // bytes4(keccak256("secondaryMarketInfo(address,uint256)")) == 0x7abab711
            );

            if (abi.decode(secondaryMarket, (bool)) == false) {
                marketplaceAmount =
                    (auction.bidPrice * _primaryMarketFee) /
                    10000;
                sellerAmount -= marketplaceAmount; // subtract before external call
                _sendValue(_feeRecipient, marketplaceAmount);
            }
        }

        if (marketplaceAmount == 0) {
            /*----------------------------------------------------------*|
             *  # IF SECONDARY MARKET                                   *|
            |*----------------------------------------------------------*/
            // if marketplaceAmount is not already set, then it is a secondary sale

            /**
             * @dev `getRoyalty()` is a getter function from a modified implementation of `RoyaltyEngineV1`, it only checks that `royaltyAmount < price`.
             * @dev arrays are returned so that their length may be checked before accessing their elements at index 0; an empty array is returned when royalties are not supported.
             *      if the collection does not support royalties, the arrays returned by `getRoyalty()` will be empty. If the collection supports royalties, the arrays will have a length of 1.
             */
            (royaltyRecipients, royaltyAmounts) = getRoyalty(
                auction.collection,
                auction.tokenId,
                auction.bidPrice
            );

            if (_secondaryMarketFee > 0) {
                /*----------------------------------------------------------*|
                |*  # PAY MARKETPLACE FEE                                   *|
                |*----------------------------------------------------------*/
                marketplaceAmount =
                    (auction.bidPrice * _secondaryMarketFee) /
                    10000;
                // subtracting primary or secondary fee amount from seller amount, this is a security check (will revert on underflow) as well as a variable assignment.
                sellerAmount -= marketplaceAmount; // subtract before external call
                _sendValue(_feeRecipient, marketplaceAmount);
            }
        }

        /*----------------------------------------------------------*|
        |*  # PAY ROYALTIES                                         *|
        |*----------------------------------------------------------*/
        // > "Marketplaces that support this standard MUST pay royalties no matter where the sale occurred or in what currency" - https://eips.ethereum.org/EIPS/eip-2981.

        /*----------------------------------------------------------*|
        |*  # IF ROYALTIES SUPPORTED                                *|
        |*----------------------------------------------------------*/
        // The collection implements some royalty standard, otherwise the length of the arrays returned would be 0.
        uint256 royaltyRecipientsLength = royaltyRecipients.length; // assign to memory variable to save gas
        if (royaltyRecipientsLength > 0) {
            if (royaltyRecipientsLength > 1) {
                for (uint256 i = 0; i < royaltyRecipientsLength; i++) {
                    // subtracting royalty amount from seller amount, this is a security check (will revert on underflow) as well as a variable assignment.
                    sellerAmount -= royaltyAmounts[i]; // subtract before external call
                    _sendValue(royaltyRecipients[i], royaltyAmounts[i]);
                }
            } else {
                /// @dev this case is only triggered if the collection supports royalties and the length of the arrays returned is 1.
                ///         There is no check such as `if (royaltyAmounts[0] > 0)` as we assume that any collection that supports royalties will return a non-zero royalty amount.
                sellerAmount -= royaltyAmounts[0]; // subtracting royalty amount from seller amount, this is a security check (will revert on underflow) as well as a variable assignment.
                _sendValue(royaltyRecipients[0], royaltyAmounts[0]);
            }
        }

        /***************************
         * Pay seller commissions *
         **************************/

        if (auction.commissionBps > 0) {
            uint256 commissionAmount = (auction.bidPrice *
                auction.commissionBps) / 10000;

            /**
             * Pay commissions, if any
             * since the seller can arbitrarily provide a value for commission shares, should the seller input a BPS/shares value that exceeds the amount they are entitled to for the sale, commissions will not be paid but instead the remaining amount (after royalties and fees) is paid to the seller.
             * this is a security check in order to avoid paying more than the actual price
             * `if` is better than `require` because should the royalties or commissions be set too high by mistake, the nft and eth may get locked in the contract forever because the entire tx would revert
             */

            sellerAmount -= commissionAmount; // sellerAmount may be 0
            /**
             * Pay commissions, if any
             */
            _sendValue(auction.commissionReceiver, commissionAmount);
        }

        /**************
         * Pay seller *
         *************/

        _sendValue(auction.seller, sellerAmount);

        // transfer nft to auction winner
        _transferNFT(
            auction.collection,
            address(this),
            auction.bidder,
            auction.tokenId
        );

        emit AuctionFinalized(auctionId_);
    }

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

    /**
     * @dev setter function only callable by contract admin used to change the address to which fees are paid
     * @param _newFeeAccount is the address owned by NINFA that will collect sales fees
     */
    function setFeeRecipient(
        address payable _newFeeAccount
    ) external onlyOwner {
        _feeRecipient = _newFeeAccount;
    }

    /**
     * @notice sets primary sale fees for NINFA_ERC721_V2 communal collection.
     */
    function setMarketFees(
        uint256 primaryMarketFee_,
        uint256 secondaryMarketFee_
    ) external onlyOwner {
        _primaryMarketFee = primaryMarketFee_;
        _secondaryMarketFee = secondaryMarketFee_;
    }

    /**
     * @notice whitelist collection to be traded on marketplace
     * @dev this function needs to be called immediately after deployment in order to set marketplace fees for NINFA_ERC721_V2 to 500bps or 5%. Required for access control by `isWhitelisted` modifier, also required in order to set secondary sales fees for NINFA_ERC721_V2 and all NinfaERC1155 to 5%.
     * @param _collection address of collection ERC721 or ERC1155
     */
    function whitelistCollection(
        address _collection,
        bool isWhitelisted_
    ) external onlyOwner {
        _isWhitelisted[_collection] = isWhitelisted_;
    }

    function setPrimaryMarketCodehash(
        address master,
        bool _isPrimaryMarket
    ) external onlyOwner {
        _isERC721Sovreign[master.codehash] = _isPrimaryMarket;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(
        bytes4 interfaceId
    ) external pure returns (bool) {
        return
            // Interface ID for IERC165
            interfaceId == 0x01ffc9a7 ||
            // Interface ID for IERC721Receiver. A wallet/broker/auction application MUST implement the wallet interface if it will accept safe transfers.
            interfaceId == 0x150b7a02;
    }

    /*----------------------------------------------------------*|
    |*  # CONSTRUCTOR                                           *|
    |*----------------------------------------------------------*/

    /**
     * @dev Grants `DEFAULT_ADMIN_ROLE`
     * @dev after deployment admin needs to manually whitelist collections.
     * @param _royaltyRegistry see https://royaltyregistry.xyz/lookup for public addresses
     */
    constructor(
        address _royaltyRegistry,
        address _primarySalesRegistry,
        address factory_
    ) RoyaltyEngineV1(_royaltyRegistry) {
        _PRIMARY_SALES_REGISTRY = _primarySalesRegistry;
        _factory = factory_;
    }
}

File 2 of 15 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.19;

/**
 * @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 3 of 15 : RoyaltyEngineV1.sol
/*----------------------------------------------------------*|
|*          ███    ██ ██ ███    ██ ███████  █████           *|
|*          ████   ██ ██ ████   ██ ██      ██   ██          *|
|*          ██ ██  ██ ██ ██ ██  ██ █████   ███████          *|
|*          ██  ██ ██ ██ ██  ██ ██ ██      ██   ██          *|
|*          ██   ████ ██ ██   ████ ██      ██   ██          *|
|*----------------------------------------------------------*/

// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import "../specs/IRoyaltyRegistry.sol";
import "../specs/IManifold.sol";
import "../specs/IRarible.sol";
import "../specs/IFoundation.sol";
import "../specs/ISuperRare.sol";
import "../specs/IEIP2981.sol";
import "../specs/IZoraOverride.sol";
import "../specs/IArtBlocksOverride.sol";
import "../specs/IKODAV2Override.sol";
import "../specs/IRoyaltySplitter.sol";

/*************************************************************
 * @title RoyaltyEngineV1                                    *
 *                                                           *
 * @notice Custom implementation of Manifold RoyaltyEngineV1 *
 *                                                           *
 * @dev > "Marketplaces may choose to directly inherit the   *
 * Royalty Engine to save a bit of gas".                     *
 *                                                           *
 * @dev ERC165 was removed because interface selector will   *
 * be different from Manifold's (0xcb23f816) and this engine *
 * implementation is not meant for used by other contracts   *
 *                                                           *
 * @author Fork of Manifold's RoyaltyRegistryV1              *
 *                                                           *
 * @custom:security-contact [email protected]                    *
 ************************************************************/

contract RoyaltyEngineV1 {
    /**
     * @dev ROYALTY_REGISTRY could be a hardcoded constant, however using an immutable variable
     * is useful for deploying the engine onto other (test) networks where its address differs from Mainnet
     */
    address internal immutable ROYALTY_REGISTRY;
    address internal constant SUPERRARE_REGISTRY =
        0x17B0C8564E53f22364A6C8de6F7ca5CE9BEa4e5D;
    address internal constant SUPERRARE_V1 =
        0x41A322b28D0fF354040e2CbC676F0320d8c8850d;
    address internal constant SUPERRARE_V2 =
        0xb932a70A57673d89f4acfFBE830E8ed7f75Fb9e0;

    error Unauthorized();
    error InvalidAmount(uint256 amount);
    error LengthMismatch(uint256 recipients, uint256 bps); // only used in RoyaltyEngineV1

    /**
     * Get the royalties for a given token and sale amount.
     *
     * @param tokenAddress - address of token
     * @param tokenId - id of token
     * @param value - sale value of token
     * Returns two arrays, first is the list of royalty recipients, second is the amounts for each recipient.
     */
    function getRoyalty(
        address tokenAddress,
        uint256 tokenId,
        uint256 value
    )
        internal
        view
        returns (address payable[] memory recipients, uint256[] memory amounts)
    {
        try
            /**
             * @dev Control-flow hijack and gas griefing vulnerability within Manifold's RoyaltyEngine, mitigated in https://github.com/manifoldxyz/royalty-registry-solidity/commit/c5ba6db3e04e0b364f7afd7aae853a25542a7439.
             *      "To mitigate the griefing vector and other potential vulnerabilities, limit the gas by default that _getRoyalty is given to at most 50,000 gas, but certainly no more than 100,000 gas."
             *      - https://githubrecord.com/issue/manifoldxyz/royalty-registry-solidity/17/1067105243
             *      However, Ninfa's ERC-2981 implementation needs to write to storage upon primary sales, this consumes 800,000 at most gas,
             *      while it only reds from storage upon secondary sales, see {ERC721N-rotaltyInfo}
             *      Other implementations of ERC721N may require even more gas in the future, therefore the limit has been raised to 1,000,000 gas.
             */
            this._getRoyalty{gas: 100000}(tokenAddress, tokenId, value)
        returns (
            address payable[] memory _recipients,
            uint256[] memory _amounts
        ) {
            return (_recipients, _amounts);
        } catch {
            revert("Royalty lookup failed");
        }
    }

    /**
     * @dev Get the royalty for a given token
     * @dev the original RoyaltyEngineV1 has been modified by removing the _specCache and the associated code,
     * using try catch statements is very cheap, no need to store `_specCache` mapping, see {RoyaltyEngineV1-_specCache}.
     * - https://www.reddit.com/r/ethdev/comments/szot8r/comment/hy5vsxb/
     * @dev EIP-2981 standard lookup is performed first unlike Manifold's implementation, as it is the most prevalent
     * royalty standard as well as the one being used by Ninfa's collections
     * @return recipients array and amounts array, if no royalty standard has been found, the returned arrays will be empty
     */
    function _getRoyalty(
        address tokenAddress,
        uint256 tokenId,
        uint256 value
    )
        external
        view
        returns (address payable[] memory recipients, uint256[] memory amounts)
    {
        address royaltyAddress = IRoyaltyRegistry(ROYALTY_REGISTRY)
            .getRoyaltyLookupAddress(tokenAddress);

        try IEIP2981(royaltyAddress).royaltyInfo(tokenId, value) returns (
            address recipient,
            uint256 amount
        ) {
            // Supports EIP2981. Return amounts
            if (amount > value) revert InvalidAmount(amount); // note doesn't revert if amount == value

            try
                IRoyaltySplitter(royaltyAddress).getRecipients(tokenId)
            returns (Recipient[] memory royaltyInfo) {
                uint256 splitRecipientsLength = royaltyInfo.length;
                recipients = new address payable[](splitRecipientsLength);
                amounts = new uint256[](splitRecipientsLength);
                uint256 sum;

                for (uint256 i; i < splitRecipientsLength; ) {
                    Recipient memory splitRecipient = royaltyInfo[i];
                    recipients[i] = payable(splitRecipient.recipient);
                    uint256 splitAmount = (splitRecipient.bps * amount) / 10000;
                    amounts[i] = splitAmount;
                    sum += splitAmount;
                    unchecked {
                        ++i;
                    }
                }
                // sum can be less than amount, otherwise small-value listings can break
                require(sum <= amount, "Invalid split");

                return (recipients, amounts);
            } catch {
                // Supports EIP2981.  Return amounts
                recipients = new address payable[](1);
                amounts = new uint256[](1);
                recipients[0] = payable(recipient);
                amounts[0] = amount;
                return (recipients, amounts);
            }
        } catch {}

        // SuperRare handling
        if (tokenAddress == SUPERRARE_V1 || tokenAddress == SUPERRARE_V2) {
            try
                ISuperRareRegistry(SUPERRARE_REGISTRY).tokenCreator(
                    tokenAddress,
                    tokenId
                )
            returns (address payable creator) {
                try
                    ISuperRareRegistry(SUPERRARE_REGISTRY).calculateRoyaltyFee(
                        tokenAddress,
                        tokenId,
                        value
                    )
                returns (uint256 amount) {
                    recipients = new address payable[](1);
                    amounts = new uint256[](1);
                    recipients[0] = creator;
                    amounts[0] = amount;
                    return (recipients, amounts);
                } catch {}
            } catch {}
        }

        try IManifold(royaltyAddress).getRoyalties(tokenId) returns (
            address payable[] memory recipients_,
            uint256[] memory bps
        ) {
            // Supports manifold interface.  Compute amounts
            if (recipients_.length != bps.length)
                revert LengthMismatch(recipients_.length, bps.length);
            return (recipients_, _computeAmounts(value, bps));
        } catch {}

        try IRaribleV2(royaltyAddress).getRaribleV2Royalties(tokenId) returns (
            IRaribleV2.Part[] memory royalties
        ) {
            // Supports rarible v2 interface. Compute amounts
            recipients = new address payable[](royalties.length);
            amounts = new uint256[](royalties.length);
            uint256 totalAmount;
            for (uint256 i = 0; i < royalties.length; i++) {
                recipients[i] = royalties[i].account;
                amounts[i] = (value * royalties[i].value) / 10000;
                totalAmount += amounts[i];
            }
            if (totalAmount > value) revert InvalidAmount(totalAmount);
            return (recipients, amounts);
        } catch {}
        try IRaribleV1(royaltyAddress).getFeeRecipients(tokenId) returns (
            address payable[] memory recipients_
        ) {
            // Supports rarible v1 interface. Compute amounts
            recipients_ = IRaribleV1(royaltyAddress).getFeeRecipients(tokenId);
            try IRaribleV1(royaltyAddress).getFeeBps(tokenId) returns (
                uint256[] memory bps
            ) {
                if (recipients_.length != bps.length)
                    revert LengthMismatch(recipients_.length, bps.length);
                return (recipients_, _computeAmounts(value, bps));
            } catch {}
        } catch {}
        try IFoundation(royaltyAddress).getFees(tokenId) returns (
            address payable[] memory recipients_,
            uint256[] memory bps
        ) {
            // Supports foundation interface.  Compute amounts
            if (recipients_.length != bps.length)
                revert LengthMismatch(recipients_.length, bps.length);
            return (recipients_, _computeAmounts(value, bps));
        } catch {}
        try
            IZoraOverride(royaltyAddress).convertBidShares(
                tokenAddress,
                tokenId
            )
        returns (address payable[] memory recipients_, uint256[] memory bps) {
            // Support Zora override
            if (recipients_.length != bps.length)
                revert LengthMismatch(recipients_.length, bps.length);
            return (recipients_, _computeAmounts(value, bps));
        } catch {}
        try
            IArtBlocksOverride(royaltyAddress).getRoyalties(
                tokenAddress,
                tokenId
            )
        returns (address payable[] memory recipients_, uint256[] memory bps) {
            // Support Art Blocks override
            if (recipients_.length != bps.length)
                revert LengthMismatch(recipients_.length, bps.length);
            return (recipients_, _computeAmounts(value, bps));
        } catch {}
        try
            IKODAV2Override(royaltyAddress).getKODAV2RoyaltyInfo(
                tokenAddress,
                tokenId,
                value
            )
        returns (
            address payable[] memory _recipients,
            uint256[] memory _amounts
        ) {
            // Support KODA V2 override
            if (_recipients.length != _amounts.length)
                revert LengthMismatch(_recipients.length, _amounts.length);
            return (_recipients, _amounts);
        } catch {}

        // No supported royalties configured
        return (recipients, amounts);
    }

    /**
     * Compute royalty amounts
     */
    function _computeAmounts(
        uint256 value,
        uint256[] memory bps
    ) private pure returns (uint256[] memory amounts) {
        amounts = new uint256[](bps.length);
        uint256 totalAmount;
        for (uint256 i = 0; i < bps.length; i++) {
            amounts[i] = (value * bps[i]) / 10000;
            totalAmount += amounts[i];
        }
        if (totalAmount > value) revert InvalidAmount(totalAmount);
        return amounts;
    }

    constructor(address _royaltyRegistry) {
        ROYALTY_REGISTRY = _royaltyRegistry;
    }
}

File 4 of 15 : Counters.sol
/*----------------------------------------------------------*|
|*          ███    ██ ██ ███    ██ ███████  █████           *|
|*          ████   ██ ██ ████   ██ ██      ██   ██          *|
|*          ██ ██  ██ ██ ██ ██  ██ █████   ███████          *|
|*          ██  ██ ██ ██ ██  ██ ██ ██      ██   ██          *|
|*          ██   ████ ██ ██   ████ ██      ██   ██          *|
|*----------------------------------------------------------*/

// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

/*************************************************************
 * @title Counters                                           *
 *                                                           *
 * @dev Stripped down version of OpenZeppelin Contracts       *
 * v4.4.1 (utils/Counters.sol), identical to                 *
 * CountersUpgradeable.sol being a library. Provides         *
 * counters that can only be incremented.                    *
 * Used to track the total supply of ERC721 ids.             *
 * @dev Include with `using Counters for Counters.Counter;`  *
 *                                                           *
 * @custom:security-contact [email protected]                    *
 ************************************************************/
/**
 * @title Counters
 * @dev Stripped down version of OpenZeppelin Contracts v4.4.1 (utils/Counters.sol), identical to CountersUpgradeable.sol being a library. Provides counters that can only be incremented. Used to track the total supply of ERC721 ids.
 * @dev Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    /// @dev if implementing ERC721A there could be an overflow risk by removing overflow protection with `unchecked`, unless we limit the amount of tokens that can be minted, or require that totalsupply be less than 2^256 - 1
    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }
}

File 5 of 15 : IZoraOverride.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.19;

/**
 * Paired down version of the Zora Market interface
 */
interface IZoraMarket {
    struct ZoraDecimal {
        uint256 value;
    }

    struct ZoraBidShares {
        // % of sale value that goes to the _previous_ owner of the nft
        ZoraDecimal prevOwner;
        // % of sale value that goes to the original creator of the nft
        ZoraDecimal creator;
        // % of sale value that goes to the seller (current owner) of the nft
        ZoraDecimal owner;
    }

    function bidSharesForToken(
        uint256 tokenId
    ) external view returns (ZoraBidShares memory);
}

/**
 * Paired down version of the Zora Media interface
 */
interface IZoraMedia {
    /**
     * Auto-generated accessors of public variables
     */
    function marketContract() external view returns (address);

    function previousTokenOwners(
        uint256 tokenId
    ) external view returns (address);

    function tokenCreators(uint256 tokenId) external view returns (address);

    /**
     * ERC721 function
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);
}

/**
 * Interface for a Zora media override
 */
interface IZoraOverride {
    /**
     * @dev Convert bid share configuration of a Zora Media token into an array of receivers and bps values
     *      Does not support prevOwner and sell-on amounts as that is specific to Zora marketplace implementation
     *      and requires updates on the Zora Media and Marketplace to update the sell-on amounts/previous owner values.
     *      An off-Zora marketplace sale will break the sell-on functionality.
     */
    function convertBidShares(
        address media,
        uint256 tokenId
    ) external view returns (address payable[] memory, uint256[] memory);
}

File 6 of 15 : ISuperRare.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.19;

interface ISuperRareRegistry {
    /**
     * @dev Get the royalty fee percentage for a specific ERC721 contract.
     * @param _contractAddress address ERC721Contract address.
     * @param _tokenId uint256 token ID.
     * @return uint8 wei royalty fee.
     */
    function getERC721TokenRoyaltyPercentage(
        address _contractAddress,
        uint256 _tokenId
    ) external view returns (uint8);

    /**
     * @dev Utililty function to calculate the royalty fee for a token.
     * @param _contractAddress address ERC721Contract address.
     * @param _tokenId uint256 token ID.
     * @param _amount uint256 wei amount.
     * @return uint256 wei fee.
     */
    function calculateRoyaltyFee(
        address _contractAddress,
        uint256 _tokenId,
        uint256 _amount
    ) external view returns (uint256);

    /**
     * @dev Get the token creator which will receive royalties of the given token
     * @param _contractAddress address ERC721Contract address.
     * @param _tokenId uint256 token ID.
     */
    function tokenCreator(
        address _contractAddress,
        uint256 _tokenId
    ) external view returns (address payable);
}

File 7 of 15 : IRoyaltySplitter.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.19;

/// @author: manifold.xyz
struct Recipient {
    address payable recipient;
    uint16 bps;
}

interface IRoyaltySplitter {
    /**
     * @dev Set the splitter recipients. Total bps must total 10000.
     */
    function setRecipients(Recipient[] calldata recipients) external;

    /**
     * @dev Get the splitter recipients;
     */
    function getRecipients(
        uint256 tokenId
    ) external view returns (Recipient[] memory);
}

File 8 of 15 : IRoyaltyRegistry.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.19;

/// @author: manifold.xyz

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

/**
 * @dev Royalty registry interface
 */
interface IRoyaltyRegistry is IERC165 {
    event RoyaltyOverride(
        address owner,
        address tokenAddress,
        address royaltyAddress
    );

    /**
     * Override the location of where to look up royalty information for a given token contract.
     * Allows for backwards compatibility and implementation of royalty logic for contracts that did not previously support them.
     *
     * @param tokenAddress    - The token address you wish to override
     * @param royaltyAddress  - The royalty override address
     */
    function setRoyaltyLookupAddress(
        address tokenAddress,
        address royaltyAddress
    ) external returns (bool);

    /**
     * Returns royalty address location.  Returns the tokenAddress by default, or the override if it exists
     *
     * @param tokenAddress    - The token address you are looking up the royalty for
     */
    function getRoyaltyLookupAddress(
        address tokenAddress
    ) external view returns (address);

    /**
     * Returns the token address that an overrideAddress is set for.
     * Note: will not be accurate if the override was created before this function was added.
     *
     * @param overrideAddress - The override address you are looking up the token for
     */
    function getOverrideLookupTokenAddress(
        address overrideAddress
    ) external view returns (address);

    /**
     * Whether or not the message sender can override the royalty address for the given token address
     *
     * @param tokenAddress    - The token address you are looking up the royalty for
     */
    function overrideAllowed(address tokenAddress) external view returns (bool);
}

File 9 of 15 : IRarible.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.19;

interface IRaribleV1 {
    /*
     * bytes4(keccak256('getFeeBps(uint256)')) == 0x0ebd4c7f
     * bytes4(keccak256('getFeeRecipients(uint256)')) == 0xb9c4d9fb
     *
     * => 0x0ebd4c7f ^ 0xb9c4d9fb == 0xb7799584
     */
    function getFeeBps(uint256 id) external view returns (uint[] memory);

    function getFeeRecipients(
        uint256 id
    ) external view returns (address payable[] memory);
}

interface IRaribleV2 {
    /*
     *  bytes4(keccak256('getRaribleV2Royalties(uint256)')) == 0xcad96cca
     */
    struct Part {
        address payable account;
        uint96 value;
    }

    function getRaribleV2Royalties(
        uint256 id
    ) external view returns (Part[] memory);
}

File 10 of 15 : IManifold.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.19;

/// @author: manifold.xyz

/**
 * @dev Royalty interface for creator core classes
 */
interface IManifold {
    /**
     * @dev Get royalites of a token.  Returns list of receivers and basisPoints
     *
     *  bytes4(keccak256('getRoyalties(uint256)')) == 0xbb3bafd6
     *
     *  => 0xbb3bafd6 = 0xbb3bafd6
     */
    function getRoyalties(
        uint256 tokenId
    ) external view returns (address payable[] memory, uint256[] memory);
}

File 11 of 15 : IKODAV2Override.sol
// SPDX-License-Identifier: MIT

/// @author: knownorigin.io

pragma solidity 0.8.19;

interface IKODAV2 {
    function editionOfTokenId(
        uint256 _tokenId
    ) external view returns (uint256 _editionNumber);

    function artistCommission(
        uint256 _editionNumber
    ) external view returns (address _artistAccount, uint256 _artistCommission);

    function editionOptionalCommission(
        uint256 _editionNumber
    ) external view returns (uint256 _rate, address _recipient);
}

interface IKODAV2Override {
    /// @notice Emitted when the royalties fee changes
    event CreatorRoyaltiesFeeUpdated(
        uint256 _oldCreatorRoyaltiesFee,
        uint256 _newCreatorRoyaltiesFee
    );

    /// @notice For the given KO NFT and token ID, return the addresses and the amounts to pay
    function getKODAV2RoyaltyInfo(
        address _tokenAddress,
        uint256 _id,
        uint256 _amount
    ) external view returns (address payable[] memory, uint256[] memory);

    /// @notice Allows the owner() to update the creator royalties
    function updateCreatorRoyalties(uint256 _creatorRoyaltiesFee) external;
}

File 12 of 15 : IFoundation.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.19;

interface IFoundation {
    /*
     *  bytes4(keccak256('getFees(uint256)')) == 0xd5a06d4c
     *
     *  => 0xd5a06d4c = 0xd5a06d4c
     */
    function getFees(
        uint256 tokenId
    ) external view returns (address payable[] memory, uint256[] memory);
}

interface IFoundationTreasuryNode {
    function getFoundationTreasury() external view returns (address payable);
}

interface IFoundationTreasury {
    function isAdmin(address account) external view returns (bool);
}

File 13 of 15 : IEIP2981.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.19;

/**
 * EIP-2981
 */
interface IEIP2981 {
    /**
     * bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a
     *
     * => 0x2a55205a = 0x2a55205a
     */
    function royaltyInfo(
        uint256 tokenId,
        uint256 value
    ) external view returns (address, uint256);
}

File 14 of 15 : IArtBlocksOverride.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.19;

/**
 *  Interface for an Art Blocks override
 */
interface IArtBlocksOverride {
    /**
     * @dev Get royalites of a token at a given tokenAddress.
     *      Returns array of receivers and basisPoints.
     *
     *  bytes4(keccak256('getRoyalties(address,uint256)')) == 0x9ca7dc7a
     *
     *  => 0x9ca7dc7a = 0x9ca7dc7a
     */
    function getRoyalties(
        address tokenAddress,
        uint256 tokenId
    ) external view returns (address payable[] memory, uint256[] memory);
}

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

pragma solidity 0.8.19;

/**
 * @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 {
    address private _owner;

    event OwnershipTransferred(
        address previousOwner,
        address newOwner
    );

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

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

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

    /**
     * @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() external onlyOwner {
        _transferOwnership(address(0));
    }

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_royaltyRegistry","type":"address"},{"internalType":"address","name":"_primarySalesRegistry","type":"address"},{"internalType":"address","name":"factory_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"InvalidAmount","type":"error"},{"inputs":[{"internalType":"uint256","name":"recipients","type":"uint256"},{"internalType":"uint256","name":"bps","type":"uint256"}],"name":"LengthMismatch","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"AuctionCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"AuctionCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"AuctionFinalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"AuctionUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"Bid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"_getRoyalty","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"auctions","outputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"seller","type":"address"},{"internalType":"address","name":"collection","type":"address"},{"internalType":"address","name":"bidder","type":"address"},{"internalType":"address","name":"commissionReceiver","type":"address"},{"internalType":"uint256","name":"commissionBps","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"bidPrice","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId_","type":"uint256"}],"name":"bid","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId_","type":"uint256"}],"name":"cancelAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId_","type":"uint256"}],"name":"finalize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId_","type":"uint256"}],"name":"firstBid","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_newFeeAccount","type":"address"}],"name":"setFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"primaryMarketFee_","type":"uint256"},{"internalType":"uint256","name":"secondaryMarketFee_","type":"uint256"}],"name":"setMarketFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"master","type":"address"},{"internalType":"bool","name":"_isPrimaryMarket","type":"bool"}],"name":"setPrimaryMarketCodehash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId_","type":"uint256"},{"internalType":"uint256","name":"_newReservePrice","type":"uint256"}],"name":"updateReservePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_collection","type":"address"},{"internalType":"bool","name":"isWhitelisted_","type":"bool"}],"name":"whitelistCollection","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c06040523480156200001157600080fd5b50604051620043993803806200439983398181016040528101906200003791906200020b565b826200004933620000fc60201b60201c565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff168152505080600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050620002a5565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e081836040516200019592919062000278565b60405180910390a15050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620001d382620001a6565b9050919050565b620001e581620001c6565b8114620001f157600080fd5b50565b6000815190506200020581620001da565b92915050565b600080600060608486031215620002275762000226620001a1565b5b60006200023786828701620001f4565b93505060206200024a86828701620001f4565b92505060406200025d86828701620001f4565b9150509250925092565b6200027281620001c6565b82525050565b60006040820190506200028f600083018562000267565b6200029e602083018462000267565b9392505050565b60805160a0516140ce620002cb60003960006107ad0152600061110001526140ce6000f3fe6080604052600436106100f35760003560e01c8063740526331161008a5780639dbdb432116100595780639dbdb43214610313578063cbdfe7cc1461033c578063e74b981b14610365578063f2fde38b1461038e576100f3565b806374052633146102585780637fea43b8146102815780638da5cb5b146102bf57806396b5a755146102ea576100f3565b806338c61759116100c657806338c61759146101c4578063454a2ab3146101e0578063571a26a0146101fc578063715018a614610241576100f3565b806301ffc9a7146100f857806305261aea14610135578063150b7a021461015e578063389273941461019b575b600080fd5b34801561010457600080fd5b5061011f600480360381019061011a9190612dfb565b6103b7565b60405161012c9190612e43565b60405180910390f35b34801561014157600080fd5b5061015c60048036038101906101579190612e94565b610419565b005b34801561016a57600080fd5b5061018560048036038101906101809190612f84565b610b65565b604051610192919061301b565b60405180910390f35b3480156101a757600080fd5b506101c260048036038101906101bd9190613036565b610ba4565b005b6101de60048036038101906101d99190612e94565b610c6c565b005b6101fa60048036038101906101f59190612e94565b610db2565b005b34801561020857600080fd5b50610223600480360381019061021e9190612e94565b610f26565b60405161023899989796959493929190613094565b60405180910390f35b34801561024d57600080fd5b50610256611014565b005b34801561026457600080fd5b5061027f600480360381019061027a919061314d565b61105f565b005b34801561028d57600080fd5b506102a860048036038101906102a3919061318d565b6110f9565b6040516102b692919061336e565b60405180910390f35b3480156102cb57600080fd5b506102d461212b565b6040516102e191906133a5565b60405180910390f35b3480156102f657600080fd5b50610311600480360381019061030c9190612e94565b612154565b005b34801561031f57600080fd5b5061033a6004803603810190610335919061314d565b6124e2565b005b34801561034857600080fd5b50610363600480360381019061035e9190613036565b612567565b005b34801561037157600080fd5b5061038c600480360381019061038791906133ec565b6125b8565b005b34801561039a57600080fd5b506103b560048036038101906103b09190613419565b61263b565b005b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610412575063150b7a0260e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b600060026000838152602001908152602001600020604051806101200160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600582015481526020016006820154815260200160078201548152602001600882015481525050905060608060008360e001519050600084610100015142108061063857506000856101000151145b1561066f576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60026000878152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556003820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556004820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556005820160009055600682016000905560078201600090556008820160009055505060046000866040015173ffffffffffffffffffffffffffffffffffffffff163f815260200190815260200160002060009054906101000a900460ff16156109135760007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637abab71187604001518860c00151604051602401610802929190613446565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405161085091906134e0565b6000604051808303816000865af19150503d806000811461088d576040519150601f19603f3d011682016040523d82523d6000602084013e610892565b606091505b5091505060001515818060200190518101906108ae919061350c565b151503610911576127106007548760e001516108ca9190613568565b6108d491906135d9565b915081836108e2919061360a565b9250610910600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836126bf565b5b505b600081036109a25761093285604001518660c001518760e0015161273a565b8094508195505050600060085411156109a1576127106008548660e0015161095a9190613568565b61096491906135d9565b90508082610972919061360a565b91506109a0600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826126bf565b5b5b6000845190506000811115610aaf576001811115610a445760005b81811015610a3e578481815181106109d8576109d761363e565b5b6020026020010151846109eb919061360a565b9350610a2b868281518110610a0357610a0261363e565b5b6020026020010151868381518110610a1e57610a1d61363e565b5b60200260200101516126bf565b8080610a369061366d565b9150506109bd565b50610aae565b83600081518110610a5857610a5761363e565b5b602002602001015183610a6b919061360a565b9250610aad85600081518110610a8457610a8361363e565b5b602002602001015185600081518110610aa057610a9f61363e565b5b60200260200101516126bf565b5b5b60008660a001511115610aff5760006127108760a001518860e00151610ad59190613568565b610adf91906135d9565b90508084610aed919061360a565b9350610afd8760800151826126bf565b505b610b0d8660200151846126bf565b610b2586604001513088606001518960c0015161280d565b7f2d7633a748a750b559b97738629efd586b561319b152bb42ba14d590706d31da87604051610b5491906136b5565b60405180910390a150505050505050565b6000806000808585810190610b7a91906136d0565b925092509250610b8e8989898686866128e5565b63150b7a0260e01b935050505095945050505050565b60006002600084815260200190815260200160002090503373ffffffffffffffffffffffffffffffffffffffff168160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148015610c1e575060008160080154145b610c2757600080fd5b8181600701819055507faed3e56ca017d9b02e523c2c7ba81ae5591f43f264dd5d603d70953a12d8079e83604051610c5f91906136b5565b60405180910390a1505050565b6000600260008381526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141580610ce65750806007015434105b15610d1d576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6201518042018160080181905550348160070181905550338160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f7a183e84509e3fe5b0b3aac15347fd1c7d71fd1503001f1a1d7c9658077eb35f82604051610da691906136b5565b60405180910390a15050565b60006002600083815260200190815260200160002090508060080154421180610ddf575060008160080154145b80610e08575060148160070154610df691906135d9565b816007015434610e06919061360a565b105b15610e3f576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806008015461038442610e529190613723565b1115610e6d5761038481600801600082825401925050819055505b610e9f8160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682600701546126bf565b348160070181905550338160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f7a183e84509e3fe5b0b3aac15347fd1c7d71fd1503001f1a1d7c9658077eb35f82604051610f1a91906136b5565b60405180910390a15050565b60026020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060050154908060060154908060070154908060080154905089565b3373ffffffffffffffffffffffffffffffffffffffff1661103361212b565b73ffffffffffffffffffffffffffffffffffffffff161461105357600080fd5b61105d6000612b8f565b565b3373ffffffffffffffffffffffffffffffffffffffff1661107e61212b565b73ffffffffffffffffffffffffffffffffffffffff161461109e57600080fd5b80600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60608060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663de5488af876040518263ffffffff1660e01b815260040161115791906133a5565b602060405180830381865afa158015611174573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611198919061376c565b90508073ffffffffffffffffffffffffffffffffffffffff16632a55205a86866040518363ffffffff1660e01b81526004016111d5929190613799565b6040805180830381865afa92505050801561120e57506040513d601f19601f8201168201806040525081019061120b91906137d7565b60015b156115ac578581111561125857806040517f3728b83d00000000000000000000000000000000000000000000000000000000815260040161124f91906136b5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663fd90e897886040518263ffffffff1660e01b815260040161129191906136b5565b600060405180830381865afa9250505080156112d057506040513d6000823e3d601f19601f820116820180604052508101906112cd9190613a0a565b60015b6113e457600167ffffffffffffffff8111156112ef576112ee613828565b5b60405190808252806020026020018201604052801561131d5781602001602082028036833780820191505090505b509450600167ffffffffffffffff81111561133b5761133a613828565b5b6040519080825280602002602001820160405280156113695781602001602082028036833780820191505090505b50935081856000815181106113815761138061363e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505080846000815181106113d0576113cf61363e565b5b602002602001018181525050505050612123565b6000815190508067ffffffffffffffff81111561140457611403613828565b5b6040519080825280602002602001820160405280156114325781602001602082028036833780820191505090505b5096508067ffffffffffffffff81111561144f5761144e613828565b5b60405190808252806020026020018201604052801561147d5781602001602082028036833780820191505090505b5095506000805b8281101561155d5760008482815181106114a1576114a061363e565b5b6020026020010151905080600001518a83815181106114c3576114c261363e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600061271087836020015161ffff166115169190613568565b61152091906135d9565b9050808a84815181106115365761153561363e565b5b602002602001018181525050808461154e9190613723565b93508260010192505050611484565b50838111156115a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159890613ab0565b60405180910390fd5b505050505050612123565b7341a322b28d0ff354040e2cbc676f0320d8c8850d73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161480611639575073b932a70a57673d89f4acffbe830e8ed7f75fb9e073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16145b1561186f577317b0c8564e53f22364a6c8de6f7ca5ce9bea4e5d73ffffffffffffffffffffffffffffffffffffffff1663b85ed7e487876040518363ffffffff1660e01b815260040161168d929190613446565b602060405180830381865afa9250505080156116c757506040513d601f19601f820116820180604052508101906116c49190613ad0565b60015b1561186e577317b0c8564e53f22364a6c8de6f7ca5ce9bea4e5d73ffffffffffffffffffffffffffffffffffffffff1663860110f58888886040518463ffffffff1660e01b815260040161171d93929190613afd565b602060405180830381865afa92505050801561175757506040513d601f19601f820116820180604052508101906117549190613b34565b60015b1561186c57600167ffffffffffffffff81111561177757611776613828565b5b6040519080825280602002602001820160405280156117a55781602001602082028036833780820191505090505b509450600167ffffffffffffffff8111156117c3576117c2613828565b5b6040519080825280602002602001820160405280156117f15781602001602082028036833780820191505090505b50935081856000815181106118095761180861363e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505080846000815181106118585761185761363e565b5b602002602001018181525050505050612123565b505b5b8073ffffffffffffffffffffffffffffffffffffffff1663bb3bafd6866040518263ffffffff1660e01b81526004016118a891906136b5565b600060405180830381865afa9250505080156118e757506040513d6000823e3d601f19601f820116820180604052508101906118e49190613ce7565b60015b1561194d57805182511461193657815181516040517fab8b67c600000000000000000000000000000000000000000000000000000000815260040161192d929190613799565b60405180910390fd5b816119418783612c32565b94509450505050612123565b8073ffffffffffffffffffffffffffffffffffffffff1663cad96cca866040518263ffffffff1660e01b815260040161198691906136b5565b600060405180830381865afa9250505080156119c557506040513d6000823e3d601f19601f820116820180604052508101906119c29190613eb6565b60015b15611bcc57805167ffffffffffffffff8111156119e5576119e4613828565b5b604051908082528060200260200182016040528015611a135781602001602082028036833780820191505090505b509350805167ffffffffffffffff811115611a3157611a30613828565b5b604051908082528060200260200182016040528015611a5f5781602001602082028036833780820191505090505b509250600080600090505b8251811015611b7e57828181518110611a8657611a8561363e565b5b602002602001015160000151868281518110611aa557611aa461363e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050612710838281518110611af557611af461363e565b5b6020026020010151602001516bffffffffffffffffffffffff1688611b1a9190613568565b611b2491906135d9565b858281518110611b3757611b3661363e565b5b602002602001018181525050848181518110611b5657611b5561363e565b5b602002602001015182611b699190613723565b91508080611b769061366d565b915050611a6a565b5085811115611bc457806040517f3728b83d000000000000000000000000000000000000000000000000000000008152600401611bbb91906136b5565b60405180910390fd5b505050612123565b8073ffffffffffffffffffffffffffffffffffffffff1663b9c4d9fb866040518263ffffffff1660e01b8152600401611c0591906136b5565b600060405180830381865afa925050508015611c4457506040513d6000823e3d601f19601f82011682018060405250810190611c419190613eff565b60015b15611daa578173ffffffffffffffffffffffffffffffffffffffff1663b9c4d9fb876040518263ffffffff1660e01b8152600401611c8291906136b5565b600060405180830381865afa158015611c9f573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190611cc89190613eff565b90508173ffffffffffffffffffffffffffffffffffffffff16630ebd4c7f876040518263ffffffff1660e01b8152600401611d0391906136b5565b600060405180830381865afa925050508015611d4257506040513d6000823e3d601f19601f82011682018060405250810190611d3f9190613f48565b60015b15611da8578051825114611d9157815181516040517fab8b67c6000000000000000000000000000000000000000000000000000000008152600401611d88929190613799565b60405180910390fd5b81611d9c8783612c32565b94509450505050612123565b505b8073ffffffffffffffffffffffffffffffffffffffff1663d5a06d4c866040518263ffffffff1660e01b8152600401611de391906136b5565b600060405180830381865afa925050508015611e2257506040513d6000823e3d601f19601f82011682018060405250810190611e1f9190613ce7565b60015b15611e88578051825114611e7157815181516040517fab8b67c6000000000000000000000000000000000000000000000000000000008152600401611e68929190613799565b60405180910390fd5b81611e7c8783612c32565b94509450505050612123565b8073ffffffffffffffffffffffffffffffffffffffff1663f662207487876040518363ffffffff1660e01b8152600401611ec3929190613446565b600060405180830381865afa925050508015611f0257506040513d6000823e3d601f19601f82011682018060405250810190611eff9190613ce7565b60015b15611f68578051825114611f5157815181516040517fab8b67c6000000000000000000000000000000000000000000000000000000008152600401611f48929190613799565b60405180910390fd5b81611f5c8783612c32565b94509450505050612123565b8073ffffffffffffffffffffffffffffffffffffffff16639ca7dc7a87876040518363ffffffff1660e01b8152600401611fa3929190613446565b600060405180830381865afa925050508015611fe257506040513d6000823e3d601f19601f82011682018060405250810190611fdf9190613ce7565b60015b1561204857805182511461203157815181516040517fab8b67c6000000000000000000000000000000000000000000000000000000008152600401612028929190613799565b60405180910390fd5b8161203c8783612c32565b94509450505050612123565b8073ffffffffffffffffffffffffffffffffffffffff1663fbda03ab8787876040518463ffffffff1660e01b815260040161208593929190613afd565b600060405180830381865afa9250505080156120c457506040513d6000823e3d601f19601f820116820180604052508101906120c19190613ce7565b60015b1561212157805182511461211357815181516040517fab8b67c600000000000000000000000000000000000000000000000000000000815260040161210a929190613799565b60405180910390fd5b818194509450505050612123565b505b935093915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600060026000838152602001908152602001600020604051806101200160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160058201548152602001600682015481526020016007820154815260200160088201548152505090503373ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff1614801561239157506000816101000151145b61239a57600080fd5b60026000838152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556003820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556004820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600582016000905560068201600090556007820160009055600882016000905550506124a7816040015130338460c0015161280d565b7f28601d865dccc9f113e15a7185c1b38c085d598c71250d3337916a428536d771826040516124d691906136b5565b60405180910390a15050565b3373ffffffffffffffffffffffffffffffffffffffff1661250161212b565b73ffffffffffffffffffffffffffffffffffffffff161461252157600080fd5b80600460008473ffffffffffffffffffffffffffffffffffffffff163f815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b3373ffffffffffffffffffffffffffffffffffffffff1661258661212b565b73ffffffffffffffffffffffffffffffffffffffff16146125a657600080fd5b81600781905550806008819055505050565b3373ffffffffffffffffffffffffffffffffffffffff166125d761212b565b73ffffffffffffffffffffffffffffffffffffffff16146125f757600080fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b3373ffffffffffffffffffffffffffffffffffffffff1661265a61212b565b73ffffffffffffffffffffffffffffffffffffffff161461267a57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036126b357600080fd5b6126bc81612b8f565b50565b60008273ffffffffffffffffffffffffffffffffffffffff16826040516126e590613fb7565b60006040518083038185875af1925050503d8060008114612722576040519150601f19603f3d011682016040523d82523d6000602084013e612727565b606091505b505090508061273557600080fd5b505050565b6060803073ffffffffffffffffffffffffffffffffffffffff16637fea43b8620186a08787876040518563ffffffff1660e01b815260040161277e93929190613afd565b6000604051808303818786fa935050505080156127be57506040513d6000823e3d601f19601f820116820180604052508101906127bb9190613ce7565b60015b6127fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127f490614018565b60405180910390fd5b8181935093505050935093915050565b60008473ffffffffffffffffffffffffffffffffffffffff166342842e0e85858560405160240161284093929190614038565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405161288e91906134e0565b6000604051808303816000865af19150503d80600081146128cb576040519150601f19603f3d011682016040523d82523d6000602084013e6128d0565b606091505b50509050806128de57600080fd5b5050505050565b6128ef6001612d6b565b60006128fb6001612d81565b90506040518061012001604052808873ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff16815260200184815260200186815260200185815260200160008152506002600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060a0820151816005015560c0820151816006015560e0820151816007015561010082015181600801559050507f7e0e356457a92dacd3760ddf327a24dd226c6ca01b2cc41a7fd6f28469c7ab9b81604051612b7e91906136b5565b60405180910390a150505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08183604051612c2692919061406f565b60405180910390a15050565b6060815167ffffffffffffffff811115612c4f57612c4e613828565b5b604051908082528060200260200182016040528015612c7d5781602001602082028036833780820191505090505b509050600080600090505b8351811015612d1e57612710848281518110612ca757612ca661363e565b5b602002602001015186612cba9190613568565b612cc491906135d9565b838281518110612cd757612cd661363e565b5b602002602001018181525050828181518110612cf657612cf561363e565b5b602002602001015182612d099190613723565b91508080612d169061366d565b915050612c88565b5083811115612d6457806040517f3728b83d000000000000000000000000000000000000000000000000000000008152600401612d5b91906136b5565b60405180910390fd5b5092915050565b6001816000016000828254019250508190555050565b600081600001549050919050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612dd881612da3565b8114612de357600080fd5b50565b600081359050612df581612dcf565b92915050565b600060208284031215612e1157612e10612d99565b5b6000612e1f84828501612de6565b91505092915050565b60008115159050919050565b612e3d81612e28565b82525050565b6000602082019050612e586000830184612e34565b92915050565b6000819050919050565b612e7181612e5e565b8114612e7c57600080fd5b50565b600081359050612e8e81612e68565b92915050565b600060208284031215612eaa57612ea9612d99565b5b6000612eb884828501612e7f565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612eec82612ec1565b9050919050565b612efc81612ee1565b8114612f0757600080fd5b50565b600081359050612f1981612ef3565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112612f4457612f43612f1f565b5b8235905067ffffffffffffffff811115612f6157612f60612f24565b5b602083019150836001820283011115612f7d57612f7c612f29565b5b9250929050565b600080600080600060808688031215612fa057612f9f612d99565b5b6000612fae88828901612f0a565b9550506020612fbf88828901612f0a565b9450506040612fd088828901612e7f565b935050606086013567ffffffffffffffff811115612ff157612ff0612d9e565b5b612ffd88828901612f2e565b92509250509295509295909350565b61301581612da3565b82525050565b6000602082019050613030600083018461300c565b92915050565b6000806040838503121561304d5761304c612d99565b5b600061305b85828601612e7f565b925050602061306c85828601612e7f565b9150509250929050565b61307f81612ee1565b82525050565b61308e81612e5e565b82525050565b6000610120820190506130aa600083018c613076565b6130b7602083018b613076565b6130c4604083018a613076565b6130d16060830189613076565b6130de6080830188613076565b6130eb60a0830187613085565b6130f860c0830186613085565b61310560e0830185613085565b613113610100830184613085565b9a9950505050505050505050565b61312a81612e28565b811461313557600080fd5b50565b60008135905061314781613121565b92915050565b6000806040838503121561316457613163612d99565b5b600061317285828601612f0a565b925050602061318385828601613138565b9150509250929050565b6000806000606084860312156131a6576131a5612d99565b5b60006131b486828701612f0a565b93505060206131c586828701612e7f565b92505060406131d686828701612e7f565b9150509250925092565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600061321782612ec1565b9050919050565b6132278161320c565b82525050565b6000613239838361321e565b60208301905092915050565b6000602082019050919050565b600061325d826131e0565b61326781856131eb565b9350613272836131fc565b8060005b838110156132a357815161328a888261322d565b975061329583613245565b925050600181019050613276565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6132e581612e5e565b82525050565b60006132f783836132dc565b60208301905092915050565b6000602082019050919050565b600061331b826132b0565b61332581856132bb565b9350613330836132cc565b8060005b8381101561336157815161334888826132eb565b975061335383613303565b925050600181019050613334565b5085935050505092915050565b600060408201905081810360008301526133888185613252565b9050818103602083015261339c8184613310565b90509392505050565b60006020820190506133ba6000830184613076565b92915050565b6133c98161320c565b81146133d457600080fd5b50565b6000813590506133e6816133c0565b92915050565b60006020828403121561340257613401612d99565b5b6000613410848285016133d7565b91505092915050565b60006020828403121561342f5761342e612d99565b5b600061343d84828501612f0a565b91505092915050565b600060408201905061345b6000830185613076565b6134686020830184613085565b9392505050565b600081519050919050565b600081905092915050565b60005b838110156134a3578082015181840152602081019050613488565b60008484015250505050565b60006134ba8261346f565b6134c4818561347a565b93506134d4818560208601613485565b80840191505092915050565b60006134ec82846134af565b915081905092915050565b60008151905061350681613121565b92915050565b60006020828403121561352257613521612d99565b5b6000613530848285016134f7565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061357382612e5e565b915061357e83612e5e565b925082820261358c81612e5e565b915082820484148315176135a3576135a2613539565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006135e482612e5e565b91506135ef83612e5e565b9250826135ff576135fe6135aa565b5b828204905092915050565b600061361582612e5e565b915061362083612e5e565b925082820390508181111561363857613637613539565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600061367882612e5e565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036136aa576136a9613539565b5b600182019050919050565b60006020820190506136ca6000830184613085565b92915050565b6000806000606084860312156136e9576136e8612d99565b5b60006136f786828701612e7f565b935050602061370886828701612e7f565b9250506040613719868287016133d7565b9150509250925092565b600061372e82612e5e565b915061373983612e5e565b925082820190508082111561375157613750613539565b5b92915050565b60008151905061376681612ef3565b92915050565b60006020828403121561378257613781612d99565b5b600061379084828501613757565b91505092915050565b60006040820190506137ae6000830185613085565b6137bb6020830184613085565b9392505050565b6000815190506137d181612e68565b92915050565b600080604083850312156137ee576137ed612d99565b5b60006137fc85828601613757565b925050602061380d858286016137c2565b9150509250929050565b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61386082613817565b810181811067ffffffffffffffff8211171561387f5761387e613828565b5b80604052505050565b6000613892612d8f565b905061389e8282613857565b919050565b600067ffffffffffffffff8211156138be576138bd613828565b5b602082029050602081019050919050565b600080fd5b6000815190506138e3816133c0565b92915050565b600061ffff82169050919050565b613900816138e9565b811461390b57600080fd5b50565b60008151905061391d816138f7565b92915050565b600060408284031215613939576139386138cf565b5b6139436040613888565b90506000613953848285016138d4565b60008301525060206139678482850161390e565b60208301525092915050565b6000613986613981846138a3565b613888565b905080838252602082019050604084028301858111156139a9576139a8612f29565b5b835b818110156139d257806139be8882613923565b8452602084019350506040810190506139ab565b5050509392505050565b600082601f8301126139f1576139f0612f1f565b5b8151613a01848260208601613973565b91505092915050565b600060208284031215613a2057613a1f612d99565b5b600082015167ffffffffffffffff811115613a3e57613a3d612d9e565b5b613a4a848285016139dc565b91505092915050565b600082825260208201905092915050565b7f496e76616c69642073706c697400000000000000000000000000000000000000600082015250565b6000613a9a600d83613a53565b9150613aa582613a64565b602082019050919050565b60006020820190508181036000830152613ac981613a8d565b9050919050565b600060208284031215613ae657613ae5612d99565b5b6000613af4848285016138d4565b91505092915050565b6000606082019050613b126000830186613076565b613b1f6020830185613085565b613b2c6040830184613085565b949350505050565b600060208284031215613b4a57613b49612d99565b5b6000613b58848285016137c2565b91505092915050565b600067ffffffffffffffff821115613b7c57613b7b613828565b5b602082029050602081019050919050565b6000613ba0613b9b84613b61565b613888565b90508083825260208201905060208402830185811115613bc357613bc2612f29565b5b835b81811015613bec5780613bd888826138d4565b845260208401935050602081019050613bc5565b5050509392505050565b600082601f830112613c0b57613c0a612f1f565b5b8151613c1b848260208601613b8d565b91505092915050565b600067ffffffffffffffff821115613c3f57613c3e613828565b5b602082029050602081019050919050565b6000613c63613c5e84613c24565b613888565b90508083825260208201905060208402830185811115613c8657613c85612f29565b5b835b81811015613caf5780613c9b88826137c2565b845260208401935050602081019050613c88565b5050509392505050565b600082601f830112613cce57613ccd612f1f565b5b8151613cde848260208601613c50565b91505092915050565b60008060408385031215613cfe57613cfd612d99565b5b600083015167ffffffffffffffff811115613d1c57613d1b612d9e565b5b613d2885828601613bf6565b925050602083015167ffffffffffffffff811115613d4957613d48612d9e565b5b613d5585828601613cb9565b9150509250929050565b600067ffffffffffffffff821115613d7a57613d79613828565b5b602082029050602081019050919050565b60006bffffffffffffffffffffffff82169050919050565b613dac81613d8b565b8114613db757600080fd5b50565b600081519050613dc981613da3565b92915050565b600060408284031215613de557613de46138cf565b5b613def6040613888565b90506000613dff848285016138d4565b6000830152506020613e1384828501613dba565b60208301525092915050565b6000613e32613e2d84613d5f565b613888565b90508083825260208201905060408402830185811115613e5557613e54612f29565b5b835b81811015613e7e5780613e6a8882613dcf565b845260208401935050604081019050613e57565b5050509392505050565b600082601f830112613e9d57613e9c612f1f565b5b8151613ead848260208601613e1f565b91505092915050565b600060208284031215613ecc57613ecb612d99565b5b600082015167ffffffffffffffff811115613eea57613ee9612d9e565b5b613ef684828501613e88565b91505092915050565b600060208284031215613f1557613f14612d99565b5b600082015167ffffffffffffffff811115613f3357613f32612d9e565b5b613f3f84828501613bf6565b91505092915050565b600060208284031215613f5e57613f5d612d99565b5b600082015167ffffffffffffffff811115613f7c57613f7b612d9e565b5b613f8884828501613cb9565b91505092915050565b50565b6000613fa160008361347a565b9150613fac82613f91565b600082019050919050565b6000613fc282613f94565b9150819050919050565b7f526f79616c7479206c6f6f6b7570206661696c65640000000000000000000000600082015250565b6000614002601583613a53565b915061400d82613fcc565b602082019050919050565b6000602082019050818103600083015261403181613ff5565b9050919050565b600060608201905061404d6000830186613076565b61405a6020830185613076565b6140676040830184613085565b949350505050565b60006040820190506140846000830185613076565b6140916020830184613076565b939250505056fea264697066735822122087b43e3079eb722c458ff10e4672cdd61e41acf3580e90049bb344b23eab4cbe64736f6c63430008130033000000000000000000000000ad2184fb5dbcfc05d8f056542fb25b04fa32a95d000000000000000000000000167a296135c0067903d4c099806405f6c316442e00000000000000000000000061b98acbfc23326cfe296f380b5aa3e5adcc5238

Deployed Bytecode

0x6080604052600436106100f35760003560e01c8063740526331161008a5780639dbdb432116100595780639dbdb43214610313578063cbdfe7cc1461033c578063e74b981b14610365578063f2fde38b1461038e576100f3565b806374052633146102585780637fea43b8146102815780638da5cb5b146102bf57806396b5a755146102ea576100f3565b806338c61759116100c657806338c61759146101c4578063454a2ab3146101e0578063571a26a0146101fc578063715018a614610241576100f3565b806301ffc9a7146100f857806305261aea14610135578063150b7a021461015e578063389273941461019b575b600080fd5b34801561010457600080fd5b5061011f600480360381019061011a9190612dfb565b6103b7565b60405161012c9190612e43565b60405180910390f35b34801561014157600080fd5b5061015c60048036038101906101579190612e94565b610419565b005b34801561016a57600080fd5b5061018560048036038101906101809190612f84565b610b65565b604051610192919061301b565b60405180910390f35b3480156101a757600080fd5b506101c260048036038101906101bd9190613036565b610ba4565b005b6101de60048036038101906101d99190612e94565b610c6c565b005b6101fa60048036038101906101f59190612e94565b610db2565b005b34801561020857600080fd5b50610223600480360381019061021e9190612e94565b610f26565b60405161023899989796959493929190613094565b60405180910390f35b34801561024d57600080fd5b50610256611014565b005b34801561026457600080fd5b5061027f600480360381019061027a919061314d565b61105f565b005b34801561028d57600080fd5b506102a860048036038101906102a3919061318d565b6110f9565b6040516102b692919061336e565b60405180910390f35b3480156102cb57600080fd5b506102d461212b565b6040516102e191906133a5565b60405180910390f35b3480156102f657600080fd5b50610311600480360381019061030c9190612e94565b612154565b005b34801561031f57600080fd5b5061033a6004803603810190610335919061314d565b6124e2565b005b34801561034857600080fd5b50610363600480360381019061035e9190613036565b612567565b005b34801561037157600080fd5b5061038c600480360381019061038791906133ec565b6125b8565b005b34801561039a57600080fd5b506103b560048036038101906103b09190613419565b61263b565b005b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610412575063150b7a0260e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b600060026000838152602001908152602001600020604051806101200160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600582015481526020016006820154815260200160078201548152602001600882015481525050905060608060008360e001519050600084610100015142108061063857506000856101000151145b1561066f576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60026000878152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556003820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556004820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556005820160009055600682016000905560078201600090556008820160009055505060046000866040015173ffffffffffffffffffffffffffffffffffffffff163f815260200190815260200160002060009054906101000a900460ff16156109135760007f000000000000000000000000167a296135c0067903d4c099806405f6c316442e73ffffffffffffffffffffffffffffffffffffffff16637abab71187604001518860c00151604051602401610802929190613446565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405161085091906134e0565b6000604051808303816000865af19150503d806000811461088d576040519150601f19603f3d011682016040523d82523d6000602084013e610892565b606091505b5091505060001515818060200190518101906108ae919061350c565b151503610911576127106007548760e001516108ca9190613568565b6108d491906135d9565b915081836108e2919061360a565b9250610910600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836126bf565b5b505b600081036109a25761093285604001518660c001518760e0015161273a565b8094508195505050600060085411156109a1576127106008548660e0015161095a9190613568565b61096491906135d9565b90508082610972919061360a565b91506109a0600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826126bf565b5b5b6000845190506000811115610aaf576001811115610a445760005b81811015610a3e578481815181106109d8576109d761363e565b5b6020026020010151846109eb919061360a565b9350610a2b868281518110610a0357610a0261363e565b5b6020026020010151868381518110610a1e57610a1d61363e565b5b60200260200101516126bf565b8080610a369061366d565b9150506109bd565b50610aae565b83600081518110610a5857610a5761363e565b5b602002602001015183610a6b919061360a565b9250610aad85600081518110610a8457610a8361363e565b5b602002602001015185600081518110610aa057610a9f61363e565b5b60200260200101516126bf565b5b5b60008660a001511115610aff5760006127108760a001518860e00151610ad59190613568565b610adf91906135d9565b90508084610aed919061360a565b9350610afd8760800151826126bf565b505b610b0d8660200151846126bf565b610b2586604001513088606001518960c0015161280d565b7f2d7633a748a750b559b97738629efd586b561319b152bb42ba14d590706d31da87604051610b5491906136b5565b60405180910390a150505050505050565b6000806000808585810190610b7a91906136d0565b925092509250610b8e8989898686866128e5565b63150b7a0260e01b935050505095945050505050565b60006002600084815260200190815260200160002090503373ffffffffffffffffffffffffffffffffffffffff168160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148015610c1e575060008160080154145b610c2757600080fd5b8181600701819055507faed3e56ca017d9b02e523c2c7ba81ae5591f43f264dd5d603d70953a12d8079e83604051610c5f91906136b5565b60405180910390a1505050565b6000600260008381526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141580610ce65750806007015434105b15610d1d576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6201518042018160080181905550348160070181905550338160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f7a183e84509e3fe5b0b3aac15347fd1c7d71fd1503001f1a1d7c9658077eb35f82604051610da691906136b5565b60405180910390a15050565b60006002600083815260200190815260200160002090508060080154421180610ddf575060008160080154145b80610e08575060148160070154610df691906135d9565b816007015434610e06919061360a565b105b15610e3f576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806008015461038442610e529190613723565b1115610e6d5761038481600801600082825401925050819055505b610e9f8160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682600701546126bf565b348160070181905550338160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f7a183e84509e3fe5b0b3aac15347fd1c7d71fd1503001f1a1d7c9658077eb35f82604051610f1a91906136b5565b60405180910390a15050565b60026020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060050154908060060154908060070154908060080154905089565b3373ffffffffffffffffffffffffffffffffffffffff1661103361212b565b73ffffffffffffffffffffffffffffffffffffffff161461105357600080fd5b61105d6000612b8f565b565b3373ffffffffffffffffffffffffffffffffffffffff1661107e61212b565b73ffffffffffffffffffffffffffffffffffffffff161461109e57600080fd5b80600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60608060007f000000000000000000000000ad2184fb5dbcfc05d8f056542fb25b04fa32a95d73ffffffffffffffffffffffffffffffffffffffff1663de5488af876040518263ffffffff1660e01b815260040161115791906133a5565b602060405180830381865afa158015611174573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611198919061376c565b90508073ffffffffffffffffffffffffffffffffffffffff16632a55205a86866040518363ffffffff1660e01b81526004016111d5929190613799565b6040805180830381865afa92505050801561120e57506040513d601f19601f8201168201806040525081019061120b91906137d7565b60015b156115ac578581111561125857806040517f3728b83d00000000000000000000000000000000000000000000000000000000815260040161124f91906136b5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663fd90e897886040518263ffffffff1660e01b815260040161129191906136b5565b600060405180830381865afa9250505080156112d057506040513d6000823e3d601f19601f820116820180604052508101906112cd9190613a0a565b60015b6113e457600167ffffffffffffffff8111156112ef576112ee613828565b5b60405190808252806020026020018201604052801561131d5781602001602082028036833780820191505090505b509450600167ffffffffffffffff81111561133b5761133a613828565b5b6040519080825280602002602001820160405280156113695781602001602082028036833780820191505090505b50935081856000815181106113815761138061363e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505080846000815181106113d0576113cf61363e565b5b602002602001018181525050505050612123565b6000815190508067ffffffffffffffff81111561140457611403613828565b5b6040519080825280602002602001820160405280156114325781602001602082028036833780820191505090505b5096508067ffffffffffffffff81111561144f5761144e613828565b5b60405190808252806020026020018201604052801561147d5781602001602082028036833780820191505090505b5095506000805b8281101561155d5760008482815181106114a1576114a061363e565b5b6020026020010151905080600001518a83815181106114c3576114c261363e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600061271087836020015161ffff166115169190613568565b61152091906135d9565b9050808a84815181106115365761153561363e565b5b602002602001018181525050808461154e9190613723565b93508260010192505050611484565b50838111156115a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159890613ab0565b60405180910390fd5b505050505050612123565b7341a322b28d0ff354040e2cbc676f0320d8c8850d73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161480611639575073b932a70a57673d89f4acffbe830e8ed7f75fb9e073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16145b1561186f577317b0c8564e53f22364a6c8de6f7ca5ce9bea4e5d73ffffffffffffffffffffffffffffffffffffffff1663b85ed7e487876040518363ffffffff1660e01b815260040161168d929190613446565b602060405180830381865afa9250505080156116c757506040513d601f19601f820116820180604052508101906116c49190613ad0565b60015b1561186e577317b0c8564e53f22364a6c8de6f7ca5ce9bea4e5d73ffffffffffffffffffffffffffffffffffffffff1663860110f58888886040518463ffffffff1660e01b815260040161171d93929190613afd565b602060405180830381865afa92505050801561175757506040513d601f19601f820116820180604052508101906117549190613b34565b60015b1561186c57600167ffffffffffffffff81111561177757611776613828565b5b6040519080825280602002602001820160405280156117a55781602001602082028036833780820191505090505b509450600167ffffffffffffffff8111156117c3576117c2613828565b5b6040519080825280602002602001820160405280156117f15781602001602082028036833780820191505090505b50935081856000815181106118095761180861363e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505080846000815181106118585761185761363e565b5b602002602001018181525050505050612123565b505b5b8073ffffffffffffffffffffffffffffffffffffffff1663bb3bafd6866040518263ffffffff1660e01b81526004016118a891906136b5565b600060405180830381865afa9250505080156118e757506040513d6000823e3d601f19601f820116820180604052508101906118e49190613ce7565b60015b1561194d57805182511461193657815181516040517fab8b67c600000000000000000000000000000000000000000000000000000000815260040161192d929190613799565b60405180910390fd5b816119418783612c32565b94509450505050612123565b8073ffffffffffffffffffffffffffffffffffffffff1663cad96cca866040518263ffffffff1660e01b815260040161198691906136b5565b600060405180830381865afa9250505080156119c557506040513d6000823e3d601f19601f820116820180604052508101906119c29190613eb6565b60015b15611bcc57805167ffffffffffffffff8111156119e5576119e4613828565b5b604051908082528060200260200182016040528015611a135781602001602082028036833780820191505090505b509350805167ffffffffffffffff811115611a3157611a30613828565b5b604051908082528060200260200182016040528015611a5f5781602001602082028036833780820191505090505b509250600080600090505b8251811015611b7e57828181518110611a8657611a8561363e565b5b602002602001015160000151868281518110611aa557611aa461363e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050612710838281518110611af557611af461363e565b5b6020026020010151602001516bffffffffffffffffffffffff1688611b1a9190613568565b611b2491906135d9565b858281518110611b3757611b3661363e565b5b602002602001018181525050848181518110611b5657611b5561363e565b5b602002602001015182611b699190613723565b91508080611b769061366d565b915050611a6a565b5085811115611bc457806040517f3728b83d000000000000000000000000000000000000000000000000000000008152600401611bbb91906136b5565b60405180910390fd5b505050612123565b8073ffffffffffffffffffffffffffffffffffffffff1663b9c4d9fb866040518263ffffffff1660e01b8152600401611c0591906136b5565b600060405180830381865afa925050508015611c4457506040513d6000823e3d601f19601f82011682018060405250810190611c419190613eff565b60015b15611daa578173ffffffffffffffffffffffffffffffffffffffff1663b9c4d9fb876040518263ffffffff1660e01b8152600401611c8291906136b5565b600060405180830381865afa158015611c9f573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190611cc89190613eff565b90508173ffffffffffffffffffffffffffffffffffffffff16630ebd4c7f876040518263ffffffff1660e01b8152600401611d0391906136b5565b600060405180830381865afa925050508015611d4257506040513d6000823e3d601f19601f82011682018060405250810190611d3f9190613f48565b60015b15611da8578051825114611d9157815181516040517fab8b67c6000000000000000000000000000000000000000000000000000000008152600401611d88929190613799565b60405180910390fd5b81611d9c8783612c32565b94509450505050612123565b505b8073ffffffffffffffffffffffffffffffffffffffff1663d5a06d4c866040518263ffffffff1660e01b8152600401611de391906136b5565b600060405180830381865afa925050508015611e2257506040513d6000823e3d601f19601f82011682018060405250810190611e1f9190613ce7565b60015b15611e88578051825114611e7157815181516040517fab8b67c6000000000000000000000000000000000000000000000000000000008152600401611e68929190613799565b60405180910390fd5b81611e7c8783612c32565b94509450505050612123565b8073ffffffffffffffffffffffffffffffffffffffff1663f662207487876040518363ffffffff1660e01b8152600401611ec3929190613446565b600060405180830381865afa925050508015611f0257506040513d6000823e3d601f19601f82011682018060405250810190611eff9190613ce7565b60015b15611f68578051825114611f5157815181516040517fab8b67c6000000000000000000000000000000000000000000000000000000008152600401611f48929190613799565b60405180910390fd5b81611f5c8783612c32565b94509450505050612123565b8073ffffffffffffffffffffffffffffffffffffffff16639ca7dc7a87876040518363ffffffff1660e01b8152600401611fa3929190613446565b600060405180830381865afa925050508015611fe257506040513d6000823e3d601f19601f82011682018060405250810190611fdf9190613ce7565b60015b1561204857805182511461203157815181516040517fab8b67c6000000000000000000000000000000000000000000000000000000008152600401612028929190613799565b60405180910390fd5b8161203c8783612c32565b94509450505050612123565b8073ffffffffffffffffffffffffffffffffffffffff1663fbda03ab8787876040518463ffffffff1660e01b815260040161208593929190613afd565b600060405180830381865afa9250505080156120c457506040513d6000823e3d601f19601f820116820180604052508101906120c19190613ce7565b60015b1561212157805182511461211357815181516040517fab8b67c600000000000000000000000000000000000000000000000000000000815260040161210a929190613799565b60405180910390fd5b818194509450505050612123565b505b935093915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600060026000838152602001908152602001600020604051806101200160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160058201548152602001600682015481526020016007820154815260200160088201548152505090503373ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff1614801561239157506000816101000151145b61239a57600080fd5b60026000838152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556003820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556004820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600582016000905560068201600090556007820160009055600882016000905550506124a7816040015130338460c0015161280d565b7f28601d865dccc9f113e15a7185c1b38c085d598c71250d3337916a428536d771826040516124d691906136b5565b60405180910390a15050565b3373ffffffffffffffffffffffffffffffffffffffff1661250161212b565b73ffffffffffffffffffffffffffffffffffffffff161461252157600080fd5b80600460008473ffffffffffffffffffffffffffffffffffffffff163f815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b3373ffffffffffffffffffffffffffffffffffffffff1661258661212b565b73ffffffffffffffffffffffffffffffffffffffff16146125a657600080fd5b81600781905550806008819055505050565b3373ffffffffffffffffffffffffffffffffffffffff166125d761212b565b73ffffffffffffffffffffffffffffffffffffffff16146125f757600080fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b3373ffffffffffffffffffffffffffffffffffffffff1661265a61212b565b73ffffffffffffffffffffffffffffffffffffffff161461267a57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036126b357600080fd5b6126bc81612b8f565b50565b60008273ffffffffffffffffffffffffffffffffffffffff16826040516126e590613fb7565b60006040518083038185875af1925050503d8060008114612722576040519150601f19603f3d011682016040523d82523d6000602084013e612727565b606091505b505090508061273557600080fd5b505050565b6060803073ffffffffffffffffffffffffffffffffffffffff16637fea43b8620186a08787876040518563ffffffff1660e01b815260040161277e93929190613afd565b6000604051808303818786fa935050505080156127be57506040513d6000823e3d601f19601f820116820180604052508101906127bb9190613ce7565b60015b6127fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127f490614018565b60405180910390fd5b8181935093505050935093915050565b60008473ffffffffffffffffffffffffffffffffffffffff166342842e0e85858560405160240161284093929190614038565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405161288e91906134e0565b6000604051808303816000865af19150503d80600081146128cb576040519150601f19603f3d011682016040523d82523d6000602084013e6128d0565b606091505b50509050806128de57600080fd5b5050505050565b6128ef6001612d6b565b60006128fb6001612d81565b90506040518061012001604052808873ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff16815260200184815260200186815260200185815260200160008152506002600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060a0820151816005015560c0820151816006015560e0820151816007015561010082015181600801559050507f7e0e356457a92dacd3760ddf327a24dd226c6ca01b2cc41a7fd6f28469c7ab9b81604051612b7e91906136b5565b60405180910390a150505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08183604051612c2692919061406f565b60405180910390a15050565b6060815167ffffffffffffffff811115612c4f57612c4e613828565b5b604051908082528060200260200182016040528015612c7d5781602001602082028036833780820191505090505b509050600080600090505b8351811015612d1e57612710848281518110612ca757612ca661363e565b5b602002602001015186612cba9190613568565b612cc491906135d9565b838281518110612cd757612cd661363e565b5b602002602001018181525050828181518110612cf657612cf561363e565b5b602002602001015182612d099190613723565b91508080612d169061366d565b915050612c88565b5083811115612d6457806040517f3728b83d000000000000000000000000000000000000000000000000000000008152600401612d5b91906136b5565b60405180910390fd5b5092915050565b6001816000016000828254019250508190555050565b600081600001549050919050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612dd881612da3565b8114612de357600080fd5b50565b600081359050612df581612dcf565b92915050565b600060208284031215612e1157612e10612d99565b5b6000612e1f84828501612de6565b91505092915050565b60008115159050919050565b612e3d81612e28565b82525050565b6000602082019050612e586000830184612e34565b92915050565b6000819050919050565b612e7181612e5e565b8114612e7c57600080fd5b50565b600081359050612e8e81612e68565b92915050565b600060208284031215612eaa57612ea9612d99565b5b6000612eb884828501612e7f565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612eec82612ec1565b9050919050565b612efc81612ee1565b8114612f0757600080fd5b50565b600081359050612f1981612ef3565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112612f4457612f43612f1f565b5b8235905067ffffffffffffffff811115612f6157612f60612f24565b5b602083019150836001820283011115612f7d57612f7c612f29565b5b9250929050565b600080600080600060808688031215612fa057612f9f612d99565b5b6000612fae88828901612f0a565b9550506020612fbf88828901612f0a565b9450506040612fd088828901612e7f565b935050606086013567ffffffffffffffff811115612ff157612ff0612d9e565b5b612ffd88828901612f2e565b92509250509295509295909350565b61301581612da3565b82525050565b6000602082019050613030600083018461300c565b92915050565b6000806040838503121561304d5761304c612d99565b5b600061305b85828601612e7f565b925050602061306c85828601612e7f565b9150509250929050565b61307f81612ee1565b82525050565b61308e81612e5e565b82525050565b6000610120820190506130aa600083018c613076565b6130b7602083018b613076565b6130c4604083018a613076565b6130d16060830189613076565b6130de6080830188613076565b6130eb60a0830187613085565b6130f860c0830186613085565b61310560e0830185613085565b613113610100830184613085565b9a9950505050505050505050565b61312a81612e28565b811461313557600080fd5b50565b60008135905061314781613121565b92915050565b6000806040838503121561316457613163612d99565b5b600061317285828601612f0a565b925050602061318385828601613138565b9150509250929050565b6000806000606084860312156131a6576131a5612d99565b5b60006131b486828701612f0a565b93505060206131c586828701612e7f565b92505060406131d686828701612e7f565b9150509250925092565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600061321782612ec1565b9050919050565b6132278161320c565b82525050565b6000613239838361321e565b60208301905092915050565b6000602082019050919050565b600061325d826131e0565b61326781856131eb565b9350613272836131fc565b8060005b838110156132a357815161328a888261322d565b975061329583613245565b925050600181019050613276565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6132e581612e5e565b82525050565b60006132f783836132dc565b60208301905092915050565b6000602082019050919050565b600061331b826132b0565b61332581856132bb565b9350613330836132cc565b8060005b8381101561336157815161334888826132eb565b975061335383613303565b925050600181019050613334565b5085935050505092915050565b600060408201905081810360008301526133888185613252565b9050818103602083015261339c8184613310565b90509392505050565b60006020820190506133ba6000830184613076565b92915050565b6133c98161320c565b81146133d457600080fd5b50565b6000813590506133e6816133c0565b92915050565b60006020828403121561340257613401612d99565b5b6000613410848285016133d7565b91505092915050565b60006020828403121561342f5761342e612d99565b5b600061343d84828501612f0a565b91505092915050565b600060408201905061345b6000830185613076565b6134686020830184613085565b9392505050565b600081519050919050565b600081905092915050565b60005b838110156134a3578082015181840152602081019050613488565b60008484015250505050565b60006134ba8261346f565b6134c4818561347a565b93506134d4818560208601613485565b80840191505092915050565b60006134ec82846134af565b915081905092915050565b60008151905061350681613121565b92915050565b60006020828403121561352257613521612d99565b5b6000613530848285016134f7565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061357382612e5e565b915061357e83612e5e565b925082820261358c81612e5e565b915082820484148315176135a3576135a2613539565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006135e482612e5e565b91506135ef83612e5e565b9250826135ff576135fe6135aa565b5b828204905092915050565b600061361582612e5e565b915061362083612e5e565b925082820390508181111561363857613637613539565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600061367882612e5e565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036136aa576136a9613539565b5b600182019050919050565b60006020820190506136ca6000830184613085565b92915050565b6000806000606084860312156136e9576136e8612d99565b5b60006136f786828701612e7f565b935050602061370886828701612e7f565b9250506040613719868287016133d7565b9150509250925092565b600061372e82612e5e565b915061373983612e5e565b925082820190508082111561375157613750613539565b5b92915050565b60008151905061376681612ef3565b92915050565b60006020828403121561378257613781612d99565b5b600061379084828501613757565b91505092915050565b60006040820190506137ae6000830185613085565b6137bb6020830184613085565b9392505050565b6000815190506137d181612e68565b92915050565b600080604083850312156137ee576137ed612d99565b5b60006137fc85828601613757565b925050602061380d858286016137c2565b9150509250929050565b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61386082613817565b810181811067ffffffffffffffff8211171561387f5761387e613828565b5b80604052505050565b6000613892612d8f565b905061389e8282613857565b919050565b600067ffffffffffffffff8211156138be576138bd613828565b5b602082029050602081019050919050565b600080fd5b6000815190506138e3816133c0565b92915050565b600061ffff82169050919050565b613900816138e9565b811461390b57600080fd5b50565b60008151905061391d816138f7565b92915050565b600060408284031215613939576139386138cf565b5b6139436040613888565b90506000613953848285016138d4565b60008301525060206139678482850161390e565b60208301525092915050565b6000613986613981846138a3565b613888565b905080838252602082019050604084028301858111156139a9576139a8612f29565b5b835b818110156139d257806139be8882613923565b8452602084019350506040810190506139ab565b5050509392505050565b600082601f8301126139f1576139f0612f1f565b5b8151613a01848260208601613973565b91505092915050565b600060208284031215613a2057613a1f612d99565b5b600082015167ffffffffffffffff811115613a3e57613a3d612d9e565b5b613a4a848285016139dc565b91505092915050565b600082825260208201905092915050565b7f496e76616c69642073706c697400000000000000000000000000000000000000600082015250565b6000613a9a600d83613a53565b9150613aa582613a64565b602082019050919050565b60006020820190508181036000830152613ac981613a8d565b9050919050565b600060208284031215613ae657613ae5612d99565b5b6000613af4848285016138d4565b91505092915050565b6000606082019050613b126000830186613076565b613b1f6020830185613085565b613b2c6040830184613085565b949350505050565b600060208284031215613b4a57613b49612d99565b5b6000613b58848285016137c2565b91505092915050565b600067ffffffffffffffff821115613b7c57613b7b613828565b5b602082029050602081019050919050565b6000613ba0613b9b84613b61565b613888565b90508083825260208201905060208402830185811115613bc357613bc2612f29565b5b835b81811015613bec5780613bd888826138d4565b845260208401935050602081019050613bc5565b5050509392505050565b600082601f830112613c0b57613c0a612f1f565b5b8151613c1b848260208601613b8d565b91505092915050565b600067ffffffffffffffff821115613c3f57613c3e613828565b5b602082029050602081019050919050565b6000613c63613c5e84613c24565b613888565b90508083825260208201905060208402830185811115613c8657613c85612f29565b5b835b81811015613caf5780613c9b88826137c2565b845260208401935050602081019050613c88565b5050509392505050565b600082601f830112613cce57613ccd612f1f565b5b8151613cde848260208601613c50565b91505092915050565b60008060408385031215613cfe57613cfd612d99565b5b600083015167ffffffffffffffff811115613d1c57613d1b612d9e565b5b613d2885828601613bf6565b925050602083015167ffffffffffffffff811115613d4957613d48612d9e565b5b613d5585828601613cb9565b9150509250929050565b600067ffffffffffffffff821115613d7a57613d79613828565b5b602082029050602081019050919050565b60006bffffffffffffffffffffffff82169050919050565b613dac81613d8b565b8114613db757600080fd5b50565b600081519050613dc981613da3565b92915050565b600060408284031215613de557613de46138cf565b5b613def6040613888565b90506000613dff848285016138d4565b6000830152506020613e1384828501613dba565b60208301525092915050565b6000613e32613e2d84613d5f565b613888565b90508083825260208201905060408402830185811115613e5557613e54612f29565b5b835b81811015613e7e5780613e6a8882613dcf565b845260208401935050604081019050613e57565b5050509392505050565b600082601f830112613e9d57613e9c612f1f565b5b8151613ead848260208601613e1f565b91505092915050565b600060208284031215613ecc57613ecb612d99565b5b600082015167ffffffffffffffff811115613eea57613ee9612d9e565b5b613ef684828501613e88565b91505092915050565b600060208284031215613f1557613f14612d99565b5b600082015167ffffffffffffffff811115613f3357613f32612d9e565b5b613f3f84828501613bf6565b91505092915050565b600060208284031215613f5e57613f5d612d99565b5b600082015167ffffffffffffffff811115613f7c57613f7b612d9e565b5b613f8884828501613cb9565b91505092915050565b50565b6000613fa160008361347a565b9150613fac82613f91565b600082019050919050565b6000613fc282613f94565b9150819050919050565b7f526f79616c7479206c6f6f6b7570206661696c65640000000000000000000000600082015250565b6000614002601583613a53565b915061400d82613fcc565b602082019050919050565b6000602082019050818103600083015261403181613ff5565b9050919050565b600060608201905061404d6000830186613076565b61405a6020830185613076565b6140676040830184613085565b949350505050565b60006040820190506140846000830185613076565b6140916020830184613076565b939250505056fea264697066735822122087b43e3079eb722c458ff10e4672cdd61e41acf3580e90049bb344b23eab4cbe64736f6c63430008130033

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

000000000000000000000000ad2184fb5dbcfc05d8f056542fb25b04fa32a95d000000000000000000000000167a296135c0067903d4c099806405f6c316442e00000000000000000000000061b98acbfc23326cfe296f380b5aa3e5adcc5238

-----Decoded View---------------
Arg [0] : _royaltyRegistry (address): 0xaD2184FB5DBcfC05d8f056542fB25b04fa32A95D
Arg [1] : _primarySalesRegistry (address): 0x167A296135c0067903d4C099806405f6c316442E
Arg [2] : factory_ (address): 0x61b98ACbfc23326Cfe296f380B5aa3e5Adcc5238

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000ad2184fb5dbcfc05d8f056542fb25b04fa32a95d
Arg [1] : 000000000000000000000000167a296135c0067903d4c099806405f6c316442e
Arg [2] : 00000000000000000000000061b98acbfc23326cfe296f380b5aa3e5adcc5238


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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