Contract 0xE468cE99444174Bd3bBBEd09209577d25D1ad673 2

Zora 
 
Txn Hash Method
Block
From
To
Value
0x1b11c9e26f47ca8823c52c2baaf156274df8f7de19d709a534664997bbb70e68Create Auction(pending)2021-10-24 2:05:282 days 16 hrs ago0x1f8f085d5dac2d2f64b58b96eebde855ac47b60e IN Zora: Auction House0 Ether(Pending)(Pending)
0x69f6b401d90151ee530340c782351368164d6ad36b721b6c2896f492235e4679Set Auction Rese...(pending)2021-10-22 12:31:334 days 6 hrs ago0x5bbab2b45f1e75587e5660176124725e49b2fb09 IN Zora: Auction House0 Ether(Pending)(Pending)
0xad94b25ec5d0ab48f2a2f74027bbee47bf619b00b0c7ca506f1202303ebf82d1Set Auction Rese...(pending)2021-10-22 12:31:334 days 6 hrs ago0x5bbab2b45f1e75587e5660176124725e49b2fb09 IN Zora: Auction House0 Ether(Pending)(Pending)
0xd8d2d8d08c22a74495b26ff6bf8a2fa8a19150fa28d5a938c074e50bd57d3feaSet Auction Rese...(pending)2021-10-20 4:56:516 days 13 hrs ago0x5bbab2b45f1e75587e5660176124725e49b2fb09 IN Zora: Auction House0 Ether(Pending)(Pending)
0xc0f9df193d52e9f8e664295e5a017bae78b2159949d6053f53064f580f12394eCreate Bid134945332021-10-26 18:14:4423 mins ago0xaff8494b762749acf239582b959f73075a58290d IN  Zora: Auction House1 Ether0.042661193667 278.567329441
0x933e2b7c133ba70202cfe04bd729bad97af5e435779d3ed91d069d89e0ec5ff8Create Auction134941882021-10-26 16:56:381 hr 41 mins agoENS Name tonyherrera.eth IN  Zora: Auction House0 Ether0.051336685026 174.022071203
0xce462f2c9d1f386b6541af1d25994fb3fa463a4360ca23415dc6ed8d1aa94f62Set Auction Rese...134941552021-10-26 16:47:251 hr 50 mins ago0x1f507de743046a97b22d78050b2e5d77fbf1bef3 IN  Zora: Auction House0 Ether0.0067630937166.1
0x76f2ec25ddfba6825597e4be07d795f111d2de6944b16b13991a3f8f48759feeCreate Auction134938552021-10-26 15:40:372 hrs 57 mins ago0x983addfc6552adb032933aed2f91329040c623f3 IN  Zora: Auction House0 Ether0.02725030797
0x79f8cd4d28eeb26fba82569784ea9e8ea80d24c7cf7ed8c671195448fbf62fb3Create Auction134938442021-10-26 15:38:352 hrs 59 mins ago0xd01dca85a0947d5fcd9ca5f817576b7e8140b111 IN  Zora: Auction House0 Ether0.03442044383 122.522768334
0x81d72d2033a89f768b63516d29d084bfd1100dbe0ea6b108aa785924b430509fCreate Bid134934912021-10-26 14:21:204 hrs 17 mins ago0x9ce3ffabc663de1c816f99e6bd04cf431488d816 IN  Zora: Auction House0.105 Ether0.017369987589 145.178172184
0xb93aeab16ec4222cc1414d33c54a66ad4e85b9f64eb4960b3d74b848261454a1Create Auction134934392021-10-26 14:07:134 hrs 31 mins agoENS Name breck.eth IN  Zora: Auction House0 Ether0.039822189957 151.685667435
0x9893b0d869f81c03e8af0869a768bea2599c5fee530db23e5c28f42fb7a0fe98Set Auction Rese...134930452021-10-26 12:37:136 hrs 1 min ago0x49318679ebe17629743a9058cc46fb571037fdff IN  Zora: Auction House0 Ether0.004122483751 101.247237071
0xc5029c87f1b6f6807dcc39d590d70426cffae48251436a023291aa1bfacd83f5Create Auction134927602021-10-26 11:36:477 hrs 1 min ago0xf6aaada76ea7f044ffa028565b028740dce5389f IN  Zora: Auction House0 Ether0.02359820484
0xcce4a4ca61c256a98e786718b0e4e699f8fb75f9afaa2baf27dfc7e685ddd4e0Create Bid134925252021-10-26 10:43:477 hrs 54 mins agoENS Name *so-so.eth IN  Zora: Auction House0.3 Ether0.009295000933 77.695311812
0xe97d1a1af56a9f3f96e693c98493d90a346a8d9f8d29f4ba40b998e2ef479e5aCreate Auction134924002021-10-26 10:16:398 hrs 21 mins ago0xa699720418f612558e2827bf68631686e9d1095e IN  Zora: Auction House0 Ether0.02003222273
0x8567e4657aa5b6b92d109bbe53acd33a20e84dae8d9ad55fd1fb8f25989eb02bEnd Auction134916202021-10-26 7:23:2311 hrs 14 mins ago0x4eef43197b15c6515649d5477c835124095955f7 IN  Zora: Auction House0 Ether0.00158093 65
0x3354f96f9553d27ab28ffbed5b685b434a083d5bb8173315c8aa21d654fcd322End Auction134914842021-10-26 6:53:1311 hrs 45 mins agoENS Name rawtoast.eth IN  Zora: Auction House0 Ether0.02953936541 83.244184646
0x96abbe4047866dc853d13b234c3baa562633cac8d6b382ac0cff34739ffbf7f1Create Bid134910982021-10-26 5:22:2913 hrs 15 mins agoENS Name realbuddha.eth IN  Zora: Auction House1 Ether0.019994535614130.559506443
0x959a02cdec5a0d2f22cf9ec795536abfd1db4df093f2086681b7130e710d2c3cEnd Auction134910382021-10-26 5:07:2913 hrs 30 mins ago0xca885aae29124b05c8736587248a4cffcda8e446 IN  Zora: Auction House0 Ether0.038962632106
0x1b78f4d0b9102f98e5e7dec02bc2514cbf2eb78e41aa39969b6a1ed45d4b3b67Create Auction134910302021-10-26 5:04:3513 hrs 33 mins agoENS Name mrio.eth IN  Zora: Auction House0 Ether0.026962153308 95.978389887
0x28ff0f002fea9ea70ee3933f4ca58a87c253d5c65d06e3bcfda40bae439e3477End Auction134908522021-10-26 4:22:4814 hrs 15 mins ago0xca885aae29124b05c8736587248a4cffcda8e446 IN  Zora: Auction House0 Ether0.03335608894
0x0a7edff238652a5db20b1a31a7869f01d302fc555da3decd472972999d90843bCreate Bid134908502021-10-26 4:22:3014 hrs 15 mins agoENS Name pleasefuckoff.eth IN  Zora: Auction House3 Ether0.015011998246 98.024736339
0x96626799f0fcf0d9faa5e31afe0f236cbec06544d276ceb2d37b74621ac24bf1Create Bid134908032021-10-26 4:11:3214 hrs 26 mins ago0x14050b58c77da50f68b9d710ad8c25341cfb98e9 IN  Zora: Auction House0.5 Ether0.014061338073 91.817154159
0x57ba82adef68b441c7c19a1c901c7ed4458d1efb152bf72c08863700a5cf8772Create Bid134907212021-10-26 3:53:3314 hrs 44 mins agoENS Name realbuddha.eth IN  Zora: Auction House0.66 Ether0.018806208764122.800018054
0x38ee5bdacb4051e88de78cc650164f90167c446814c0d4333845ad9cfed064edCreate Bid134907172021-10-26 3:52:1614 hrs 46 mins agoENS Name realbuddha.eth IN  Zora: Auction House0.5 Ether0.019131062921124.921237531
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xc0f9df193d52e9f8e664295e5a017bae78b2159949d6053f53064f580f12394e134945332021-10-26 18:14:4423 mins ago Zora: Auction House Wrapped Ether1 Ether
0x81d72d2033a89f768b63516d29d084bfd1100dbe0ea6b108aa785924b430509f134934912021-10-26 14:21:204 hrs 17 mins ago Zora: Auction House Wrapped Ether0.105 Ether
0x81d72d2033a89f768b63516d29d084bfd1100dbe0ea6b108aa785924b430509f134934912021-10-26 14:21:204 hrs 17 mins ago Zora: Auction HouseENS Name sub5.eth0.1 Ether
0x81d72d2033a89f768b63516d29d084bfd1100dbe0ea6b108aa785924b430509f134934912021-10-26 14:21:204 hrs 17 mins ago Wrapped Ether Zora: Auction House0.1 Ether
0xcce4a4ca61c256a98e786718b0e4e699f8fb75f9afaa2baf27dfc7e685ddd4e0134925252021-10-26 10:43:477 hrs 54 mins ago Zora: Auction House Wrapped Ether0.3 Ether
0xcce4a4ca61c256a98e786718b0e4e699f8fb75f9afaa2baf27dfc7e685ddd4e0134925252021-10-26 10:43:477 hrs 54 mins ago Zora: Auction HouseENS Name 0xerik.eth0.2 Ether
0xcce4a4ca61c256a98e786718b0e4e699f8fb75f9afaa2baf27dfc7e685ddd4e0134925252021-10-26 10:43:477 hrs 54 mins ago Wrapped Ether Zora: Auction House0.2 Ether
0x3354f96f9553d27ab28ffbed5b685b434a083d5bb8173315c8aa21d654fcd322134914842021-10-26 6:53:1311 hrs 45 mins ago Zora: Auction House0x4eef43197b15c6515649d5477c835124095955f70.18 Ether
0x3354f96f9553d27ab28ffbed5b685b434a083d5bb8173315c8aa21d654fcd322134914842021-10-26 6:53:1311 hrs 45 mins ago Wrapped Ether Zora: Auction House0.18 Ether
0xaf767bc886a4c5c1d2babb14d7e830e4d037588fdbfb06c048cd6f997ce7f1ef134914612021-10-26 6:47:1711 hrs 51 mins ago Zora: Auction House0xe47afde415442f32a96cb3c7ed5164d7d2ea51693.675 Ether
0xaf767bc886a4c5c1d2babb14d7e830e4d037588fdbfb06c048cd6f997ce7f1ef134914612021-10-26 6:47:1711 hrs 51 mins ago Wrapped Ether Zora: Auction House3.675 Ether
0x96abbe4047866dc853d13b234c3baa562633cac8d6b382ac0cff34739ffbf7f1134910982021-10-26 5:22:2913 hrs 15 mins ago Zora: Auction House Wrapped Ether1 Ether
0x959a02cdec5a0d2f22cf9ec795536abfd1db4df093f2086681b7130e710d2c3c134910382021-10-26 5:07:2913 hrs 30 mins ago Zora: Auction House0xca885aae29124b05c8736587248a4cffcda8e4460.5829 Ether
0x959a02cdec5a0d2f22cf9ec795536abfd1db4df093f2086681b7130e710d2c3c134910382021-10-26 5:07:2913 hrs 30 mins ago Wrapped Ether Zora: Auction House0.5829 Ether
0x959a02cdec5a0d2f22cf9ec795536abfd1db4df093f2086681b7130e710d2c3c134910382021-10-26 5:07:2913 hrs 30 mins ago Zora: Auction HouseENS Name thepark.eth0.0871 Ether
0x959a02cdec5a0d2f22cf9ec795536abfd1db4df093f2086681b7130e710d2c3c134910382021-10-26 5:07:2913 hrs 30 mins ago Wrapped Ether Zora: Auction House0.0871 Ether
0x28ff0f002fea9ea70ee3933f4ca58a87c253d5c65d06e3bcfda40bae439e3477134908522021-10-26 4:22:4814 hrs 15 mins ago Zora: Auction House0xca885aae29124b05c8736587248a4cffcda8e4460.67 Ether
0x28ff0f002fea9ea70ee3933f4ca58a87c253d5c65d06e3bcfda40bae439e3477134908522021-10-26 4:22:4814 hrs 15 mins ago Wrapped Ether Zora: Auction House0.67 Ether
0x0a7edff238652a5db20b1a31a7869f01d302fc555da3decd472972999d90843b134908502021-10-26 4:22:3014 hrs 15 mins ago Zora: Auction House Wrapped Ether3 Ether
0x96626799f0fcf0d9faa5e31afe0f236cbec06544d276ceb2d37b74621ac24bf1134908032021-10-26 4:11:3214 hrs 26 mins ago Zora: Auction House Wrapped Ether0.5 Ether
0x57ba82adef68b441c7c19a1c901c7ed4458d1efb152bf72c08863700a5cf8772134907212021-10-26 3:53:3314 hrs 44 mins ago Zora: Auction House Wrapped Ether0.66 Ether
0x38ee5bdacb4051e88de78cc650164f90167c446814c0d4333845ad9cfed064ed134907172021-10-26 3:52:1614 hrs 46 mins ago Zora: Auction House Wrapped Ether0.5 Ether
0x960868eef328a8ec405b550f5b1a5dd7801a4f60dc3bfcc29460e2a4a267d59f134906862021-10-26 3:46:3214 hrs 51 mins ago Zora: Auction House Wrapped Ether0.25 Ether
0x854f005302d6f3e3947cda2f01b1382037836fe5720ced177efa182e40044d8e134904662021-10-26 2:59:0015 hrs 39 mins ago Zora: Auction House Wrapped Ether10 Ether
0x4e90341c3010cc46ed3034c23d1a440d5393938720ab6499e4812ade2d8a4a1b134900072021-10-26 1:12:5817 hrs 25 mins ago Zora: Auction HouseENS Name dame.eth0.135 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AuctionHouse

