ETH Price: $2,924.58 (-8.50%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Match Ask With T...198679802024-05-14 11:34:23264 days ago1715686463IN
0x10a8478D...4bB98145C
0.1 ETH0.001730146.39278735
Match Ask With T...194170762024-03-12 6:01:23327 days ago1710223283IN
0x10a8478D...4bB98145C
0.06 ETH0.0154766854.20260553
Match Ask With T...191608852024-02-05 8:27:59363 days ago1707121679IN
0x10a8478D...4bB98145C
0.05 ETH0.0034248412.62745836
Match Ask With T...191602692024-02-05 6:23:35363 days ago1707114215IN
0x10a8478D...4bB98145C
0.065 ETH0.0031267112.11327662
Match Ask With T...191556672024-02-04 14:54:11364 days ago1707058451IN
0x10a8478D...4bB98145C
0.054 ETH0.0048081716.8382409
Match Ask With T...191309792024-02-01 3:41:11367 days ago1706758871IN
0x10a8478D...4bB98145C
0.068 ETH0.0056767920.4202005
Match Ask With T...191309572024-02-01 3:36:47367 days ago1706758607IN
0x10a8478D...4bB98145C
0.06 ETH0.005642420.2947562
Match Ask With T...191306762024-02-01 2:38:59367 days ago1706755139IN
0x10a8478D...4bB98145C
0.05 ETH0.0063496722.24014263
Match Ask With T...191302342024-02-01 1:09:47367 days ago1706749787IN
0x10a8478D...4bB98145C
0.04 ETH0.0067770124.62693846
Match Bid With T...191063492024-01-28 16:53:47371 days ago1706460827IN
0x10a8478D...4bB98145C
0 ETH0.0040846912.11122238
Match Ask With T...190898472024-01-26 9:21:11373 days ago1706260871IN
0x10a8478D...4bB98145C
0.028 ETH0.0046696617.89802659
Match Ask With T...190865022024-01-25 22:06:47373 days ago1706220407IN
0x10a8478D...4bB98145C
0.025 ETH0.0057673621.26303557
Match Ask With T...190272632024-01-17 14:40:47382 days ago1705502447IN
0x10a8478D...4bB98145C
0.019 ETH0.0101354935.49662106
Match Ask With T...190031262024-01-14 5:45:47385 days ago1705211147IN
0x10a8478D...4bB98145C
0.023 ETH0.01152639.9728127
Match Ask With T...189834342024-01-11 11:37:59388 days ago1704973079IN
0x10a8478D...4bB98145C
0.02 ETH0.0066009124.59264132
Match Ask With T...189674072024-01-09 5:43:59390 days ago1704779039IN
0x10a8478D...4bB98145C
0.035 ETH0.0036433613.70937979
Match Ask With T...188407082023-12-22 10:11:59408 days ago1703239919IN
0x10a8478D...4bB98145C
0.015 ETH0.0098994439.81324925
Match Ask With T...188356242023-12-21 17:06:47409 days ago1703178407IN
0x10a8478D...4bB98145C
0.015 ETH0.022634878.49876797
Match Ask With T...184234082023-10-24 23:31:47466 days ago1698190307IN
0x10a8478D...4bB98145C
0.15 ETH0.0075996925.17229452
Match Ask With T...183862332023-10-19 18:41:23472 days ago1697740883IN
0x10a8478D...4bB98145C
0.03 ETH0.0030570311.08327643
Update Collectio...183775732023-10-18 13:35:59473 days ago1697636159IN
0x10a8478D...4bB98145C
0 ETH0.0004877816.17364305
Match Ask With T...183439902023-10-13 20:55:47477 days ago1697230547IN
0x10a8478D...4bB98145C
0.1 ETH0.002966149.59771049
Match Ask With T...183371822023-10-12 22:01:35478 days ago1697148095IN
0x10a8478D...4bB98145C
0.1 ETH0.002256997.60666549
Match Ask With T...183291482023-10-11 19:02:35480 days ago1697050955IN
0x10a8478D...4bB98145C
0.025 ETH0.002579098.40883511
Match Ask With T...180741922023-09-06 1:38:35515 days ago1693964315IN
0x10a8478D...4bB98145C
0.03 ETH0.0052877117.51554509
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
198679802024-05-14 11:34:23264 days ago1715686463
0x10a8478D...4bB98145C
0.1 ETH
194170762024-03-12 6:01:23327 days ago1710223283
0x10a8478D...4bB98145C
0.06 ETH
191608852024-02-05 8:27:59363 days ago1707121679
0x10a8478D...4bB98145C
0.05 ETH
191602692024-02-05 6:23:35363 days ago1707114215
0x10a8478D...4bB98145C
0.065 ETH
191556672024-02-04 14:54:11364 days ago1707058451
0x10a8478D...4bB98145C
0.054 ETH
191309792024-02-01 3:41:11367 days ago1706758871
0x10a8478D...4bB98145C
0.068 ETH
191309572024-02-01 3:36:47367 days ago1706758607
0x10a8478D...4bB98145C
0.06 ETH
191306762024-02-01 2:38:59367 days ago1706755139
0x10a8478D...4bB98145C
0.05 ETH
191302342024-02-01 1:09:47367 days ago1706749787
0x10a8478D...4bB98145C
0.04 ETH
190898472024-01-26 9:21:11373 days ago1706260871
0x10a8478D...4bB98145C
0.028 ETH
190865022024-01-25 22:06:47373 days ago1706220407
0x10a8478D...4bB98145C
0.025 ETH
190272632024-01-17 14:40:47382 days ago1705502447
0x10a8478D...4bB98145C
0.019 ETH
190031262024-01-14 5:45:47385 days ago1705211147
0x10a8478D...4bB98145C
0.023 ETH
189834342024-01-11 11:37:59388 days ago1704973079
0x10a8478D...4bB98145C
0.02 ETH
189674072024-01-09 5:43:59390 days ago1704779039
0x10a8478D...4bB98145C
0.035 ETH
188407082023-12-22 10:11:59408 days ago1703239919
0x10a8478D...4bB98145C
0.015 ETH
188356242023-12-21 17:06:47409 days ago1703178407
0x10a8478D...4bB98145C
0.015 ETH
184234082023-10-24 23:31:47466 days ago1698190307
0x10a8478D...4bB98145C
0.15 ETH
183862332023-10-19 18:41:23472 days ago1697740883
0x10a8478D...4bB98145C
0.03 ETH
183439902023-10-13 20:55:47477 days ago1697230547
0x10a8478D...4bB98145C
0.1 ETH
183371822023-10-12 22:01:35478 days ago1697148095
0x10a8478D...4bB98145C
0.1 ETH
183291482023-10-11 19:02:35480 days ago1697050955
0x10a8478D...4bB98145C
0.025 ETH
180741922023-09-06 1:38:35515 days ago1693964315
0x10a8478D...4bB98145C
0.03 ETH
174780702023-06-14 12:06:23599 days ago1686744383
0x10a8478D...4bB98145C
0.5 ETH
174445172023-06-09 18:43:11604 days ago1686336191
0x10a8478D...4bB98145C
0.08 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CryptoAvatarsExchange

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 20 : CryptoAvatarsExchange.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

// CryptoAvatars interfaces
import {ICurrencyManager} from "./interfaces/ICurrencyManager.sol";
import {IExecutionManager} from "./interfaces/IExecutionManager.sol";
import {IExecutionStrategy} from "./interfaces/IExecutionStrategy.sol";
import {IRoyaltyFeeManager} from "./interfaces/IRoyaltyFeeManager.sol";
import {ICryptoAvatarsExchange} from "./interfaces/ICryptoAvatarsExchange.sol";
import {ITransferManagerNFT} from "./interfaces/ITransferManagerNFT.sol";
import {ITransferSelectorNFT} from "./interfaces/ITransferSelectorNFT.sol";
import {ICollectionManager} from "./interfaces/ICollectionManager.sol";
import {IWETH} from "./interfaces/IWETH.sol";

// CryptoAvatars libraries
import {OrderTypes} from "./libraries/OrderTypes.sol";
import {SignatureChecker} from "./libraries/SignatureChecker.sol";

/**
 * @title CryptoAvatars
 * @notice It is the core contract of the CryptoAvatars exchange.
 */
contract CryptoAvatarsExchange is ICryptoAvatarsExchange, ReentrancyGuard, Ownable {
    using SafeERC20 for IERC20;

    using OrderTypes for OrderTypes.MakerOrder;
    using OrderTypes for OrderTypes.TakerOrder;

    address public immutable WETH;
    bytes32 public immutable DOMAIN_SEPARATOR;

    address public protocolFeeRecipient;
    address public signer;

    ICurrencyManager public currencyManager;
    IExecutionManager public executionManager;
    IRoyaltyFeeManager public royaltyFeeManager;
    ITransferSelectorNFT public transferSelectorNFT;
    ICollectionManager public collectionManager;

    mapping(address => uint256) public userMinOrderNonce;
    mapping(address => mapping(uint256 => bool)) private _isUserOrderNonceExecutedOrCancelled;

    event CancelAllOrders(address indexed user, uint256 newMinNonce);
    event CancelMultipleOrders(address indexed user, uint256[] orderNonces);
    event NewCurrencyManager(address indexed currencyManager);
    event NewExecutionManager(address indexed executionManager);
    event NewProtocolFeeRecipient(address indexed protocolFeeRecipient);
    event NewRoyaltyFeeManager(address indexed royaltyFeeManager);
    event NewCollectionManager(address indexed collectionManager);
    event NewTransferSelectorNFT(address indexed transferSelectorNFT);

    event RoyaltyPayment(
        address indexed collection,
        uint256 indexed tokenId,
        address indexed royaltyRecipient,
        address currency,
        uint256 amount
    );

    event MarketSell(
        bytes makerOrder, // maker order data
        bytes takerOrder // taker order data
    );

    /**
     * @notice Constructor
     * @param _currencyManager currency manager address
     * @param _executionManager execution manager address
     * @param _royaltyFeeManager royalty fee manager address
     * @param _WETH wrapped ether address (for other chains, use wrapped native asset)
     * @param _protocolFeeRecipient protocol fee recipient
     */
    constructor(
        address _currencyManager,
        address _executionManager,
        address _royaltyFeeManager,
        address _collectionManager,
        address _WETH,
        address _protocolFeeRecipient,
        address _signer
    ) {
        // Calculate the domain separator
        DOMAIN_SEPARATOR = keccak256(
            abi.encode(
                0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f, // keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)")
                0x479e4b32420d5d35c74f62189f17325d7fd3b51ff82b6be4bcab394dc45ea1d9, // keccak256("CryptoAvatars")
                0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6, // keccak256(bytes("1")) for versionId = 1
                block.chainid,
                address(this)
            )
        );

        currencyManager = ICurrencyManager(_currencyManager);
        executionManager = IExecutionManager(_executionManager);
        royaltyFeeManager = IRoyaltyFeeManager(_royaltyFeeManager);
        collectionManager = ICollectionManager(_collectionManager);
        WETH = _WETH;
        protocolFeeRecipient = _protocolFeeRecipient;
        signer = _signer;
    }

    /**
     * @notice Cancel all pending orders for a sender
     * @param minNonce minimum user nonce
     */
    function cancelAllOrdersForSender(uint256 minNonce) external {
        require(minNonce > userMinOrderNonce[msg.sender], "Cancel: Order nonce lower than current");
        require(minNonce < userMinOrderNonce[msg.sender] + 500000, "Cancel: Cannot cancel more orders");
        userMinOrderNonce[msg.sender] = minNonce;
        emit CancelAllOrders(msg.sender, minNonce);
    }

    /**
     * @notice Cancel maker orders
     * @param orderNonces array of order nonces
     */
    function cancelMultipleMakerOrders(uint256[] calldata orderNonces) external {
        require(orderNonces.length > 0, "Cancel: Cannot be empty");

        for (uint256 i = 0; i < orderNonces.length; i++) {
            require(orderNonces[i] >= userMinOrderNonce[msg.sender], "Cancel: Order nonce lower than current");
            _isUserOrderNonceExecutedOrCancelled[msg.sender][orderNonces[i]] = true;
        }
        emit CancelMultipleOrders(msg.sender, orderNonces);
    }

    /**
     * @notice Match ask with a taker bid order using ETH
     * @param takerBid taker bid order
     * @param makerAsk maker ask order
     */
    function matchAskWithTakerBidUsingETHAndWETH(
        OrderTypes.TakerOrder calldata takerBid,
        OrderTypes.MakerOrder calldata makerAsk
    ) external payable override nonReentrant {
        require((makerAsk.isOrderAsk) && (!takerBid.isOrderAsk), "Order: Wrong sides");
        require(makerAsk.currency == WETH, "Order: Currency must be WETH");
        require(msg.sender == takerBid.taker, "Order: Taker must be the sender");

        // If not enough ETH to cover the price, use WETH
        if (takerBid.price > msg.value) {
            IERC20(WETH).safeTransferFrom(msg.sender, address(this), (takerBid.price - msg.value));
        } else {
            require(takerBid.price == msg.value, "Order: Msg.value too high");
        }

        // Wrap ETH sent to this contract
        IWETH(WETH).deposit{value: msg.value}();

        // Check maker ask and taker bid orders
        _validateOrder(makerAsk, takerBid);

        // Retrieve execution parameters
        (bool isExecutionValid, uint256 tokenId, uint256 amount) = IExecutionStrategy(makerAsk.strategy)
            .canExecuteTakerBid(takerBid, makerAsk);

        require(isExecutionValid, "Strategy: Execution invalid");

        // Update maker ask order status to true (prevents replay)
        _isUserOrderNonceExecutedOrCancelled[makerAsk.signer][makerAsk.nonce] = true;

        // Execution part 1/2
        _transferFeesAndFundsWithWETH(
           makerAsk,
           takerBid, 
           makerAsk.signer
        );

        // Execution part 2/2
        _transferNonFungibleToken(makerAsk.collection, makerAsk.signer, takerBid.taker, tokenId, amount);

        // Emit event
        emit MarketSell(abi.encode(makerAsk), abi.encode(takerBid));

    }

    /**
     * @notice Match a takerBid with a matchAsk
     * @param takerBid taker bid order
     * @param makerAsk maker ask order
     */
    function matchAskWithTakerBid(OrderTypes.TakerOrder calldata takerBid, OrderTypes.MakerOrder calldata makerAsk)
        external
        override
        nonReentrant
    {
        require((makerAsk.isOrderAsk) && (!takerBid.isOrderAsk), "Order: Wrong sides");
        require(msg.sender == takerBid.taker, "Order: Taker must be the sender");

        // Check the maker ask order
        _validateOrder(makerAsk, takerBid);


        (bool isExecutionValid, uint256 tokenId, uint256 amount) = IExecutionStrategy(makerAsk.strategy)
            .canExecuteTakerBid(takerBid, makerAsk);

        require(isExecutionValid, "Strategy: Execution invalid");

        // Update maker ask order status to true (prevents replay)
        _isUserOrderNonceExecutedOrCancelled[makerAsk.signer][makerAsk.nonce] = true;

        // Execution part 1/2
        _transferFeesAndFunds(makerAsk, takerBid, takerBid.taker, makerAsk.signer);

        // Execution part 2/2
        _transferNonFungibleToken(makerAsk.collection, makerAsk.signer, takerBid.taker, tokenId, amount);

        // Emit event
        emit MarketSell(abi.encode(makerAsk), abi.encode(takerBid));
    }

    /**
     * @notice Match a takerAsk with a makerBid
     * @param takerAsk taker ask order
     * @param makerBid maker bid order
     */
    function matchBidWithTakerAsk(OrderTypes.TakerOrder calldata takerAsk, OrderTypes.MakerOrder calldata makerBid)
        external
        override
        nonReentrant
    {
        require((!makerBid.isOrderAsk) && (takerAsk.isOrderAsk), "Order: Wrong sides");
        require(msg.sender == takerAsk.taker, "Order: Taker must be the sender");

        // Check the maker bid order
        _validateOrder(makerBid, takerAsk);

        (bool isExecutionValid, uint256 tokenId, uint256 amount) = IExecutionStrategy(makerBid.strategy)
            .canExecuteTakerAsk(takerAsk, makerBid);

        require(isExecutionValid, "Strategy: Execution invalid");

        // Update maker bid order status to true (prevents replay)
        _isUserOrderNonceExecutedOrCancelled[makerBid.signer][makerBid.nonce] = true;

        // Execution part 1/2
        _transferNonFungibleToken(makerBid.collection, takerAsk.taker, makerBid.signer, tokenId, amount);
        
        // Execution part 2/2
        _transferFeesAndFunds(makerBid, takerAsk, makerBid.signer, takerAsk.taker);

        // Emit event
        emit MarketSell(abi.encode(makerBid), abi.encode(takerAsk));

    }

    /**
    * @notice Update signer
    * @param _signer new marketplace signer
    */
    function updateSigner(address _signer) external onlyOwner {
        require(_signer != address(0), "Owner: Cannot be null address");
        signer = _signer;
    }

    /**
     * @notice Update currency manager
     * @param _currencyManager new currency manager address
     */
    function updateCurrencyManager(address _currencyManager) external onlyOwner {
        require(_currencyManager != address(0), "Owner: Cannot be null address");
        currencyManager = ICurrencyManager(_currencyManager);
        emit NewCurrencyManager(_currencyManager);
    }

    /**
     * @notice Update execution manager
     * @param _executionManager new execution manager address
     */
    function updateExecutionManager(address _executionManager) external onlyOwner {
        require(_executionManager != address(0), "Owner: Cannot be null address");
        executionManager = IExecutionManager(_executionManager);
        emit NewExecutionManager(_executionManager);
    }

    /**
     * @notice Update collection manager
     * @param _collectionManager new collection manager address
     */
    function updateCollectionManager(address _collectionManager) external onlyOwner {
        require(_collectionManager != address(0), "Owner: Cannot be null address");
        collectionManager = ICollectionManager(_collectionManager);
        emit NewCollectionManager(_collectionManager);
    }

    /**
     * @notice Update protocol fee and recipient
     * @param _protocolFeeRecipient new recipient for protocol fees
     */
    function updateProtocolFeeRecipient(address _protocolFeeRecipient) external onlyOwner {
        protocolFeeRecipient = _protocolFeeRecipient;
        emit NewProtocolFeeRecipient(_protocolFeeRecipient);
    }

    /**
     * @notice Update royalty fee manager
     * @param _royaltyFeeManager new fee manager address
     */
    function updateRoyaltyFeeManager(address _royaltyFeeManager) external onlyOwner {
        require(_royaltyFeeManager != address(0), "Owner: Cannot be null address");
        royaltyFeeManager = IRoyaltyFeeManager(_royaltyFeeManager);
        emit NewRoyaltyFeeManager(_royaltyFeeManager);
    }

    /**
     * @notice Update transfer selector NFT
     * @param _transferSelectorNFT new transfer selector address
     */
    function updateTransferSelectorNFT(address _transferSelectorNFT) external onlyOwner {
        require(_transferSelectorNFT != address(0), "Owner: Cannot be null address");
        transferSelectorNFT = ITransferSelectorNFT(_transferSelectorNFT);   
        emit NewTransferSelectorNFT(_transferSelectorNFT);
    }

    /**
     * @notice Check whether user order nonce is executed or cancelled
     * @param user address of user
     * @param orderNonce nonce of the order
     */
    function isUserOrderNonceExecutedOrCancelled(address user, uint256 orderNonce) external view returns (bool) {
        return _isUserOrderNonceExecutedOrCancelled[user][orderNonce];
    }

    /**
     * @notice Transfer fees and funds to royalty recipient, protocol, and seller
     * @param takerOrder taker order 
     * @param makerOrder maker order
     * @param from _msgSender()  
     */
    function _transferFeesAndFunds(
        OrderTypes.MakerOrder calldata makerOrder,
        OrderTypes.TakerOrder calldata takerOrder, 
        address from, 
        address to
    ) internal {
        // Initialize the final amount that is transferred to seller
        uint256 finalSellerAmount = makerOrder.price;

        // 1. Protocol fee
        {
            uint256 protocolFeeAmount = _calculateProtocolFee(makerOrder.strategy, makerOrder.price);

            // Check if the protocol fee is different than 0 for this strategy
            if ((protocolFeeRecipient != address(0)) && (protocolFeeAmount != 0)) {
                IERC20(makerOrder.currency).safeTransferFrom(from, protocolFeeRecipient, protocolFeeAmount);
                finalSellerAmount -= protocolFeeAmount;
            }
        }

        // 2. Royalty fee
        {        
            if(!isZeroBytes(takerOrder.dataCryptoAvatars)) { // Is CryptoAvatars, pay a fee to the avatar creator
                (address creator , uint256 royaltyFee) = abi.decode(takerOrder.dataCryptoAvatars, (address, uint256));
                uint256 royaltyCreatorFeeAmount = (makerOrder.price * royaltyFee) / 10000 ;
                if ((creator != address(0)) && (royaltyCreatorFeeAmount != 0)) {
                    IERC20(makerOrder.currency).safeTransferFrom(from, creator, royaltyCreatorFeeAmount);
                    finalSellerAmount -= royaltyCreatorFeeAmount;
                }
            }
            else if(!isZeroBytes(takerOrder.dataRemix)) { // Is Remix, pay a fee to the remix creator and to the collection owner
                (address creatorRemix, address ownerRemix) = abi.decode(takerOrder.dataRemix, (address, address));
                uint256 royaltyCreatorFee = royaltyFeeManager.getRemixCreatorRoyaltyFee();
                uint256 royaltyOwnerFee = royaltyFeeManager.getRemixOwnerRoyaltyFee();
                uint256 royaltyCreatorFeeAmount = (makerOrder.price * royaltyCreatorFee) / 10000 ;
                uint256 royaltyOwnerFeeAmount =  (makerOrder.price * royaltyOwnerFee) / 10000 ;
                IERC20(makerOrder.currency).safeTransferFrom(from, creatorRemix, royaltyCreatorFeeAmount);
                IERC20(makerOrder.currency).safeTransferFrom(from, ownerRemix, royaltyOwnerFeeAmount);
                finalSellerAmount -= royaltyCreatorFeeAmount + royaltyOwnerFeeAmount;
            }
            else { // It is a non CA collection, pay a fee to the collection owner
                (address royaltyFeeRecipient, uint256 royaltyFeeAmount) = royaltyFeeManager
                    .calculateRoyaltyFeeAndGetRecipient(makerOrder.collection, makerOrder.tokenId, makerOrder.price);
                // Check if there is a royalty fee and that it is different to 0
                if ((royaltyFeeRecipient != address(0)) && (royaltyFeeAmount != 0)) {
                    IERC20(makerOrder.currency).safeTransferFrom(from, royaltyFeeRecipient, royaltyFeeAmount);
                    finalSellerAmount -= royaltyFeeAmount;
                emit RoyaltyPayment(makerOrder.collection, makerOrder.tokenId, royaltyFeeRecipient, makerOrder.currency, royaltyFeeAmount);
                }
            }
        }
        
        require((finalSellerAmount * 10000) >= (makerOrder.minPercentageToAsk * makerOrder.price), "Fees: Higher than expected");

        // 3. Transfer final amount (post-fees) to seller
        {
            IERC20(makerOrder.currency).safeTransferFrom(from, to, finalSellerAmount);
        }
    }

    /**
     * @notice Transfer fees and funds to royalty recipient, protocol, and seller
     * @param makerOrder maker order
     * @param takerOrder taker order
     */
    function _transferFeesAndFundsWithWETH(
       OrderTypes.MakerOrder calldata makerOrder,
       OrderTypes.TakerOrder calldata takerOrder, 
       address to
    ) internal {
        // Initialize the final amount that is transferred to seller
        uint256 finalSellerAmount = makerOrder.price;

        // 1. Protocol fee
        {
            uint256 protocolFeeAmount = _calculateProtocolFee(makerOrder.strategy, makerOrder.price);

            // Check if the protocol fee is different than 0 for this strategy
            if ((protocolFeeRecipient != address(0)) && (protocolFeeAmount != 0)) {
                IERC20(WETH).safeTransfer(protocolFeeRecipient, protocolFeeAmount);
                finalSellerAmount -= protocolFeeAmount;
            }
        }

        // 2. Royalty fee
        {  
            if(!isZeroBytes(takerOrder.dataCryptoAvatars)) { // Is CryptoAvatars, pay a fee to the avatar creator
                (address creator , uint256 royaltyFee) = abi.decode(takerOrder.dataCryptoAvatars, (address, uint256));
                uint256 royaltyCreatorFeeAmount = (makerOrder.price * royaltyFee) / 10000 ;
                if ((creator != address(0)) && (royaltyCreatorFeeAmount != 0)) {
                    IERC20(WETH).safeTransfer(creator, royaltyCreatorFeeAmount);
                    finalSellerAmount -= royaltyCreatorFeeAmount;
                }
            }
            else if(!isZeroBytes(takerOrder.dataRemix)) { // Is Remix, pay a fee to the remix creator and to the collection owner
                (address creatorRemix, address ownerRemix) = abi.decode(takerOrder.dataRemix, (address, address));
                uint256 royaltyCreatorFee = royaltyFeeManager.getRemixCreatorRoyaltyFee();
                uint256 royaltyOwnerFee = royaltyFeeManager.getRemixOwnerRoyaltyFee();
                uint256 royaltyCreatorFeeAmount = (makerOrder.price * royaltyCreatorFee) / 10000 ;
                uint256 royaltyOwnerFeeAmount =  (makerOrder.price * royaltyOwnerFee) / 10000 ;
                IERC20(WETH).safeTransfer(creatorRemix, royaltyCreatorFeeAmount);
                IERC20(WETH).safeTransfer(ownerRemix, royaltyOwnerFeeAmount);
                finalSellerAmount -= royaltyCreatorFeeAmount + royaltyOwnerFeeAmount;
            }
            else { // It is a non CA collection, pay a fee to the collection owner
                (address royaltyFeeRecipient, uint256 royaltyFeeAmount) = royaltyFeeManager
                    .calculateRoyaltyFeeAndGetRecipient(makerOrder.collection, makerOrder.tokenId, makerOrder.price);
                // Check if there is a royalty fee and that it is different to 0
                if ((royaltyFeeRecipient != address(0)) && (royaltyFeeAmount != 0)) {
                    IERC20(WETH).safeTransfer(royaltyFeeRecipient, royaltyFeeAmount);
                    finalSellerAmount -= royaltyFeeAmount;
                emit RoyaltyPayment(makerOrder.collection, makerOrder.tokenId, royaltyFeeRecipient, WETH, royaltyFeeAmount);
                }
            }
        }

        require((finalSellerAmount * 10000) >= (makerOrder.minPercentageToAsk * makerOrder.price), "Fees: Higher than expected");

        // 3. Transfer final amount (post-fees) to seller
        {
            IERC20(WETH).safeTransfer(to, finalSellerAmount);
        }
    }

    /**
     * @notice Transfer NFT
     * @param collection address of the token collection
     * @param from address of the sender
     * @param to address of the recipient
     * @param tokenId tokenId
     * @param amount amount of tokens (1 for ERC721, 1+ for ERC1155)
     * @dev For ERC721, amount is not used
     */
    function _transferNonFungibleToken(
        address collection,
        address from,
        address to,
        uint256 tokenId,
        uint256 amount
    ) internal {
        // Retrieve the transfer manager address
        address transferManager = transferSelectorNFT.checkTransferManagerForToken(collection);

        // If no transfer manager found, it returns address(0)
        require(transferManager != address(0), "Transfer: No NFT transfer manager available");

        // If one is found, transfer the token
        ITransferManagerNFT(transferManager).transferNonFungibleToken(collection, from, to, tokenId, amount);
    }

    /**
     * @notice Calculate protocol fee for an execution strategy
     * @param executionStrategy strategy
     * @param amount amount to transfer
     */
    function _calculateProtocolFee(address executionStrategy, uint256 amount) internal view returns (uint256) {
        uint256 protocolFee = IExecutionStrategy(executionStrategy).viewProtocolFee();
        return (protocolFee * amount) / 10000;
    }

    /**
     * @notice Verify the validity of the maker order and the taker order
     * @param makerOrder maker order
     * @param takerOrder taker order
     */
    function _validateOrder(OrderTypes.MakerOrder calldata makerOrder, 
                            OrderTypes.TakerOrder calldata takerOrder) internal view {
        // Verify whether order nonce has expired
        require(
            (!_isUserOrderNonceExecutedOrCancelled[makerOrder.signer][makerOrder.nonce]) &&
                (makerOrder.nonce >= userMinOrderNonce[makerOrder.signer]),
            "Order: Matching order expired"
        );

        // Verify the signer is not address(0)
        require(makerOrder.signer != address(0), "Order: Invalid signer");

        // Verify the amount is not 0
        require(makerOrder.amount > 0, "Order: Amount cannot be 0");

        // Verify signature max valid time
        require(block.timestamp<=takerOrder.maxValidTime, "Order: Invalid signature");

        bytes32 makerOrderHash = makerOrder.hashMakerOrder();
        // Verify the validity of the signatures
        // Verify makerOrder signature
        require(
            SignatureChecker.verifySignature712(
                makerOrderHash,
                makerOrder.signer,
                makerOrder.v,
                makerOrder.r,
                makerOrder.s,
                DOMAIN_SEPARATOR
            ),
            "MakerOrder Signature: Invalid"
        );
        bytes32 takerOrderHash = takerOrder.hashTakerOrder();
        // Verify takerOrder signature
        require(
            SignatureChecker.verifySignature191(
                takerOrderHash,
                signer,
                takerOrder.v,
                takerOrder.r,
                takerOrder.s
     ),
            "TakerOrder Signature: Invalid"
        );

        // Verify whether the currency is whitelisted
        require(currencyManager.isCurrencyWhitelisted(makerOrder.currency), "Currency: Not whitelisted");

        // Verify whether strategy can be executed
        require(executionManager.isStrategyWhitelisted(makerOrder.strategy), "Strategy: Not whitelisted");

        // Verify whether the collection is whitelisted
        require(collectionManager.isCollectionWhitelisted(makerOrder.collection),"Collection: Not whitelisted");
    }

    function isZeroBytes(bytes calldata data) public pure returns (bool) {
        for (uint256 i = 0; i < data.length; i++) {
            if (data[i] != 0) {
                return false;
            }
        }
        return true;
    }
}

File 2 of 20 : ICurrencyManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface ICurrencyManager {
    function addCurrency(address currency) external;

    function removeCurrency(address currency) external;

    function isCurrencyWhitelisted(address currency) external view returns (bool);

    function viewWhitelistedCurrencies(uint256 cursor, uint256 size) external view returns (address[] memory, uint256);

    function viewCountWhitelistedCurrencies() external view returns (uint256);
}

File 3 of 20 : IRoyaltyFeeManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IRoyaltyFeeManager {
    function calculateRoyaltyFeeAndGetRecipient(
        address collection,
        uint256 tokenId,
        uint256 amount
    ) external view returns (address, uint256);

    function getRemixCreatorRoyaltyFee()external view returns(uint256);

    function getRemixOwnerRoyaltyFee()external view returns(uint256);

}

File 4 of 20 : IExecutionManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IExecutionManager {
    function addStrategy(address strategy) external;

    function removeStrategy(address strategy) external;

    function isStrategyWhitelisted(address strategy) external view returns (bool);

    function viewWhitelistedStrategies(uint256 cursor, uint256 size) external view returns (address[] memory, uint256);

    function viewCountWhitelistedStrategies() external view returns (uint256);
}

File 5 of 20 : ICryptoAvatarsExchange.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {OrderTypes} from "../libraries/OrderTypes.sol";

interface ICryptoAvatarsExchange {
    function matchAskWithTakerBidUsingETHAndWETH(
        OrderTypes.TakerOrder calldata takerBid,
        OrderTypes.MakerOrder calldata makerAsk
    ) external payable;

    function matchAskWithTakerBid(OrderTypes.TakerOrder calldata takerBid, OrderTypes.MakerOrder calldata makerAsk)
        external;

    function matchBidWithTakerAsk(OrderTypes.TakerOrder calldata takerAsk, OrderTypes.MakerOrder calldata makerBid)
        external;
}

File 6 of 20 : IExecutionStrategy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {OrderTypes} from "../libraries/OrderTypes.sol";

interface IExecutionStrategy {
    function canExecuteTakerAsk(OrderTypes.TakerOrder calldata takerAsk, OrderTypes.MakerOrder calldata makerBid)
        external
        view
        returns (
            bool,
            uint256,
            uint256
        );

    function canExecuteTakerBid(OrderTypes.TakerOrder calldata takerBid, OrderTypes.MakerOrder calldata makerAsk)
        external
        view
        returns (
            bool,
            uint256,
            uint256
        );

    function viewProtocolFee() external view returns (uint256);
}

File 7 of 20 : ITransferSelectorNFT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface ITransferSelectorNFT {
    function checkTransferManagerForToken(address collection) external view returns (address);
}

File 8 of 20 : ITransferManagerNFT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface ITransferManagerNFT {
    function transferNonFungibleToken(
        address collection,
        address from,
        address to,
        uint256 tokenId,
        uint256 amount
    ) external;
}

File 9 of 20 : IWETH.sol
// SPDX-License-Identifier: GNU
pragma solidity >=0.5.0;

interface IWETH {
    function deposit() external payable;

    function transfer(address to, uint256 value) external returns (bool);

    function withdraw(uint256) external;
}

File 10 of 20 : ICollectionManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface ICollectionManager {
    function addCollection(address collection) external;

    function removeCollection(address collection) external;

    function isCollectionWhitelisted(address collection) external view returns (bool);

    function viewWhitelistedCollections(uint256 cursor, uint256 size) external view returns (address[] memory, uint256);

    function viewCountWhitelistedCollections() external view returns (uint256);
}

File 11 of 20 : SignatureChecker.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";

/**
 * @title SignatureChecker
 * @notice This library allows verification of signatures for both EOAs and contracts.
 */
library SignatureChecker {
    /**
     * @notice Recovers the signer of a signature (for EOA)
     * @param hash the hash containing the signed mesage
     * @param v parameter (27 or 28). This prevents maleability since the public key recovery equation has two possible solutions.
     * @param r parameter
     * @param s parameter
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        // https://ethereum.stackexchange.com/questions/83174/is-it-best-practice-to-check-signature-malleability-in-ecrecover
        // https://crypto.iacr.org/2019/affevents/wac/medias/Heninger-BiasedNonceSense.pdf
        require(
            uint256(s) <=
                0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0,
            "Signature: Invalid s parameter"
        );

        require(v == 27 || v == 28, "Signature: Invalid v parameter");

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

        return signer;
    }

    /**
     * @notice Returns whether the signer matches the signed message
     * @param hash the hash containing the signed mesage
     * @param signer the signer address to confirm message validity
     * @param v parameter (27 or 28)
     * @param r parameter
     * @param s parameter
     * @param domainSeparator paramer to prevent signature being executed in other chains and environments
     * @return true --> if valid // false --> if invalid
     * https://eips.ethereum.org/EIPS/eip-712#specification
     */
    function verifySignature712(
        bytes32 hash,
        address signer,
        uint8 v,
        bytes32 r,
        bytes32 s,
        bytes32 domainSeparator
    ) internal view returns (bool) {
        bytes32 digest = keccak256(
            abi.encodePacked("\x19\x01", domainSeparator, hash)
        );
        if (Address.isContract(signer)) {
            // 0x1626ba7e is the interfaceId for signature contracts (see IERC1271)
            return
                IERC1271(signer).isValidSignature(
                    digest,
                    abi.encodePacked(r, s, v)
                ) == 0x1626ba7e;
        } else {
            return recover(digest, v, r, s) == signer;
        }
    }

    /**
     * @notice Returns whether the signer matches the signed message
     * @param hash the hash containing the signed mesage
     * @param signer the signer address to confirm message validity
     * @param v parameter (27 or 28)
     * @param r parameter
     * @param s parameter
     * @return true --> if valid // false --> if invalid
     * https://eips.ethereum.org/EIPS/eip-191#specification
     */
    function verifySignature191(
        bytes32 hash,
        address signer,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (bool) {
        bytes32 messageHash = keccak256(
            abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)
        );
        address recovered = recover(messageHash, v, r, s);
        return recovered == signer;
    }

    function splitSignature(
        bytes memory sig
    ) internal pure returns (bytes32 r, bytes32 s, uint8 v) {
        require(sig.length == 65, "invalid signature length");

        assembly {
            r := mload(add(sig, 32))
            s := mload(add(sig, 64))
            v := byte(0, mload(add(sig, 96)))
        }
    }
}

File 12 of 20 : OrderTypes.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
 * @title OrderTypes
 * @notice This library contains order types for the CryptoAvatars exchange.
 */
library OrderTypes {
    // keccak256("MakerOrder(bool isOrderAsk,address signer,address collection,uint256 price,uint256 tokenId,uint256 amount,address strategy,address currency,uint256 nonce,uint256 startTime,uint256 endTime,uint256 minPercentageToAsk,bytes params)")
    bytes32 internal constant MAKER_ORDER_HASH = 0x40261ade532fa1d2c7293df30aaadb9b3c616fae525a0b56d3d411c841a85028;
    //keccak256("TakerOrder(bool isOrderAsk,address taker,address signer,uint256 price,uint256 tokenId,uint256 maxValidTime,uint256 minPercentageToAsk,bytes params,bytes dataCryptoAvatars,bytes dataRemix)")
    bytes32 internal constant TAKER_ORDER_HASH = 0x52899feb3ddfece805ec742fd953f7c2d538f6a548044216a6b8db2598b449d9;
    struct MakerOrder {
        bool isOrderAsk; // true --> ask / false --> bid
        address signer; // signer of the maker order
        address collection; // collection address
        uint256 price; // price (used as )
        uint256 tokenId; // id of the token
        uint256 amount; // amount of tokens to sell/purchase (must be 1 for ERC721, 1+ for ERC1155)
        address strategy; // strategy for trade execution (e.g., DutchAuction, StandardSaleForFixedPrice)
        address currency; // currency (e.g., WETH)
        uint256 nonce; // order nonce (must be unique unless new maker order is meant to override existing one e.g., lower ask price)
        uint256 startTime; // startTime in timestamp
        uint256 endTime; // endTime in timestamp
        uint256 minPercentageToAsk; // slippage protection (9000 --> 90% of the final price must return to ask)
        bytes params; // additional parameters
        uint8 v; // v: parameter (27 or 28)
        bytes32 r; // r: parameter
        bytes32 s; // s: parameter
    }

    struct TakerOrder {
        bool isOrderAsk; // true --> ask / false --> bid
        address taker; // msg.sender
        address signer;
        uint256 price; // final price for the purchase
        uint256 tokenId;
        uint256 maxValidTime; // validTime in timestamp
        uint256 minPercentageToAsk; // // slippage protection (9000 --> 90% of the final price must return to ask)
        bytes params; // other params (e.g., tokenId)
        bytes dataCryptoAvatars; // data for CryptoAvatars NFT
        bytes dataRemix; // check if the NFT is a remix and if so, the creator and the owner of the parent remix avatar for royalties
        uint8 v; // v: parameter (27 or 28)
        bytes32 r; // r: parameter
        bytes32 s; // s: parameter
    }

    function hashMakerOrder(MakerOrder memory makerOrder) internal pure returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    MAKER_ORDER_HASH,
                    makerOrder.isOrderAsk,
                    makerOrder.signer,
                    makerOrder.collection,
                    makerOrder.price,
                    makerOrder.tokenId,
                    makerOrder.amount,
                    makerOrder.strategy,
                    makerOrder.currency,
                    makerOrder.nonce,
                    makerOrder.startTime,
                    makerOrder.endTime,
                    makerOrder.minPercentageToAsk,
                    keccak256(makerOrder.params)
                )
            );
    }
    // keccak256("TakerOrder(bool isOrderAsk,address taker,uint256 price,uint256 tokenId,uint256 minPercentageToAsk,bytes params,uint256 validTime))

     function hashTakerOrder(TakerOrder memory takerOrder) internal view returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    TAKER_ORDER_HASH,
                    block.chainid,
                    takerOrder.isOrderAsk,
                    takerOrder.taker,
                    takerOrder.signer,
                    takerOrder.price,
                    takerOrder.tokenId,
                    takerOrder.maxValidTime,
                    takerOrder.minPercentageToAsk,
                    keccak256(takerOrder.params),
                    keccak256(takerOrder.dataCryptoAvatars),
                    keccak256(takerOrder.dataRemix)
                )
            );
    }
}

