ETH Price: $2,560.52 (+2.40%)

Contract

0xaFB71004636fCAf6fb15959A7dD19db4779c3237

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Turn Rewards Off525534692022-12-20 21:31:25906 days ago1671571885IN
0xaFB71004...4779c3237
0 ETH0.0000547464280.001
Turn Rewards On525527012022-12-20 21:28:39906 days ago1671571719IN
0xaFB71004...4779c3237
0 ETH0.0000486392840.001

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
1075263562023-07-29 17:24:49685 days ago1690651489
0xaFB71004...4779c3237
0 ETH
1075263392023-07-29 17:24:15685 days ago1690651455
0xaFB71004...4779c3237
0 ETH
1075263262023-07-29 17:23:49685 days ago1690651429
0xaFB71004...4779c3237
0 ETH
1075262912023-07-29 17:22:39685 days ago1690651359
0xaFB71004...4779c3237
0 ETH
1075262782023-07-29 17:22:13685 days ago1690651333
0xaFB71004...4779c3237
0 ETH
1075262682023-07-29 17:21:53685 days ago1690651313
0xaFB71004...4779c3237
0 ETH
1075262402023-07-29 17:20:57685 days ago1690651257
0xaFB71004...4779c3237
0 ETH
1070810862023-07-19 10:02:29695 days ago1689760949
0xaFB71004...4779c3237
0 ETH
1069386692023-07-16 2:55:15698 days ago1689476115
0xaFB71004...4779c3237
0 ETH
1067908472023-07-12 16:47:51702 days ago1689180471
0xaFB71004...4779c3237
0 ETH
1067908472023-07-12 16:47:51702 days ago1689180471
0xaFB71004...4779c3237
0 ETH
1066836462023-07-10 5:14:29704 days ago1688966069
0xaFB71004...4779c3237
0 ETH
1066836462023-07-10 5:14:29704 days ago1688966069
0xaFB71004...4779c3237
0 ETH
1066836462023-07-10 5:14:29704 days ago1688966069
0xaFB71004...4779c3237
0 ETH
1066836462023-07-10 5:14:29704 days ago1688966069
0xaFB71004...4779c3237
0 ETH
1066836462023-07-10 5:14:29704 days ago1688966069
0xaFB71004...4779c3237
0 ETH
1066836462023-07-10 5:14:29704 days ago1688966069
0xaFB71004...4779c3237
0 ETH
1066836462023-07-10 5:14:29704 days ago1688966069
0xaFB71004...4779c3237
0 ETH
1066836462023-07-10 5:14:29704 days ago1688966069
0xaFB71004...4779c3237
0 ETH
1066836462023-07-10 5:14:29704 days ago1688966069
0xaFB71004...4779c3237
0 ETH
1066836462023-07-10 5:14:29704 days ago1688966069
0xaFB71004...4779c3237
0 ETH
1066836462023-07-10 5:14:29704 days ago1688966069
0xaFB71004...4779c3237
0 ETH
1066836462023-07-10 5:14:29704 days ago1688966069
0xaFB71004...4779c3237
0 ETH
1066836462023-07-10 5:14:29704 days ago1688966069
0xaFB71004...4779c3237
0 ETH
1066836462023-07-10 5:14:29704 days ago1688966069
0xaFB71004...4779c3237
0 ETH
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RewardDeriver

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import { RewardInfo, Campaign } from "./RewardStructs.sol";
import { ICampaignTracker } from "./ICampaignTracker.sol";
import { IRewardDeriver } from "./IRewardDeriver.sol";
import {
    Order,
    AdditionalRecipient,
    ConsiderationItem
} from "../lib/seaport/lib/ConsiderationStructs.sol";
import { ItemType } from "../lib/seaport/lib/ConsiderationEnums.sol";
import {
    AggregatorV3Interface
} from "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
import { TwoStepOwnable } from "../access/TwoStepOwnable.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";

/**
 * @title RewardDeriver
 * @notice RewardDeriver calculates the OP token reward that a buyer will receive for placing an
 *         order on Quixotic via Seaport. It uses Chainlink to calculate the price conversion from
 *         the buyer's ETH payment to their reward in OP tokens.
 */