Compiler Version
v0.6.8+commit.0bbfe453

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 14 : AuctionHouse.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.6.8;
pragma experimental ABIEncoderV2;

import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol";
import { IERC721, IERC165 } from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import {Counters} from "@openzeppelin/contracts/utils/Counters.sol";
import { IMarket, Decimal } from "@zoralabs/core/dist/contracts/interfaces/IMarket.sol";
import { IMedia } from "@zoralabs/core/dist/contracts/interfaces/IMedia.sol";
import { IAuctionHouse } from "./interfaces/IAuctionHouse.sol";

interface IWETH {
    function deposit() external payable;
    function withdraw(uint wad) external;

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

interface IMediaExtended is IMedia {
    function marketContract() external returns(address);
}

/**
 * @title An open auction house, enabling collectors and curators to run their own auctions
 */
contract AuctionHouse is IAuctionHouse, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;
    using Counters for Counters.Counter;

    // The minimum amount of time left in an auction after a new bid is created
    uint256 public timeBuffer;

    // The minimum percentage difference between the last bid amount and the current bid.
    uint8 public minBidIncrementPercentage;

    // The address of the zora protocol to use via this contract
    address public zora;

    // / The address of the WETH contract, so that any ETH transferred can be handled as an ERC-20
    address public wethAddress;

    // A mapping of all of the auctions currently running.
    mapping(uint256 => IAuctionHouse.Auction) public auctions;

    bytes4 constant interfaceId = 0x80ac58cd; // 721 interface id

    Counters.Counter private _auctionIdTracker;

    /**
     * @notice Require that the specified auction exists
     */
    modifier auctionExists(uint256 auctionId) {
        require(_exists(auctionId), "Auction doesn't exist");
        _;
    }

    /*
     * Constructor
     */
    constructor(address _zora, address _weth) public {
        require(
            IERC165(_zora).supportsInterface(interfaceId),
            "Doesn't support NFT interface"
        );
        zora = _zora;
        wethAddress = _weth;
        timeBuffer = 15 * 60; // extend 15 minutes after every bid made in last 15 minutes
        minBidIncrementPercentage = 5; // 5%
    }

    /**
     * @notice Create an auction.
     * @dev Store the auction details in the auctions mapping and emit an AuctionCreated event.
     * If there is no curator, or if the curator is the auction creator, automatically approve the auction.
     */
    function createAuction(
        uint256 tokenId,
        address tokenContract,
        uint256 duration,
        uint256 reservePrice,
        address payable curator,
        uint8 curatorFeePercentage,
        address auctionCurrency
    ) public override nonReentrant returns (uint256) {
        require(
            IERC165(tokenContract).supportsInterface(interfaceId),
            "tokenContract does not support ERC721 interface"
        );
        require(curatorFeePercentage < 100, "curatorFeePercentage must be less than 100");
        address tokenOwner = IERC721(tokenContract).ownerOf(tokenId);
        require(msg.sender == IERC721(tokenContract).getApproved(tokenId) || msg.sender == tokenOwner, "Caller must be approved or owner for token id");
        uint256 auctionId = _auctionIdTracker.current();

        auctions[auctionId] = Auction({
            tokenId: tokenId,
            tokenContract: tokenContract,
            approved: false,
            amount: 0,
            duration: duration,
            firstBidTime: 0,
            reservePrice: reservePrice,
            curatorFeePercentage: curatorFeePercentage,
            tokenOwner: tokenOwner,
            bidder: address(0),
            curator: curator,
            auctionCurrency: auctionCurrency
        });

        IERC721(tokenContract).transferFrom(tokenOwner, address(this), tokenId);

        _auctionIdTracker.increment();

        emit AuctionCreated(auctionId, tokenId, tokenContract, duration, reservePrice, tokenOwner, curator, curatorFeePercentage, auctionCurrency);


        if(auctions[auctionId].curator == address(0) || curator == tokenOwner) {
            _approveAuction(auctionId, true);
        }

        return auctionId;
    }

    /**
     * @notice Approve an auction, opening up the auction for bids.
     * @dev Only callable by the curator. Cannot be called if the auction has already started.
     */
    function setAuctionApproval(uint256 auctionId, bool approved) external override auctionExists(auctionId) {
        require(msg.sender == auctions[auctionId].curator, "Must be auction curator");
        require(auctions[auctionId].firstBidTime == 0, "Auction has already started");
        _approveAuction(auctionId, approved);
    }