File 13 of 20 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

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

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

File 15 of 20 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

File 16 of 20 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 17 of 20 : IERC1271.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC1271 standard signature validation method for
 * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].
 *
 * _Available since v4.1._
 */
interface IERC1271 {
    /**
     * @dev Should return whether the signature provided is valid for the provided data
     * @param hash      Hash of the data to be signed
     * @param signature Signature byte array associated with _data
     */
    function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);
}

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_currencyManager","type":"address"},{"internalType":"address","name":"_executionManager","type":"address"},{"internalType":"address","name":"_royaltyFeeManager","type":"address"},{"internalType":"address","name":"_collectionManager","type":"address"},{"internalType":"address","name":"_WETH","type":"address"},{"internalType":"address","name":"_protocolFeeRecipient","type":"address"},{"internalType":"address","name":"_signer","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"newMinNonce","type":"uint256"}],"name":"CancelAllOrders","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"orderNonces","type":"uint256[]"}],"name":"CancelMultipleOrders","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"makerOrder","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"takerOrder","type":"bytes"}],"name":"MarketSell","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"collectionManager","type":"address"}],"name":"NewCollectionManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"currencyManager","type":"address"}],"name":"NewCurrencyManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"executionManager","type":"address"}],"name":"NewExecutionManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"protocolFeeRecipient","type":"address"}],"name":"NewProtocolFeeRecipient","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"royaltyFeeManager","type":"address"}],"name":"NewRoyaltyFeeManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"transferSelectorNFT","type":"address"}],"name":"NewTransferSelectorNFT","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"collection","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"royaltyRecipient","type":"address"},{"indexed":false,"internalType":"address","name":"currency","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RoyaltyPayment","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"minNonce","type":"uint256"}],"name":"cancelAllOrdersForSender","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"orderNonces","type":"uint256[]"}],"name":"cancelMultipleMakerOrders","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collectionManager","outputs":[{"internalType":"contract ICollectionManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currencyManager","outputs":[{"internalType":"contract ICurrencyManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"executionManager","outputs":[{"internalType":"contract IExecutionManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"orderNonce","type":"uint256"}],"name":"isUserOrderNonceExecutedOrCancelled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"isZeroBytes","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"isOrderAsk","type":"bool"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"maxValidTime","type":"uint256"},{"internalType":"uint256","name":"minPercentageToAsk","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"},{"internalType":"bytes","name":"dataCryptoAvatars","type":"bytes"},{"internalType":"bytes","name":"dataRemix","type":"bytes"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct OrderTypes.TakerOrder","name":"takerBid","type":"tuple"},{"components":[{"internalType":"bool","name":"isOrderAsk","type":"bool"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"strategy","type":"address"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"minPercentageToAsk","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct OrderTypes.MakerOrder","name":"makerAsk","type":"tuple"}],"name":"matchAskWithTakerBid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"isOrderAsk","type":"bool"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"maxValidTime","type":"uint256"},{"internalType":"uint256","name":"minPercentageToAsk","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"},{"internalType":"bytes","name":"dataCryptoAvatars","type":"bytes"},{"internalType":"bytes","name":"dataRemix","type":"bytes"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct OrderTypes.TakerOrder","name":"takerBid","type":"tuple"},{"components":[{"internalType":"bool","name":"isOrderAsk","type":"bool"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"strategy","type":"address"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"minPercentageToAsk","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct OrderTypes.MakerOrder","name":"makerAsk","type":"tuple"}],"name":"matchAskWithTakerBidUsingETHAndWETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"isOrderAsk","type":"bool"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"maxValidTime","type":"uint256"},{"internalType":"uint256","name":"minPercentageToAsk","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"},{"internalType":"bytes","name":"dataCryptoAvatars","type":"bytes"},{"internalType":"bytes","name":"dataRemix","type":"bytes"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct OrderTypes.TakerOrder","name":"takerAsk","type":"tuple"},{"components":[{"internalType":"bool","name":"isOrderAsk","type":"bool"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"strategy","type":"address"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"minPercentageToAsk","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct OrderTypes.MakerOrder","name":"makerBid","type":"tuple"}],"name":"matchBidWithTakerAsk","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolFeeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royaltyFeeManager","outputs":[{"internalType":"contract IRoyaltyFeeManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"signer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"transferSelectorNFT","outputs":[{"internalType":"contract ITransferSelectorNFT","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collectionManager","type":"address"}],"name":"updateCollectionManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_currencyManager","type":"address"}],"name":"updateCurrencyManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_executionManager","type":"address"}],"name":"updateExecutionManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_protocolFeeRecipient","type":"address"}],"name":"updateProtocolFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_royaltyFeeManager","type":"address"}],"name":"updateRoyaltyFeeManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"updateSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_transferSelectorNFT","type":"address"}],"name":"updateTransferSelectorNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userMinOrderNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60c06040523480156200001157600080fd5b5060405162003f2e38038062003f2e8339810160408190526200003491620001cd565b600160005562000044336200015e565b604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f479e4b32420d5d35c74f62189f17325d7fd3b51ff82b6be4bcab394dc45ea1d9918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160408051808303601f19018152919052805160209091012060a052600480546001600160a01b03199081166001600160a01b03998a1617909155600580548216978916979097179096556006805487169588169590951790945560088054861693871693909317909255841660805260028054841691851691909117905560038054909216921691909117905562000262565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b0381168114620001c857600080fd5b919050565b600080600080600080600060e0888a031215620001e957600080fd5b620001f488620001b0565b96506200020460208901620001b0565b95506200021460408901620001b0565b94506200022460608901620001b0565b93506200023460808901620001b0565b92506200024460a08901620001b0565b91506200025460c08901620001b0565b905092959891949750929550565b60805160a051613c59620002d56000396000818161029501526116cb0152600081816104770152818161064b0152818161073b015281816107bd01528181611ad501528181611b8c01528181611d5e01528181611d9201528181611eb801528181611f360152611ffe0152613c596000f3fe60806040526004361061019c5760003560e01c806387e4401f116100ec578063ad5c46481161008a578063cbd2ec6511610064578063cbd2ec65146104d9578063d4ff41dc146104f9578063f2fde38b14610519578063f75ff53f1461053957600080fd5b8063ad5c464814610465578063bc30f0b014610499578063c5498769146104b957600080fd5b80639e53a69a116100c65780639e53a69a146103e55780639fdf846914610405578063a20dbdb314610425578063a7ecd37e1461044557600080fd5b806387e4401f146103875780638da5cb5b146103a75780639e461c77146103c557600080fd5b80633644e515116101595780635ce052d7116101335780635ce052d7146103125780635e14f68e1461033257806364df049e14610352578063715018a61461037257600080fd5b80633644e515146102835780634266581e146102c5578063483abb9f146102f257600080fd5b80630c2b1830146101a15780630f747d74146101c357806316c5b02c146102005780631df47f8014610213578063238ac9331461023357806331e27e2714610253575b600080fd5b3480156101ad57600080fd5b506101c16101bc366004612f0f565b610559565b005b3480156101cf57600080fd5b506004546101e3906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101c161020e366004612f2c565b6105da565b34801561021f57600080fd5b506101c161022e366004612f0f565b610a15565b34801561023f57600080fd5b506003546101e3906001600160a01b031681565b34801561025f57600080fd5b5061027361026e366004612fa1565b610a67565b60405190151581526020016101f7565b34801561028f57600080fd5b506102b77f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101f7565b3480156102d157600080fd5b506102b76102e0366004612f0f565b60096020526000908152604090205481565b3480156102fe57600080fd5b506005546101e3906001600160a01b031681565b34801561031e57600080fd5b506101c161032d366004612f0f565b610a95565b34801561033e57600080fd5b506007546101e3906001600160a01b031681565b34801561035e57600080fd5b506002546101e3906001600160a01b031681565b34801561037e57600080fd5b506101c1610b0d565b34801561039357600080fd5b506006546101e3906001600160a01b031681565b3480156103b357600080fd5b506001546001600160a01b03166101e3565b3480156103d157600080fd5b506102736103e0366004612fcd565b610b21565b3480156103f157600080fd5b506101c161040036600461303f565b610b7a565b34801561041157600080fd5b506008546101e3906001600160a01b031681565b34801561043157600080fd5b506101c1610440366004612f2c565b610cc4565b34801561045157600080fd5b506101c1610460366004612f0f565b610ea6565b34801561047157600080fd5b506101e37f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a557600080fd5b506101c16104b4366004612f2c565b610ef6565b3480156104c557600080fd5b506101c16104d4366004612f0f565b611106565b3480156104e557600080fd5b506101c16104f43660046130a2565b61117e565b34801561050557600080fd5b506101c1610514366004612f0f565b611270565b34801561052557600080fd5b506101c1610534366004612f0f565b6112e8565b34801561054557600080fd5b506101c1610554366004612f0f565b611361565b6105616113d9565b6001600160a01b0381166105905760405162461bcd60e51b8152600401610587906130bb565b60405180910390fd5b600880546001600160a01b0319166001600160a01b0383169081179091556040517f068b920c55005f87649c109080cf23b59b089cdd46ad5eea463e83419919699c90600090a250565b600260005414156105fd5760405162461bcd60e51b8152600401610587906130f2565b600260005561060f6020820182613142565b801561062557506106236020830183613142565b155b6106415760405162461bcd60e51b81526004016105879061315f565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001661067c610100830160e08401612f0f565b6001600160a01b0316146106d25760405162461bcd60e51b815260206004820152601c60248201527f4f726465723a2043757272656e6379206d7573742062652057455448000000006044820152606401610587565b6106e26040830160208401612f0f565b6001600160a01b0316336001600160a01b0316146107125760405162461bcd60e51b81526004016105879061318b565b34826060013511156107685761076333306107313460608701356131d8565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190611433565b6107bb565b348260600135146107bb5760405162461bcd60e51b815260206004820152601960248201527f4f726465723a204d73672e76616c756520746f6f2068696768000000000000006044820152606401610587565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561081657600080fd5b505af115801561082a573d6000803e3d6000fd5b505050505061083981836114a4565b6000808061084d60e0850160c08601612f0f565b6001600160a01b03166317e3586686866040518363ffffffff1660e01b815260040161087a9291906134ae565b60606040518083038186803b15801561089257600080fd5b505afa1580156108a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ca91906134d3565b925092509250826108ed5760405162461bcd60e51b81526004016105879061350a565b6001600a60006109036040880160208901612f0f565b6001600160a01b031681526020808201929092526040908101600090812061010089013582528352819020805460ff19169315159390931790925561095a918691889161095591908401908401612f0f565b611a7f565b61099461096d6060860160408701612f0f565b61097d6040870160208801612f0f565b61098d6040890160208a01612f0f565b8585612025565b7f1f846d00e2edac7ec61d9fc98f4515e686a45dc4c92a2b93d8efe8848f160465846040516020016109c69190613541565b604051602081830303815290604052866040516020016109e69190613554565b60408051601f1981840301815290829052610a0192916135bf565b60405180910390a150506001600055505050565b610a1d6113d9565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f8cffb07faa2874440346743bdc0a86b06c3335cc47dc49b327d10e77b73ceb1090600090a250565b6001600160a01b0382166000908152600a6020908152604080832084845290915290205460ff165b92915050565b610a9d6113d9565b6001600160a01b038116610ac35760405162461bcd60e51b8152600401610587906130bb565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fb4f5db40df3aced29e88a4babbc3b46e305e07d34098525d18b1497056e6383890600090a250565b610b156113d9565b610b1f6000612190565b565b6000805b82811015610b7057838382818110610b3f57610b3f6135e4565b909101356001600160f81b031916159050610b5e576000915050610a8f565b80610b68816135fa565b915050610b25565b5060019392505050565b80610bc75760405162461bcd60e51b815260206004820152601760248201527f43616e63656c3a2043616e6e6f7420626520656d7074790000000000000000006044820152606401610587565b60005b81811015610c7c5733600090815260096020526040902054838383818110610bf457610bf46135e4565b905060200201351015610c195760405162461bcd60e51b815260040161058790613615565b336000908152600a60205260408120600191858585818110610c3d57610c3d6135e4565b90506020020135815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610c74906135fa565b915050610bca565b50336001600160a01b03167ffa0ae5d80fe3763c880a3839fab0294171a6f730d1f82c4cd5392c6f67b417328383604051610cb892919061365b565b60405180910390a25050565b60026000541415610ce75760405162461bcd60e51b8152600401610587906130f2565b6002600055610cf96020820182613142565b8015610d0f5750610d0d6020830183613142565b155b610d2b5760405162461bcd60e51b81526004016105879061315f565b610d3b6040830160208401612f0f565b6001600160a01b0316336001600160a01b031614610d6b5760405162461bcd60e51b81526004016105879061318b565b610d7581836114a4565b60008080610d8960e0850160c08601612f0f565b6001600160a01b03166317e3586686866040518363ffffffff1660e01b8152600401610db69291906134ae565b60606040518083038186803b158015610dce57600080fd5b505afa158015610de2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0691906134d3565b92509250925082610e295760405162461bcd60e51b81526004016105879061350a565b6001600a6000610e3f6040880160208901612f0f565b6001600160a01b031681526020808201929092526040908101600090812061010089013582528352819020805460ff19169315159390931790925561095a9186918891610e9191908301908301612f0f565b610ea16040890160208a01612f0f565b6121e2565b610eae6113d9565b6001600160a01b038116610ed45760405162461bcd60e51b8152600401610587906130bb565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b60026000541415610f195760405162461bcd60e51b8152600401610587906130f2565b6002600055610f2b6020820182613142565b158015610f405750610f406020830183613142565b610f5c5760405162461bcd60e51b81526004016105879061315f565b610f6c6040830160208401612f0f565b6001600160a01b0316336001600160a01b031614610f9c5760405162461bcd60e51b81526004016105879061318b565b610fa681836114a4565b60008080610fba60e0850160c08601612f0f565b6001600160a01b031663f563d77786866040518363ffffffff1660e01b8152600401610fe79291906134ae565b60606040518083038186803b158015610fff57600080fd5b505afa158015611013573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061103791906134d3565b9250925092508261105a5760405162461bcd60e51b81526004016105879061350a565b6001600a60006110706040880160208901612f0f565b6001600160a01b0316815260208082019290925260409081016000908120610100890135825290925290819020805460ff1916921515929092179091556110e1906110c19060608701908701612f0f565b6110d16040880160208901612f0f565b61098d6040880160208901612f0f565b61099484866110f66040830160208401612f0f565b610ea160408a0160208b01612f0f565b61110e6113d9565b6001600160a01b0381166111345760405162461bcd60e51b8152600401610587906130bb565b600680546001600160a01b0319166001600160a01b0383169081179091556040517f80e3874461ebbd918ac3e81da0a92e5e51387d70f337237c9123e48d20e5a50890600090a250565b3360009081526009602052604090205481116111ac5760405162461bcd60e51b815260040161058790613615565b336000908152600960205260409020546111c9906207a120613697565b81106112215760405162461bcd60e51b815260206004820152602160248201527f43616e63656c3a2043616e6e6f742063616e63656c206d6f7265206f726465726044820152607360f81b6064820152608401610587565b3360008181526009602052604090819020839055517f1e7178d84f0b0825c65795cd62e7972809ad3aac6917843aaec596161b2c0a97906112659084815260200190565b60405180910390a250565b6112786113d9565b6001600160a01b03811661129e5760405162461bcd60e51b8152600401610587906130bb565b600580546001600160a01b0319166001600160a01b0383169081179091556040517f36e2a376eabc3bc60cb88f29c288f53e36874a95a7f407330ab4f166b090569890600090a250565b6112f06113d9565b6001600160a01b0381166113555760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610587565b61135e81612190565b50565b6113696113d9565b6001600160a01b03811661138f5760405162461bcd60e51b8152600401610587906130bb565b600780546001600160a01b0319166001600160a01b0383169081179091556040517f205d78ab41afe80bd6b6aaa5d7599d5300ff8690da3ab1302c1b552f7baf7d8c90600090a250565b6001546001600160a01b03163314610b1f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610587565b6040516001600160a01b038085166024830152831660448201526064810182905261149e9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526126e3565b50505050565b600a60006114b86040850160208601612f0f565b6001600160a01b0316815260208082019290925260409081016000908120610100860135825290925290205460ff1615801561152d5750600960006115036040850160208601612f0f565b6001600160a01b03166001600160a01b031681526020019081526020016000205482610100013510155b6115795760405162461bcd60e51b815260206004820152601d60248201527f4f726465723a204d61746368696e67206f7264657220657870697265640000006044820152606401610587565b600061158b6040840160208501612f0f565b6001600160a01b031614156115da5760405162461bcd60e51b815260206004820152601560248201527427b93232b91d1024b73b30b634b21039b4b3b732b960591b6044820152606401610587565b60008260a001351161162e5760405162461bcd60e51b815260206004820152601960248201527f4f726465723a20416d6f756e742063616e6e6f742062652030000000000000006044820152606401610587565b8060a001354211156116825760405162461bcd60e51b815260206004820152601860248201527f4f726465723a20496e76616c6964207369676e617475726500000000000000006044820152606401610587565b6000611695611690846137a0565b6127ba565b90506116ef816116ab6040860160208701612f0f565b6116bd6101c087016101a088016138b1565b866101c00135876101e001357f0000000000000000000000000000000000000000000000000000000000000000612861565b61173b5760405162461bcd60e51b815260206004820152601d60248201527f4d616b65724f72646572205369676e61747572653a20496e76616c69640000006044820152606401610587565b600061174e611749846138cc565b6129af565b6003549091506117869082906001600160a01b0316611775610160870161014088016138b1565b866101600135876101800135612a95565b6117d25760405162461bcd60e51b815260206004820152601d60248201527f54616b65724f72646572205369676e61747572653a20496e76616c69640000006044820152606401610587565b6004546001600160a01b03166343b938c56117f4610100870160e08801612f0f565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561183357600080fd5b505afa158015611847573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186b91906139e7565b6118b75760405162461bcd60e51b815260206004820152601960248201527f43757272656e63793a204e6f742077686974656c6973746564000000000000006044820152606401610587565b6005546001600160a01b031663999ba27c6118d860e0870160c08801612f0f565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561191757600080fd5b505afa15801561192b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061194f91906139e7565b61199b5760405162461bcd60e51b815260206004820152601960248201527f53747261746567793a204e6f742077686974656c6973746564000000000000006044820152606401610587565b6008546001600160a01b031663a0655c796119bc6060870160408801612f0f565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b1580156119fb57600080fd5b505afa158015611a0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3391906139e7565b61149e5760405162461bcd60e51b815260206004820152601b60248201527f436f6c6c656374696f6e3a204e6f742077686974656c697374656400000000006044820152606401610587565b60608301356000611aa3611a9960e0870160c08801612f0f565b8660600135612b0f565b6002549091506001600160a01b031615801590611abf57508015155b15611b0b57600254611afe906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683612ba4565b611b0881836131d8565b91505b50611b1d6103e0610100850185613a04565b611bc857600080611b32610100860186613a04565b810190611b3f9190612fa1565b90925090506000612710611b578360608a0135613a4b565b611b619190613a6a565b90506001600160a01b03831615801590611b7a57508015155b15611bc057611bb36001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483612ba4565b611bbd81856131d8565b93505b505050611f84565b611bd96103e0610120850185613a04565b611dda57600080611bee610120860186613a04565b810190611bfb9190613a8c565b915091506000600660009054906101000a90046001600160a01b03166001600160a01b0316638466b0346040518163ffffffff1660e01b815260040160206040518083038186803b158015611c4f57600080fd5b505afa158015611c63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c879190613aba565b90506000600660009054906101000a90046001600160a01b03166001600160a01b031663f248fdfb6040518163ffffffff1660e01b815260040160206040518083038186803b158015611cd957600080fd5b505afa158015611ced573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d119190613aba565b90506000612710611d268460608c0135613a4b565b611d309190613a6a565b90506000612710611d458460608d0135613a4b565b611d4f9190613a6a565b9050611d856001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168784612ba4565b611db96001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168683612ba4565b611dc38183613697565b611dcd90886131d8565b9650505050505050611f84565b60065460009081906001600160a01b031663f4f635fa611e006060890160408a01612f0f565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526080890135602482015260608901356044820152606401604080518083038186803b158015611e5257600080fd5b505afa158015611e66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e8a9190613ad3565b90925090506001600160a01b03821615801590611ea657508015155b15611f8157611edf6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168383612ba4565b611ee981846131d8565b92506001600160a01b0382166080870135611f0a6060890160408a01612f0f565b6001600160a01b03167f27c4f0403323142b599832f26acd21c74a9e5b809f2215726e244a4ac588cd7d7f000000000000000000000000000000000000000000000000000000000000000085604051611f789291906001600160a01b03929092168252602082015260400190565b60405180910390a45b50505b611f976060850135610160860135613a4b565b611fa382612710613a4b565b1015611ff15760405162461bcd60e51b815260206004820152601a60248201527f466565733a20486967686572207468616e2065787065637465640000000000006044820152606401610587565b61149e6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168383612ba4565b60075460405163cc15949360e01b81526001600160a01b038781166004830152600092169063cc1594939060240160206040518083038186803b15801561206b57600080fd5b505afa15801561207f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120a39190613b01565b90506001600160a01b03811661210f5760405162461bcd60e51b815260206004820152602b60248201527f5472616e736665723a204e6f204e4654207472616e73666572206d616e61676560448201526a7220617661696c61626c6560a81b6064820152608401610587565b6040516333f2fa9f60e01b81526001600160a01b0387811660048301528681166024830152858116604483015260648201859052608482018490528216906333f2fa9f9060a401600060405180830381600087803b15801561217057600080fd5b505af1158015612184573d6000803e3d6000fd5b50505050505050505050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606084013560006122066121fc60e0880160c08901612f0f565b8760600135612b0f565b6002549091506001600160a01b03161580159061222257508015155b156122695760025461225c9085906001600160a01b03168361224b6101008b0160e08c01612f0f565b6001600160a01b0316929190611433565b61226681836131d8565b91505b5061227b6103e0610100860186613a04565b61230957600080612290610100870187613a04565b81019061229d9190612fa1565b909250905060006127106122b58360608b0135613a4b565b6122bf9190613a6a565b90506001600160a01b038316158015906122d857508015155b15612301576122f486848361224b6101008d0160e08e01612f0f565b6122fe81856131d8565b93505b505050612658565b61231a6103e0610120860186613a04565b6124e55760008061232f610120870187613a04565b81019061233c9190613a8c565b915091506000600660009054906101000a90046001600160a01b03166001600160a01b0316638466b0346040518163ffffffff1660e01b815260040160206040518083038186803b15801561239057600080fd5b505afa1580156123a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123c89190613aba565b90506000600660009054906101000a90046001600160a01b03166001600160a01b031663f248fdfb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561241a57600080fd5b505afa15801561242e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124529190613aba565b905060006127106124678460608d0135613a4b565b6124719190613a6a565b905060006127106124868460608e0135613a4b565b6124909190613a6a565b90506124ab8987848e60e001602081019061224b9190612f0f565b6124c48986838e60e001602081019061224b9190612f0f565b6124ce8183613697565b6124d890886131d8565b9650505050505050612658565b60065460009081906001600160a01b031663f4f635fa61250b60608a0160408b01612f0f565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260808a0135602482015260608a01356044820152606401604080518083038186803b15801561255d57600080fd5b505afa158015612571573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125959190613ad3565b90925090506001600160a01b038216158015906125b157508015155b15612655576125cd85838361224b6101008c0160e08d01612f0f565b6125d781846131d8565b92506001600160a01b03821660808801356125f860608a0160408b01612f0f565b6001600160a01b03167f27c4f0403323142b599832f26acd21c74a9e5b809f2215726e244a4ac588cd7d6126336101008c0160e08d01612f0f565b604080516001600160a01b039092168252602082018790520160405180910390a45b50505b61266b6060860135610160870135613a4b565b61267782612710613a4b565b10156126c55760405162461bcd60e51b815260206004820152601a60248201527f466565733a20486967686572207468616e2065787065637465640000000000006044820152606401610587565b6126dc83838361224b6101008a0160e08b01612f0f565b5050505050565b6000612738826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612bd49092919063ffffffff16565b8051909150156127b5578080602001905181019061275691906139e7565b6127b55760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610587565b505050565b80516020808301516040808501516060860151608087015160a088015160c089015160e08a01516101008b01516101208c01516101408d01516101608e01516101808f01518051908e01209a5160009e6128449e7f40261ade532fa1d2c7293df30aaadb9b3c616fae525a0b56d3d411c841a850289e919d919c9b9a999897969594939201613b1e565b604051602081830303815290604052805190602001209050919050565b60405161190160f01b6020820152602281018290526042810187905260009081906062016040516020818303038152906040528051906020012090506128b0876001600160a01b03163b151590565b1561298157604080516020810187905280820186905260f888901b6001600160f81b0319166060820152815160418183030181526061820192839052630b135d3f60e11b9092526001600160a01b03891691631626ba7e91612916918591606501613bb1565b60206040518083038186803b15801561292e57600080fd5b505afa158015612942573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129669190613bca565b6001600160e01b031916631626ba7e60e01b149150506129a5565b866001600160a01b031661299782888888612bed565b6001600160a01b0316149150505b9695505050505050565b60007f52899feb3ddfece805ec742fd953f7c2d538f6a548044216a6b8db2598b449d960001b46836000015184602001518560400151866060015187608001518860a001518960c001518a60e00151805190602001208b6101000151805190602001208c6101200151805190602001206040516020016128449c9b9a999897969594939291909b8c5260208c019a909a5297151560408b01526001600160a01b0396871660608b015294909516608089015260a088019290925260c087015260e08601526101008501919091526101208401526101408301526101608201526101800190565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018690526000908190605c016040516020818303038152906040528051906020012090506000612af382878787612bed565b6001600160a01b03908116908816149250505095945050505050565b600080836001600160a01b0316639dd1cda66040518163ffffffff1660e01b815260040160206040518083038186803b158015612b4b57600080fd5b505afa158015612b5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b839190613aba565b9050612710612b928483613a4b565b612b9c9190613a6a565b949350505050565b6040516001600160a01b0383166024820152604481018290526127b590849063a9059cbb60e01b90606401611467565b6060612be38484600085612d80565b90505b9392505050565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115612c5f5760405162461bcd60e51b815260206004820152601e60248201527f5369676e61747572653a20496e76616c6964207320706172616d6574657200006044820152606401610587565b8360ff16601b1480612c7457508360ff16601c145b612cc05760405162461bcd60e51b815260206004820152601e60248201527f5369676e61747572653a20496e76616c6964207620706172616d6574657200006044820152606401610587565b6040805160008082526020820180845288905260ff871692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa158015612d14573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612d775760405162461bcd60e51b815260206004820152601960248201527f5369676e61747572653a20496e76616c6964207369676e6572000000000000006044820152606401610587565b95945050505050565b606082471015612de15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610587565b6001600160a01b0385163b612e385760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610587565b600080866001600160a01b03168587604051612e549190613bf4565b60006040518083038185875af1925050503d8060008114612e91576040519150601f19603f3d011682016040523d82523d6000602084013e612e96565b606091505b5091509150612ea6828286612eb1565b979650505050505050565b60608315612ec0575081612be6565b825115612ed05782518084602001fd5b8160405162461bcd60e51b81526004016105879190613c10565b6001600160a01b038116811461135e57600080fd5b8035612f0a81612eea565b919050565b600060208284031215612f2157600080fd5b8135612be681612eea565b60008060408385031215612f3f57600080fd5b823567ffffffffffffffff80821115612f5757600080fd5b908401906101a08287031215612f6c57600080fd5b90925060208401359080821115612f8257600080fd5b5083016102008186031215612f9657600080fd5b809150509250929050565b60008060408385031215612fb457600080fd5b8235612fbf81612eea565b946020939093013593505050565b60008060208385031215612fe057600080fd5b823567ffffffffffffffff80821115612ff857600080fd5b818501915085601f83011261300c57600080fd5b81358181111561301b57600080fd5b86602082850101111561302d57600080fd5b60209290920196919550909350505050565b6000806020838503121561305257600080fd5b823567ffffffffffffffff8082111561306a57600080fd5b818501915085601f83011261307e57600080fd5b81358181111561308d57600080fd5b8660208260051b850101111561302d57600080fd5b6000602082840312156130b457600080fd5b5035919050565b6020808252601d908201527f4f776e65723a2043616e6e6f74206265206e756c6c2061646472657373000000604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b801515811461135e57600080fd5b8035612f0a81613129565b60006020828403121561315457600080fd5b8135612be681613129565b6020808252601290820152714f726465723a2057726f6e6720736964657360701b604082015260600190565b6020808252601f908201527f4f726465723a2054616b6572206d757374206265207468652073656e64657200604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000828210156131ea576131ea6131c2565b500390565b6000808335601e1984360301811261320657600080fd5b830160208101925035905067ffffffffffffffff81111561322657600080fd5b80360383131561323557600080fd5b9250929050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff81168114612f0a57600080fd5b60006101a061328e8461328885613137565b15159052565b61329a60208401612eff565b6001600160a01b031660208501526132b460408401612eff565b6001600160a01b038116604086015250606083013560608501526080830135608085015260a083013560a085015260c083013560c08501526132f960e08401846131ef565b8260e087015261330c838701828461323c565b9250505061010061331f818501856131ef565b8684038388015261333184828461323c565b9350505050610120613345818501856131ef565b8684038388015261335784828461323c565b935050505061014061336a818501613265565b60ff169085015261016083810135908501526101809283013592909301919091525090565b60006102006133a18461328885613137565b6133ad60208401612eff565b6001600160a01b031660208501526133c760408401612eff565b6001600160a01b038116604086015250606083013560608501526080830135608085015260a083013560a085015261340160c08401612eff565b6001600160a01b031660c085015261341b60e08401612eff565b6001600160a01b031660e08501526101008381013590850152610120808401359085015261014080840135908501526101608084013590850152610180613464818501856131ef565b8383880152613476848801828461323c565b93505050506101a0613489818501613265565b60ff16908501526101c083810135908501526101e09283013592909301919091525090565b6040815260006134c16040830185613276565b8281036020840152612d77818561338f565b6000806000606084860312156134e857600080fd5b83516134f381613129565b602085015160409095015190969495509392505050565b6020808252601b908201527f53747261746567793a20457865637574696f6e20696e76616c69640000000000604082015260600190565b602081526000612be6602083018461338f565b602081526000612be66020830184613276565b60005b8381101561358257818101518382015260200161356a565b8381111561149e5750506000910152565b600081518084526135ab816020860160208601613567565b601f01601f19169290920160200192915050565b6040815260006135d26040830185613593565b8281036020840152612d778185613593565b634e487b7160e01b600052603260045260246000fd5b600060001982141561360e5761360e6131c2565b5060010190565b60208082526026908201527f43616e63656c3a204f72646572206e6f6e6365206c6f776572207468616e20636040820152651d5c9c995b9d60d21b606082015260800190565b6020808252810182905260006001600160fb1b0383111561367b57600080fd5b8260051b80856040850137600092016040019182525092915050565b600082198211156136aa576136aa6131c2565b500190565b634e487b7160e01b600052604160045260246000fd5b604051610200810167ffffffffffffffff811182821017156136e9576136e96136af565b60405290565b6040516101a0810167ffffffffffffffff811182821017156136e9576136e96136af565b600082601f83011261372457600080fd5b813567ffffffffffffffff8082111561373f5761373f6136af565b604051601f8301601f19908116603f01168101908282118183101715613767576137676136af565b8160405283815286602085880101111561378057600080fd5b836020870160208301376000602085830101528094505050505092915050565b600061020082360312156137b357600080fd5b6137bb6136c5565b6137c483613137565b81526137d260208401612eff565b60208201526137e360408401612eff565b6040820152606083013560608201526080830135608082015260a083013560a082015261381260c08401612eff565b60c082015261382360e08401612eff565b60e082015261010083810135908201526101208084013590820152610140808401359082015261016080840135908201526101808084013567ffffffffffffffff81111561387057600080fd5b61387c36828701613713565b8284015250506101a0613890818501613265565b908201526101c083810135908201526101e092830135928101929092525090565b6000602082840312156138c357600080fd5b612be682613265565b60006101a082360312156138df57600080fd5b6138e76136ef565b6138f083613137565b81526138fe60208401612eff565b602082015261390f60408401612eff565b6040820152606083013560608201526080830135608082015260a083013560a082015260c083013560c082015260e083013567ffffffffffffffff8082111561395757600080fd5b61396336838701613713565b60e08401526101009150818501358181111561397e57600080fd5b61398a36828801613713565b8385015250610120915081850135818111156139a557600080fd5b6139b136828801613713565b838501525050506101406139c6818501613265565b90820152610160838101359082015261018092830135928101929092525090565b6000602082840312156139f957600080fd5b8151612be681613129565b6000808335601e19843603018112613a1b57600080fd5b83018035915067ffffffffffffffff821115613a3657600080fd5b60200191503681900382131561323557600080fd5b6000816000190483118215151615613a6557613a656131c2565b500290565b600082613a8757634e487b7160e01b600052601260045260246000fd5b500490565b60008060408385031215613a9f57600080fd5b8235613aaa81612eea565b91506020830135612f9681612eea565b600060208284031215613acc57600080fd5b5051919050565b60008060408385031215613ae657600080fd5b8251613af181612eea565b6020939093015192949293505050565b600060208284031215613b1357600080fd5b8151612be681612eea565b8e81528d151560208201526001600160a01b038d811660408301528c1660608201526101c081018b60808301528a60a08301528960c0830152613b6c60e083018a6001600160a01b03169052565b6001600160a01b0388166101008301526101208201969096526101408101949094526101608401929092526101808301526101a0909101529998505050505050505050565b828152604060208201526000612be36040830184613593565b600060208284031215613bdc57600080fd5b81516001600160e01b031981168114612be657600080fd5b60008251613c06818460208701613567565b9190910192915050565b602081526000612be6602083018461359356fea2646970667358221220a7f7cd8545e023bd66ed8d67fbdda6013dcbf74cb4257c2cb7245e285326930964736f6c634300080900330000000000000000000000009a0dea9fdaf7f3e6a447a6251c8e5395db9b53bc000000000000000000000000239ac6878fd2c96ba5c200bf6f2e202e9e7ecc44000000000000000000000000d5491361728e8f8afe0230c399611675bed5cf570000000000000000000000007a34f051548f8e908b0a89f4284e778103799080000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000510ced318567901142f3ad38d80b36f689065c1d0000000000000000000000001e2bb099f1831fdaf7898b0304462e66385234e2