contract RewardDeriver is TwoStepOwnable, IRewardDeriver {
    /**
     * @notice Emitted when a new marketplace fee recipient address is set.
     *
     * @param marketplaceFeeRecipient New marketplace fee recipient address.
     */
    event MarketplaceFeeRecipientSet(address indexed marketplaceFeeRecipient);

    /**
     * @notice Emitted when the marketplace fee per mille is changed by this contract's owner.
     *
     * @param marketplaceFeePerMille New marketplace fee per mille.
     */
    event MarketplaceFeePerMilleSet(uint256 marketplaceFeePerMille);

    /**
     * @notice Emitted when the RewardWrapper is set.
     */
    event RewardWrapperSet(address indexed rewardWrapper);

    /**
     * @notice Emitted when the CampaignTracker is set.
     */
    event CampaignTrackerSet(address indexed campaignTracker);

    /**
     * @notice Address of the OP token ERC20 contract.
     */
    // slither-disable-next-line too-many-digits
    IERC20 internal constant OP_TOKEN = IERC20(0x4200000000000000000000000000000000000042);

    string public constant BASELINE_CAMPAIGN_STRING = "BASELINE";

    string public constant OPTIMISM_OG_CAMPAIGN_STRING = "OPOG";

    string public constant COLLECTION_BOOST_PREFIX = "COLLECTION_BOOST_";

    /**
     * @notice Address of the RewardWrapper.
     */
    address public rewardWrapper;

    /**
     * @notice Address of the CampaignTracker.
     */
    ICampaignTracker public campaignTracker;

    /**
     * @notice Address of Chainlink's OP-USD price oracle.
     */
    AggregatorV3Interface public opUsdPriceFeed;

    /**
     * @notice Address of Chainlink's ETH-USD price oracle.
     */
    AggregatorV3Interface public ethUsdPriceFeed;

    /**
     * @notice The address to receive marketplace fees.
     */
    address public marketplaceFeeRecipient;

    /**
     * @notice Marketplace fee per mille.
     */
    uint256 public marketplaceFeePerMille;

    /**
     * @notice Boolean indicating if rewards are turned on.
     */
    bool public rewardsTurnedOn;

    /**
     * @param _marketplaceOwner        Owner of this contract.
     * @param _rewardWrapper           Address of the RewardWrapper.
     * @param _campaignTracker         Address of the CampaignTracker.
     * @param _marketplaceFeeRecipient Address to receive the marketplace fee.
     * @param _marketplaceFeePerMille  Marketplace fee out of 1000.
     */
    constructor(
        address _marketplaceOwner,
        address _rewardWrapper,
        address _campaignTracker,
        address _marketplaceFeeRecipient,
        uint256 _marketplaceFeePerMille
    ) {
        // The Chainlink oracles only exist on Optimism mainnet (chain ID 10). We also allow chain
        // ID 31337 to test this contract on a forked version of Optimism mainnet using Hardhat.
        if (block.chainid == 10 || block.chainid == 31337) {
            opUsdPriceFeed = AggregatorV3Interface(0x0D276FC14719f9292D5C1eA2198673d1f4269246);
            ethUsdPriceFeed = AggregatorV3Interface(0x13e3Ee699D1909E989722E753853AE30b17e08c5);
        } else {
            // We use pre-deployed EACAggregatorProxyMock contracts to mimic the Chainlink oracles
            // on other networks.
            opUsdPriceFeed = AggregatorV3Interface(0x653eDEC47e954A613A2CD6c5C8C0d1d18781C0ad);
            ethUsdPriceFeed = AggregatorV3Interface(0x680DD45482CEAa2B9FFf17f2EE6396bC7fAc549F);
        }

        turnRewardsOn();
        setRewardWrapper(_rewardWrapper);
        setCampaignTracker(ICampaignTracker(_campaignTracker));
        setMarketplaceFeeRecipient(_marketplaceFeeRecipient);
        setMarketplaceFeePerMille(_marketplaceFeePerMille);

        _transferOwnership(_marketplaceOwner);
    }

    /**
     * @notice Gets the buyer's reward amount in OP for a given order. A reward is only given for
     *         orders that:
     *         - Are paid completely in ETH.
     *         - Have an equal starting and ending price (i.e. no dutch auctions).
     *         - Pay the marketplace fee.
     *         - Have an active campaign with a sufficient allowance.
     *         If any of these conditions are not met, the reward amount is zero.
     *
     * @param _order     Seaport order struct.
     * @param _recipient Address to receive the reward.
     *
     * @return OP token reward amount.
     */
    function getRewardInOP(Order memory _order, address _recipient)
        external
        view
        override
        returns (RewardInfo[] memory)
    {
        if (!rewardsTurnedOn) {
            return new RewardInfo[](0);
        }

        if (
            _order.parameters.consideration.length !=
            _order.parameters.totalOriginalConsiderationItems
        ) {
            return new RewardInfo[](0);
        }

        string memory collectionBoostCampaignString = string.concat(
            COLLECTION_BOOST_PREFIX,
            Strings.toHexString(uint160(_order.parameters.offer[0].token), 20)
        );
        Campaign memory campaign = campaignTracker.getCampaign(collectionBoostCampaignString);

        uint256 considerationAmount = 0;
        uint256 marketplacePayment = 0;
        uint256 royaltyPayment = 0;
        for (uint256 i = 0; i < _order.parameters.totalOriginalConsiderationItems; i++) {
            ConsiderationItem memory considerationItem = _order.parameters.consideration[i];
            if (considerationItem.startAmount != considerationItem.endAmount) {
                return new RewardInfo[](0);
            } else if (considerationItem.itemType != ItemType.NATIVE) {
                return new RewardInfo[](0);
            } else if (considerationItem.recipient == marketplaceFeeRecipient) {
                marketplacePayment += considerationItem.startAmount;
            } else if (considerationItem.recipient == campaign.royaltyReceiver) {
                royaltyPayment += considerationItem.startAmount;
            }
            considerationAmount += considerationItem.startAmount;
        }

        uint256 expectedMarketplacePayment = (marketplaceFeePerMille * considerationAmount) / 1000;
        if (expectedMarketplacePayment > marketplacePayment) {
            return new RewardInfo[](0);
        }

        uint256 expectedRoyaltyPayment = (campaign.royaltyPerMille * considerationAmount) / 1000;
        if (campaign.royaltyReceiver != address(0) && expectedRoyaltyPayment > royaltyPayment) {
            return new RewardInfo[](0);
        }

        (, int256 usdPerOP, , , ) = opUsdPriceFeed.latestRoundData();
        (, int256 usdPerETH, , , ) = ethUsdPriceFeed.latestRoundData();

        // Note that `usdPerOP` and `usdPerETH` are integers, not unsigned integers, meaning that
        // their values could theoretically be negative. Although this is highly unlikely, we check
        // that these values are positive anyways to avoid an underflow. See here for the reason
        // Chainlink made these values integers and not unsigned integers:
        // https://stackoverflow.com/questions/67094903/anybody-knows-why-chainlinks-pricefeed-return-price-value-with-int-type-while
        if (usdPerOP <= 0 || usdPerETH <= 0) {
            return new RewardInfo[](0);
        }

        // Converts the supplied amount from ETH to OP. We perform a division before multiplication
        // here for code clarity. This won't lead to truncation errors unless `usdPerOP` exceeds
        // `usdPerETH`, which won't happen anytime soon.
        // slither-disable-next-line divide-before-multiply
        uint256 considerationAmountInOP = (considerationAmount * uint256(usdPerETH)) /
            uint256(usdPerOP);

        uint256 totalRewardAmountInOP = 0;
        RewardInfo[] memory rewardInfoArray = new RewardInfo[](3);
        if (campaignTracker.isOptimismOGHolder(_recipient)) {
            uint256 rewardAmountInOP = campaignTracker.getRewardAmountInOP(
                OPTIMISM_OG_CAMPAIGN_STRING,
                considerationAmountInOP
            );
            rewardInfoArray[0] = RewardInfo({
                campaignString: OPTIMISM_OG_CAMPAIGN_STRING,
                rewardAmountInOP: rewardAmountInOP
            });
            totalRewardAmountInOP += rewardAmountInOP;
        }

        uint256 baselineRewardAmountInOP = campaignTracker.getRewardAmountInOP(
            BASELINE_CAMPAIGN_STRING,
            considerationAmountInOP
        );
        rewardInfoArray[1] = RewardInfo({
            campaignString: BASELINE_CAMPAIGN_STRING,
            rewardAmountInOP: baselineRewardAmountInOP
        });
        totalRewardAmountInOP += baselineRewardAmountInOP;

        uint256 collectionBoostRewardAmountInOP = campaignTracker.getRewardAmountInOP(
            collectionBoostCampaignString,
            considerationAmountInOP
        );
        rewardInfoArray[2] = RewardInfo({
            campaignString: collectionBoostCampaignString,
            rewardAmountInOP: collectionBoostRewardAmountInOP
        });
        totalRewardAmountInOP += collectionBoostRewardAmountInOP;

        // Check that the owner of the RewardWrapper has a sufficient balance of OP token
        // and that the RewardWrapper has a sufficient allowance.
        address rewardWrapperOwner = TwoStepOwnable(rewardWrapper).owner();
        if (totalRewardAmountInOP > OP_TOKEN.balanceOf(rewardWrapperOwner)) {
            return new RewardInfo[](0);
        } else if (totalRewardAmountInOP > OP_TOKEN.allowance(rewardWrapperOwner, rewardWrapper)) {
            return new RewardInfo[](0);
        }

        return rewardInfoArray;
    }

    /**
     * @notice Alows the owner to set a new marketplace fee recipient address.
     *
     * @param _marketplaceFeeRecipient New marketplace fee recipient address.
     */
    function setMarketplaceFeeRecipient(address _marketplaceFeeRecipient) public onlyOwner {
        marketplaceFeeRecipient = _marketplaceFeeRecipient;
        emit MarketplaceFeeRecipientSet(_marketplaceFeeRecipient);
    }

    /**
     * @notice Allows the owner to set a new RewardWrapper contract.
     *
     * @param _rewardWrapper New RewardWrapper contract.
     */
    function setRewardWrapper(address _rewardWrapper) public onlyOwner {
        rewardWrapper = _rewardWrapper;
        emit RewardWrapperSet(_rewardWrapper);
    }

    /**
     * @notice Allows the owner to set a new CampaignTracker contract.
     *
     * @param _campaignTracker New CampaignTracker contract.
     */
    function setCampaignTracker(ICampaignTracker _campaignTracker) public onlyOwner {
        campaignTracker = _campaignTracker;
        emit CampaignTrackerSet(address(_campaignTracker));
    }

    /**
     * @notice Allows the contract owner to set a new marketplace fee per mille. The new marketplace
     *         fee per mille must be greater than the reward per mille for the baseline campaign
     *         plus the reward per mille for the OP OG campaign. This helps ensure that someone
     *         malicious cannot purchase their own NFT to profitably drain rewards.
     *
     * @param _marketplaceFeePerMille New marketplace fee per mille.
     */
    function setMarketplaceFeePerMille(uint256 _marketplaceFeePerMille) public onlyOwner {
        Campaign memory baselineCampaign = campaignTracker.getCampaign(BASELINE_CAMPAIGN_STRING);
        Campaign memory optimismOGCampaign = campaignTracker.getCampaign(
            OPTIMISM_OG_CAMPAIGN_STRING
        );
        require(
            _marketplaceFeePerMille >
                baselineCampaign.rewardPerMille + optimismOGCampaign.rewardPerMille,
            "RewardDeriver: new marketplace fee per mille is too low"
        );

        marketplaceFeePerMille = _marketplaceFeePerMille;
        emit MarketplaceFeePerMilleSet(_marketplaceFeePerMille);
    }

    /**
     * @notice Allows the owner to turn rewards off.
     */
    function turnRewardsOff() external onlyOwner {
        rewardsTurnedOn = false;
    }

    /**
     * @notice Allows the owner to turn rewards on.
     */
    function turnRewardsOn() public onlyOwner {
        rewardsTurnedOn = true;
    }
}

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

struct Campaign {
    string campaignString;
    uint256 rewardPerMille;
    address manager;
    address royaltyReceiver;
    uint256 royaltyPerMille;
    uint256 maxAllowanceInOP;
    bool isActive;
}

/**
 * @notice The campaign ID and OP token reward amount for a given order.
 */
struct RewardInfo {
    string campaignString;
    uint256 rewardAmountInOP;
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import { Order } from "../lib/seaport/lib/ConsiderationStructs.sol";
import { RewardInfo } from "./RewardStructs.sol";

/**
 * @title IRewardDeriver
 * @notice RewardDeriver interface.
 */
interface IRewardDeriver {
    /**
     * @notice The address to receive marketplace fees.
     */
    function marketplaceFeeRecipient() external returns (address);

    /**
     * @notice Marketplace fee per mille.
     */
    function marketplaceFeePerMille() external returns (uint256);

    /**
     * @notice Boolean indicating if rewards are turned on.
     */
    function rewardsTurnedOn() external returns (bool);

    /**
     * @notice Gets the buyer's reward amount in OP for a given order. A reward is only given for
     *
     * @param _order Seaport order struct.
     * @param _buyer Buyer of the order.
     *
     * @return OP token reward amount.
     */
    function getRewardInOP(Order memory _order, address _buyer)
        external
        view
        returns (RewardInfo[] memory);
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import { Campaign } from "./RewardStructs.sol";

interface ICampaignTracker {
    function getRewardAmountInOP(string memory _campaignString, uint256 _considerationAmountInOP)
        external
        view
        returns (uint256);

    function getCampaign(string memory _campaignString) external view returns (Campaign memory);

    function isOptimismOGHolder(address _address) external view returns (bool);