    function setAuctionReservePrice(uint256 auctionId, uint256 reservePrice) external override auctionExists(auctionId) {
        require(msg.sender == auctions[auctionId].curator || msg.sender == auctions[auctionId].tokenOwner, "Must be auction curator or token owner");
        require(auctions[auctionId].firstBidTime == 0, "Auction has already started");

        auctions[auctionId].reservePrice = reservePrice;

        emit AuctionReservePriceUpdated(auctionId, auctions[auctionId].tokenId, auctions[auctionId].tokenContract, reservePrice);
    }

    /**
     * @notice Create a bid on a token, with a given amount.
     * @dev If provided a valid bid, transfers the provided amount to this contract.
     * If the auction is run in native ETH, the ETH is wrapped so it can be identically to other
     * auction currencies in this contract.
     */
    function createBid(uint256 auctionId, uint256 amount)
    external
    override
    payable
    auctionExists(auctionId)
    nonReentrant
    {
        address payable lastBidder = auctions[auctionId].bidder;
        require(auctions[auctionId].approved, "Auction must be approved by curator");
        require(
            auctions[auctionId].firstBidTime == 0 ||
            block.timestamp <
            auctions[auctionId].firstBidTime.add(auctions[auctionId].duration),
            "Auction expired"
        );
        require(
            amount >= auctions[auctionId].reservePrice,
                "Must send at least reservePrice"
        );
        require(
            amount >= auctions[auctionId].amount.add(
                auctions[auctionId].amount.mul(minBidIncrementPercentage).div(100)
            ),
            "Must send more than last bid by minBidIncrementPercentage amount"
        );

        // For Zora Protocol, ensure that the bid is valid for the current bidShare configuration
        if(auctions[auctionId].tokenContract == zora) {
            require(
                IMarket(IMediaExtended(zora).marketContract()).isValidBid(
                    auctions[auctionId].tokenId,
                    amount
                ),
                "Bid invalid for share splitting"
            );
        }

        // If this is the first valid bid, we should set the starting time now.
        // If it's not, then we should refund the last bidder
        if(auctions[auctionId].firstBidTime == 0) {
            auctions[auctionId].firstBidTime = block.timestamp;
        } else if(lastBidder != address(0)) {
            _handleOutgoingBid(lastBidder, auctions[auctionId].amount, auctions[auctionId].auctionCurrency);
        }

        _handleIncomingBid(amount, auctions[auctionId].auctionCurrency);

        auctions[auctionId].amount = amount;
        auctions[auctionId].bidder = msg.sender;


        bool extended = false;
        // at this point we know that the timestamp is less than start + duration (since the auction would be over, otherwise)
        // we want to know by how much the timestamp is less than start + duration
        // if the difference is less than the timeBuffer, increase the duration by the timeBuffer
        if (
            auctions[auctionId].firstBidTime.add(auctions[auctionId].duration).sub(
                block.timestamp
            ) < timeBuffer
        ) {
            // Playing code golf for gas optimization:
            // uint256 expectedEnd = auctions[auctionId].firstBidTime.add(auctions[auctionId].duration);
            // uint256 timeRemaining = expectedEnd.sub(block.timestamp);
            // uint256 timeToAdd = timeBuffer.sub(timeRemaining);
            // uint256 newDuration = auctions[auctionId].duration.add(timeToAdd);
            uint256 oldDuration = auctions[auctionId].duration;
            auctions[auctionId].duration =
                oldDuration.add(timeBuffer.sub(auctions[auctionId].firstBidTime.add(oldDuration).sub(block.timestamp)));
            extended = true;
        }

        emit AuctionBid(
            auctionId,
            auctions[auctionId].tokenId,
            auctions[auctionId].tokenContract,
            msg.sender,
            amount,
            lastBidder == address(0), // firstBid boolean
            extended
        );

        if (extended) {
            emit AuctionDurationExtended(
                auctionId,
                auctions[auctionId].tokenId,
                auctions[auctionId].tokenContract,
                auctions[auctionId].duration
            );
        }
    }

    /**
     * @notice End an auction, finalizing the bid on Zora if applicable and paying out the respective parties.
     * @dev If for some reason the auction cannot be finalized (invalid token recipient, for example),
     * The auction is reset and the NFT is transferred back to the auction creator.
     */
    function endAuction(uint256 auctionId) external override auctionExists(auctionId) nonReentrant {
        require(
            uint256(auctions[auctionId].firstBidTime) != 0,
            "Auction hasn't begun"
        );
        require(
            block.timestamp >=
            auctions[auctionId].firstBidTime.add(auctions[auctionId].duration),
            "Auction hasn't completed"
        );

        address currency = auctions[auctionId].auctionCurrency == address(0) ? wethAddress : auctions[auctionId].auctionCurrency;
        uint256 curatorFee = 0;

        uint256 tokenOwnerProfit = auctions[auctionId].amount;

        if(auctions[auctionId].tokenContract == zora) {
            // If the auction is running on zora, settle it on the protocol
            (bool success, uint256 remainingProfit) = _handleZoraAuctionSettlement(auctionId);
            tokenOwnerProfit = remainingProfit;
            if(success != true) {
                _handleOutgoingBid(auctions[auctionId].bidder, auctions[auctionId].amount, auctions[auctionId].auctionCurrency);
                _cancelAuction(auctionId);
                return;
            }
        } else {
            // Otherwise, transfer the token to the winner and pay out the participants below
            try IERC721(auctions[auctionId].tokenContract).safeTransferFrom(address(this), auctions[auctionId].bidder, auctions[auctionId].tokenId) {} catch {
                _handleOutgoingBid(auctions[auctionId].bidder, auctions[auctionId].amount, auctions[auctionId].auctionCurrency);
                _cancelAuction(auctionId);
                return;
            }
        }


        if(auctions[auctionId].curator != address(0)) {
            curatorFee = tokenOwnerProfit.mul(auctions[auctionId].curatorFeePercentage).div(100);
            tokenOwnerProfit = tokenOwnerProfit.sub(curatorFee);
            _handleOutgoingBid(auctions[auctionId].curator, curatorFee, auctions[auctionId].auctionCurrency);
        }
        _handleOutgoingBid(auctions[auctionId].tokenOwner, tokenOwnerProfit, auctions[auctionId].auctionCurrency);

        emit AuctionEnded(
            auctionId,
            auctions[auctionId].tokenId,
            auctions[auctionId].tokenContract,
            auctions[auctionId].tokenOwner,
            auctions[auctionId].curator,
            auctions[auctionId].bidder,
            tokenOwnerProfit,
            curatorFee,
            currency
        );
        delete auctions[auctionId];
    }

    /**
     * @notice Cancel an auction.
     * @dev Transfers the NFT back to the auction creator and emits an AuctionCanceled event
     */
    function cancelAuction(uint256 auctionId) external override nonReentrant auctionExists(auctionId) {
        require(
            auctions[auctionId].tokenOwner == msg.sender || auctions[auctionId].curator == msg.sender,
            "Can only be called by auction creator or curator"
        );
        require(
            uint256(auctions[auctionId].firstBidTime) == 0,
            "Can't cancel an auction once it's begun"
        );
        _cancelAuction(auctionId);
    }

    /**
     * @dev Given an amount and a currency, transfer the currency to this contract.
     * If the currency is ETH (0x0), attempt to wrap the amount as WETH
     */
    function _handleIncomingBid(uint256 amount, address currency) internal {
        // If this is an ETH bid, ensure they sent enough and convert it to WETH under the hood
        if(currency == address(0)) {
            require(msg.value == amount, "Sent ETH Value does not match specified bid amount");
            IWETH(wethAddress).deposit{value: amount}();
        } else {
            // We must check the balance that was actually transferred to the auction,
            // as some tokens impose a transfer fee and would not actually transfer the
            // full amount to the market, resulting in potentally locked funds
            IERC20 token = IERC20(currency);
            uint256 beforeBalance = token.balanceOf(address(this));
            token.safeTransferFrom(msg.sender, address(this), amount);
            uint256 afterBalance = token.balanceOf(address(this));
            require(beforeBalance.add(amount) == afterBalance, "Token transfer call did not transfer expected amount");
        }
    }

    function _handleOutgoingBid(address to, uint256 amount, address currency) internal {
        // If the auction is in ETH, unwrap it from its underlying WETH and try to send it to the recipient.
        if(currency == address(0)) {
            IWETH(wethAddress).withdraw(amount);

            // If the ETH transfer fails (sigh), rewrap the ETH and try send it as WETH.
            if(!_safeTransferETH(to, amount)) {
                IWETH(wethAddress).deposit{value: amount}();
                IERC20(wethAddress).safeTransfer(to, amount);
            }
        } else {
            IERC20(currency).safeTransfer(to, amount);
        }
    }

    function _safeTransferETH(address to, uint256 value) internal returns (bool) {
        (bool success, ) = to.call{value: value}(new bytes(0));
        return success;
    }

    function _cancelAuction(uint256 auctionId) internal {
        address tokenOwner = auctions[auctionId].tokenOwner;
        IERC721(auctions[auctionId].tokenContract).safeTransferFrom(address(this), tokenOwner, auctions[auctionId].tokenId);

        emit AuctionCanceled(auctionId, auctions[auctionId].tokenId, auctions[auctionId].tokenContract, tokenOwner);
        delete auctions[auctionId];
    }