Deployed Bytecode

0x60806040526004361061019c5760003560e01c806387e4401f116100ec578063ad5c46481161008a578063cbd2ec6511610064578063cbd2ec65146104d9578063d4ff41dc146104f9578063f2fde38b14610519578063f75ff53f1461053957600080fd5b8063ad5c464814610465578063bc30f0b014610499578063c5498769146104b957600080fd5b80639e53a69a116100c65780639e53a69a146103e55780639fdf846914610405578063a20dbdb314610425578063a7ecd37e1461044557600080fd5b806387e4401f146103875780638da5cb5b146103a75780639e461c77146103c557600080fd5b80633644e515116101595780635ce052d7116101335780635ce052d7146103125780635e14f68e1461033257806364df049e14610352578063715018a61461037257600080fd5b80633644e515146102835780634266581e146102c5578063483abb9f146102f257600080fd5b80630c2b1830146101a15780630f747d74146101c357806316c5b02c146102005780631df47f8014610213578063238ac9331461023357806331e27e2714610253575b600080fd5b3480156101ad57600080fd5b506101c16101bc366004612f0f565b610559565b005b3480156101cf57600080fd5b506004546101e3906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101c161020e366004612f2c565b6105da565b34801561021f57600080fd5b506101c161022e366004612f0f565b610a15565b34801561023f57600080fd5b506003546101e3906001600160a01b031681565b34801561025f57600080fd5b5061027361026e366004612fa1565b610a67565b60405190151581526020016101f7565b34801561028f57600080fd5b506102b77fc6db6387e1a5a9323760523f1719c52c28f239e2392cd93b7cff507f6e6ff63a81565b6040519081526020016101f7565b3480156102d157600080fd5b506102b76102e0366004612f0f565b60096020526000908152604090205481565b3480156102fe57600080fd5b506005546101e3906001600160a01b031681565b34801561031e57600080fd5b506101c161032d366004612f0f565b610a95565b34801561033e57600080fd5b506007546101e3906001600160a01b031681565b34801561035e57600080fd5b506002546101e3906001600160a01b031681565b34801561037e57600080fd5b506101c1610b0d565b34801561039357600080fd5b506006546101e3906001600160a01b031681565b3480156103b357600080fd5b506001546001600160a01b03166101e3565b3480156103d157600080fd5b506102736103e0366004612fcd565b610b21565b3480156103f157600080fd5b506101c161040036600461303f565b610b7a565b34801561041157600080fd5b506008546101e3906001600160a01b031681565b34801561043157600080fd5b506101c1610440366004612f2c565b610cc4565b34801561045157600080fd5b506101c1610460366004612f0f565b610ea6565b34801561047157600080fd5b506101e37f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b3480156104a557600080fd5b506101c16104b4366004612f2c565b610ef6565b3480156104c557600080fd5b506101c16104d4366004612f0f565b611106565b3480156104e557600080fd5b506101c16104f43660046130a2565b61117e565b34801561050557600080fd5b506101c1610514366004612f0f565b611270565b34801561052557600080fd5b506101c1610534366004612f0f565b6112e8565b34801561054557600080fd5b506101c1610554366004612f0f565b611361565b6105616113d9565b6001600160a01b0381166105905760405162461bcd60e51b8152600401610587906130bb565b60405180910390fd5b600880546001600160a01b0319166001600160a01b0383169081179091556040517f068b920c55005f87649c109080cf23b59b089cdd46ad5eea463e83419919699c90600090a250565b600260005414156105fd5760405162461bcd60e51b8152600401610587906130f2565b600260005561060f6020820182613142565b801561062557506106236020830183613142565b155b6106415760405162461bcd60e51b81526004016105879061315f565b6001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21661067c610100830160e08401612f0f565b6001600160a01b0316146106d25760405162461bcd60e51b815260206004820152601c60248201527f4f726465723a2043757272656e6379206d7573742062652057455448000000006044820152606401610587565b6106e26040830160208401612f0f565b6001600160a01b0316336001600160a01b0316146107125760405162461bcd60e51b81526004016105879061318b565b34826060013511156107685761076333306107313460608701356131d8565b6001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216929190611433565b6107bb565b348260600135146107bb5760405162461bcd60e51b815260206004820152601960248201527f4f726465723a204d73672e76616c756520746f6f2068696768000000000000006044820152606401610587565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561081657600080fd5b505af115801561082a573d6000803e3d6000fd5b505050505061083981836114a4565b6000808061084d60e0850160c08601612f0f565b6001600160a01b03166317e3586686866040518363ffffffff1660e01b815260040161087a9291906134ae565b60606040518083038186803b15801561089257600080fd5b505afa1580156108a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ca91906134d3565b925092509250826108ed5760405162461bcd60e51b81526004016105879061350a565b6001600a60006109036040880160208901612f0f565b6001600160a01b031681526020808201929092526040908101600090812061010089013582528352819020805460ff19169315159390931790925561095a918691889161095591908401908401612f0f565b611a7f565b61099461096d6060860160408701612f0f565b61097d6040870160208801612f0f565b61098d6040890160208a01612f0f565b8585612025565b7f1f846d00e2edac7ec61d9fc98f4515e686a45dc4c92a2b93d8efe8848f160465846040516020016109c69190613541565b604051602081830303815290604052866040516020016109e69190613554565b60408051601f1981840301815290829052610a0192916135bf565b60405180910390a150506001600055505050565b610a1d6113d9565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f8cffb07faa2874440346743bdc0a86b06c3335cc47dc49b327d10e77b73ceb1090600090a250565b6001600160a01b0382166000908152600a6020908152604080832084845290915290205460ff165b92915050565b610a9d6113d9565b6001600160a01b038116610ac35760405162461bcd60e51b8152600401610587906130bb565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fb4f5db40df3aced29e88a4babbc3b46e305e07d34098525d18b1497056e6383890600090a250565b610b156113d9565b610b1f6000612190565b565b6000805b82811015610b7057838382818110610b3f57610b3f6135e4565b909101356001600160f81b031916159050610b5e576000915050610a8f565b80610b68816135fa565b915050610b25565b5060019392505050565b80610bc75760405162461bcd60e51b815260206004820152601760248201527f43616e63656c3a2043616e6e6f7420626520656d7074790000000000000000006044820152606401610587565b60005b81811015610c7c5733600090815260096020526040902054838383818110610bf457610bf46135e4565b905060200201351015610c195760405162461bcd60e51b815260040161058790613615565b336000908152600a60205260408120600191858585818110610c3d57610c3d6135e4565b90506020020135815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610c74906135fa565b915050610bca565b50336001600160a01b03167ffa0ae5d80fe3763c880a3839fab0294171a6f730d1f82c4cd5392c6f67b417328383604051610cb892919061365b565b60405180910390a25050565b60026000541415610ce75760405162461bcd60e51b8152600401610587906130f2565b6002600055610cf96020820182613142565b8015610d0f5750610d0d6020830183613142565b155b610d2b5760405162461bcd60e51b81526004016105879061315f565b610d3b6040830160208401612f0f565b6001600160a01b0316336001600160a01b031614610d6b5760405162461bcd60e51b81526004016105879061318b565b610d7581836114a4565b60008080610d8960e0850160c08601612f0f565b6001600160a01b03166317e3586686866040518363ffffffff1660e01b8152600401610db69291906134ae565b60606040518083038186803b158015610dce57600080fd5b505afa158015610de2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0691906134d3565b92509250925082610e295760405162461bcd60e51b81526004016105879061350a565b6001600a6000610e3f6040880160208901612f0f565b6001600160a01b031681526020808201929092526040908101600090812061010089013582528352819020805460ff19169315159390931790925561095a9186918891610e9191908301908301612f0f565b610ea16040890160208a01612f0f565b6121e2565b610eae6113d9565b6001600160a01b038116610ed45760405162461bcd60e51b8152600401610587906130bb565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b60026000541415610f195760405162461bcd60e51b8152600401610587906130f2565b6002600055610f2b6020820182613142565b158015610f405750610f406020830183613142565b610f5c5760405162461bcd60e51b81526004016105879061315f565b610f6c6040830160208401612f0f565b6001600160a01b0316336001600160a01b031614610f9c5760405162461bcd60e51b81526004016105879061318b565b610fa681836114a4565b60008080610fba60e0850160c08601612f0f565b6001600160a01b031663f563d77786866040518363ffffffff1660e01b8152600401610fe79291906134ae565b60606040518083038186803b158015610fff57600080fd5b505afa158015611013573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061103791906134d3565b9250925092508261105a5760405162461bcd60e51b81526004016105879061350a565b6001600a60006110706040880160208901612f0f565b6001600160a01b0316815260208082019290925260409081016000908120610100890135825290925290819020805460ff1916921515929092179091556110e1906110c19060608701908701612f0f565b6110d16040880160208901612f0f565b61098d6040880160208901612f0f565b61099484866110f66040830160208401612f0f565b610ea160408a0160208b01612f0f565b61110e6113d9565b6001600160a01b0381166111345760405162461bcd60e51b8152600401610587906130bb565b600680546001600160a01b0319166001600160a01b0383169081179091556040517f80e3874461ebbd918ac3e81da0a92e5e51387d70f337237c9123e48d20e5a50890600090a250565b3360009081526009602052604090205481116111ac5760405162461bcd60e51b815260040161058790613615565b336000908152600960205260409020546111c9906207a120613697565b81106112215760405162461bcd60e51b815260206004820152602160248201527f43616e63656c3a2043616e6e6f742063616e63656c206d6f7265206f726465726044820152607360f81b6064820152608401610587565b3360008181526009602052604090819020839055517f1e7178d84f0b0825c65795cd62e7972809ad3aac6917843aaec596161b2c0a97906112659084815260200190565b60405180910390a250565b6112786113d9565b6001600160a01b03811661129e5760405162461bcd60e51b8152600401610587906130bb565b600580546001600160a01b0319166001600160a01b0383169081179091556040517f36e2a376eabc3bc60cb88f29c288f53e36874a95a7f407330ab4f166b090569890600090a250565b6112f06113d9565b6001600160a01b0381166113555760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610587565b61135e81612190565b50565b6113696113d9565b6001600160a01b03811661138f5760405162461bcd60e51b8152600401610587906130bb565b600780546001600160a01b0319166001600160a01b0383169081179091556040517f205d78ab41afe80bd6b6aaa5d7599d5300ff8690da3ab1302c1b552f7baf7d8c90600090a250565b6001546001600160a01b03163314610b1f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610587565b6040516001600160a01b038085166024830152831660448201526064810182905261149e9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526126e3565b50505050565b600a60006114b86040850160208601612f0f565b6001600160a01b0316815260208082019290925260409081016000908120610100860135825290925290205460ff1615801561152d5750600960006115036040850160208601612f0f565b6001600160a01b03166001600160a01b031681526020019081526020016000205482610100013510155b6115795760405162461bcd60e51b815260206004820152601d60248201527f4f726465723a204d61746368696e67206f7264657220657870697265640000006044820152606401610587565b600061158b6040840160208501612f0f565b6001600160a01b031614156115da5760405162461bcd60e51b815260206004820152601560248201527427b93232b91d1024b73b30b634b21039b4b3b732b960591b6044820152606401610587565b60008260a001351161162e5760405162461bcd60e51b815260206004820152601960248201527f4f726465723a20416d6f756e742063616e6e6f742062652030000000000000006044820152606401610587565b8060a001354211156116825760405162461bcd60e51b815260206004820152601860248201527f4f726465723a20496e76616c6964207369676e617475726500000000000000006044820152606401610587565b6000611695611690846137a0565b6127ba565b90506116ef816116ab6040860160208701612f0f565b6116bd6101c087016101a088016138b1565b866101c00135876101e001357fc6db6387e1a5a9323760523f1719c52c28f239e2392cd93b7cff507f6e6ff63a612861565b61173b5760405162461bcd60e51b815260206004820152601d60248201527f4d616b65724f72646572205369676e61747572653a20496e76616c69640000006044820152606401610587565b600061174e611749846138cc565b6129af565b6003549091506117869082906001600160a01b0316611775610160870161014088016138b1565b866101600135876101800135612a95565b6117d25760405162461bcd60e51b815260206004820152601d60248201527f54616b65724f72646572205369676e61747572653a20496e76616c69640000006044820152606401610587565b6004546001600160a01b03166343b938c56117f4610100870160e08801612f0f565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561183357600080fd5b505afa158015611847573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186b91906139e7565b6118b75760405162461bcd60e51b815260206004820152601960248201527f43757272656e63793a204e6f742077686974656c6973746564000000000000006044820152606401610587565b6005546001600160a01b031663999ba27c6118d860e0870160c08801612f0f565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561191757600080fd5b505afa15801561192b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061194f91906139e7565b61199b5760405162461bcd60e51b815260206004820152601960248201527f53747261746567793a204e6f742077686974656c6973746564000000000000006044820152606401610587565b6008546001600160a01b031663a0655c796119bc6060870160408801612f0f565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b1580156119fb57600080fd5b505afa158015611a0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3391906139e7565b61149e5760405162461bcd60e51b815260206004820152601b60248201527f436f6c6c656374696f6e3a204e6f742077686974656c697374656400000000006044820152606401610587565b60608301356000611aa3611a9960e0870160c08801612f0f565b8660600135612b0f565b6002549091506001600160a01b031615801590611abf57508015155b15611b0b57600254611afe906001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28116911683612ba4565b611b0881836131d8565b91505b50611b1d6103e0610100850185613a04565b611bc857600080611b32610100860186613a04565b810190611b3f9190612fa1565b90925090506000612710611b578360608a0135613a4b565b611b619190613a6a565b90506001600160a01b03831615801590611b7a57508015155b15611bc057611bb36001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2168483612ba4565b611bbd81856131d8565b93505b505050611f84565b611bd96103e0610120850185613a04565b611dda57600080611bee610120860186613a04565b810190611bfb9190613a8c565b915091506000600660009054906101000a90046001600160a01b03166001600160a01b0316638466b0346040518163ffffffff1660e01b815260040160206040518083038186803b158015611c4f57600080fd5b505afa158015611c63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c879190613aba565b90506000600660009054906101000a90046001600160a01b03166001600160a01b031663f248fdfb6040518163ffffffff1660e01b815260040160206040518083038186803b158015611cd957600080fd5b505afa158015611ced573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d119190613aba565b90506000612710611d268460608c0135613a4b565b611d309190613a6a565b90506000612710611d458460608d0135613a4b565b611d4f9190613a6a565b9050611d856001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2168784612ba4565b611db96001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2168683612ba4565b611dc38183613697565b611dcd90886131d8565b9650505050505050611f84565b60065460009081906001600160a01b031663f4f635fa611e006060890160408a01612f0f565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526080890135602482015260608901356044820152606401604080518083038186803b158015611e5257600080fd5b505afa158015611e66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e8a9190613ad3565b90925090506001600160a01b03821615801590611ea657508015155b15611f8157611edf6001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2168383612ba4565b611ee981846131d8565b92506001600160a01b0382166080870135611f0a6060890160408a01612f0f565b6001600160a01b03167f27c4f0403323142b599832f26acd21c74a9e5b809f2215726e244a4ac588cd7d7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc285604051611f789291906001600160a01b03929092168252602082015260400190565b60405180910390a45b50505b611f976060850135610160860135613a4b565b611fa382612710613a4b565b1015611ff15760405162461bcd60e51b815260206004820152601a60248201527f466565733a20486967686572207468616e2065787065637465640000000000006044820152606401610587565b61149e6001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2168383612ba4565b60075460405163cc15949360e01b81526001600160a01b038781166004830152600092169063cc1594939060240160206040518083038186803b15801561206b57600080fd5b505afa15801561207f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120a39190613b01565b90506001600160a01b03811661210f5760405162461bcd60e51b815260206004820152602b60248201527f5472616e736665723a204e6f204e4654207472616e73666572206d616e61676560448201526a7220617661696c61626c6560a81b6064820152608401610587565b6040516333f2fa9f60e01b81526001600160a01b0387811660048301528681166024830152858116604483015260648201859052608482018490528216906333f2fa9f9060a401600060405180830381600087803b15801561217057600080fd5b505af1158015612184573d6000803e3d6000fd5b50505050505050505050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606084013560006122066121fc60e0880160c08901612f0f565b8760600135612b0f565b6002549091506001600160a01b03161580159061222257508015155b156122695760025461225c9085906001600160a01b03168361224b6101008b0160e08c01612f0f565b6001600160a01b0316929190611433565b61226681836131d8565b91505b5061227b6103e0610100860186613a04565b61230957600080612290610100870187613a04565b81019061229d9190612fa1565b909250905060006127106122b58360608b0135613a4b565b6122bf9190613a6a565b90506001600160a01b038316158015906122d857508015155b15612301576122f486848361224b6101008d0160e08e01612f0f565b6122fe81856131d8565b93505b505050612658565b61231a6103e0610120860186613a04565b6124e55760008061232f610120870187613a04565b81019061233c9190613a8c565b915091506000600660009054906101000a90046001600160a01b03166001600160a01b0316638466b0346040518163ffffffff1660e01b815260040160206040518083038186803b15801561239057600080fd5b505afa1580156123a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123c89190613aba565b90506000600660009054906101000a90046001600160a01b03166001600160a01b031663f248fdfb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561241a57600080fd5b505afa15801561242e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124529190613aba565b905060006127106124678460608d0135613a4b565b6124719190613a6a565b905060006127106124868460608e0135613a4b565b6124909190613a6a565b90506124ab8987848e60e001602081019061224b9190612f0f565b6124c48986838e60e001602081019061224b9190612f0f565b6124ce8183613697565b6124d890886131d8565b9650505050505050612658565b60065460009081906001600160a01b031663f4f635fa61250b60608a0160408b01612f0f565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260808a0135602482015260608a01356044820152606401604080518083038186803b15801561255d57600080fd5b505afa158015612571573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125959190613ad3565b90925090506001600160a01b038216158015906125b157508015155b15612655576125cd85838361224b6101008c0160e08d01612f0f565b6125d781846131d8565b92506001600160a01b03821660808801356125f860608a0160408b01612f0f565b6001600160a01b03167f27c4f0403323142b599832f26acd21c74a9e5b809f2215726e244a4ac588cd7d6126336101008c0160e08d01612f0f565b604080516001600160a01b039092168252602082018790520160405180910390a45b50505b61266b6060860135610160870135613a4b565b61267782612710613a4b565b10156126c55760405162461bcd60e51b815260206004820152601a60248201527f466565733a20486967686572207468616e2065787065637465640000000000006044820152606401610587565b6126dc83838361224b6101008a0160e08b01612f0f565b5050505050565b6000612738826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612bd49092919063ffffffff16565b8051909150156127b5578080602001905181019061275691906139e7565b6127b55760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610587565b505050565b80516020808301516040808501516060860151608087015160a088015160c089015160e08a01516101008b01516101208c01516101408d01516101608e01516101808f01518051908e01209a5160009e6128449e7f40261ade532fa1d2c7293df30aaadb9b3c616fae525a0b56d3d411c841a850289e919d919c9b9a999897969594939201613b1e565b604051602081830303815290604052805190602001209050919050565b60405161190160f01b6020820152602281018290526042810187905260009081906062016040516020818303038152906040528051906020012090506128b0876001600160a01b03163b151590565b1561298157604080516020810187905280820186905260f888901b6001600160f81b0319166060820152815160418183030181526061820192839052630b135d3f60e11b9092526001600160a01b03891691631626ba7e91612916918591606501613bb1565b60206040518083038186803b15801561292e57600080fd5b505afa158015612942573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129669190613bca565b6001600160e01b031916631626ba7e60e01b149150506129a5565b866001600160a01b031661299782888888612bed565b6001600160a01b0316149150505b9695505050505050565b60007f52899feb3ddfece805ec742fd953f7c2d538f6a548044216a6b8db2598b449d960001b46836000015184602001518560400151866060015187608001518860a001518960c001518a60e00151805190602001208b6101000151805190602001208c6101200151805190602001206040516020016128449c9b9a999897969594939291909b8c5260208c019a909a5297151560408b01526001600160a01b0396871660608b015294909516608089015260a088019290925260c087015260e08601526101008501919091526101208401526101408301526101608201526101800190565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018690526000908190605c016040516020818303038152906040528051906020012090506000612af382878787612bed565b6001600160a01b03908116908816149250505095945050505050565b600080836001600160a01b0316639dd1cda66040518163ffffffff1660e01b815260040160206040518083038186803b158015612b4b57600080fd5b505afa158015612b5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b839190613aba565b9050612710612b928483613a4b565b612b9c9190613a6a565b949350505050565b6040516001600160a01b0383166024820152604481018290526127b590849063a9059cbb60e01b90606401611467565b6060612be38484600085612d80565b90505b9392505050565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115612c5f5760405162461bcd60e51b815260206004820152601e60248201527f5369676e61747572653a20496e76616c6964207320706172616d6574657200006044820152606401610587565b8360ff16601b1480612c7457508360ff16601c145b612cc05760405162461bcd60e51b815260206004820152601e60248201527f5369676e61747572653a20496e76616c6964207620706172616d6574657200006044820152606401610587565b6040805160008082526020820180845288905260ff871692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa158015612d14573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612d775760405162461bcd60e51b815260206004820152601960248201527f5369676e61747572653a20496e76616c6964207369676e6572000000000000006044820152606401610587565b95945050505050565b606082471015612de15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610587565b6001600160a01b0385163b612e385760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610587565b600080866001600160a01b03168587604051612e549190613bf4565b60006040518083038185875af1925050503d8060008114612e91576040519150601f19603f3d011682016040523d82523d6000602084013e612e96565b606091505b5091509150612ea6828286612eb1565b979650505050505050565b60608315612ec0575081612be6565b825115612ed05782518084602001fd5b8160405162461bcd60e51b81526004016105879190613c10565b6001600160a01b038116811461135e57600080fd5b8035612f0a81612eea565b919050565b600060208284031215612f2157600080fd5b8135612be681612eea565b60008060408385031215612f3f57600080fd5b823567ffffffffffffffff80821115612f5757600080fd5b908401906101a08287031215612f6c57600080fd5b90925060208401359080821115612f8257600080fd5b5083016102008186031215612f9657600080fd5b809150509250929050565b60008060408385031215612fb457600080fd5b8235612fbf81612eea565b946020939093013593505050565b60008060208385031215612fe057600080fd5b823567ffffffffffffffff80821115612ff857600080fd5b818501915085601f83011261300c57600080fd5b81358181111561301b57600080fd5b86602082850101111561302d57600080fd5b60209290920196919550909350505050565b6000806020838503121561305257600080fd5b823567ffffffffffffffff8082111561306a57600080fd5b818501915085601f83011261307e57600080fd5b81358181111561308d57600080fd5b8660208260051b850101111561302d57600080fd5b6000602082840312156130b457600080fd5b5035919050565b6020808252601d908201527f4f776e65723a2043616e6e6f74206265206e756c6c2061646472657373000000604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b801515811461135e57600080fd5b8035612f0a81613129565b60006020828403121561315457600080fd5b8135612be681613129565b6020808252601290820152714f726465723a2057726f6e6720736964657360701b604082015260600190565b6020808252601f908201527f4f726465723a2054616b6572206d757374206265207468652073656e64657200604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000828210156131ea576131ea6131c2565b500390565b6000808335601e1984360301811261320657600080fd5b830160208101925035905067ffffffffffffffff81111561322657600080fd5b80360383131561323557600080fd5b9250929050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff81168114612f0a57600080fd5b60006101a061328e8461328885613137565b15159052565b61329a60208401612eff565b6001600160a01b031660208501526132b460408401612eff565b6001600160a01b038116604086015250606083013560608501526080830135608085015260a083013560a085015260c083013560c08501526132f960e08401846131ef565b8260e087015261330c838701828461323c565b9250505061010061331f818501856131ef565b8684038388015261333184828461323c565b9350505050610120613345818501856131ef565b8684038388015261335784828461323c565b935050505061014061336a818501613265565b60ff169085015261016083810135908501526101809283013592909301919091525090565b60006102006133a18461328885613137565b6133ad60208401612eff565b6001600160a01b031660208501526133c760408401612eff565b6001600160a01b038116604086015250606083013560608501526080830135608085015260a083013560a085015261340160c08401612eff565b6001600160a01b031660c085015261341b60e08401612eff565b6001600160a01b031660e08501526101008381013590850152610120808401359085015261014080840135908501526101608084013590850152610180613464818501856131ef565b8383880152613476848801828461323c565b93505050506101a0613489818501613265565b60ff16908501526101c083810135908501526101e09283013592909301919091525090565b6040815260006134c16040830185613276565b8281036020840152612d77818561338f565b6000806000606084860312156134e857600080fd5b83516134f381613129565b602085015160409095015190969495509392505050565b6020808252601b908201527f53747261746567793a20457865637574696f6e20696e76616c69640000000000604082015260600190565b602081526000612be6602083018461338f565b602081526000612be66020830184613276565b60005b8381101561358257818101518382015260200161356a565b8381111561149e5750506000910152565b600081518084526135ab816020860160208601613567565b601f01601f19169290920160200192915050565b6040815260006135d26040830185613593565b8281036020840152612d778185613593565b634e487b7160e01b600052603260045260246000fd5b600060001982141561360e5761360e6131c2565b5060010190565b60208082526026908201527f43616e63656c3a204f72646572206e6f6e6365206c6f776572207468616e20636040820152651d5c9c995b9d60d21b606082015260800190565b6020808252810182905260006001600160fb1b0383111561367b57600080fd5b8260051b80856040850137600092016040019182525092915050565b600082198211156136aa576136aa6131c2565b500190565b634e487b7160e01b600052604160045260246000fd5b604051610200810167ffffffffffffffff811182821017156136e9576136e96136af565b60405290565b6040516101a0810167ffffffffffffffff811182821017156136e9576136e96136af565b600082601f83011261372457600080fd5b813567ffffffffffffffff8082111561373f5761373f6136af565b604051601f8301601f19908116603f01168101908282118183101715613767576137676136af565b8160405283815286602085880101111561378057600080fd5b836020870160208301376000602085830101528094505050505092915050565b600061020082360312156137b357600080fd5b6137bb6136c5565b6137c483613137565b81526137d260208401612eff565b60208201526137e360408401612eff565b6040820152606083013560608201526080830135608082015260a083013560a082015261381260c08401612eff565b60c082015261382360e08401612eff565b60e082015261010083810135908201526101208084013590820152610140808401359082015261016080840135908201526101808084013567ffffffffffffffff81111561387057600080fd5b61387c36828701613713565b8284015250506101a0613890818501613265565b908201526101c083810135908201526101e092830135928101929092525090565b6000602082840312156138c357600080fd5b612be682613265565b60006101a082360312156138df57600080fd5b6138e76136ef565b6138f083613137565b81526138fe60208401612eff565b602082015261390f60408401612eff565b6040820152606083013560608201526080830135608082015260a083013560a082015260c083013560c082015260e083013567ffffffffffffffff8082111561395757600080fd5b61396336838701613713565b60e08401526101009150818501358181111561397e57600080fd5b61398a36828801613713565b8385015250610120915081850135818111156139a557600080fd5b6139b136828801613713565b838501525050506101406139c6818501613265565b90820152610160838101359082015261018092830135928101929092525090565b6000602082840312156139f957600080fd5b8151612be681613129565b6000808335601e19843603018112613a1b57600080fd5b83018035915067ffffffffffffffff821115613a3657600080fd5b60200191503681900382131561323557600080fd5b6000816000190483118215151615613a6557613a656131c2565b500290565b600082613a8757634e487b7160e01b600052601260045260246000fd5b500490565b60008060408385031215613a9f57600080fd5b8235613aaa81612eea565b91506020830135612f9681612eea565b600060208284031215613acc57600080fd5b5051919050565b60008060408385031215613ae657600080fd5b8251613af181612eea565b6020939093015192949293505050565b600060208284031215613b1357600080fd5b8151612be681612eea565b8e81528d151560208201526001600160a01b038d811660408301528c1660608201526101c081018b60808301528a60a08301528960c0830152613b6c60e083018a6001600160a01b03169052565b6001600160a01b0388166101008301526101208201969096526101408101949094526101608401929092526101808301526101a0909101529998505050505050505050565b828152604060208201526000612be36040830184613593565b600060208284031215613bdc57600080fd5b81516001600160e01b031981168114612be657600080fd5b60008251613c06818460208701613567565b9190910192915050565b602081526000612be6602083018461359356fea2646970667358221220a7f7cd8545e023bd66ed8d67fbdda6013dcbf74cb4257c2cb7245e285326930964736f6c63430008090033

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