    function getOptimismOGERC721s() external view returns (address[] memory);
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import { Context } from "@openzeppelin/contracts/utils/Context.sol";

/**
 * @title TwoStepOwnable
 * @notice This contract is a slightly modified version of OpenZeppelin's `Ownable` contract with the caveat
 *         that ownership transfer occurs in two phases. First, the current owner initiates the transfer,
 *         and then the new owner accepts it. Ownership isn't actually transferred until both steps have been
 *         completed. The purpose of this is to ensure that ownership isn't accidentally transferred to the
 *         incorrect address. Note that the initial owner account is the contract deployer by default. Also
 *         note that this contract can only be used through inheritance.
 */
abstract contract TwoStepOwnable is Context {
    address private _owner;

    // A potential owner is specified by the owner when the transfer is initiated. A potential owner
    // does not have any ownership privileges until it accepts the transfer.
    address private _potentialOwner;

    /**
     * @notice Emitted when ownership transfer is initiated.
     *
     * @param owner          The current owner.
     * @param potentialOwner The address that the owner specifies as the new owner.
     */
    event OwnershipTransferInitiated(
        address indexed owner,
        address indexed potentialOwner
    );

    /**
     * @notice Emitted when ownership transfer is finalized.
     *
     * @param previousOwner The previous owner.
     * @param newOwner      The new owner.
     */
    event OwnershipTransferFinalized(
        address indexed previousOwner,
        address indexed newOwner
    );

    /**
     * @notice Emitted when ownership transfer is cancelled.
     *
     * @param owner                   The current owner.
     * @param cancelledPotentialOwner The previous potential owner that can no longer accept ownership.
     */
    event OwnershipTransferCancelled(
        address indexed owner,
        address indexed cancelledPotentialOwner
    );

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

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

    /**
     * @notice Reverts if called by any account other than the potential owner.
     */
    modifier onlyPotentialOwner() {
        _checkPotentialOwner();
        _;
    }

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

    /**
     * @notice Returns the address of the potential owner.
     */
    function potentialOwner() public view virtual returns (address) {
        return _potentialOwner;
    }

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

    /**
     * @notice Reverts if the sender is not the potential owner.
     */
    function _checkPotentialOwner() internal view virtual {
        require(
            potentialOwner() == _msgSender(),
            "TwoStepOwnable: caller is not the potential owner"
        );
    }

    /**
     * @notice Initiates ownership transfer of the contract to a new account. Can only be called by
     *         the current owner.
     * @param newOwner The address that the owner specifies as the new owner.
     */
    // slither-disable-next-line external-function
    function initiateOwnershipTransfer(address newOwner)
        public
        virtual
        onlyOwner
    {
        require(
            newOwner != address(0),
            "TwoStepOwnable: new owner is the zero address"
        );
        _potentialOwner = newOwner;
        emit OwnershipTransferInitiated(owner(), newOwner);
    }

    /**
     * @notice Finalizes ownership transfer of the contract to a new account. Can only be called by
     *         the account that is accepting the ownership transfer.
     */
    // slither-disable-next-line external-function
    function acceptOwnershipTransfer() public virtual onlyPotentialOwner {
        _transferOwnership(msg.sender);
    }

    /**
     * @notice Cancels the ownership transfer to the new account, keeping the current owner as is. The current
     *         owner should call this function if the transfer is initiated to the wrong address. Can only be
     *         called by the current owner.
     */
    // slither-disable-next-line external-function
    function cancelOwnershipTransfer() public virtual onlyOwner {
        require(potentialOwner() != address(0), "TwoStepOwnable: no existing potential owner to cancel");
        address previousPotentialOwner = _potentialOwner;
        _potentialOwner = address(0);
        emit OwnershipTransferCancelled(owner(), previousPotentialOwner);
    }

    /**
     * @notice Leaves the contract without an owner forever. This makes it impossible to perform any ownership
     *         functionality, including calling `onlyOwner` functions. Can only be called by the current owner.
     *         Note that renouncing ownership is a single step process.
     */
    // slither-disable-next-line external-function
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @notice Transfers ownership of the contract to a new account.
     *
     * @param newOwner The new owner of the contract.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        _potentialOwner = address(0);
        emit OwnershipTransferFinalized(oldOwner, newOwner);
    }
}

File 2 of 11 : ConsiderationStructs.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

import {
    OrderType,
    BasicOrderType,
    ItemType,
    Side
} from "./ConsiderationEnums.sol";

/**
 * @dev An order contains eleven components: an offerer, a zone (or account that
 *      can cancel the order or restrict who can fulfill the order depending on
 *      the type), the order type (specifying partial fill support as well as
 *      restricted order status), the start and end time, a hash that will be
 *      provided to the zone when validating restricted orders, a salt, a key
 *      corresponding to a given conduit, a counter, and an arbitrary number of
 *      offer items that can be spent along with consideration items that must
 *      be received by their respective recipient.
 */
struct OrderComponents {
    address offerer;
    address zone;
    OfferItem[] offer;
    ConsiderationItem[] consideration;
    OrderType orderType;
    uint256 startTime;
    uint256 endTime;
    bytes32 zoneHash;
    uint256 salt;
    bytes32 conduitKey;
    uint256 counter;
}

/**
 * @dev An offer item has five components: an item type (ETH or other native
 *      tokens, ERC20, ERC721, and ERC1155, as well as criteria-based ERC721 and
 *      ERC1155), a token address, a dual-purpose "identifierOrCriteria"
 *      component that will either represent a tokenId or a merkle root
 *      depending on the item type, and a start and end amount that support
 *      increasing or decreasing amounts over the duration of the respective
 *      order.
 */
struct OfferItem {
    ItemType itemType;
    address token;
    uint256 identifierOrCriteria;
    uint256 startAmount;
    uint256 endAmount;
}

/**
 * @dev A consideration item has the same five components as an offer item and
 *      an additional sixth component designating the required recipient of the
 *      item.
 */
struct ConsiderationItem {
    ItemType itemType;
    address token;
    uint256 identifierOrCriteria;
    uint256 startAmount;
    uint256 endAmount;
    address payable recipient;
}

/**
 * @dev A spent item is translated from a utilized offer item and has four
 *      components: an item type (ETH or other native tokens, ERC20, ERC721, and
 *      ERC1155), a token address, a tokenId, and an amount.
 */
struct SpentItem {
    ItemType itemType;
    address token;
    uint256 identifier;
    uint256 amount;
}

/**
 * @dev A received item is translated from a utilized consideration item and has
 *      the same four components as a spent item, as well as an additional fifth
 *      component designating the required recipient of the item.
 */
struct ReceivedItem {
    ItemType itemType;
    address token;
    uint256 identifier;
    uint256 amount;
    address payable recipient;
}

/**
 * @dev For basic orders involving ETH / native / ERC20 <=> ERC721 / ERC1155
 *      matching, a group of six functions may be called that only requires a
 *      subset of the usual order arguments. Note the use of a "basicOrderType"
 *      enum; this represents both the usual order type as well as the "route"
 *      of the basic order (a simple derivation function for the basic order
 *      type is `basicOrderType = orderType + (4 * basicOrderRoute)`.)
 */
struct BasicOrderParameters {
    // calldata offset
    address considerationToken; // 0x24
    uint256 considerationIdentifier; // 0x44
    uint256 considerationAmount; // 0x64
    address payable offerer; // 0x84
    address zone; // 0xa4
    address offerToken; // 0xc4
    uint256 offerIdentifier; // 0xe4
    uint256 offerAmount; // 0x104
    BasicOrderType basicOrderType; // 0x124
    uint256 startTime; // 0x144
    uint256 endTime; // 0x164
    bytes32 zoneHash; // 0x184
    uint256 salt; // 0x1a4
    bytes32 offererConduitKey; // 0x1c4
    bytes32 fulfillerConduitKey; // 0x1e4
    uint256 totalOriginalAdditionalRecipients; // 0x204
    AdditionalRecipient[] additionalRecipients; // 0x224
    bytes signature; // 0x244
    // Total length, excluding dynamic array data: 0x264 (580)
}

/**
 * @dev Basic orders can supply any number of additional recipients, with the
 *      implied assumption that they are supplied from the offered ETH (or other
 *      native token) or ERC20 token for the order.
 */
struct AdditionalRecipient {
    uint256 amount;
    address payable recipient;
}

/**
 * @dev The full set of order components, with the exception of the counter,
 *      must be supplied when fulfilling more sophisticated orders or groups of
 *      orders. The total number of original consideration items must also be
 *      supplied, as the caller may specify additional consideration items.
 */
struct OrderParameters {
    address offerer; // 0x00
    address zone; // 0x20
    OfferItem[] offer; // 0x40
    ConsiderationItem[] consideration; // 0x60
    OrderType orderType; // 0x80
    uint256 startTime; // 0xa0
    uint256 endTime; // 0xc0
    bytes32 zoneHash; // 0xe0
    uint256 salt; // 0x100
    bytes32 conduitKey; // 0x120
    uint256 totalOriginalConsiderationItems; // 0x140
    // offer.length                          // 0x160
}

/**
 * @dev Orders require a signature in addition to the other order parameters.
 */
struct Order {
    OrderParameters parameters;
    bytes signature;
}

/**
 * @dev Advanced orders include a numerator (i.e. a fraction to attempt to fill)
 *      and a denominator (the total size of the order) in addition to the
 *      signature and other order parameters. It also supports an optional field
 *      for supplying extra data; this data will be included in a staticcall to
 *      `isValidOrderIncludingExtraData` on the zone for the order if the order
 *      type is restricted and the offerer or zone are not the caller.
 */
struct AdvancedOrder {
    OrderParameters parameters;
    uint120 numerator;
    uint120 denominator;
    bytes signature;
    bytes extraData;
}

/**
 * @dev Orders can be validated (either explicitly via `validate`, or as a
 *      consequence of a full or partial fill), specifically cancelled (they can
 *      also be cancelled in bulk via incrementing a per-zone counter), and
 *      partially or fully filled (with the fraction filled represented by a
 *      numerator and denominator).
 */
struct OrderStatus {
    bool isValidated;
    bool isCancelled;
    uint120 numerator;
    uint120 denominator;
}

/**
 * @dev A criteria resolver specifies an order, side (offer vs. consideration),
 *      and item index. It then provides a chosen identifier (i.e. tokenId)
 *      alongside a merkle proof demonstrating the identifier meets the required
 *      criteria.
 */
struct CriteriaResolver {
    uint256 orderIndex;
    Side side;
    uint256 index;
    uint256 identifier;
    bytes32[] criteriaProof;
}

/**
 * @dev A fulfillment is applied to a group of orders. It decrements a series of
 *      offer and consideration items, then generates a single execution
 *      element. A given fulfillment can be applied to as many offer and
 *      consideration items as desired, but must contain at least one offer and
 *      at least one consideration that match. The fulfillment must also remain
 *      consistent on all key parameters across all offer items (same offerer,
 *      token, type, tokenId, and conduit preference) as well as across all
 *      consideration items (token, type, tokenId, and recipient).
 */
struct Fulfillment {
    FulfillmentComponent[] offerComponents;
    FulfillmentComponent[] considerationComponents;
}

/**
 * @dev Each fulfillment component contains one index referencing a specific
 *      order and another referencing a specific offer or consideration item.
 */
struct FulfillmentComponent {
    uint256 orderIndex;
    uint256 itemIndex;
}

/**
 * @dev An execution is triggered once all consideration items have been zeroed
 *      out. It sends the item in question from the offerer to the item's
 *      recipient, optionally sourcing approvals from either this contract
 *      directly or from the offerer's chosen conduit if one is specified. An
 *      execution is not provided as an argument, but rather is derived via
 *      orders, criteria resolvers, and fulfillments (where the total number of
 *      executions will be less than or equal to the total number of indicated
 *      fulfillments) and returned as part of `matchOrders`.
 */
struct Execution {
    ReceivedItem item;
    address offerer;
    bytes32 conduitKey;
}

File 2 of 11 : ConsiderationEnums.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

// prettier-ignore
enum OrderType {
    // 0: no partial fills, anyone can execute
    FULL_OPEN,