    function _approveAuction(uint256 auctionId, bool approved) internal {
        auctions[auctionId].approved = approved;
        emit AuctionApprovalUpdated(auctionId, auctions[auctionId].tokenId, auctions[auctionId].tokenContract, approved);
    }

    function _exists(uint256 auctionId) internal view returns(bool) {
        return auctions[auctionId].tokenOwner != address(0);
    }

    function _handleZoraAuctionSettlement(uint256 auctionId) internal returns (bool, uint256) {
        address currency = auctions[auctionId].auctionCurrency == address(0) ? wethAddress : auctions[auctionId].auctionCurrency;

        IMarket.Bid memory bid = IMarket.Bid({
            amount: auctions[auctionId].amount,
            currency: currency,
            bidder: address(this),
            recipient: auctions[auctionId].bidder,
            sellOnShare: Decimal.D256(0)
        });

        IERC20(currency).approve(IMediaExtended(zora).marketContract(), bid.amount);
        IMedia(zora).setBid(auctions[auctionId].tokenId, bid);
        uint256 beforeBalance = IERC20(currency).balanceOf(address(this));
        try IMedia(zora).acceptBid(auctions[auctionId].tokenId, bid) {} catch {
            // If the underlying NFT transfer here fails, we should cancel the auction and refund the winner
            IMediaExtended(zora).removeBid(auctions[auctionId].tokenId);
            return (false, 0);
        }
        uint256 afterBalance = IERC20(currency).balanceOf(address(this));

        // We have to calculate the amount to send to the token owner here in case there was a
        // sell-on share on the token
        return (true, afterBalance.sub(beforeBalance));
    }

    // TODO: consider reverting if the message sender is not WETH
    receive() external payable {}
    fallback() external payable {}
}

File 2 of 14 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

File 3 of 14 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

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

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
      * @dev Safely transfers `tokenId` token from `from` to `to`.
      *
      * Requirements:
      *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
      * - `tokenId` token must exist and be owned by `from`.
      * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
      * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
      *
      * Emits a {Transfer} event.
      */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
}

File 4 of 14 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 5 of 14 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

File 6 of 14 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC20.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";

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

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

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

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

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

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

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

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

File 7 of 14 : Counters.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../math/SafeMath.sol";

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}
 * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never
 * directly accessed.
 */
library Counters {
    using SafeMath for uint256;

    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

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

    function increment(Counter storage counter) internal {
        // The {SafeMath} overflow check can be skipped here, see the comment at the top
        counter._value += 1;
    }

    function decrement(Counter storage counter) internal {
        counter._value = counter._value.sub(1);
    }
}

File 8 of 14 : IMarket.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.6.8;
pragma experimental ABIEncoderV2;

import {Decimal} from "../Decimal.sol";

/**
 * @title Interface for Zora Protocol's Market
 */
interface IMarket {
    struct Bid {
        // Amount of the currency being bid
        uint256 amount;
        // Address to the ERC20 token being used to bid
        address currency;
        // Address of the bidder
        address bidder;
        // Address of the recipient
        address recipient;
        // % of the next sale to award the current owner
        Decimal.D256 sellOnShare;
    }

    struct Ask {
        // Amount of the currency being asked
        uint256 amount;
        // Address to the ERC20 token being asked
        address currency;
    }

    struct BidShares {
        // % of sale value that goes to the _previous_ owner of the nft
        Decimal.D256 prevOwner;
        // % of sale value that goes to the original creator of the nft
        Decimal.D256 creator;
        // % of sale value that goes to the seller (current owner) of the nft
        Decimal.D256 owner;
    }

    event BidCreated(uint256 indexed tokenId, Bid bid);
    event BidRemoved(uint256 indexed tokenId, Bid bid);
    event BidFinalized(uint256 indexed tokenId, Bid bid);
    event AskCreated(uint256 indexed tokenId, Ask ask);
    event AskRemoved(uint256 indexed tokenId, Ask ask);
    event BidShareUpdated(uint256 indexed tokenId, BidShares bidShares);

    function bidForTokenBidder(uint256 tokenId, address bidder)
        external
        view
        returns (Bid memory);

    function currentAskForToken(uint256 tokenId)
        external
        view
        returns (Ask memory);

    function bidSharesForToken(uint256 tokenId)
        external
        view
        returns (BidShares memory);

    function isValidBid(uint256 tokenId, uint256 bidAmount)
        external
        view
        returns (bool);

    function isValidBidShares(BidShares calldata bidShares)
        external
        pure
        returns (bool);

    function splitShare(Decimal.D256 calldata sharePercentage, uint256 amount)
        external
        pure
        returns (uint256);

    function configure(address mediaContractAddress) external;

    function setBidShares(uint256 tokenId, BidShares calldata bidShares)
        external;

    function setAsk(uint256 tokenId, Ask calldata ask) external;

    function removeAsk(uint256 tokenId) external;

    function setBid(
        uint256 tokenId,
        Bid calldata bid,
        address spender
    ) external;

    function removeBid(uint256 tokenId, address bidder) external;

    function acceptBid(uint256 tokenId, Bid calldata expectedBid) external;
}

File 9 of 14 : IMedia.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.6.8;
pragma experimental ABIEncoderV2;

import {IMarket} from "./IMarket.sol";

/**
 * @title Interface for Zora Protocol's Media
 */
interface IMedia {
    struct EIP712Signature {
        uint256 deadline;
        uint8 v;
        bytes32 r;
        bytes32 s;
    }

    struct MediaData {
        // A valid URI of the content represented by this token
        string tokenURI;
        // A valid URI of the metadata associated with this token
        string metadataURI;
        // A SHA256 hash of the content pointed to by tokenURI
        bytes32 contentHash;
        // A SHA256 hash of the content pointed to by metadataURI
        bytes32 metadataHash;
    }

    event TokenURIUpdated(uint256 indexed _tokenId, address owner, string _uri);
    event TokenMetadataURIUpdated(
        uint256 indexed _tokenId,
        address owner,
        string _uri
    );

    /**
     * @notice Return the metadata URI for a piece of media given the token URI
     */
    function tokenMetadataURI(uint256 tokenId)
        external
        view
        returns (string memory);

    /**
     * @notice Mint new media for msg.sender.
     */
    function mint(MediaData calldata data, IMarket.BidShares calldata bidShares)
        external;

    /**
     * @notice EIP-712 mintWithSig method. Mints new media for a creator given a valid signature.
     */
    function mintWithSig(
        address creator,
        MediaData calldata data,
        IMarket.BidShares calldata bidShares,
        EIP712Signature calldata sig
    ) external;

    /**
     * @notice Transfer the token with the given ID to a given address.
     * Save the previous owner before the transfer, in case there is a sell-on fee.
     * @dev This can only be called by the auction contract specified at deployment
     */
    function auctionTransfer(uint256 tokenId, address recipient) external;

    /**
     * @notice Set the ask on a piece of media
     */
    function setAsk(uint256 tokenId, IMarket.Ask calldata ask) external;

    /**
     * @notice Remove the ask on a piece of media
     */
    function removeAsk(uint256 tokenId) external;

    /**
     * @notice Set the bid on a piece of media
     */
    function setBid(uint256 tokenId, IMarket.Bid calldata bid) external;

    /**
     * @notice Remove the bid on a piece of media
     */
    function removeBid(uint256 tokenId) external;

    function acceptBid(uint256 tokenId, IMarket.Bid calldata bid) external;

    /**
     * @notice Revoke approval for a piece of media
     */
    function revokeApproval(uint256 tokenId) external;

    /**
     * @notice Update the token URI
     */
    function updateTokenURI(uint256 tokenId, string calldata tokenURI) external;

    /**
     * @notice Update the token metadata uri
     */
    function updateTokenMetadataURI(
        uint256 tokenId,
        string calldata metadataURI
    ) external;

    /**
     * @notice EIP-712 permit method. Sets an approved spender given a valid signature.
     */
    function permit(
        address spender,
        uint256 tokenId,
        EIP712Signature calldata sig
    ) external;
}

File 10 of 14 : IAuctionHouse.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.6.8;
pragma experimental ABIEncoderV2;

/**
 * @title Interface for Auction Houses
 */
interface IAuctionHouse {
    struct Auction {
        // ID for the ERC721 token
        uint256 tokenId;
        // Address for the ERC721 contract
        address tokenContract;
        // Whether or not the auction curator has approved the auction to start
        bool approved;
        // The current highest bid amount
        uint256 amount;
        // The length of time to run the auction for, after the first bid was made
        uint256 duration;
        // The time of the first bid
        uint256 firstBidTime;
        // The minimum price of the first bid
        uint256 reservePrice;
        // The sale percentage to send to the curator
        uint8 curatorFeePercentage;
        // The address that should receive the funds once the NFT is sold.
        address tokenOwner;
        // The address of the current highest bid
        address payable bidder;
        // The address of the auction's curator.
        // The curator can reject or approve an auction
        address payable curator;
        // The address of the ERC-20 currency to run the auction with.
        // If set to 0x0, the auction will be run in ETH
        address auctionCurrency;
    }