0000000000000000000000009a0dea9fdaf7f3e6a447a6251c8e5395db9b53bc000000000000000000000000239ac6878fd2c96ba5c200bf6f2e202e9e7ecc44000000000000000000000000d5491361728e8f8afe0230c399611675bed5cf570000000000000000000000007a34f051548f8e908b0a89f4284e778103799080000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000510ced318567901142f3ad38d80b36f689065c1d0000000000000000000000001e2bb099f1831fdaf7898b0304462e66385234e2

-----Decoded View---------------
Arg [0] : _currencyManager (address): 0x9a0dEa9fDAf7f3E6A447A6251C8e5395DB9b53Bc
Arg [1] : _executionManager (address): 0x239aC6878FD2c96Ba5C200Bf6f2e202e9E7ECC44
Arg [2] : _royaltyFeeManager (address): 0xd5491361728E8F8AFE0230C399611675Bed5Cf57
Arg [3] : _collectionManager (address): 0x7a34f051548F8E908b0a89F4284e778103799080
Arg [4] : _WETH (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [5] : _protocolFeeRecipient (address): 0x510CEd318567901142f3ad38d80b36F689065C1D
Arg [6] : _signer (address): 0x1e2Bb099f1831FdaF7898B0304462e66385234E2

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000009a0dea9fdaf7f3e6a447a6251c8e5395db9b53bc
Arg [1] : 000000000000000000000000239ac6878fd2c96ba5c200bf6f2e202e9e7ecc44
Arg [2] : 000000000000000000000000d5491361728e8f8afe0230c399611675bed5cf57
Arg [3] : 0000000000000000000000007a34f051548f8e908b0a89f4284e778103799080
Arg [4] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [5] : 000000000000000000000000510ced318567901142f3ad38d80b36f689065c1d
Arg [6] : 0000000000000000000000001e2bb099f1831fdaf7898b0304462e66385234e2


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.