    // 1: partial fills supported, anyone can execute
    PARTIAL_OPEN,

    // 2: no partial fills, only offerer or zone can execute
    FULL_RESTRICTED,

    // 3: partial fills supported, only offerer or zone can execute
    PARTIAL_RESTRICTED
}

// prettier-ignore
enum BasicOrderType {
    // 0: no partial fills, anyone can execute
    ETH_TO_ERC721_FULL_OPEN,

    // 1: partial fills supported, anyone can execute
    ETH_TO_ERC721_PARTIAL_OPEN,

    // 2: no partial fills, only offerer or zone can execute
    ETH_TO_ERC721_FULL_RESTRICTED,

    // 3: partial fills supported, only offerer or zone can execute
    ETH_TO_ERC721_PARTIAL_RESTRICTED,

    // 4: no partial fills, anyone can execute
    ETH_TO_ERC1155_FULL_OPEN,

    // 5: partial fills supported, anyone can execute
    ETH_TO_ERC1155_PARTIAL_OPEN,

    // 6: no partial fills, only offerer or zone can execute
    ETH_TO_ERC1155_FULL_RESTRICTED,

    // 7: partial fills supported, only offerer or zone can execute
    ETH_TO_ERC1155_PARTIAL_RESTRICTED,

    // 8: no partial fills, anyone can execute
    ERC20_TO_ERC721_FULL_OPEN,

    // 9: partial fills supported, anyone can execute
    ERC20_TO_ERC721_PARTIAL_OPEN,

    // 10: no partial fills, only offerer or zone can execute
    ERC20_TO_ERC721_FULL_RESTRICTED,

    // 11: partial fills supported, only offerer or zone can execute
    ERC20_TO_ERC721_PARTIAL_RESTRICTED,

    // 12: no partial fills, anyone can execute
    ERC20_TO_ERC1155_FULL_OPEN,

    // 13: partial fills supported, anyone can execute
    ERC20_TO_ERC1155_PARTIAL_OPEN,

    // 14: no partial fills, only offerer or zone can execute
    ERC20_TO_ERC1155_FULL_RESTRICTED,

    // 15: partial fills supported, only offerer or zone can execute
    ERC20_TO_ERC1155_PARTIAL_RESTRICTED,

    // 16: no partial fills, anyone can execute
    ERC721_TO_ERC20_FULL_OPEN,

    // 17: partial fills supported, anyone can execute
    ERC721_TO_ERC20_PARTIAL_OPEN,

    // 18: no partial fills, only offerer or zone can execute
    ERC721_TO_ERC20_FULL_RESTRICTED,

    // 19: partial fills supported, only offerer or zone can execute
    ERC721_TO_ERC20_PARTIAL_RESTRICTED,

    // 20: no partial fills, anyone can execute
    ERC1155_TO_ERC20_FULL_OPEN,

    // 21: partial fills supported, anyone can execute
    ERC1155_TO_ERC20_PARTIAL_OPEN,

    // 22: no partial fills, only offerer or zone can execute
    ERC1155_TO_ERC20_FULL_RESTRICTED,

    // 23: partial fills supported, only offerer or zone can execute
    ERC1155_TO_ERC20_PARTIAL_RESTRICTED
}

// prettier-ignore
enum BasicOrderRouteType {
    // 0: provide Ether (or other native token) to receive offered ERC721 item.
    ETH_TO_ERC721,

    // 1: provide Ether (or other native token) to receive offered ERC1155 item.
    ETH_TO_ERC1155,

    // 2: provide ERC20 item to receive offered ERC721 item.
    ERC20_TO_ERC721,

    // 3: provide ERC20 item to receive offered ERC1155 item.
    ERC20_TO_ERC1155,

    // 4: provide ERC721 item to receive offered ERC20 item.
    ERC721_TO_ERC20,

    // 5: provide ERC1155 item to receive offered ERC20 item.
    ERC1155_TO_ERC20
}

// prettier-ignore
enum ItemType {
    // 0: ETH on mainnet, MATIC on polygon, etc.
    NATIVE,

    // 1: ERC20 items (ERC777 and ERC20 analogues could also technically work)
    ERC20,

    // 2: ERC721 items
    ERC721,

    // 3: ERC1155 items
    ERC1155,

    // 4: ERC721 items where a number of tokenIds are supported
    ERC721_WITH_CRITERIA,

    // 5: ERC1155 items where a number of ids are supported
    ERC1155_WITH_CRITERIA
}

// prettier-ignore
enum Side {
    // 0: Items that can be spent
    OFFER,