    event AuctionCreated(
        uint256 indexed auctionId,
        uint256 indexed tokenId,
        address indexed tokenContract,
        uint256 duration,
        uint256 reservePrice,
        address tokenOwner,
        address curator,
        uint8 curatorFeePercentage,
        address auctionCurrency
    );

    event AuctionApprovalUpdated(
        uint256 indexed auctionId,
        uint256 indexed tokenId,
        address indexed tokenContract,
        bool approved
    );

    event AuctionReservePriceUpdated(
        uint256 indexed auctionId,
        uint256 indexed tokenId,
        address indexed tokenContract,
        uint256 reservePrice
    );

    event AuctionBid(
        uint256 indexed auctionId,
        uint256 indexed tokenId,
        address indexed tokenContract,
        address sender,
        uint256 value,
        bool firstBid,
        bool extended
    );

    event AuctionDurationExtended(
        uint256 indexed auctionId,
        uint256 indexed tokenId,
        address indexed tokenContract,
        uint256 duration
    );

    event AuctionEnded(
        uint256 indexed auctionId,
        uint256 indexed tokenId,
        address indexed tokenContract,
        address tokenOwner,
        address curator,
        address winner,
        uint256 amount,
        uint256 curatorFee,
        address auctionCurrency
    );

    event AuctionCanceled(
        uint256 indexed auctionId,
        uint256 indexed tokenId,
        address indexed tokenContract,
        address tokenOwner
    );

    function createAuction(
        uint256 tokenId,
        address tokenContract,
        uint256 duration,
        uint256 reservePrice,
        address payable curator,
        uint8 curatorFeePercentages,
        address auctionCurrency
    ) external returns (uint256);

    function setAuctionApproval(uint256 auctionId, bool approved) external;

    function setAuctionReservePrice(uint256 auctionId, uint256 reservePrice) external;

    function createBid(uint256 auctionId, uint256 amount) external payable;

    function endAuction(uint256 auctionId) external;

    function cancelAuction(uint256 auctionId) external;
}

File 11 of 14 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

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

pragma solidity >=0.6.2 <0.8.0;

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

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 13 of 14 : Decimal.sol
/*
    Copyright 2019 dYdX Trading Inc.
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
*/

pragma solidity 0.6.8;
pragma experimental ABIEncoderV2;

/**
 * NOTE: This file is a clone of the dydx protocol's Decimal.sol contract. It was forked from https://github.com/dydxprotocol/solo
 * at commit 2d8454e02702fe5bc455b848556660629c3cad36
 *
 * It has not been modified other than to use a newer solidity in the pragma to match the rest of the contract suite of this project
 */

import {SafeMath} from "@openzeppelin/contracts/math/SafeMath.sol";
import {Math} from "./Math.sol";

/**
 * @title Decimal
 *
 * Library that defines a fixed-point number with 18 decimal places.
 */
library Decimal {
    using SafeMath for uint256;

    // ============ Constants ============

    uint256 constant BASE_POW = 18;
    uint256 constant BASE = 10**BASE_POW;

    // ============ Structs ============

    struct D256 {
        uint256 value;
    }

    // ============ Functions ============

    function one() internal pure returns (D256 memory) {
        return D256({value: BASE});
    }

    function onePlus(D256 memory d) internal pure returns (D256 memory) {
        return D256({value: d.value.add(BASE)});
    }

    function mul(uint256 target, D256 memory d)
        internal
        pure
        returns (uint256)
    {
        return Math.getPartial(target, d.value, BASE);
    }

    function div(uint256 target, D256 memory d)
        internal
        pure
        returns (uint256)
    {
        return Math.getPartial(target, BASE, d.value);
    }
}

File 14 of 14 : Math.sol
pragma solidity 0.6.8;
pragma experimental ABIEncoderV2;

import {SafeMath} from "@openzeppelin/contracts/math/SafeMath.sol";

/**
 * @title Math
 *
 * Library for non-standard Math functions
 * NOTE: This file is a clone of the dydx protocol's Decimal.sol contract.
 * It was forked from https://github.com/dydxprotocol/solo at commit
 * 2d8454e02702fe5bc455b848556660629c3cad36. It has not been modified other than to use a
 * newer solidity in the pragma to match the rest of the contract suite of this project.
 */
library Math {
    using SafeMath for uint256;

    // ============ Library Functions ============

    /*
     * Return target * (numerator / denominator).
     */
    function getPartial(
        uint256 target,
        uint256 numerator,
        uint256 denominator
    ) internal pure returns (uint256) {
        return target.mul(numerator).div(denominator);
    }

    /*
     * Return target * (numerator / denominator), but rounded up.
     */
    function getPartialRoundUp(
        uint256 target,
        uint256 numerator,
        uint256 denominator
    ) internal pure returns (uint256) {
        if (target == 0 || numerator == 0) {
            // SafeMath will check for zero denominator
            return SafeMath.div(0, denominator);
        }
        return target.mul(numerator).sub(1).div(denominator).add(1);
    }

    function to128(uint256 number) internal pure returns (uint128) {
        uint128 result = uint128(number);
        require(result == number, "Math: Unsafe cast to uint128");
        return result;
    }

    function to96(uint256 number) internal pure returns (uint96) {
        uint96 result = uint96(number);
        require(result == number, "Math: Unsafe cast to uint96");
        return result;
    }

    function to32(uint256 number) internal pure returns (uint32) {
        uint32 result = uint32(number);
        require(result == number, "Math: Unsafe cast to uint32");
        return result;
    }

    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_zora","type":"address"},{"internalType":"address","name":"_weth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"AuctionApprovalUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"bool","name":"firstBid","type":"bool"},{"indexed":false,"internalType":"bool","name":"extended","type":"bool"}],"name":"AuctionBid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":false,"internalType":"address","name":"tokenOwner","type":"address"}],"name":"AuctionCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reservePrice","type":"uint256"},{"indexed":false,"internalType":"address","name":"tokenOwner","type":"address"},{"indexed":false,"internalType":"address","name":"curator","type":"address"},{"indexed":false,"internalType":"uint8","name":"curatorFeePercentage","type":"uint8"},{"indexed":false,"internalType":"address","name":"auctionCurrency","type":"address"}],"name":"AuctionCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"AuctionDurationExtended","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":false,"internalType":"address","name":"tokenOwner","type":"address"},{"indexed":false,"internalType":"address","name":"curator","type":"address"},{"indexed":false,"internalType":"address","name":"winner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"curatorFee","type":"uint256"},{"indexed":false,"internalType":"address","name":"auctionCurrency","type":"address"}],"name":"AuctionEnded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"reservePrice","type":"uint256"}],"name":"AuctionReservePriceUpdated","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"auctions","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"bool","name":"approved","type":"bool"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"firstBidTime","type":"uint256"},{"internalType":"uint256","name":"reservePrice","type":"uint256"},{"internalType":"uint8","name":"curatorFeePercentage","type":"uint8"},{"internalType":"address","name":"tokenOwner","type":"address"},{"internalType":"address payable","name":"bidder","type":"address"},{"internalType":"address payable","name":"curator","type":"address"},{"internalType":"address","name":"auctionCurrency","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"cancelAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"reservePrice","type":"uint256"},{"internalType":"address payable","name":"curator","type":"address"},{"internalType":"uint8","name":"curatorFeePercentage","type":"uint8"},{"internalType":"address","name":"auctionCurrency","type":"address"}],"name":"createAuction","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"createBid","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"endAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minBidIncrementPercentage","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setAuctionApproval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"},{"internalType":"uint256","name":"reservePrice","type":"uint256"}],"name":"setAuctionReservePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timeBuffer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wethAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"zora","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b50604051620051ca380380620051ca8339818101604052810190620000379190620001f4565b60016000819055508173ffffffffffffffffffffffffffffffffffffffff166301ffc9a76380ac58cd60e01b6040518263ffffffff1660e01b8152600401620000819190620002b4565b60206040518083038186803b1580156200009a57600080fd5b505afa158015620000af573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d5919062000235565b62000117576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200010e90620002d1565b60405180910390fd5b81600260016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506103846001819055506005600260006101000a81548160ff021916908360ff1602179055505050620003a4565b600081519050620001d78162000370565b92915050565b600081519050620001ee816200038a565b92915050565b600080604083850312156200020857600080fd5b60006200021885828601620001c6565b92505060206200022b85828601620001c6565b9150509250929050565b6000602082840312156200024857600080fd5b60006200025884828501620001dd565b91505092915050565b6200026c8162000324565b82525050565b600062000281601d83620002f3565b91507f446f65736e277420737570706f7274204e465420696e746572666163650000006000830152602082019050919050565b6000602082019050620002cb600083018462000261565b92915050565b60006020820190508181036000830152620002ec8162000272565b9050919050565b600082825260208201905092915050565b6000620003118262000350565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6200037b8162000304565b81146200038757600080fd5b50565b620003958162000318565b8114620003a157600080fd5b50565b614e1680620003b46000396000f3fe6080604052600436106100a05760003560e01c806396b5a7551161006457806396b5a755146101ad578063973ddb4a146101d6578063b296024d146101ff578063b7751c711461022a578063b9a2de3a14610246578063ec91f2a41461026f576100a7565b8063166f46a7146100a95780634f0e0ef3146100d4578063571a26a0146100ff5780636f8a41e11461014757806375e9249f14610170576100a7565b366100a757005b005b3480156100b557600080fd5b506100be61029a565b6040516100cb9190614552565b60405180910390f35b3480156100e057600080fd5b506100e96102c0565b6040516100f69190614552565b60405180910390f35b34801561010b57600080fd5b5061012660048036038101906101219190613a70565b6102e6565b60405161013e9c9b9a99989796959493929190614aa6565b60405180910390f35b34801561015357600080fd5b5061016e60048036038101906101699190613b9c565b610400565b005b34801561017c57600080fd5b5061019760048036038101906101929190613ac2565b61066e565b6040516101a49190614a8b565b60405180910390f35b3480156101b957600080fd5b506101d460048036038101906101cf9190613a70565b610deb565b005b3480156101e257600080fd5b506101fd60048036038101906101f89190613b60565b611000565b005b34801561020b57600080fd5b50610214611155565b6040516102219190614c13565b60405180910390f35b610244600480360381019061023f9190613b9c565b611168565b005b34801561025257600080fd5b5061026d60048036038101906102689190613a70565b611a6d565b005b34801561027b57600080fd5b506102846123e8565b6040516102919190614a8b565b60405180910390f35b600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60046020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160149054906101000a900460ff16908060020154908060030154908060040154908060050154908060060160009054906101000a900460ff16908060060160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060070160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060080160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060090160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508c565b8161040a816123ee565b610449576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104409061490b565b60405180910390fd5b6004600084815260200190815260200160002060080160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061051a57506004600084815260200190815260200160002060060160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610559576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105509061494b565b60405180910390fd5b60006004600085815260200190815260200160002060040154146105b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105a9906148ab565b60405180910390fd5b8160046000858152602001908152602001600020600501819055506004600084815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060000154847f01e6a465ec1edd582d333147c7b7edf5998164f2cf2269dcb9c93d46c67bd317856040516106619190614a8b565b60405180910390a4505050565b6000600260005414156106b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ad90614a0b565b60405180910390fd5b60026000819055508673ffffffffffffffffffffffffffffffffffffffff166301ffc9a76380ac58cd60e01b6040518263ffffffff1660e01b81526004016106fe919061474e565b60206040518083038186803b15801561071657600080fd5b505afa15801561072a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074e9190613a47565b61078d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078490614a4b565b60405180910390fd5b60648360ff16106107d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ca906149cb565b60405180910390fd5b60008773ffffffffffffffffffffffffffffffffffffffff16636352211e8a6040518263ffffffff1660e01b815260040161080e9190614a8b565b60206040518083038186803b15801561082657600080fd5b505afa15801561083a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085e9190613a1e565b90508773ffffffffffffffffffffffffffffffffffffffff1663081812fc8a6040518263ffffffff1660e01b81526004016108999190614a8b565b60206040518083038186803b1580156108b157600080fd5b505afa1580156108c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e99190613a1e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061094d57508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61098c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610983906149eb565b60405180910390fd5b6000610998600561245d565b90506040518061018001604052808b81526020018a73ffffffffffffffffffffffffffffffffffffffff16815260200160001515815260200160008152602001898152602001600081526020018881526020018660ff1681526020018373ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815250600460008381526020019081526020016000206000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160010160146101000a81548160ff021916908315150217905550606082015181600201556080820151816003015560a0820151816004015560c0820151816005015560e08201518160060160006101000a81548160ff021916908360ff1602179055506101008201518160060160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506101208201518160070160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506101408201518160080160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506101608201518160090160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509050508873ffffffffffffffffffffffffffffffffffffffff166323b872dd83308d6040518463ffffffff1660e01b8152600401610c909392919061469c565b600060405180830381600087803b158015610caa57600080fd5b505af1158015610cbe573d6000803e3d6000fd5b50505050610ccc600561246b565b8873ffffffffffffffffffffffffffffffffffffffff168a827f38c0b9047bd28fac9f420b967f6caf4a6260ba09d18940a9a502578a480c09008b8b878c8c8c604051610d1e96959493929190614bb2565b60405180910390a4600073ffffffffffffffffffffffffffffffffffffffff166004600083815260200190815260200160002060080160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610dc257508173ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16145b15610dd357610dd2816001612481565b5b80925050506001600081905550979650505050505050565b60026000541415610e31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e2890614a0b565b60405180910390fd5b600260008190555080610e43816123ee565b610e82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e799061490b565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166004600084815260200190815260200160002060060160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610f5357503373ffffffffffffffffffffffffffffffffffffffff166004600084815260200190815260200160002060080160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b610f92576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f899061484b565b60405180910390fd5b6000600460008481526020019081526020016000206004015414610feb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fe2906147ab565b60405180910390fd5b610ff48261254f565b50600160008190555050565b8161100a816123ee565b611049576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110409061490b565b60405180910390fd5b6004600084815260200190815260200160002060080160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146110ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110e4906147cb565b60405180910390fd5b6000600460008581526020019081526020016000206004015414611146576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113d906148ab565b60405180910390fd5b6111508383612481565b505050565b600260009054906101000a900460ff1681565b81611172816123ee565b6111b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a89061490b565b60405180910390fd5b600260005414156111f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ee90614a0b565b60405180910390fd5b600260008190555060006004600085815260200190815260200160002060070160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506004600085815260200190815260200160002060010160149054906101000a900460ff1661129d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112949061488b565b60405180910390fd5b6000600460008681526020019081526020016000206004015414806112ff57506112fc6004600086815260200190815260200160002060030154600460008781526020019081526020016000206004015461280e90919063ffffffff16565b42105b61133e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133590614a2b565b60405180910390fd5b6004600085815260200190815260200160002060050154831015611397576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138e9061486b565b60405180910390fd5b61140d6113e860646113da600260009054906101000a900460ff1660ff16600460008a81526020019081526020016000206002015461286390919063ffffffff16565b6128d390919063ffffffff16565b600460008781526020019081526020016000206002015461280e90919063ffffffff16565b83101561144f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611446906148cb565b60405180910390fd5b600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166004600086815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561165d57600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a1794bcd6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561154557600080fd5b505af1158015611559573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061157d9190613a1e565b73ffffffffffffffffffffffffffffffffffffffff166302e8fe136004600087815260200190815260200160002060000154856040518363ffffffff1660e01b81526004016115cd929190614b89565b60206040518083038186803b1580156115e557600080fd5b505afa1580156115f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161d9190613a47565b61165c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116539061478b565b60405180910390fd5b5b60006004600086815260200190815260200160002060040154141561169c57426004600086815260200190815260200160002060040181905550611729565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611728576117278160046000878152602001908152602001600020600201546004600088815260200190815260200160002060090160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661291d565b5b5b611769836004600087815260200190815260200160002060090160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16612af4565b826004600086815260200190815260200160002060020181905550336004600086815260200190815260200160002060070160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600080905060015461183242611824600460008a815260200190815260200160002060030154600460008b81526020019081526020016000206004015461280e90919063ffffffff16565b612d9b90919063ffffffff16565b10156118d4576000600460008781526020019081526020016000206003015490506118b46118a56118944261188685600460008d81526020019081526020016000206004015461280e90919063ffffffff16565b612d9b90919063ffffffff16565b600154612d9b90919063ffffffff16565b8261280e90919063ffffffff16565b600460008881526020019081526020016000206003018190555060019150505b6004600086815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166004600087815260200190815260200160002060000154867fda6b779568630ce5e5658b317174df474d5b335541ed9471bd8424a017f3be6d3388600073ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff16148760405161199d94939291906145f6565b60405180910390a48015611a5e576004600086815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166004600087815260200190815260200160002060000154867f55cf2b31608fbe49fa31cd0285b6b6cce46f56d26c8c59980a2af5a0ffbdd5db600460008a815260200190815260200160002060030154604051611a559190614a8b565b60405180910390a45b50506001600081905550505050565b80611a77816123ee565b611ab6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aad9061490b565b60405180910390fd5b60026000541415611afc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611af390614a0b565b60405180910390fd5b6002600081905550600060046000848152602001908152602001600020600401541415611b5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b559061482b565b60405180910390fd5b611b9d6004600084815260200190815260200160002060030154600460008581526020019081526020016000206004015461280e90919063ffffffff16565b421015611bdf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bd6906149ab565b60405180910390fd5b60008073ffffffffffffffffffffffffffffffffffffffff166004600085815260200190815260200160002060090160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c86576004600084815260200190815260200160002060090160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611caa565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff165b90506000809050600060046000868152602001908152602001600020600201549050600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166004600087815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611e1e57600080611d6487612de5565b915091508092506001151582151514611e1757611e046004600089815260200190815260200160002060070160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460008a815260200190815260200160002060020154600460008b815260200190815260200160002060090160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661291d565b611e0d8761254f565b50505050506123dc565b5050611fab565b6004600086815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e306004600089815260200190815260200160002060070160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460008a8152602001908152602001600020600001546040518463ffffffff1660e01b8152600401611edd93929190614588565b600060405180830381600087803b158015611ef757600080fd5b505af1925050508015611f08575060015b611faa57611f996004600087815260200190815260200160002060070160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660046000888152602001908152602001600020600201546004600089815260200190815260200160002060090160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661291d565b611fa28561254f565b5050506123dc565b5b600073ffffffffffffffffffffffffffffffffffffffff166004600087815260200190815260200160002060080160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146120f05761206160646120536004600089815260200190815260200160002060060160009054906101000a900460ff1660ff168461286390919063ffffffff16565b6128d390919063ffffffff16565b91506120768282612d9b90919063ffffffff16565b90506120ef6004600087815260200190815260200160002060080160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836004600089815260200190815260200160002060090160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661291d565b5b6121676004600087815260200190815260200160002060060160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826004600089815260200190815260200160002060090160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661291d565b6004600086815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166004600087815260200190815260200160002060000154867f4f35fb3ea0081b3ccbe8df613cab0f9e1694d50a025e0aa09b88a86a3d07c2de600460008a815260200190815260200160002060060160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460008b815260200190815260200160002060080160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460008c815260200190815260200160002060070160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1687898b6040516122a79695949392919061463b565b60405180910390a4600460008681526020019081526020016000206000808201600090556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160146101000a81549060ff021916905560028201600090556003820160009055600482016000905560058201600090556006820160006101000a81549060ff02191690556006820160016101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556007820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556008820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556009820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550505050505b60016000819055505050565b60015481565b60008073ffffffffffffffffffffffffffffffffffffffff166004600084815260200190815260200160002060060160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600081600001549050919050565b6001816000016000828254019250508190555050565b806004600084815260200190815260200160002060010160146101000a81548160ff0219169083151502179055506004600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166004600084815260200190815260200160002060000154837fec35d321ab4972475f131e184c0c0fe52c5a58a29d74f7db2969af2f6dd93a1f846040516125439190614733565b60405180910390a45050565b60006004600083815260200190815260200160002060060160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506004600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e308360046000878152602001908152602001600020600001546040518463ffffffff1660e01b8152600401612613939291906145bf565b600060405180830381600087803b15801561262d57600080fd5b505af1158015612641573d6000803e3d6000fd5b505050506004600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166004600084815260200190815260200160002060000154837f6091afcbe8514686c43b167ca4f1b03e24446d29d8490d496e438f8a2c763439846040516126d99190614552565b60405180910390a4600460008381526020019081526020016000206000808201600090556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160146101000a81549060ff021916905560028201600090556003820160009055600482016000905560058201600090556006820160006101000a81549060ff02191690556006820160016101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556007820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556008820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556009820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550505050565b600080828401905083811015612859576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612850906147eb565b60405180910390fd5b8091505092915050565b60008083141561287657600090506128cd565b600082840290508284828161288757fe5b04146128c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128bf906148eb565b60405180910390fd5b809150505b92915050565b600061291583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506133ef565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612ac357600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d836040518263ffffffff1660e01b81526004016129ad9190614a8b565b600060405180830381600087803b1580156129c757600080fd5b505af11580156129db573d6000803e3d6000fd5b505050506129e98383613450565b612abe57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015612a5757600080fd5b505af1158015612a6b573d6000803e3d6000fd5b5050505050612abd8383600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166135149092919063ffffffff16565b5b612aef565b612aee83838373ffffffffffffffffffffffffffffffffffffffff166135149092919063ffffffff16565b5b505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612bf357813414612b6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b629061492b565b60405180910390fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015612bd557600080fd5b505af1158015612be9573d6000803e3d6000fd5b5050505050612d97565b600081905060008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401612c33919061456d565b60206040518083038186803b158015612c4b57600080fd5b505afa158015612c5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c839190613a99565b9050612cb23330868573ffffffffffffffffffffffffffffffffffffffff1661359a909392919063ffffffff16565b60008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401612ced919061456d565b60206040518083038186803b158015612d0557600080fd5b505afa158015612d19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d3d9190613a99565b905080612d53868461280e90919063ffffffff16565b14612d93576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d8a90614a6b565b60405180910390fd5b5050505b5050565b6000612ddd83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250613623565b905092915050565b60008060008073ffffffffffffffffffffffffffffffffffffffff166004600086815260200190815260200160002060090160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612e8f576004600085815260200190815260200160002060090160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16612eb3565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff165b9050612ebd6138ec565b6040518060a00160405280600460008881526020019081526020016000206002015481526020018373ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff1681526020016004600088815260200190815260200160002060070160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016040518060200160405280600081525081525090508173ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a1794bcd6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561300957600080fd5b505af115801561301d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130419190613a1e565b83600001516040518363ffffffff1660e01b815260040161306392919061470a565b602060405180830381600087803b15801561307d57600080fd5b505af1158015613091573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130b59190613a47565b50600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635bf624226004600088815260200190815260200160002060000154836040518363ffffffff1660e01b8152600401613129929190614b60565b600060405180830381600087803b15801561314357600080fd5b505af1158015613157573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401613196919061456d565b60206040518083038186803b1580156131ae57600080fd5b505afa1580156131c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131e69190613a99565b9050600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ba3393996004600089815260200190815260200160002060000154846040518363ffffffff1660e01b815260040161325b929190614b60565b600060405180830381600087803b15801561327557600080fd5b505af1925050508015613286575060015b61333f57600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b320f45960046000898152602001908152602001600020600001546040518263ffffffff1660e01b81526004016132fb9190614a8b565b600060405180830381600087803b15801561331557600080fd5b505af1158015613329573d6000803e3d6000fd5b50505050600080809050945094505050506133ea565b60008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161337a919061456d565b60206040518083038186803b15801561339257600080fd5b505afa1580156133a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133ca9190613a99565b905060016133e18383612d9b90919063ffffffff16565b95509550505050505b915091565b60008083118290613436576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161342d9190614769565b60405180910390fd5b50600083858161344257fe5b049050809150509392505050565b6000808373ffffffffffffffffffffffffffffffffffffffff1683600067ffffffffffffffff8111801561348357600080fd5b506040519080825280601f01601f1916602001820160405280156134b65781602001600182028036833780820191505090505b506040516134c4919061453b565b60006040518083038185875af1925050503d8060008114613501576040519150601f19603f3d011682016040523d82523d6000602084013e613506565b606091505b505090508091505092915050565b6135958363a9059cbb60e01b848460405160240161353392919061470a565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061367e565b505050565b61361d846323b872dd60e01b8585856040516024016135bb939291906146d3565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061367e565b50505050565b600083831115829061366b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016136629190614769565b60405180910390fd5b5060008385039050809150509392505050565b60606136e0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166137459092919063ffffffff16565b905060008151111561374057808060200190518101906137009190613a47565b61373f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016137369061498b565b60405180910390fd5b5b505050565b6060613754848460008561375d565b90509392505050565b6060824710156137a2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016137999061480b565b60405180910390fd5b6137ab85613872565b6137ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016137e19061496b565b60405180910390fd5b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051613814919061453b565b60006040518083038185875af1925050503d8060008114613851576040519150601f19603f3d011682016040523d82523d6000602084013e613856565b606091505b5091509150613866828286613885565b92505050949350505050565b600080823b905060008111915050919050565b60608315613895578290506138e5565b6000835111156138a85782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016138dc9190614769565b60405180910390fd5b9392505050565b6040518060a0016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200161395d613963565b81525090565b6040518060200160405280600081525090565b60008135905061398581614d6d565b92915050565b60008151905061399a81614d6d565b92915050565b6000813590506139af81614d84565b92915050565b6000813590506139c481614d9b565b92915050565b6000815190506139d981614d9b565b92915050565b6000813590506139ee81614db2565b92915050565b600081519050613a0381614db2565b92915050565b600081359050613a1881614dc9565b92915050565b600060208284031215613a3057600080fd5b6000613a3e8482850161398b565b91505092915050565b600060208284031215613a5957600080fd5b6000613a67848285016139ca565b91505092915050565b600060208284031215613a8257600080fd5b6000613a90848285016139df565b91505092915050565b600060208284031215613aab57600080fd5b6000613ab9848285016139f4565b91505092915050565b600080600080600080600060e0888a031215613add57600080fd5b6000613aeb8a828b016139df565b9750506020613afc8a828b01613976565b9650506040613b0d8a828b016139df565b9550506060613b1e8a828b016139df565b9450506080613b2f8a828b016139a0565b93505060a0613b408a828b01613a09565b92505060c0613b518a828b01613976565b91505092959891949750929550565b60008060408385031215613b7357600080fd5b6000613b81858286016139df565b9250506020613b92858286016139b5565b9150509250929050565b60008060408385031215613baf57600080fd5b6000613bbd858286016139df565b9250506020613bce858286016139df565b9150509250929050565b613be181614cf3565b82525050565b613bf081614c72565b82525050565b613bff81614c60565b82525050565b613c0e81614c60565b82525050565b613c1d81614c84565b82525050565b613c2c81614c90565b82525050565b6000613c3d82614c2e565b613c478185614c44565b9350613c57818560208601614d29565b80840191505092915050565b6000613c6e82614c39565b613c788185614c4f565b9350613c88818560208601614d29565b613c9181614d5c565b840191505092915050565b6000613ca9601f83614c4f565b91507f42696420696e76616c696420666f722073686172652073706c697474696e67006000830152602082019050919050565b6000613ce9602783614c4f565b91507f43616e27742063616e63656c20616e2061756374696f6e206f6e63652069742760008301527f7320626567756e000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613d4f601783614c4f565b91507f4d7573742062652061756374696f6e2063757261746f720000000000000000006000830152602082019050919050565b6000613d8f601b83614c4f565b91507f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006000830152602082019050919050565b6000613dcf602683614c4f565b91507f416464726573733a20696e73756666696369656e742062616c616e636520666f60008301527f722063616c6c00000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613e35601483614c4f565b91507f41756374696f6e206861736e277420626567756e0000000000000000000000006000830152602082019050919050565b6000613e75603083614c4f565b91507f43616e206f6e6c792062652063616c6c65642062792061756374696f6e20637260008301527f6561746f72206f722063757261746f72000000000000000000000000000000006020830152604082019050919050565b6000613edb601f83614c4f565b91507f4d7573742073656e64206174206c6561737420726573657276655072696365006000830152602082019050919050565b6000613f1b602383614c4f565b91507f41756374696f6e206d75737420626520617070726f766564206279206375726160008301527f746f7200000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613f81601b83614c4f565b91507f41756374696f6e2068617320616c7265616479207374617274656400000000006000830152602082019050919050565b6000613fc1604083614c4f565b91507f4d7573742073656e64206d6f7265207468616e206c617374206269642062792060008301527f6d696e426964496e6372656d656e7450657263656e7461676520616d6f756e746020830152604082019050919050565b6000614027602183614c4f565b91507f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008301527f77000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061408d601583614c4f565b91507f41756374696f6e20646f65736e277420657869737400000000000000000000006000830152602082019050919050565b60006140cd603283614c4f565b91507f53656e74204554482056616c756520646f6573206e6f74206d6174636820737060008301527f656369666965642062696420616d6f756e7400000000000000000000000000006020830152604082019050919050565b6000614133602683614c4f565b91507f4d7573742062652061756374696f6e2063757261746f72206f7220746f6b656e60008301527f206f776e657200000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000614199601d83614c4f565b91507f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006000830152602082019050919050565b60006141d9602a83614c4f565b91507f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008301527f6f742073756363656564000000000000000000000000000000000000000000006020830152604082019050919050565b600061423f601883614c4f565b91507f41756374696f6e206861736e277420636f6d706c6574656400000000000000006000830152602082019050919050565b600061427f602a83614c4f565b91507f63757261746f7246656550657263656e74616765206d757374206265206c657360008301527f73207468616e20313030000000000000000000000000000000000000000000006020830152604082019050919050565b60006142e5602d83614c4f565b91507f43616c6c6572206d75737420626520617070726f766564206f72206f776e657260008301527f20666f7220746f6b656e206964000000000000000000000000000000000000006020830152604082019050919050565b600061434b601f83614c4f565b91507f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006000830152602082019050919050565b600061438b600f83614c4f565b91507f41756374696f6e206578706972656400000000000000000000000000000000006000830152602082019050919050565b60006143cb602f83614c4f565b91507f746f6b656e436f6e747261637420646f6573206e6f7420737570706f7274204560008301527f524337323120696e7465726661636500000000000000000000000000000000006020830152604082019050919050565b6000614431603483614c4f565b91507f546f6b656e207472616e736665722063616c6c20646964206e6f74207472616e60008301527f7366657220657870656374656420616d6f756e740000000000000000000000006020830152604082019050919050565b60a0820160008201516144a0600085018261450e565b5060208201516144b36020850182613bf6565b5060408201516144c66040850182613bf6565b5060608201516144d96060850182613bf6565b5060808201516144ec60808501826144f2565b50505050565b602082016000820151614508600085018261450e565b50505050565b61451781614cdc565b82525050565b61452681614cdc565b82525050565b61453581614ce6565b82525050565b60006145478284613c32565b915081905092915050565b60006020820190506145676000830184613c05565b92915050565b60006020820190506145826000830184613bd8565b92915050565b600060608201905061459d6000830186613bd8565b6145aa6020830185613bd8565b6145b7604083018461451d565b949350505050565b60006060820190506145d46000830186613bd8565b6145e16020830185613c05565b6145ee604083018461451d565b949350505050565b600060808201905061460b6000830187613bd8565b614618602083018661451d565b6146256040830185613c14565b6146326060830184613c14565b95945050505050565b600060c0820190506146506000830189613c05565b61465d6020830188613bd8565b61466a6040830187613bd8565b614677606083018661451d565b614684608083018561451d565b61469160a0830184613c05565b979650505050505050565b60006060820190506146b16000830186613c05565b6146be6020830185613bd8565b6146cb604083018461451d565b949350505050565b60006060820190506146e86000830186613c05565b6146f56020830185613c05565b614702604083018461451d565b949350505050565b600060408201905061471f6000830185613c05565b61472c602083018461451d565b9392505050565b60006020820190506147486000830184613c14565b92915050565b60006020820190506147636000830184613c23565b92915050565b600060208201905081810360008301526147838184613c63565b905092915050565b600060208201905081810360008301526147a481613c9c565b9050919050565b600060208201905081810360008301526147c481613cdc565b9050919050565b600060208201905081810360008301526147e481613d42565b9050919050565b6000602082019050818103600083015261480481613d82565b9050919050565b6000602082019050818103600083015261482481613dc2565b9050919050565b6000602082019050818103600083015261484481613e28565b9050919050565b6000602082019050818103600083015261486481613e68565b9050919050565b6000602082019050818103600083015261488481613ece565b9050919050565b600060208201905081810360008301526148a481613f0e565b9050919050565b600060208201905081810360008301526148c481613f74565b9050919050565b600060208201905081810360008301526148e481613fb4565b9050919050565b600060208201905081810360008301526149048161401a565b9050919050565b6000602082019050818103600083015261492481614080565b9050919050565b60006020820190508181036000830152614944816140c0565b9050919050565b6000602082019050818103600083015261496481614126565b9050919050565b600060208201905081810360008301526149848161418c565b9050919050565b600060208201905081810360008301526149a4816141cc565b9050919050565b600060208201905081810360008301526149c481614232565b9050919050565b600060208201905081810360008301526149e481614272565b9050919050565b60006020820190508181036000830152614a04816142d8565b9050919050565b60006020820190508181036000830152614a248161433e565b9050919050565b60006020820190508181036000830152614a448161437e565b9050919050565b60006020820190508181036000830152614a64816143be565b9050919050565b60006020820190508181036000830152614a8481614424565b9050919050565b6000602082019050614aa0600083018461451d565b92915050565b600061018082019050614abc600083018f61451d565b614ac9602083018e613c05565b614ad6604083018d613c14565b614ae3606083018c61451d565b614af0608083018b61451d565b614afd60a083018a61451d565b614b0a60c083018961451d565b614b1760e083018861452c565b614b25610100830187613c05565b614b33610120830186613be7565b614b41610140830185613be7565b614b4f610160830184613c05565b9d9c50505050505050505050505050565b600060c082019050614b75600083018561451d565b614b82602083018461448a565b9392505050565b6000604082019050614b9e600083018561451d565b614bab602083018461451d565b9392505050565b600060c082019050614bc7600083018961451d565b614bd4602083018861451d565b614be16040830187613c05565b614bee6060830186613bd8565b614bfb608083018561452c565b614c0860a0830184613c05565b979650505050505050565b6000602082019050614c28600083018461452c565b92915050565b600081519050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b6000614c6b82614cbc565b9050919050565b6000614c7d82614cbc565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000614cfe82614d05565b9050919050565b6000614d1082614d17565b9050919050565b6000614d2282614cbc565b9050919050565b60005b83811015614d47578082015181840152602081019050614d2c565b83811115614d56576000848401525b50505050565b6000601f19601f8301169050919050565b614d7681614c60565b8114614d8157600080fd5b50565b614d8d81614c72565b8114614d9857600080fd5b50565b614da481614c84565b8114614daf57600080fd5b50565b614dbb81614cdc565b8114614dc657600080fd5b50565b614dd281614ce6565b8114614ddd57600080fd5b5056fea26469706673582212202088ab10f69dfdf103a724f0a0ade038bea9419ed210c3af52b8e69c4e5ce38364736f6c63430006080033000000000000000000000000abefbc9fd2f806065b4f3c237d4b59d9a97bcac7000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

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

000000000000000000000000abefbc9fd2f806065b4f3c237d4b59d9a97bcac7000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

-----Decoded View---------------
Arg [0] : _zora (address): 0xabefbc9fd2f806065b4f3c237d4b59d9a97bcac7
Arg [1] : _weth (address): 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000abefbc9fd2f806065b4f3c237d4b59d9a97bcac7
Arg [1] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2


Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.