    // 1: Items that must be received
    CONSIDERATION
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

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

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface AggregatorV3Interface {
  function decimals() external view returns (uint8);

  function description() external view returns (string memory);

  function version() external view returns (uint256);

  // getRoundData and latestRoundData should both raise "No data present"
  // if they do not have data to report, instead of returning unset values
  // which could be misinterpreted as actual reported values.
  function getRoundData(uint80 _roundId)
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

  function latestRoundData()
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );
}

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

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_marketplaceOwner","type":"address"},{"internalType":"address","name":"_rewardWrapper","type":"address"},{"internalType":"address","name":"_campaignTracker","type":"address"},{"internalType":"address","name":"_marketplaceFeeRecipient","type":"address"},{"internalType":"uint256","name":"_marketplaceFeePerMille","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"campaignTracker","type":"address"}],"name":"CampaignTrackerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"marketplaceFeePerMille","type":"uint256"}],"name":"MarketplaceFeePerMilleSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"marketplaceFeeRecipient","type":"address"}],"name":"MarketplaceFeeRecipientSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"cancelledPotentialOwner","type":"address"}],"name":"OwnershipTransferCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferFinalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"potentialOwner","type":"address"}],"name":"OwnershipTransferInitiated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"rewardWrapper","type":"address"}],"name":"RewardWrapperSet","type":"event"},{"inputs":[],"name":"BASELINE_CAMPAIGN_STRING","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COLLECTION_BOOST_PREFIX","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPTIMISM_OG_CAMPAIGN_STRING","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnershipTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"campaignTracker","outputs":[{"internalType":"contract ICampaignTracker","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cancelOwnershipTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ethUsdPriceFeed","outputs":[{"internalType":"contract AggregatorV3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"zone","type":"address"},{"components":[{"internalType":"enum ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"}],"internalType":"struct OfferItem[]","name":"offer","type":"tuple[]"},{"components":[{"internalType":"enum ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"},{"internalType":"address payable","name":"recipient","type":"address"}],"internalType":"struct ConsiderationItem[]","name":"consideration","type":"tuple[]"},{"internalType":"enum OrderType","name":"orderType","type":"uint8"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bytes32","name":"zoneHash","type":"bytes32"},{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes32","name":"conduitKey","type":"bytes32"},{"internalType":"uint256","name":"totalOriginalConsiderationItems","type":"uint256"}],"internalType":"struct OrderParameters","name":"parameters","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct Order","name":"_order","type":"tuple"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"getRewardInOP","outputs":[{"components":[{"internalType":"string","name":"campaignString","type":"string"},{"internalType":"uint256","name":"rewardAmountInOP","type":"uint256"}],"internalType":"struct RewardInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"initiateOwnershipTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"marketplaceFeePerMille","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketplaceFeeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"opUsdPriceFeed","outputs":[{"internalType":"contract AggregatorV3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"potentialOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardWrapper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsTurnedOn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ICampaignTracker","name":"_campaignTracker","type":"address"}],"name":"setCampaignTracker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_marketplaceFeePerMille","type":"uint256"}],"name":"setMarketplaceFeePerMille","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_marketplaceFeeRecipient","type":"address"}],"name":"setMarketplaceFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardWrapper","type":"address"}],"name":"setRewardWrapper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"turnRewardsOff","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"turnRewardsOn","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162002bd038038062002bd083398101604081905262000034916200053a565b6200003f3362000139565b46600a148062000050575046617a69145b15620000a457600480546001600160a01b0319908116730d276fc14719f9292d5c1ea2198673d1f426924617909155600580549091167313e3ee699d1909e989722e753853ae30b17e08c5179055620000ed565b600480546001600160a01b031990811673653edec47e954a613a2cd6c5c8c0d1d18781c0ad179091556005805490911673680dd45482ceaa2b9fff17f2ee6396bc7fac549f1790555b620000f762000193565b6200010284620001ac565b6200010d8362000200565b620001188262000254565b6200012381620002a8565b6200012e8562000139565b5050505050620007de565b600080546001600160a01b038381166001600160a01b031980841682178555600180549091169055604051919092169283917f407822b4c883c6a9c5456acd2a25e25393aaff085c06852c9d874f11a3f21e2a9190a35050565b6200019d620004af565b6008805460ff19166001179055565b620001b6620004af565b600280546001600160a01b0319166001600160a01b0383169081179091556040517f457204b3f7e4543c13bcf6c60b211dd7cf3bbee1f0f6795e55c772e42013ab8490600090a250565b6200020a620004af565b600380546001600160a01b0319166001600160a01b0383169081179091556040517fefe59ecc90f8ccd20419786aa3bdf5938bab2b4006f710362c2de6ed560cef1d90600090a250565b6200025e620004af565b600680546001600160a01b0319166001600160a01b0383169081179091556040517f8e89204ab77c3f5f37ae26ad4ed5eaad82c2e1d03b357876ccf4b9e3d19adfb790600090a250565b620002b2620004af565b6003546040805180820182526008815267424153454c494e4560c01b602082015290516314afcdbb60e21b81526000926001600160a01b0316916352bf36ec91620003019190600401620005d4565b600060405180830381865afa1580156200031f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620003499190810190620006ec565b6003546040805180820182526004808252634f504f4760e01b602083015291516314afcdbb60e21b81529394506000936001600160a01b03909316926352bf36ec9262000398929101620005d4565b600060405180830381865afa158015620003b6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620003e09190810190620006ec565b905080602001518260200151620003f89190620007b7565b8311620004725760405162461bcd60e51b815260206004820152603760248201527f526577617264446572697665723a206e6577206d61726b6574706c616365206660448201527f656520706572206d696c6c6520697320746f6f206c6f7700000000000000000060648201526084015b60405180910390fd5b60078390556040518381527fc46585f524d14e75355d23d258a469281f9602090418cf74995702c70a4052a39060200160405180910390a1505050565b6000546001600160a01b031633146200051b5760405162461bcd60e51b815260206004820152602760248201527f54776f537465704f776e61626c653a2063616c6c6572206973206e6f74207468604482015266329037bbb732b960c91b606482015260840162000469565b565b80516001600160a01b03811681146200053557600080fd5b919050565b600080600080600060a086880312156200055357600080fd5b6200055e866200051d565b94506200056e602087016200051d565b93506200057e604087016200051d565b92506200058e606087016200051d565b9150608086015190509295509295909350565b60005b83811015620005be578181015183820152602001620005a4565b83811115620005ce576000848401525b50505050565b6020815260008251806020840152620005f5816040850160208701620005a1565b601f01601f19169190910160400192915050565b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b038111828210171562000644576200064462000609565b60405290565b600082601f8301126200065c57600080fd5b81516001600160401b038082111562000679576200067962000609565b604051601f8301601f19908116603f01168101908282118183101715620006a457620006a462000609565b81604052838152866020858801011115620006be57600080fd5b620006d1846020830160208901620005a1565b9695505050505050565b805180151581146200053557600080fd5b600060208284031215620006ff57600080fd5b81516001600160401b03808211156200071757600080fd5b9083019060e082860312156200072c57600080fd5b620007366200061f565b8251828111156200074657600080fd5b62000754878286016200064a565b825250602083015160208201526200076f604084016200051d565b604082015262000782606084016200051d565b60608201526080830151608082015260a083015160a0820152620007a960c08401620006db565b60c082015295945050505050565b60008219821115620007d957634e487b7160e01b600052601160045260246000fd5b500190565b6123e280620007ee6000396000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c80637b0dd8b5116100e3578063c0b6f5611161008c578063e2e99a6811610066578063e2e99a6814610366578063fc4448f414610379578063fd1ec663146103b557600080fd5b8063c0b6f5611461032d578063c49d91de14610340578063caedbe431461035357600080fd5b80639c352f38116100bd5780639c352f381461030a578063a44f5a781461031d578063b842e87f1461032557600080fd5b80637b0dd8b5146102cf5780638da5cb5b146102e657806393d2f161146102f757600080fd5b80634b456cc511610145578063715018a61161011f578063715018a61461029657806374ccec491461029e5780637762df25146102be57600080fd5b80634b456cc5146102685780636a680e3b146102705780636cc56acd1461028357600080fd5b806323452b9c1161017657806323452b9c146101f957806342f6fb29146102015780634a25c6481461022c57600080fd5b80631ac1d493146101925780631e2ea2a3146101e4575b600080fd5b6101ce6040518060400160405280600881526020017f424153454c494e4500000000000000000000000000000000000000000000000081525081565b6040516101db9190611a33565b60405180910390f35b6101f76101f2366004611a6e565b6103d2565b005b6101f761043c565b600554610214906001600160a01b031681565b6040516001600160a01b0390911681526020016101db565b6101ce6040518060400160405280600481526020017f4f504f470000000000000000000000000000000000000000000000000000000081525081565b6101f7610571565b6101f761027e366004611a6e565b6105a6565b600354610214906001600160a01b031681565b6101f7610610565b6102b16102ac366004611dd7565b610624565b6040516101db9190611f43565b6001546001600160a01b0316610214565b6102d860075481565b6040519081526020016101db565b6000546001600160a01b0316610214565b600454610214906001600160a01b031681565b600254610214906001600160a01b031681565b6101f76111ae565b6101f76111e0565b6101f761033b366004611a6e565b6111f1565b600654610214906001600160a01b031681565b6101f7610361366004611a6e565b611310565b6101f7610374366004611fd7565b61137a565b6101ce6040518060400160405280601181526020017f434f4c4c454354494f4e5f424f4f53545f00000000000000000000000000000081525081565b6008546103c29060ff1681565b60405190151581526020016101db565b6103da6115e7565b600680547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040517f8e89204ab77c3f5f37ae26ad4ed5eaad82c2e1d03b357876ccf4b9e3d19adfb790600090a250565b6104446115e7565b60006104586001546001600160a01b031690565b6001600160a01b0316036104f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f54776f537465704f776e61626c653a206e6f206578697374696e6720706f746560448201527f6e7469616c206f776e657220746f2063616e63656c000000000000000000000060648201526084015b60405180910390fd5b600180547fffffffffffffffffffffffff000000000000000000000000000000000000000081169091556001600160a01b0316806105396000546001600160a01b031690565b6001600160a01b03167f0ef3ae3c61450215beca833f02d7858a638ab836d06ae02febbe77a656cab62a60405160405180910390a350565b6105796115e7565b600880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6105ae6115e7565b600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040517f457204b3f7e4543c13bcf6c60b211dd7cf3bbee1f0f6795e55c772e42013ab8490600090a250565b6106186115e7565b6106226000611681565b565b60085460609060ff1661067757604080516000808252602082019092529061066f565b6040805180820190915260608152600060208201528152602001906001900390816106475790505b5090506111a8565b825161014081015160609091015151146106a157604080516000808252602082019092529061066f565b60006040518060400160405280601181526020017f434f4c4c454354494f4e5f424f4f53545f0000000000000000000000000000008152506107138560000151604001516000815181106106f7576106f7611ff0565b6020026020010151602001516001600160a01b031660146116f3565b60405160200161072492919061201f565b60408051601f19818403018152908290526003547f52bf36ec0000000000000000000000000000000000000000000000000000000083529092506000916001600160a01b03909116906352bf36ec90610781908590600401611a33565b600060405180830381865afa15801561079e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107c691908101906120b6565b90506000806000805b8851610140015181101561091757600089600001516060015182815181106107f9576107f9611ff0565b60200260200101519050806080015181606001511461085f576040805160008082526020820190925290610850565b6040805180820190915260608152600060208201528152602001906001900390816108285790505b509750505050505050506111a8565b60008151600581111561087457610874612174565b1461088f576040805160008082526020820190925290610850565b60065460a08201516001600160a01b039182169116036108bf5760608101516108b890856121d2565b93506108f2565b85606001516001600160a01b03168160a001516001600160a01b0316036108f25760608101516108ef90846121d2565b92505b606081015161090190866121d2565b945050808061090f906121ea565b9150506107cf565b5060006103e88460075461092b9190612222565b610935919061225f565b90508281111561098b57604080516000808252602082019092529061097d565b6040805180820190915260608152600060208201528152602001906001900390816109555790505b5096505050505050506111a8565b60006103e88587608001516109a09190612222565b6109aa919061225f565b60608701519091506001600160a01b0316158015906109c857508281115b156109e3576040805160008082526020820190925290610850565b6000600460009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610a38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5c91906122b4565b5050509150506000600560009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610ab7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adb91906122b4565b505050915050600082131580610af2575060008113155b15610b46576040805160008082526020820190925290610b35565b604080518082019091526060815260006020820152815260200190600190039081610b0d5790505b5099505050505050505050506111a8565b600082610b53838a612222565b610b5d919061225f565b604080516003808252608082019092529192506000918291816020015b604080518082019091526060815260006020820152815260200190600190039081610b7a579050509050600360009054906101000a90046001600160a01b03166001600160a01b031663a4f0c3558f6040518263ffffffff1660e01b8152600401610bf491906001600160a01b0391909116815260200190565b602060405180830381865afa158015610c11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c359190612304565b15610d705760035460408051808201825260048082527f4f504f4700000000000000000000000000000000000000000000000000000000602083015291517f514a44030000000000000000000000000000000000000000000000000000000081526000936001600160a01b03169263514a440392610cb792909189910161231f565b602060405180830381865afa158015610cd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf89190612341565b905060405180604001604052806040518060400160405280600481526020017f4f504f470000000000000000000000000000000000000000000000000000000081525081526020018281525082600081518110610d5757610d57611ff0565b6020908102919091010152610d6c81846121d2565b9250505b600354604080518082018252600881527f424153454c494e45000000000000000000000000000000000000000000000000602082015290517f514a44030000000000000000000000000000000000000000000000000000000081526000926001600160a01b03169163514a440391610ded9190889060040161231f565b602060405180830381865afa158015610e0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2e9190612341565b905060405180604001604052806040518060400160405280600881526020017f424153454c494e4500000000000000000000000000000000000000000000000081525081526020018281525082600181518110610e8d57610e8d611ff0565b6020908102919091010152610ea281846121d2565b92506000600360009054906101000a90046001600160a01b03166001600160a01b031663514a44038f876040518363ffffffff1660e01b8152600401610ee992919061231f565b602060405180830381865afa158015610f06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2a9190612341565b905060405180604001604052808f81526020018281525083600281518110610f5457610f54611ff0565b6020908102919091010152610f6981856121d2565b93506000600260009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe4919061235a565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0382166004820152909150734200000000000000000000000000000000000042906370a0823190602401602060405180830381865afa158015611058573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107c9190612341565b8511156110d85760408051600080825260208201909252906110c1565b6040805180820190915260608152600060208201528152602001906001900390816110995790505b509f505050505050505050505050505050506111a8565b6002546040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081526001600160a01b03808416600483015290911660248201527342000000000000000000000000000000000000429063dd62ed3e90604401602060405180830381865afa158015611155573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111799190612341565b8511156111965760408051600080825260208201909252906110c1565b50919d50505050505050505050505050505b92915050565b6111b66115e7565b600880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6111e861193d565b61062233611681565b6111f96115e7565b6001600160a01b03811661128f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f54776f537465704f776e61626c653a206e6577206f776e65722069732074686560448201527f207a65726f20616464726573730000000000000000000000000000000000000060648201526084016104ea565b600180546001600160a01b0383167fffffffffffffffffffffffff000000000000000000000000000000000000000090911681179091556112d86000546001600160a01b031690565b6001600160a01b03167fb150023a879fd806e3599b6ca8ee3b60f0e360ab3846d128d67ebce1a391639a60405160405180910390a350565b6113186115e7565b600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040517fefe59ecc90f8ccd20419786aa3bdf5938bab2b4006f710362c2de6ed560cef1d90600090a250565b6113826115e7565b600354604080518082018252600881527f424153454c494e45000000000000000000000000000000000000000000000000602082015290517f52bf36ec0000000000000000000000000000000000000000000000000000000081526000926001600160a01b0316916352bf36ec916113fd9190600401611a33565b600060405180830381865afa15801561141a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261144291908101906120b6565b60035460408051808201825260048082527f4f504f4700000000000000000000000000000000000000000000000000000000602083015291517f52bf36ec0000000000000000000000000000000000000000000000000000000081529394506000936001600160a01b03909316926352bf36ec926114c1929101611a33565b600060405180830381865afa1580156114de573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261150691908101906120b6565b90508060200151826020015161151c91906121d2565b83116115aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f526577617264446572697665723a206e6577206d61726b6574706c616365206660448201527f656520706572206d696c6c6520697320746f6f206c6f7700000000000000000060648201526084016104ea565b60078390556040518381527fc46585f524d14e75355d23d258a469281f9602090418cf74995702c70a4052a39060200160405180910390a1505050565b6000546001600160a01b03163314610622576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f54776f537465704f776e61626c653a2063616c6c6572206973206e6f7420746860448201527f65206f776e65720000000000000000000000000000000000000000000000000060648201526084016104ea565b600080546001600160a01b038381167fffffffffffffffffffffffff000000000000000000000000000000000000000080841682178555600180549091169055604051919092169283917f407822b4c883c6a9c5456acd2a25e25393aaff085c06852c9d874f11a3f21e2a9190a35050565b60606000611702836002612222565b61170d9060026121d2565b67ffffffffffffffff81111561172557611725611a8b565b6040519080825280601f01601f19166020018201604052801561174f576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061178657611786611ff0565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106117e9576117e9611ff0565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000611825846002612222565b6118309060016121d2565b90505b60018111156118cd577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061187157611871611ff0565b1a60f81b82828151811061188757611887611ff0565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936118c681612377565b9050611833565b508315611936576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104ea565b9392505050565b6001546001600160a01b03163314610622576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f54776f537465704f776e61626c653a2063616c6c6572206973206e6f7420746860448201527f6520706f74656e7469616c206f776e657200000000000000000000000000000060648201526084016104ea565b60005b838110156119f25781810151838201526020016119da565b83811115611a01576000848401525b50505050565b60008151808452611a1f8160208601602086016119d7565b601f01601f19169290920160200192915050565b6020815260006119366020830184611a07565b6001600160a01b0381168114611a5b57600080fd5b50565b8035611a6981611a46565b919050565b600060208284031215611a8057600080fd5b813561193681611a46565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160a0810167ffffffffffffffff81118282101715611add57611add611a8b565b60405290565b60405160c0810167ffffffffffffffff81118282101715611add57611add611a8b565b6040805190810167ffffffffffffffff81118282101715611add57611add611a8b565b604051610160810167ffffffffffffffff81118282101715611add57611add611a8b565b60405160e0810167ffffffffffffffff81118282101715611add57611add611a8b565b604051601f8201601f1916810167ffffffffffffffff81118282101715611b9957611b99611a8b565b604052919050565b600067ffffffffffffffff821115611bbb57611bbb611a8b565b5060051b60200190565b803560068110611a6957600080fd5b600082601f830112611be557600080fd5b81356020611bfa611bf583611ba1565b611b70565b82815260a09283028501820192828201919087851115611c1957600080fd5b8387015b85811015611c845781818a031215611c355760008081fd5b611c3d611aba565b611c4682611bc5565b815285820135611c5581611a46565b818701526040828101359082015260608083013590820152608080830135908201528452928401928101611c1d565b5090979650505050505050565b600082601f830112611ca257600080fd5b81356020611cb2611bf583611ba1565b82815260c09283028501820192828201919087851115611cd157600080fd5b8387015b85811015611c845781818a031215611ced5760008081fd5b611cf5611ae3565b611cfe82611bc5565b815285820135611d0d81611a46565b8187015260408281013590820152606080830135908201526080808301359082015260a080830135611d3e81611a46565b908201528452928401928101611cd5565b803560048110611a6957600080fd5b600067ffffffffffffffff821115611d7857611d78611a8b565b50601f01601f191660200190565b600082601f830112611d9757600080fd5b8135611da5611bf582611d5e565b818152846020838601011115611dba57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215611dea57600080fd5b823567ffffffffffffffff80821115611e0257600080fd5b9084019060408287031215611e1657600080fd5b611e1e611b06565b823582811115611e2d57600080fd5b83016101608189031215611e4057600080fd5b611e48611b29565b611e5182611a5e565b8152611e5f60208301611a5e565b6020820152604082013584811115611e7657600080fd5b611e828a828501611bd4565b604083015250606082013584811115611e9a57600080fd5b611ea68a828501611c91565b606083015250611eb860808301611d4f565b608082015260a082013560a082015260c082013560c082015260e082013560e08201526101008083013581830152506101208083013581830152506101408083013581830152508083525050602083013582811115611f1657600080fd5b611f2288828601611d86565b602083015250809450505050611f3a60208401611a5e565b90509250929050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015611fc9577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc089840301855281518051878552611fac88860182611a07565b918901519489019490945294870194925090860190600101611f6a565b509098975050505050505050565b600060208284031215611fe957600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600083516120318184602088016119d7565b8351908301906120458183602088016119d7565b01949350505050565b600082601f83011261205f57600080fd5b815161206d611bf582611d5e565b81815284602083860101111561208257600080fd5b6120938260208301602087016119d7565b949350505050565b8051611a6981611a46565b80518015158114611a6957600080fd5b6000602082840312156120c857600080fd5b815167ffffffffffffffff808211156120e057600080fd5b9083019060e082860312156120f457600080fd5b6120fc611b4d565b82518281111561210b57600080fd5b6121178782860161204e565b825250602083015160208201526121306040840161209b565b60408201526121416060840161209b565b60608201526080830151608082015260a083015160a082015261216660c084016120a6565b60c082015295945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156121e5576121e56121a3565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361221b5761221b6121a3565b5060010190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561225a5761225a6121a3565b500290565b600082612295577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b805169ffffffffffffffffffff81168114611a6957600080fd5b600080600080600060a086880312156122cc57600080fd5b6122d58661229a565b94506020860151935060408601519250606086015191506122f86080870161229a565b90509295509295909350565b60006020828403121561231657600080fd5b611936826120a6565b6040815260006123326040830185611a07565b90508260208301529392505050565b60006020828403121561235357600080fd5b5051919050565b60006020828403121561236c57600080fd5b815161193681611a46565b600081612386576123866121a3565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fea26469706673582212207ffc05d5a610ff1ef60a098dd73bfd2f7d6869f1a9604822e9722b47cc85f18e64736f6c634300080f00330000000000000000000000005ad4a019f77e82940f6dd15a5215362af061a742000000000000000000000000c78a09d6a4badecc7614a339fd264b7290361ef10000000000000000000000003dadc74b465034276be0fa55240e1a67d7e3a266000000000000000000000000ec1557a67d4980c948cd473075293204f4d280fd0000000000000000000000000000000000000000000000000000000000000019

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061018d5760003560e01c80637b0dd8b5116100e3578063c0b6f5611161008c578063e2e99a6811610066578063e2e99a6814610366578063fc4448f414610379578063fd1ec663146103b557600080fd5b8063c0b6f5611461032d578063c49d91de14610340578063caedbe431461035357600080fd5b80639c352f38116100bd5780639c352f381461030a578063a44f5a781461031d578063b842e87f1461032557600080fd5b80637b0dd8b5146102cf5780638da5cb5b146102e657806393d2f161146102f757600080fd5b80634b456cc511610145578063715018a61161011f578063715018a61461029657806374ccec491461029e5780637762df25146102be57600080fd5b80634b456cc5146102685780636a680e3b146102705780636cc56acd1461028357600080fd5b806323452b9c1161017657806323452b9c146101f957806342f6fb29146102015780634a25c6481461022c57600080fd5b80631ac1d493146101925780631e2ea2a3146101e4575b600080fd5b6101ce6040518060400160405280600881526020017f424153454c494e4500000000000000000000000000000000000000000000000081525081565b6040516101db9190611a33565b60405180910390f35b6101f76101f2366004611a6e565b6103d2565b005b6101f761043c565b600554610214906001600160a01b031681565b6040516001600160a01b0390911681526020016101db565b6101ce6040518060400160405280600481526020017f4f504f470000000000000000000000000000000000000000000000000000000081525081565b6101f7610571565b6101f761027e366004611a6e565b6105a6565b600354610214906001600160a01b031681565b6101f7610610565b6102b16102ac366004611dd7565b610624565b6040516101db9190611f43565b6001546001600160a01b0316610214565b6102d860075481565b6040519081526020016101db565b6000546001600160a01b0316610214565b600454610214906001600160a01b031681565b600254610214906001600160a01b031681565b6101f76111ae565b6101f76111e0565b6101f761033b366004611a6e565b6111f1565b600654610214906001600160a01b031681565b6101f7610361366004611a6e565b611310565b6101f7610374366004611fd7565b61137a565b6101ce6040518060400160405280601181526020017f434f4c4c454354494f4e5f424f4f53545f00000000000000000000000000000081525081565b6008546103c29060ff1681565b60405190151581526020016101db565b6103da6115e7565b600680547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040517f8e89204ab77c3f5f37ae26ad4ed5eaad82c2e1d03b357876ccf4b9e3d19adfb790600090a250565b6104446115e7565b60006104586001546001600160a01b031690565b6001600160a01b0316036104f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f54776f537465704f776e61626c653a206e6f206578697374696e6720706f746560448201527f6e7469616c206f776e657220746f2063616e63656c000000000000000000000060648201526084015b60405180910390fd5b600180547fffffffffffffffffffffffff000000000000000000000000000000000000000081169091556001600160a01b0316806105396000546001600160a01b031690565b6001600160a01b03167f0ef3ae3c61450215beca833f02d7858a638ab836d06ae02febbe77a656cab62a60405160405180910390a350565b6105796115e7565b600880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6105ae6115e7565b600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040517f457204b3f7e4543c13bcf6c60b211dd7cf3bbee1f0f6795e55c772e42013ab8490600090a250565b6106186115e7565b6106226000611681565b565b60085460609060ff1661067757604080516000808252602082019092529061066f565b6040805180820190915260608152600060208201528152602001906001900390816106475790505b5090506111a8565b825161014081015160609091015151146106a157604080516000808252602082019092529061066f565b60006040518060400160405280601181526020017f434f4c4c454354494f4e5f424f4f53545f0000000000000000000000000000008152506107138560000151604001516000815181106106f7576106f7611ff0565b6020026020010151602001516001600160a01b031660146116f3565b60405160200161072492919061201f565b60408051601f19818403018152908290526003547f52bf36ec0000000000000000000000000000000000000000000000000000000083529092506000916001600160a01b03909116906352bf36ec90610781908590600401611a33565b600060405180830381865afa15801561079e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107c691908101906120b6565b90506000806000805b8851610140015181101561091757600089600001516060015182815181106107f9576107f9611ff0565b60200260200101519050806080015181606001511461085f576040805160008082526020820190925290610850565b6040805180820190915260608152600060208201528152602001906001900390816108285790505b509750505050505050506111a8565b60008151600581111561087457610874612174565b1461088f576040805160008082526020820190925290610850565b60065460a08201516001600160a01b039182169116036108bf5760608101516108b890856121d2565b93506108f2565b85606001516001600160a01b03168160a001516001600160a01b0316036108f25760608101516108ef90846121d2565b92505b606081015161090190866121d2565b945050808061090f906121ea565b9150506107cf565b5060006103e88460075461092b9190612222565b610935919061225f565b90508281111561098b57604080516000808252602082019092529061097d565b6040805180820190915260608152600060208201528152602001906001900390816109555790505b5096505050505050506111a8565b60006103e88587608001516109a09190612222565b6109aa919061225f565b60608701519091506001600160a01b0316158015906109c857508281115b156109e3576040805160008082526020820190925290610850565b6000600460009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610a38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5c91906122b4565b5050509150506000600560009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610ab7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adb91906122b4565b505050915050600082131580610af2575060008113155b15610b46576040805160008082526020820190925290610b35565b604080518082019091526060815260006020820152815260200190600190039081610b0d5790505b5099505050505050505050506111a8565b600082610b53838a612222565b610b5d919061225f565b604080516003808252608082019092529192506000918291816020015b604080518082019091526060815260006020820152815260200190600190039081610b7a579050509050600360009054906101000a90046001600160a01b03166001600160a01b031663a4f0c3558f6040518263ffffffff1660e01b8152600401610bf491906001600160a01b0391909116815260200190565b602060405180830381865afa158015610c11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c359190612304565b15610d705760035460408051808201825260048082527f4f504f4700000000000000000000000000000000000000000000000000000000602083015291517f514a44030000000000000000000000000000000000000000000000000000000081526000936001600160a01b03169263514a440392610cb792909189910161231f565b602060405180830381865afa158015610cd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf89190612341565b905060405180604001604052806040518060400160405280600481526020017f4f504f470000000000000000000000000000000000000000000000000000000081525081526020018281525082600081518110610d5757610d57611ff0565b6020908102919091010152610d6c81846121d2565b9250505b600354604080518082018252600881527f424153454c494e45000000000000000000000000000000000000000000000000602082015290517f514a44030000000000000000000000000000000000000000000000000000000081526000926001600160a01b03169163514a440391610ded9190889060040161231f565b602060405180830381865afa158015610e0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2e9190612341565b905060405180604001604052806040518060400160405280600881526020017f424153454c494e4500000000000000000000000000000000000000000000000081525081526020018281525082600181518110610e8d57610e8d611ff0565b6020908102919091010152610ea281846121d2565b92506000600360009054906101000a90046001600160a01b03166001600160a01b031663514a44038f876040518363ffffffff1660e01b8152600401610ee992919061231f565b602060405180830381865afa158015610f06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2a9190612341565b905060405180604001604052808f81526020018281525083600281518110610f5457610f54611ff0565b6020908102919091010152610f6981856121d2565b93506000600260009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe4919061235a565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0382166004820152909150734200000000000000000000000000000000000042906370a0823190602401602060405180830381865afa158015611058573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107c9190612341565b8511156110d85760408051600080825260208201909252906110c1565b6040805180820190915260608152600060208201528152602001906001900390816110995790505b509f505050505050505050505050505050506111a8565b6002546040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081526001600160a01b03808416600483015290911660248201527342000000000000000000000000000000000000429063dd62ed3e90604401602060405180830381865afa158015611155573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111799190612341565b8511156111965760408051600080825260208201909252906110c1565b50919d50505050505050505050505050505b92915050565b6111b66115e7565b600880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6111e861193d565b61062233611681565b6111f96115e7565b6001600160a01b03811661128f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f54776f537465704f776e61626c653a206e6577206f776e65722069732074686560448201527f207a65726f20616464726573730000000000000000000000000000000000000060648201526084016104ea565b600180546001600160a01b0383167fffffffffffffffffffffffff000000000000000000000000000000000000000090911681179091556112d86000546001600160a01b031690565b6001600160a01b03167fb150023a879fd806e3599b6ca8ee3b60f0e360ab3846d128d67ebce1a391639a60405160405180910390a350565b6113186115e7565b600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040517fefe59ecc90f8ccd20419786aa3bdf5938bab2b4006f710362c2de6ed560cef1d90600090a250565b6113826115e7565b600354604080518082018252600881527f424153454c494e45000000000000000000000000000000000000000000000000602082015290517f52bf36ec0000000000000000000000000000000000000000000000000000000081526000926001600160a01b0316916352bf36ec916113fd9190600401611a33565b600060405180830381865afa15801561141a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261144291908101906120b6565b60035460408051808201825260048082527f4f504f4700000000000000000000000000000000000000000000000000000000602083015291517f52bf36ec0000000000000000000000000000000000000000000000000000000081529394506000936001600160a01b03909316926352bf36ec926114c1929101611a33565b600060405180830381865afa1580156114de573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261150691908101906120b6565b90508060200151826020015161151c91906121d2565b83116115aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f526577617264446572697665723a206e6577206d61726b6574706c616365206660448201527f656520706572206d696c6c6520697320746f6f206c6f7700000000000000000060648201526084016104ea565b60078390556040518381527fc46585f524d14e75355d23d258a469281f9602090418cf74995702c70a4052a39060200160405180910390a1505050565b6000546001600160a01b03163314610622576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f54776f537465704f776e61626c653a2063616c6c6572206973206e6f7420746860448201527f65206f776e65720000000000000000000000000000000000000000000000000060648201526084016104ea565b600080546001600160a01b038381167fffffffffffffffffffffffff000000000000000000000000000000000000000080841682178555600180549091169055604051919092169283917f407822b4c883c6a9c5456acd2a25e25393aaff085c06852c9d874f11a3f21e2a9190a35050565b60606000611702836002612222565b61170d9060026121d2565b67ffffffffffffffff81111561172557611725611a8b565b6040519080825280601f01601f19166020018201604052801561174f576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061178657611786611ff0565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106117e9576117e9611ff0565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000611825846002612222565b6118309060016121d2565b90505b60018111156118cd577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061187157611871611ff0565b1a60f81b82828151811061188757611887611ff0565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936118c681612377565b9050611833565b508315611936576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104ea565b9392505050565b6001546001600160a01b03163314610622576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f54776f537465704f776e61626c653a2063616c6c6572206973206e6f7420746860448201527f6520706f74656e7469616c206f776e657200000000000000000000000000000060648201526084016104ea565b60005b838110156119f25781810151838201526020016119da565b83811115611a01576000848401525b50505050565b60008151808452611a1f8160208601602086016119d7565b601f01601f19169290920160200192915050565b6020815260006119366020830184611a07565b6001600160a01b0381168114611a5b57600080fd5b50565b8035611a6981611a46565b919050565b600060208284031215611a8057600080fd5b813561193681611a46565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160a0810167ffffffffffffffff81118282101715611add57611add611a8b565b60405290565b60405160c0810167ffffffffffffffff81118282101715611add57611add611a8b565b6040805190810167ffffffffffffffff81118282101715611add57611add611a8b565b604051610160810167ffffffffffffffff81118282101715611add57611add611a8b565b60405160e0810167ffffffffffffffff81118282101715611add57611add611a8b565b604051601f8201601f1916810167ffffffffffffffff81118282101715611b9957611b99611a8b565b604052919050565b600067ffffffffffffffff821115611bbb57611bbb611a8b565b5060051b60200190565b803560068110611a6957600080fd5b600082601f830112611be557600080fd5b81356020611bfa611bf583611ba1565b611b70565b82815260a09283028501820192828201919087851115611c1957600080fd5b8387015b85811015611c845781818a031215611c355760008081fd5b611c3d611aba565b611c4682611bc5565b815285820135611c5581611a46565b818701526040828101359082015260608083013590820152608080830135908201528452928401928101611c1d565b5090979650505050505050565b600082601f830112611ca257600080fd5b81356020611cb2611bf583611ba1565b82815260c09283028501820192828201919087851115611cd157600080fd5b8387015b85811015611c845781818a031215611ced5760008081fd5b611cf5611ae3565b611cfe82611bc5565b815285820135611d0d81611a46565b8187015260408281013590820152606080830135908201526080808301359082015260a080830135611d3e81611a46565b908201528452928401928101611cd5565b803560048110611a6957600080fd5b600067ffffffffffffffff821115611d7857611d78611a8b565b50601f01601f191660200190565b600082601f830112611d9757600080fd5b8135611da5611bf582611d5e565b818152846020838601011115611dba57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215611dea57600080fd5b823567ffffffffffffffff80821115611e0257600080fd5b9084019060408287031215611e1657600080fd5b611e1e611b06565b823582811115611e2d57600080fd5b83016101608189031215611e4057600080fd5b611e48611b29565b611e5182611a5e565b8152611e5f60208301611a5e565b6020820152604082013584811115611e7657600080fd5b611e828a828501611bd4565b604083015250606082013584811115611e9a57600080fd5b611ea68a828501611c91565b606083015250611eb860808301611d4f565b608082015260a082013560a082015260c082013560c082015260e082013560e08201526101008083013581830152506101208083013581830152506101408083013581830152508083525050602083013582811115611f1657600080fd5b611f2288828601611d86565b602083015250809450505050611f3a60208401611a5e565b90509250929050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015611fc9577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc089840301855281518051878552611fac88860182611a07565b918901519489019490945294870194925090860190600101611f6a565b509098975050505050505050565b600060208284031215611fe957600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600083516120318184602088016119d7565b8351908301906120458183602088016119d7565b01949350505050565b600082601f83011261205f57600080fd5b815161206d611bf582611d5e565b81815284602083860101111561208257600080fd5b6120938260208301602087016119d7565b949350505050565b8051611a6981611a46565b80518015158114611a6957600080fd5b6000602082840312156120c857600080fd5b815167ffffffffffffffff808211156120e057600080fd5b9083019060e082860312156120f457600080fd5b6120fc611b4d565b82518281111561210b57600080fd5b6121178782860161204e565b825250602083015160208201526121306040840161209b565b60408201526121416060840161209b565b60608201526080830151608082015260a083015160a082015261216660c084016120a6565b60c082015295945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156121e5576121e56121a3565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361221b5761221b6121a3565b5060010190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561225a5761225a6121a3565b500290565b600082612295577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b805169ffffffffffffffffffff81168114611a6957600080fd5b600080600080600060a086880312156122cc57600080fd5b6122d58661229a565b94506020860151935060408601519250606086015191506122f86080870161229a565b90509295509295909350565b60006020828403121561231657600080fd5b611936826120a6565b6040815260006123326040830185611a07565b90508260208301529392505050565b60006020828403121561235357600080fd5b5051919050565b60006020828403121561236c57600080fd5b815161193681611a46565b600081612386576123866121a3565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fea26469706673582212207ffc05d5a610ff1ef60a098dd73bfd2f7d6869f1a9604822e9722b47cc85f18e64736f6c634300080f0033

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

0000000000000000000000005ad4a019f77e82940f6dd15a5215362af061a742000000000000000000000000c78a09d6a4badecc7614a339fd264b7290361ef10000000000000000000000003dadc74b465034276be0fa55240e1a67d7e3a266000000000000000000000000ec1557a67d4980c948cd473075293204f4d280fd0000000000000000000000000000000000000000000000000000000000000019

-----Decoded View---------------
Arg [0] : _marketplaceOwner (address): 0x5Ad4A019F77e82940f6Dd15A5215362AF061A742
Arg [1] : _rewardWrapper (address): 0xC78A09D6a4badecc7614A339FD264B7290361ef1
Arg [2] : _campaignTracker (address): 0x3Dadc74B465034276bE0Fa55240e1a67d7e3a266
Arg [3] : _marketplaceFeeRecipient (address): 0xeC1557A67d4980C948cD473075293204F4D280fd
Arg [4] : _marketplaceFeePerMille (uint256): 25

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000005ad4a019f77e82940f6dd15a5215362af061a742
Arg [1] : 000000000000000000000000c78a09d6a4badecc7614a339fd264b7290361ef1
Arg [2] : 0000000000000000000000003dadc74b465034276be0fa55240e1a67d7e3a266
Arg [3] : 000000000000000000000000ec1557a67d4980c948cd473075293204f4d280fd
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000019


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
[ 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.

OSZAR »