Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 11 from a total of 11 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Cancel Auction | 12966129 | 1689 days ago | IN | 0 ETH | 0.01361935 | ||||
| Create Auction | 12966084 | 1689 days ago | IN | 0 ETH | 0.02283037 | ||||
| Grant Role | 12965205 | 1689 days ago | IN | 0 ETH | 0.00410808 | ||||
| Grant Role | 12965203 | 1689 days ago | IN | 0 ETH | 0.00402511 | ||||
| Grant Role | 12965200 | 1689 days ago | IN | 0 ETH | 0.00448614 | ||||
| Grant Role | 12965174 | 1689 days ago | IN | 0 ETH | 0.00390723 | ||||
| Grant Role | 12965171 | 1689 days ago | IN | 0 ETH | 0.00365841 | ||||
| Grant Role | 12964635 | 1689 days ago | IN | 0 ETH | 0.00252185 | ||||
| Grant Role | 12960968 | 1689 days ago | IN | 0 ETH | 0.00123744 | ||||
| Grant Role | 12960966 | 1689 days ago | IN | 0 ETH | 0.00323112 | ||||
| Grant Role | 12959606 | 1690 days ago | IN | 0 ETH | 0.00898411 |
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| - | 12959553 | 1690 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
FirstDibsAuction
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 1348 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: Unlicensed
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
import '@openzeppelin/contracts/access/AccessControl.sol';
import '@openzeppelin/contracts/math/SafeMath.sol';
import '@openzeppelin/contracts/utils/ReentrancyGuard.sol';
import '@openzeppelin/contracts/payment/PullPayment.sol';
import './IERC721TokenCreator.sol';
import './IFirstDibsMarketSettings.sol';
contract FirstDibsAuction is PullPayment, AccessControl, ReentrancyGuard, IERC721Receiver {
using SafeMath for uint256;
using SafeMath for uint64;
using Counters for Counters.Counter;
bytes32 public constant BIDDER_ROLE = keccak256('BIDDER_ROLE');
bytes32 public constant BIDDER_ROLE_ADMIN = keccak256('BIDDER_ROLE_ADMIN');
/**
* ========================
* #Public state variables
* ========================
*/
bool public bidderRoleRequired; // if true, bids require bidder having BIDDER_ROLE role
bool public globalPaused; // flag for pausing all auctions
IERC721TokenCreator public iERC721TokenCreatorRegistry;
IFirstDibsMarketSettings public iFirstDibsMarketSettings;
// Mapping auction id => Auction
mapping(uint256 => Auction) public auctions;
// Map token address => tokenId => auctionId
mapping(address => mapping(uint256 => uint256)) public auctionIds;
/*
* ========================
* #Private state variables
* ========================
*/
Counters.Counter private auctionIdsCounter;
/**
* ========================
* #Structs
* ========================
*/
struct AuctionSettings {
uint32 buyerPremium; // percent; added on top of current bid
uint32 duration; // defaults to globalDuration
uint32 minimumBidIncrement; // defaults to globalMinimumBidIncrement
uint32 commissionRate; // percent; defaults to globalMarketCommission
uint128 creatorRoyaltyRate; // percent; defaults to globalCreatorRoyaltyRate
}
struct Bid {
uint256 amount; // current winning bid of the auction
uint256 buyerPremiumAmount; // current buyer premium associated with current bid
}
struct Auction {
uint256 startTime; // auction start timestamp
uint256 pausedTime; // when was the auction paused
uint256 reservePrice; // minimum bid threshold for auction to begin
uint256 tokenId; // id of the token
bool paused; // is individual auction paused
address nftAddress; // address of the token
address payable payee; // address of auction proceeds recipient. NFT creator until secondary market is introduced.
address payable currentBidder; // current winning bidder of the auction
address auctionCreator; // address of the creator of the auction (whoever called the createAuction method)
AuctionSettings settings;
Bid currentBid;
}
/**
* ========================
* #Modifiers
* ========================
*/
modifier onlyAdmin() {
require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), 'caller is not an admin');
_;
}
modifier onlyBidder() {
if (bidderRoleRequired == true) {
require(hasRole(BIDDER_ROLE, _msgSender()), 'bidder role required');
}
_;
}
modifier notPaused(uint256 auctionId) {
require(!globalPaused, 'Auctions are globally paused');
require(!auctions[auctionId].paused, 'Auction is paused.');
_;
}
modifier auctionExists(uint256 auctionId) {
require(auctions[auctionId].payee != address(0), "Auction doesn't exist");
_;
}
modifier senderIsAuctionCreatorOrAdmin(uint256 auctionId) {
require(
_msgSender() == auctions[auctionId].auctionCreator ||
hasRole(DEFAULT_ADMIN_ROLE, _msgSender()),
'Must be auction creator or admin'
);
_;
}
/**
* ========================
* #Events
* ========================
*/
event AuctionCreated(
uint256 indexed auctionId,
address indexed nftAddress,
uint256 indexed tokenId,
address tokenSeller,
uint256 reservePrice,
bool isPaused,
address auctionCreator,
uint64 duration
);
event AuctionBid(
uint256 indexed auctionId,
address indexed bidder,
uint256 bidAmount,
uint256 bidBuyerPremium,
uint64 duration,
uint256 startTime
);
event AuctionEnded(
uint256 indexed auctionId,
address indexed tokenSeller,
address indexed winningBidder,
uint256 winningBid,
uint256 winningBidBuyerPremium,
uint256 adminCommissionFee,
uint256 royaltyFee,
uint256 sellerPayment
);
event AuctionPaused(
uint256 indexed auctionId,
address indexed tokenSeller,
address toggledBy,
bool isPaused,
uint64 duration
);
event AuctionCanceled(uint256 indexed auctionId, address canceledBy, uint256 refundedAmount);
/**
* ========================
* constructor
* ========================
*/
constructor(address _marketSettings, address _creatorRegistry) public {
require(
_marketSettings != address(0),
'constructor: 0 address not allowed for _marketSettings'
);
require(
_creatorRegistry != address(0),
'constructor: 0 address not allowed for _creatorRegistry'
);
_setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); // deployer of the contract gets admin permissions
_setupRole(BIDDER_ROLE, _msgSender());
_setupRole(BIDDER_ROLE_ADMIN, _msgSender());
_setRoleAdmin(BIDDER_ROLE, BIDDER_ROLE_ADMIN);
iERC721TokenCreatorRegistry = IERC721TokenCreator(_creatorRegistry);
iFirstDibsMarketSettings = IFirstDibsMarketSettings(_marketSettings);
bidderRoleRequired = true;
}
/**
* @dev setter for creator registry address
* @param _iERC721TokenCreatorRegistry address of the IERC721TokenCreator contract to set for the auction
*/
function setIERC721TokenCreatorRegistry(address _iERC721TokenCreatorRegistry)
external
onlyAdmin
{
require(
_iERC721TokenCreatorRegistry != address(0),
'setIERC721TokenCreatorRegistry: 0 address not allowed'
);
iERC721TokenCreatorRegistry = IERC721TokenCreator(_iERC721TokenCreatorRegistry);
}
/**
* @dev setter for market settings address
* @param _iFirstDibsMarketSettings address of the FirstDibsMarketSettings contract to set for the auction
*/
function setIFirstDibsMarketSettings(address _iFirstDibsMarketSettings) external onlyAdmin {
require(
_iFirstDibsMarketSettings != address(0),
'setIFirstDibsMarketSettings: 0 address not allowed'
);
iFirstDibsMarketSettings = IFirstDibsMarketSettings(_iFirstDibsMarketSettings);
}
/**
* @dev setter for setting bidder role being required to bid
* @param _bidderRole bool If true, bidder must have bidder role to bid
*/
function setBidderRoleRequired(bool _bidderRole) external onlyAdmin {
bidderRoleRequired = _bidderRole;
}
/**
* @dev setter for global pause state
* @param _paused) true to pause all auctions, false to unpause all auctions
*/
function setGlobalPaused(bool _paused) external onlyAdmin {
globalPaused = _paused;
}
/**
* @dev External function which creates an auction with a reserve price,
* custom start time, custom duration, and custom minimum bid increment.
*
* @param _nftAddress address of ERC-721 contract
* @param _tokenId uint256
* @param _reservePrice uint64 reserve price in ETH
* @param _pausedArg create the auction in a paused state
* @param _startTimeArg admin-only unix timestamp; allow bidding to start at this time
* @param _auctionDurationArg (optional) auction duration in seconds
* @param _minimumBidIncrementArg (optional) minimum bid increment in percentage points
*/
function createAuction(
address _nftAddress,
uint256 _tokenId,
uint64 _reservePrice,
bool _pausedArg,
uint64 _startTimeArg,
uint32 _auctionDurationArg,
uint8 _minimumBidIncrementArg
) external {
adminCreateAuction(
_nftAddress,
_tokenId,
_reservePrice,
_pausedArg,
_startTimeArg,
_auctionDurationArg,
_minimumBidIncrementArg,
101, // adminCreateAuction function ignores values > 100
101 // adminCreateAuction function ignores values > 100
);
}
/**
* @dev External function which creates an auction with a reserve price,
* custom start time, custom duration, custom minimum bid increment,
* custom commission rate, and custom creator royalty rate.
*
* @param _nftAddress address of ERC-721 contract (latest FirstDibsToken address)
* @param _tokenId uint256
* @param _reservePrice reserve price in ETH
* @param _pausedArg create the auction in a paused state
* @param _startTimeArg (optional) admin-only; unix timestamp; allow bidding to start at this time
* @param _auctionDurationArg (optional) admin-only; auction duration in seconds
* @param _minimumBidIncrementArg (optional) admin-only; minimum bid increment in percentage points
* @param _commissionRateArg (optional) admin-only; pass in a custom marketplace commission rate
* @param _creatorRoyaltyRateArg (optional) admin-only; pass in a custom creator royalty rate
*/
function adminCreateAuction(
address _nftAddress,
uint256 _tokenId,
uint64 _reservePrice,
bool _pausedArg,
uint64 _startTimeArg,
uint32 _auctionDurationArg,
uint8 _minimumBidIncrementArg,
uint8 _commissionRateArg,
uint8 _creatorRoyaltyRateArg
) public nonReentrant {
require(!globalPaused, 'adminCreateAuction: auctions are globally paused');
// May not create auctions unless you are the token owner or
// an admin of this contract
require(
_msgSender() == IERC721(_nftAddress).ownerOf(_tokenId) ||
hasRole(DEFAULT_ADMIN_ROLE, _msgSender()),
'adminCreateAuction: must be token owner or admin'
);
require(
auctionIds[_nftAddress][_tokenId] == 0,
'adminCreateAuction: auction already exists'
);
require(_reservePrice > 0, 'adminCreateAuction: Reserve must be > 0');
Auction memory auction = Auction({
currentBid: Bid({ amount: 0, buyerPremiumAmount: 0 }),
nftAddress: _nftAddress,
tokenId: _tokenId,
payee: payable(IERC721(_nftAddress).ownerOf(_tokenId)), // payee is the token owner
auctionCreator: _msgSender(),
reservePrice: _reservePrice, // minimum bid threshold for auction to begin
startTime: 0,
currentBidder: address(0), // there is no bidder at auction creation
paused: _pausedArg, // is individual auction paused
pausedTime: 0, // when the auction was paused
settings: AuctionSettings({ // Defaults to global market settings; admins may override
buyerPremium: iFirstDibsMarketSettings.globalBuyerPremium(),
duration: iFirstDibsMarketSettings.globalAuctionDuration(),
minimumBidIncrement: iFirstDibsMarketSettings.globalMinimumBidIncrement(),
commissionRate: iFirstDibsMarketSettings.globalMarketCommission(),
creatorRoyaltyRate: iFirstDibsMarketSettings.globalCreatorRoyaltyRate()
})
});
if (hasRole(DEFAULT_ADMIN_ROLE, _msgSender())) {
if (_auctionDurationArg > 0) {
require(
_auctionDurationArg >= iFirstDibsMarketSettings.globalTimeBuffer(),
'adminCreateAuction: duration must be >= time buffer'
);
auction.settings.duration = _auctionDurationArg;
}
if (_startTimeArg > 0) {
require(
block.timestamp < _startTimeArg,
'adminCreateAuction: start time must be in the future'
);
auction.startTime = _startTimeArg;
// since `bid` is gated by `notPaused` modifier
// and a start time in the future means that a bid
// must be allowed after that time, we can't have
// the auction paused if there is a start time > 0
auction.paused = false;
}
if (_minimumBidIncrementArg > 0) {
auction.settings.minimumBidIncrement = _minimumBidIncrementArg;
}
if (_commissionRateArg <= 100) {
auction.settings.commissionRate = _commissionRateArg;
}
if (_creatorRoyaltyRateArg <= 100) {
auction.settings.creatorRoyaltyRate = _creatorRoyaltyRateArg;
}
}
require(
uint256(auction.settings.commissionRate).add(auction.settings.creatorRoyaltyRate) <=
100,
'adminCreateAuction: commission rate + royalty rate must be <= 100'
);
auctionIdsCounter.increment();
auctions[auctionIdsCounter.current()] = auction;
auctionIds[_nftAddress][_tokenId] = auctionIdsCounter.current();
// transfer the NFT to the auction contract to hold in escrow for the duration of the auction
IERC721(_nftAddress).safeTransferFrom(auction.payee, address(this), _tokenId);
emit AuctionCreated(
auctionIdsCounter.current(),
_nftAddress,
_tokenId,
auction.payee,
_reservePrice,
auction.paused,
_msgSender(),
auction.settings.duration
);
}
/**
* @dev Retrieves the bid and buyer premium amount from the _amount based on _buyerPremiumRate
*
* @param _amount The entire amount (bid amount + buyer premium amount)
* @param _buyerPremiumRate The buyer premium rate used to calculate _amount
* @return The bid sent and the premium sent
*/
function getSentBidAndPremium(uint64 _amount, uint64 _buyerPremiumRate)
public
pure
returns (
uint64, /*sentBid*/
uint64 /*sentPremium*/
)
{
uint256 bpRate = _buyerPremiumRate.add(100);
uint64 _sentBid = uint64(_amount.mul(100).div(bpRate));
uint64 _sentPremium = uint64(_amount.sub(_sentBid));
return (_sentBid, _sentPremium);
}
/**
* @dev Validates that the total amount sent is valid for the current state of the auction
* and returns the bid amount and buyer premium amount sent
*
* @param _auctionId The id of the auction on which to validate the amount sent
* @param _totalAmount The total amount sent (bid amount + buyer premium amount)
* @return boolean true if the amount satisfies the state of the auction; the sent bid; and the sent premium
*/
function _validateAndGetBid(uint256 _auctionId, uint64 _totalAmount)
internal
view
returns (
uint64, /*sentBid*/
uint64 /*sentPremium*/
)
{
(uint64 _sentBid, uint64 _sentPremium) = getSentBidAndPremium(
_totalAmount,
auctions[_auctionId].settings.buyerPremium
);
if (auctions[_auctionId].currentBidder == address(0)) {
// This is the first bid against reserve price
require(
_sentBid >= auctions[_auctionId].reservePrice,
'_validateAndGetBid: reserve not met'
);
} else {
// Subsequent bids must meet minimum bid increment
require(
_sentBid >=
auctions[_auctionId].currentBid.amount.add(
auctions[_auctionId]
.currentBid
.amount
.mul(auctions[_auctionId].settings.minimumBidIncrement)
.div(100)
),
'_validateAndGetBid: minimum bid not met'
);
}
return (_sentBid, _sentPremium);
}
/**
* @dev external function that can be called by any address which submits a bid to an auction
* @param _auctionId uint256 id of the auction
* @param _amount uint64 bid in WEI
*/
function bid(uint256 _auctionId, uint64 _amount)
external
payable
nonReentrant
onlyBidder
auctionExists(_auctionId)
notPaused(_auctionId)
{
require(msg.value > 0, 'bid: value must be > 0');
require(_amount == msg.value, 'bid: amount/value mismatch');
// Auctions with a start time of 0 may accept bids
// Auctions with a start time can't accept bids until now is greater than start time
require(
auctions[_auctionId].startTime == 0 ||
block.timestamp >= auctions[_auctionId].startTime,
'bid: auction not started'
);
// Auctions with a start time of 0 may accept bids
// Auctions with an end time less than now may accept a bid
require(
auctions[_auctionId].startTime == 0 || block.timestamp < _endTime(_auctionId),
'bid: auction expired'
);
require(
auctions[_auctionId].payee != _msgSender(),
'bid: token owner may not bid on own auction'
);
require(
auctions[_auctionId].currentBidder != _msgSender(),
'bid: sender is current highest bidder'
);
// Validate the amount sent and get sent bid and sent premium
(uint64 _sentBid, uint64 _sentPremium) = _validateAndGetBid(_auctionId, _amount);
// bid amount is OK, if not first bid, then transfer funds
// back to previous bidder & update current bidder to the current sender
if (auctions[_auctionId].startTime == 0) {
auctions[_auctionId].startTime = uint64(block.timestamp);
} else if (auctions[_auctionId].currentBidder != address(0)) {
uint256 refundAmount = auctions[_auctionId].currentBid.amount.add(
auctions[_auctionId].currentBid.buyerPremiumAmount
);
address priorBidder = auctions[_auctionId].currentBidder;
_tryTransferThenEscrow(priorBidder, refundAmount);
}
auctions[_auctionId].currentBid.amount = _sentBid;
auctions[_auctionId].currentBid.buyerPremiumAmount = _sentPremium;
auctions[_auctionId].currentBidder = _msgSender();
// extend countdown for bids within the time buffer of the auction
if (
// if auction ends less than globalTimeBuffer from now
_endTime(_auctionId) < block.timestamp.add(iFirstDibsMarketSettings.globalTimeBuffer())
) {
// increment the duration by the difference between the new end time and the old end time
auctions[_auctionId].settings.duration += uint32(
block.timestamp.add(iFirstDibsMarketSettings.globalTimeBuffer()).sub(
_endTime(_auctionId)
)
);
}
emit AuctionBid(
_auctionId,
_msgSender(),
_sentBid,
_sentPremium,
auctions[_auctionId].settings.duration,
auctions[_auctionId].startTime
);
}
/**
* @dev method for ending an auction which has expired. Distrubutes payment to all parties & send
* token to winning bidder (or returns it to the auction creator if there was no winner)
* @param _auctionId uint256 id of the token
*/
function endAuction(uint256 _auctionId)
external
nonReentrant
auctionExists(_auctionId)
notPaused(_auctionId)
{
require(
auctions[_auctionId].currentBidder != address(0),
'endAuction: no bidders; use cancelAuction'
);
require(
auctions[_auctionId].startTime > 0 && // auction has started
block.timestamp >= _endTime(_auctionId), // past the endtime of the auction,
'endAuction: auction is not complete'
);
Auction memory auction = auctions[_auctionId];
// send commission fee & buyer premium to commission address
uint256 commissionFee = auction.currentBid.amount.mul(auction.settings.commissionRate).div(
100
);
// don't attempt to transfer fees if there are none
if (commissionFee.add(auction.currentBid.buyerPremiumAmount) > 0) {
_tryTransferThenEscrow(
iFirstDibsMarketSettings.commissionAddress(),
commissionFee.add(auction.currentBid.buyerPremiumAmount)
);
}
address nftCreator = iERC721TokenCreatorRegistry.tokenCreator(
auction.nftAddress,
auction.tokenId
);
// send payout to token owner & token creator (they might be the same)
uint256 creatorRoyaltyFee = 0;
if (nftCreator == auction.payee) {
// Primary sale
_asyncTransfer(auction.payee, auction.currentBid.amount.sub(commissionFee));
} else {
// Secondary sale
// calculate & send creator royalty to escrow
creatorRoyaltyFee = auction
.currentBid
.amount
.mul(auction.settings.creatorRoyaltyRate)
.div(100);
_asyncTransfer(nftCreator, creatorRoyaltyFee);
// send remaining funds to the seller in escrow
_asyncTransfer(
auction.payee,
auction.currentBid.amount.sub(creatorRoyaltyFee).sub(commissionFee)
);
}
// send the NFT to the winning bidder
IERC721(auction.nftAddress).safeTransferFrom(
address(this), // from
auction.currentBidder, // to
auction.tokenId
);
_delete(_auctionId);
emit AuctionEnded(
_auctionId,
auction.payee,
auction.currentBidder,
auction.currentBid.amount,
auction.currentBid.buyerPremiumAmount,
commissionFee,
creatorRoyaltyFee,
auction.currentBid.amount.sub(creatorRoyaltyFee).sub(commissionFee) // seller payment
);
}
/**
* @dev external function to cancel an auction & return the NFT to the creator of the auction
* @param _auctionId uint256 auction id
*/
function cancelAuction(uint256 _auctionId)
external
nonReentrant
auctionExists(_auctionId)
senderIsAuctionCreatorOrAdmin(_auctionId)
{
if (!hasRole(DEFAULT_ADMIN_ROLE, _msgSender())) {
// only admin may cancel an auction with bids
require(
auctions[_auctionId].currentBidder == address(0),
'cancelAuction: auction with bids may not be canceled'
);
}
// return the token back to the original owner
IERC721(auctions[_auctionId].nftAddress).safeTransferFrom(
address(this),
auctions[_auctionId].payee,
auctions[_auctionId].tokenId
);
uint256 refundAmount = 0;
if (auctions[_auctionId].currentBidder != address(0)) {
// If there's a bidder, return funds to them
refundAmount = auctions[_auctionId].currentBid.amount.add(
auctions[_auctionId].currentBid.buyerPremiumAmount
);
_tryTransferThenEscrow(auctions[_auctionId].currentBidder, refundAmount);
}
_delete(_auctionId);
emit AuctionCanceled(_auctionId, _msgSender(), refundAmount);
}
/**
* @dev external function for pausing / unpausing an auction
* @param _auctionId uint256 auction id
* @param _paused true to pause the auction, false to unpause the auction
*/
function setAuctionPause(uint256 _auctionId, bool _paused)
external
auctionExists(_auctionId)
senderIsAuctionCreatorOrAdmin(_auctionId)
{
if (_paused == auctions[_auctionId].paused) {
// no-op, auction is already in this state
return;
}
if (_paused) {
auctions[_auctionId].pausedTime = uint64(block.timestamp);
} else if (
!_paused && auctions[_auctionId].pausedTime > 0 && auctions[_auctionId].startTime > 0
) {
// if the auction has started, increment duration by difference between current time and paused time
auctions[_auctionId].settings.duration += uint32(
block.timestamp.sub(auctions[_auctionId].pausedTime)
);
auctions[_auctionId].pausedTime = 0;
}
auctions[_auctionId].paused = _paused;
emit AuctionPaused(
_auctionId,
auctions[_auctionId].payee,
_msgSender(),
_paused,
auctions[_auctionId].settings.duration
);
}
/**
* @notice Handle the receipt of an NFT
* @dev Per erc721 spec this interface must be implemented to receive NFTs via
* the safeTransferFrom function. See: https://eips.ethereum.org/EIPS/eip-721 for more.
*/
function onERC721Received(
address,
address,
uint256,
bytes memory
) external override returns (bytes4) {
return IERC721Receiver(address(this)).onERC721Received.selector;
}
/**
* @dev utility function for calculating an auctions end time
* @param _auctionId uint256
*/
function _endTime(uint256 _auctionId) private view returns (uint256) {
return auctions[_auctionId].startTime + auctions[_auctionId].settings.duration;
}
/**
* @dev Delete auctionId for current auction for token+id & delete auction struct
* @param _auctionId uint256
*/
function _delete(uint256 _auctionId) private {
address nftAddress = auctions[_auctionId].nftAddress;
uint256 tokenId = auctions[_auctionId].tokenId;
// delete auctionId for current address+id token combo
// only one auction at a time per token allowed
delete auctionIds[nftAddress][tokenId];
// Delete auction struct
delete auctions[_auctionId];
}
/**
* @dev Sending ether is not guaranteed complete, and the method used here will
* escrow the value if it fails. For example, a contract can block transfer, or might use
* an excessive amount of gas, thereby griefing a bidder.
* We limit the gas used in transfers, and handle failure with escrowing.
* @param _to address to transfer ETH to
* @param _amount uint256 WEI amount to transfer
*/
function _tryTransferThenEscrow(address _to, uint256 _amount) private {
// increase the gas limit a reasonable amount above the default, and try
// to send ether to the recipient.
(bool success, ) = _to.call{ value: _amount, gas: 30000 }('');
if (!success) {
_asyncTransfer(_to, _amount);
}
}
}// 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);
}
}// 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;
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
*/
function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "../utils/EnumerableSet.sol";
import "../utils/Address.sol";
import "../utils/Context.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it.
*/
abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*
* _Available since v3.1._
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view returns (bool) {
return _roles[role].members.contains(account);
}
/**
* @dev Returns the number of accounts that have `role`. Can be used
* together with {getRoleMember} to enumerate all bearers of a role.
*/
function getRoleMemberCount(bytes32 role) public view returns (uint256) {
return _roles[role].members.length();
}
/**
* @dev Returns one of the accounts that have `role`. `index` must be a
* value between 0 and {getRoleMemberCount}, non-inclusive.
*
* Role bearers are not sorted in any particular way, and their ordering may
* change at any point.
*
* WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
* you perform all queries on the same block. See the following
* https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
* for more information.
*/
function getRoleMember(bytes32 role, uint256 index) public view returns (address) {
return _roles[role].members.at(index);
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) public virtual {
require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant");
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) public virtual {
require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke");
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) public virtual {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* [WARNING]
* ====
* This function should only be called from the constructor when setting
* up the initial roles for the system.
*
* Using this function in any other way is effectively circumventing the admin
* system imposed by {AccessControl}.
* ====
*/
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);
_roles[role].adminRole = adminRole;
}
function _grantRole(bytes32 role, address account) private {
if (_roles[role].members.add(account)) {
emit RoleGranted(role, account, _msgSender());
}
}
function _revokeRole(bytes32 role, address account) private {
if (_roles[role].members.remove(account)) {
emit RoleRevoked(role, account, _msgSender());
}
}
}// 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, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b > a) return (false, 0);
return (true, a - b);
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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 (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a / b);
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a % b);
}
/**
* @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) {
require(b <= a, "SafeMath: subtraction overflow");
return a - b;
}
/**
* @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) {
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, reverting 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) {
require(b > 0, "SafeMath: division by zero");
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting 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) {
require(b > 0, "SafeMath: modulo by zero");
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* 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);
return a - b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryDiv}.
*
* 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);
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* 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;
}
}// 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;
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2 <0.8.0;
import "./escrow/Escrow.sol";
/**
* @dev Simple implementation of a
* https://consensys.github.io/smart-contract-best-practices/recommendations/#favor-pull-over-push-for-external-calls[pull-payment]
* strategy, where the paying contract doesn't interact directly with the
* receiver account, which must withdraw its payments itself.
*
* Pull-payments are often considered the best practice when it comes to sending
* Ether, security-wise. It prevents recipients from blocking execution, and
* eliminates reentrancy concerns.
*
* 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].
*
* To use, derive from the `PullPayment` contract, and use {_asyncTransfer}
* instead of Solidity's `transfer` function. Payees can query their due
* payments with {payments}, and retrieve them with {withdrawPayments}.
*/
abstract contract PullPayment {
Escrow private _escrow;
constructor () internal {
_escrow = new Escrow();
}
/**
* @dev Withdraw accumulated payments, forwarding all gas to the recipient.
*
* Note that _any_ account can call this function, not just the `payee`.
* This means that contracts unaware of the `PullPayment` protocol can still
* receive funds this way, by having a separate account call
* {withdrawPayments}.
*
* WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities.
* Make sure you trust the recipient, or are either following the
* checks-effects-interactions pattern or using {ReentrancyGuard}.
*
* @param payee Whose payments will be withdrawn.
*/
function withdrawPayments(address payable payee) public virtual {
_escrow.withdraw(payee);
}
/**
* @dev Returns the payments owed to an address.
* @param dest The creditor's address.
*/
function payments(address dest) public view returns (uint256) {
return _escrow.depositsOf(dest);
}
/**
* @dev Called by the payer to store the sent amount as credit to be pulled.
* Funds sent in this way are stored in an intermediate {Escrow} contract, so
* there is no danger of them being spent before withdrawal.
*
* @param dest The destination address of the funds.
* @param amount The amount to transfer.
*/
function _asyncTransfer(address dest, uint256 amount) internal virtual {
_escrow.deposit{ value: amount }(dest);
}
}//SPDX-License-Identifier: BSD 3-Clause
pragma solidity 0.6.12;
/**
* @title IERC721 Non-Fungible Token Creator basic interface
* @dev Interop with other systems supporting this interface
* @notice Original license and source here: https://github.com/Pixura/pixura-contracts
*/
interface IERC721TokenCreator {
/**
* @dev Gets the creator of the _tokenId on _nftAddress
* @param _nftAddress address of the ERC721 contract
* @param _tokenId uint256 ID of the token
* @return address of the creator
*/
function tokenCreator(address _nftAddress, uint256 _tokenId)
external
view
returns (address payable);
}//SPDX-License-Identifier: Unlicensed
pragma solidity 0.6.12;
interface IFirstDibsMarketSettings {
function globalBuyerPremium() external view returns (uint32);
function globalMarketCommission() external view returns (uint32);
function globalCreatorRoyaltyRate() external view returns (uint32);
function globalMinimumBidIncrement() external view returns (uint32);
function globalTimeBuffer() external view returns (uint32);
function globalAuctionDuration() external view returns (uint32);
function commissionAddress() external view returns (address);
}// 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);
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
* and `uint256` (`UintSet`) are supported.
*/
library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping (bytes32 => uint256) _indexes;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
return true;
} else {
return false;
}
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) { // Equivalent to contains(set, value)
// To delete an element from the _values array in O(1), we swap the element to delete with the last one in
// the array, and then remove the last element (sometimes called as 'swap and pop').
// This modifies the order of the array, as noted in {at}.
uint256 toDeleteIndex = valueIndex - 1;
uint256 lastIndex = set._values.length - 1;
// When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
// so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.
bytes32 lastvalue = set._values[lastIndex];
// Move the last value to the index where the value to delete is
set._values[toDeleteIndex] = lastvalue;
// Update the index for the moved value
set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based
// Delete the slot where the moved value was stored
set._values.pop();
// Delete the index for the deleted slot
delete set._indexes[value];
return true;
} else {
return false;
}
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Set storage set, uint256 index) private view returns (bytes32) {
require(set._values.length > index, "EnumerableSet: index out of bounds");
return set._values[index];
}
// Bytes32Set
struct Bytes32Set {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint160(uint256(_at(set._inner, index))));
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
}// 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);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.delegatecall(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);
}
}
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "../../math/SafeMath.sol";
import "../../access/Ownable.sol";
import "../../utils/Address.sol";
/**
* @title Escrow
* @dev Base escrow contract, holds funds designated for a payee until they
* withdraw them.
*
* Intended usage: This contract (and derived escrow contracts) should be a
* standalone contract, that only interacts with the contract that instantiated
* it. That way, it is guaranteed that all Ether will be handled according to
* the `Escrow` rules, and there is no need to check for payable functions or
* transfers in the inheritance tree. The contract that uses the escrow as its
* payment method should be its owner, and provide public methods redirecting
* to the escrow's deposit and withdraw.
*/
contract Escrow is Ownable {
using SafeMath for uint256;
using Address for address payable;
event Deposited(address indexed payee, uint256 weiAmount);
event Withdrawn(address indexed payee, uint256 weiAmount);
mapping(address => uint256) private _deposits;
function depositsOf(address payee) public view returns (uint256) {
return _deposits[payee];
}
/**
* @dev Stores the sent amount as credit to be withdrawn.
* @param payee The destination address of the funds.
*/
function deposit(address payee) public payable virtual onlyOwner {
uint256 amount = msg.value;
_deposits[payee] = _deposits[payee].add(amount);
emit Deposited(payee, amount);
}
/**
* @dev Withdraw accumulated balance for a payee, forwarding all gas to the
* recipient.
*
* WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities.
* Make sure you trust the recipient, or are either following the
* checks-effects-interactions pattern or using {ReentrancyGuard}.
*
* @param payee The address whose funds will be withdrawn and transferred to.
*/
function withdraw(address payable payee) public virtual onlyOwner {
uint256 payment = _deposits[payee];
_deposits[payee] = 0;
payee.sendValue(payment);
emit Withdrawn(payee, payment);
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}{
"optimizer": {
"enabled": true,
"runs": 1348
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_marketSettings","type":"address"},{"internalType":"address","name":"_creatorRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":true,"internalType":"address","name":"bidder","type":"address"},{"indexed":false,"internalType":"uint256","name":"bidAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bidBuyerPremium","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"duration","type":"uint64"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"}],"name":"AuctionBid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":false,"internalType":"address","name":"canceledBy","type":"address"},{"indexed":false,"internalType":"uint256","name":"refundedAmount","type":"uint256"}],"name":"AuctionCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":true,"internalType":"address","name":"nftAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"tokenSeller","type":"address"},{"indexed":false,"internalType":"uint256","name":"reservePrice","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isPaused","type":"bool"},{"indexed":false,"internalType":"address","name":"auctionCreator","type":"address"},{"indexed":false,"internalType":"uint64","name":"duration","type":"uint64"}],"name":"AuctionCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":true,"internalType":"address","name":"tokenSeller","type":"address"},{"indexed":true,"internalType":"address","name":"winningBidder","type":"address"},{"indexed":false,"internalType":"uint256","name":"winningBid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"winningBidBuyerPremium","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"adminCommissionFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"royaltyFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sellerPayment","type":"uint256"}],"name":"AuctionEnded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":true,"internalType":"address","name":"tokenSeller","type":"address"},{"indexed":false,"internalType":"address","name":"toggledBy","type":"address"},{"indexed":false,"internalType":"bool","name":"isPaused","type":"bool"},{"indexed":false,"internalType":"uint64","name":"duration","type":"uint64"}],"name":"AuctionPaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"BIDDER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BIDDER_ROLE_ADMIN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nftAddress","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint64","name":"_reservePrice","type":"uint64"},{"internalType":"bool","name":"_pausedArg","type":"bool"},{"internalType":"uint64","name":"_startTimeArg","type":"uint64"},{"internalType":"uint32","name":"_auctionDurationArg","type":"uint32"},{"internalType":"uint8","name":"_minimumBidIncrementArg","type":"uint8"},{"internalType":"uint8","name":"_commissionRateArg","type":"uint8"},{"internalType":"uint8","name":"_creatorRoyaltyRateArg","type":"uint8"}],"name":"adminCreateAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"auctionIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"auctions","outputs":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"pausedTime","type":"uint256"},{"internalType":"uint256","name":"reservePrice","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"paused","type":"bool"},{"internalType":"address","name":"nftAddress","type":"address"},{"internalType":"address payable","name":"payee","type":"address"},{"internalType":"address payable","name":"currentBidder","type":"address"},{"internalType":"address","name":"auctionCreator","type":"address"},{"components":[{"internalType":"uint32","name":"buyerPremium","type":"uint32"},{"internalType":"uint32","name":"duration","type":"uint32"},{"internalType":"uint32","name":"minimumBidIncrement","type":"uint32"},{"internalType":"uint32","name":"commissionRate","type":"uint32"},{"internalType":"uint128","name":"creatorRoyaltyRate","type":"uint128"}],"internalType":"struct FirstDibsAuction.AuctionSettings","name":"settings","type":"tuple"},{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"buyerPremiumAmount","type":"uint256"}],"internalType":"struct FirstDibsAuction.Bid","name":"currentBid","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionId","type":"uint256"},{"internalType":"uint64","name":"_amount","type":"uint64"}],"name":"bid","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"bidderRoleRequired","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionId","type":"uint256"}],"name":"cancelAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nftAddress","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint64","name":"_reservePrice","type":"uint64"},{"internalType":"bool","name":"_pausedArg","type":"bool"},{"internalType":"uint64","name":"_startTimeArg","type":"uint64"},{"internalType":"uint32","name":"_auctionDurationArg","type":"uint32"},{"internalType":"uint8","name":"_minimumBidIncrementArg","type":"uint8"}],"name":"createAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionId","type":"uint256"}],"name":"endAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"_amount","type":"uint64"},{"internalType":"uint64","name":"_buyerPremiumRate","type":"uint64"}],"name":"getSentBidAndPremium","outputs":[{"internalType":"uint64","name":"","type":"uint64"},{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"globalPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"iERC721TokenCreatorRegistry","outputs":[{"internalType":"contract IERC721TokenCreator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"iFirstDibsMarketSettings","outputs":[{"internalType":"contract IFirstDibsMarketSettings","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"dest","type":"address"}],"name":"payments","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionId","type":"uint256"},{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setAuctionPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_bidderRole","type":"bool"}],"name":"setBidderRoleRequired","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setGlobalPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_iERC721TokenCreatorRegistry","type":"address"}],"name":"setIERC721TokenCreatorRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_iFirstDibsMarketSettings","type":"address"}],"name":"setIFirstDibsMarketSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"payee","type":"address"}],"name":"withdrawPayments","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60806040523480156200001157600080fd5b5060405162004a4838038062004a48833981016040819052620000349162000311565b604051620000429062000303565b604051809103906000f0801580156200005f573d6000803e3d6000fd5b50600080546001600160a01b0319166001600160a01b0392831617905560016002558216620000ab5760405162461bcd60e51b8152600401620000a2906200039b565b60405180910390fd5b6001600160a01b038116620000d45760405162461bcd60e51b8152600401620000a2906200034f565b620000ea6000620000e46200019b565b6200019f565b6200010860008051602062004a28833981519152620000e46200019b565b6200012660008051602062004a08833981519152620000e46200019b565b6200015060008051602062004a2883398151915260008051602062004a08833981519152620001af565b60038054600480546001600160a01b0319166001600160a01b0395861617905562010000600160b01b0319166201000092909316919091029190911760ff1916600117905562000400565b3390565b620001ab828262000201565b5050565b600082815260016020526040808220600201549051839285917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a460009182526001602052604090912060020155565b600082815260016020908152604090912062000228918390620025816200027c821b17901c565b15620001ab57620002386200019b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000293836001600160a01b0384166200029c565b90505b92915050565b6000620002aa8383620002eb565b620002e25750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000296565b50600062000296565b60009081526001919091016020526040902054151590565b6107c9806200421f83390190565b6000806040838503121562000324578182fd5b82516200033181620003e7565b60208401519092506200034481620003e7565b809150509250929050565b6020808252603790820152600080516020620049e883398151915260408201527f656420666f72205f63726561746f725265676973747279000000000000000000606082015260800190565b6020808252603690820152600080516020620049e883398151915260408201527f656420666f72205f6d61726b657453657474696e677300000000000000000000606082015260800190565b6001600160a01b0381168114620003fd57600080fd5b50565b613e0f80620004106000396000f3fe6080604052600436106101cd5760003560e01c806372fb2ec3116100f7578063a217fddf11610095578063ca15c87311610064578063ca15c8731461051c578063d547741f1461053c578063e2982c211461055c578063e597a2091461057c576101cd565b8063a217fddf146104a7578063a6213e88146104bc578063b9a2de3a146104dc578063c40119f8146104fc576101cd565b80639010d07c116100d15780639010d07c1461043257806391d148541461045257806396b5a7551461047257806396e978ff14610492576101cd565b806372fb2ec3146103dd57806376cad834146103fd5780637ccfdbfe1461041d576101cd565b806336568abe1161016f5780634199e02b1161013e5780634199e02b14610343578063571a26a0146103635780635d56b1141461039a57806361a552dc146103c8576101cd565b806336568abe146102c1578063398109a3146102e15780633a80e893146103015780633dd0a7e414610323576101cd565b806325e2ba9e116101ab57806325e2ba9e1461024a5780632badf25c1461025f5780632f2ff15d1461028157806331b3eb94146102a1576101cd565b80630ce526d1146101d2578063150b7a02146101fd578063248a9ca31461022a575b600080fd5b3480156101de57600080fd5b506101e761059c565b6040516101f4919061314f565b60405180910390f35b34801561020957600080fd5b5061021d610218366004612d1a565b6105c0565b6040516101f49190613158565b34801561023657600080fd5b506101e7610245366004612f5f565b6105e9565b61025d610258366004613003565b6105fe565b005b34801561026b57600080fd5b50610274610b4b565b6040516101f49190613144565b34801561028d57600080fd5b5061025d61029c366004612f77565b610b54565b3480156102ad57600080fd5b5061025d6102bc366004612ce2565b610b9c565b3480156102cd57600080fd5b5061025d6102dc366004612f77565b610c1a565b3480156102ed57600080fd5b5061025d6102fc366004612f43565b610c5c565b34801561030d57600080fd5b50610316610c98565b6040516101f4919061308a565b34801561032f57600080fd5b5061025d61033e366004612ce2565b610cad565b34801561034f57600080fd5b506101e761035e366004612de2565b610d3c565b34801561036f57600080fd5b5061038361037e366004612f5f565b610d59565b6040516101f49b9a99989796959493929190613c4c565b3480156103a657600080fd5b506103ba6103b536600461304b565b610e4e565b6040516101f4929190613d31565b3480156103d457600080fd5b50610274610eb3565b3480156103e957600080fd5b5061025d6103f8366004612e94565b610ec1565b34801561040957600080fd5b5061025d610418366004612f43565b611930565b34801561042957600080fd5b50610316611973565b34801561043e57600080fd5b5061031661044d366004612fa6565b611982565b34801561045e57600080fd5b5061027461046d366004612f77565b6119a3565b34801561047e57600080fd5b5061025d61048d366004612f5f565b6119bb565b34801561049e57600080fd5b506101e7611c09565b3480156104b357600080fd5b506101e7611c2d565b3480156104c857600080fd5b5061025d6104d7366004612e0d565b611c32565b3480156104e857600080fd5b5061025d6104f7366004612f5f565b611c4d565b34801561050857600080fd5b5061025d610517366004612ce2565b6121fb565b34801561052857600080fd5b506101e7610537366004612f5f565b612279565b34801561054857600080fd5b5061025d610557366004612f77565b612290565b34801561056857600080fd5b506101e7610577366004612ce2565b6122ca565b34801561058857600080fd5b5061025d610597366004612fdf565b612364565b7f80f9b792196f21120f021903634877a78a3dd5e8ef643701b99dae7bb938062d81565b7f150b7a0200000000000000000000000000000000000000000000000000000000949350505050565b60009081526001602052604090206002015490565b6002805414156106295760405162461bcd60e51b815260040161062090613b83565b60405180910390fd5b6002805560035460ff16151560011415610685576106697f80f9b792196f21120f021903634877a78a3dd5e8ef643701b99dae7bb938062d61046d612596565b6106855760405162461bcd60e51b815260040161062090613660565b6000828152600560208190526040909120015482906001600160a01b03166106bf5760405162461bcd60e51b8152600401610620906137bf565b6003548390610100900460ff16156106e95760405162461bcd60e51b81526004016106209061397b565b60008181526005602052604090206004015460ff161561071b5760405162461bcd60e51b815260040161062090613944565b6000341161073b5760405162461bcd60e51b8152600401610620906134db565b348367ffffffffffffffff16146107645760405162461bcd60e51b8152600401610620906138b0565b600084815260056020526040902054158061078d57506000848152600560205260409020544210155b6107a95760405162461bcd60e51b815260040161062090613b4c565b60008481526005602052604090205415806107cb57506107c88461259a565b42105b6107e75760405162461bcd60e51b81526004016106209061372b565b6107ef612596565b600085815260056020819052604090912001546001600160a01b039081169116141561082d5760405162461bcd60e51b81526004016106209061347e565b610835612596565b6000858152600560205260409020600601546001600160a01b03908116911614156108725760405162461bcd60e51b815260040161062090613aef565b60008061087f86866125c2565b60008881526005602052604090205491935091506108b757600086815260056020526040902067ffffffffffffffff42169055610924565b6000868152600560205260409020600601546001600160a01b031615610924576000868152600560205260408120600a8101546009909101546108f9916126df565b6000888152600560205260409020600601549091506001600160a01b03166109218183612704565b50505b600086815260056020526040902067ffffffffffffffff80841660098301558216600a90910155610953612596565b600087815260056020908152604091829020600601805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0394851617905560048054835163e536f52360e01b81529351610a1895919091169363e536f5239381840193909291829003018186803b1580156109cb57600080fd5b505afa1580156109df573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a03919061302f565b63ffffffff16426126df90919063ffffffff16565b610a218761259a565b1015610ac857610a8a610a338761259a565b610a84600460009054906101000a90046001600160a01b03166001600160a01b031663e536f5236040518163ffffffff1660e01b815260040160206040518083038186803b1580156109cb57600080fd5b9061277c565b6000878152600560205260409020600801805463ffffffff64010000000080830482169094011690920267ffffffff00000000199092169190911790555b610ad0612596565b600087815260056020526040908190206008810154905491516001600160a01b03939093169289927fd66b5764c67c36e32461c93c76dc6bd7a7a8d9ec4ed13647a30f88b9b5f3aef192610b369288928892640100000000900463ffffffff1691613d4c565b60405180910390a35050600160025550505050565b60035460ff1681565b600082815260016020526040902060020154610b729061046d612596565b610b8e5760405162461bcd60e51b8152600401610620906131e2565b610b9882826127a4565b5050565b6000546040517f51cff8d90000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906351cff8d990610be590849060040161308a565b600060405180830381600087803b158015610bff57600080fd5b505af1158015610c13573d6000803e3d6000fd5b5050505050565b610c22612596565b6001600160a01b0316816001600160a01b031614610c525760405162461bcd60e51b815260040161062090613bef565b610b98828261280d565b610c69600061046d612596565b610c855760405162461bcd60e51b815260040161062090613697565b6003805460ff1916911515919091179055565b6003546201000090046001600160a01b031681565b610cba600061046d612596565b610cd65760405162461bcd60e51b815260040161062090613697565b6001600160a01b038116610cfc5760405162461bcd60e51b815260040161062090613a35565b600380546001600160a01b0390921662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff909216919091179055565b600660209081526000928352604080842090915290825290205481565b6005602081815260009283526040928390208054600182015460028301546003840154600485015496850154600686015460078701548a5160a081018c52600889015463ffffffff808216835264010000000082048116838d01526801000000000000000082048116838f01526c01000000000000000000000000820416606083015270010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1660808201528b51808d01909c5260098901548c52600a90980154988b0198909852949893979296919560ff8416956101009094046001600160a01b03908116959281169481169316918b565b60008080610e6767ffffffffffffffff851660646126df565b90506000610e8a82610e8467ffffffffffffffff89166064612876565b906128b0565b90506000610ea567ffffffffffffffff88811690841661277c565b919791965090945050505050565b600354610100900460ff1681565b600280541415610ee35760405162461bcd60e51b815260040161062090613b83565b60028055600354610100900460ff1615610f0f5760405162461bcd60e51b8152600401610620906136ce565b6040517f6352211e0000000000000000000000000000000000000000000000000000000081526001600160a01b038a1690636352211e90610f54908b9060040161314f565b60206040518083038186803b158015610f6c57600080fd5b505afa158015610f80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa49190612cfe565b6001600160a01b0316610fb5612596565b6001600160a01b03161480610fd25750610fd2600061046d612596565b610fee5760405162461bcd60e51b815260040161062090613421565b6001600160a01b03891660009081526006602090815260408083208b84529091529020541561102f5760405162461bcd60e51b8152600401610620906137f6565b60008767ffffffffffffffff16116110595760405162461bcd60e51b815260040161062090613a92565b611061612be6565b60405180610160016040528060008152602001600081526020018967ffffffffffffffff1681526020018a815260200188151581526020018b6001600160a01b031681526020018b6001600160a01b0316636352211e8c6040518263ffffffff1660e01b81526004016110d4919061314f565b60206040518083038186803b1580156110ec57600080fd5b505afa158015611100573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111249190612cfe565b6001600160a01b0316815260006020820152604001611141612596565b6001600160a01b031681526020016040518060a00160405280600460009054906101000a90046001600160a01b03166001600160a01b031663e092c7fd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111a857600080fd5b505afa1580156111bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e0919061302f565b63ffffffff168152602001600460009054906101000a90046001600160a01b03166001600160a01b031663f309051c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561123957600080fd5b505afa15801561124d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611271919061302f565b63ffffffff168152602001600460009054906101000a90046001600160a01b03166001600160a01b03166346d3eb356040518163ffffffff1660e01b815260040160206040518083038186803b1580156112ca57600080fd5b505afa1580156112de573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611302919061302f565b63ffffffff168152602001600460009054906101000a90046001600160a01b03166001600160a01b0316637cdd2a566040518163ffffffff1660e01b815260040160206040518083038186803b15801561135b57600080fd5b505afa15801561136f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611393919061302f565b63ffffffff168152602001600460009054906101000a90046001600160a01b03166001600160a01b031663cf9a95f66040518163ffffffff1660e01b815260040160206040518083038186803b1580156113ec57600080fd5b505afa158015611400573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611424919061302f565b63ffffffff16905281526040805180820190915260008082526020828101829052909201529091506114589061046d612596565b156115c25763ffffffff85161561152257600480546040805163e536f52360e01b815290516001600160a01b039092169263e536f523928282019260209290829003018186803b1580156114ab57600080fd5b505afa1580156114bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e3919061302f565b63ffffffff168563ffffffff16101561150e5760405162461bcd60e51b81526004016106209061323f565b61012081015163ffffffff86166020909101525b67ffffffffffffffff861615611570578567ffffffffffffffff16421061155b5760405162461bcd60e51b815260040161062090613603565b67ffffffffffffffff86168152600060808201525b60ff84161561158a5761012081015160ff85166040909101525b60648360ff16116115a65761012081015160ff84166060909101525b60648260ff16116115c25761012081015160ff83166080909101525b6064611601826101200151608001516fffffffffffffffffffffffffffffffff168361012001516060015163ffffffff166126df90919063ffffffff16565b111561161f5760405162461bcd60e51b8152600401610620906139b2565b61162960076128e2565b806005600061163860076128eb565b8152602080820192909252604090810160002083518155838301516001820155838201516002820155606080850151600383015560808086015160048401805460a089015160ff19909116921515929092177fffffffffffffffffffffff0000000000000000000000000000000000000000ff166101006001600160a01b0393841681029190911790915560c088015160058601805473ffffffffffffffffffffffffffffffffffffffff1990811692851692909217905560e089015160068701805483169185169190911790559088015160078087018054909316919093161790556101208701518051600886018054838a01519884015196840151939095015163ffffffff1990951663ffffffff9283161767ffffffff00000000191664010000000098831698909802979097177fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000095821695909502949094177fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c010000000000000000000000009490911693909302929092176fffffffffffffffffffffffffffffffff908116700100000000000000000000000000000000919092160217909255610140909301518051600985015590910151600a9092019190915561182e906128eb565b6001600160a01b038b1660008181526006602090815260408083208e8452909152908190209290925560c08301519151632142170760e11b815290916342842e0e91611881919030908e9060040161309e565b600060405180830381600087803b15801561189b57600080fd5b505af11580156118af573d6000803e3d6000fd5b50505050888a6001600160a01b03166118c860076128eb565b7f3379874afd33ac61edf4b8af3a03c30f782441d9481f3a36833d3be8022e50018460c001518c86608001516118fc612596565b88610120015160200151604051611917959493929190613102565b60405180910390a4505060016002555050505050505050565b61193d600061046d612596565b6119595760405162461bcd60e51b815260040161062090613697565b600380549115156101000261ff0019909216919091179055565b6004546001600160a01b031681565b600082815260016020526040812061199a90836128ef565b90505b92915050565b600082815260016020526040812061199a90836128fb565b6002805414156119dd5760405162461bcd60e51b815260040161062090613b83565b600280556000818152600560208190526040909120015481906001600160a01b0316611a1b5760405162461bcd60e51b8152600401610620906137bf565b60008281526005602052604090206007015482906001600160a01b0316611a40612596565b6001600160a01b03161480611a5d5750611a5d600061046d612596565b611a795760405162461bcd60e51b815260040161062090613bba565b611a86600061046d612596565b611ac2576000838152600560205260409020600601546001600160a01b031615611ac25760405162461bcd60e51b815260040161062090613330565b600083815260056020819052604091829020600480820154928201546003909201549351632142170760e11b81526001600160a01b036101009094048416946342842e0e94611b169430949116920161309e565b600060405180830381600087803b158015611b3057600080fd5b505af1158015611b44573d6000803e3d6000fd5b5050506000848152600560205260408120600601549091506001600160a01b031615611bb4576000848152600560205260409020600a810154600990910154611b8c916126df565b600085815260056020526040902060060154909150611bb4906001600160a01b031682612704565b611bbd84612910565b837fc326dcfb5d4e924f5e3e717c0f667b0eecb5abb73fc0b33236b6107c1fd48a57611be7612596565b83604051611bf69291906130e9565b60405180910390a2505060016002555050565b7f98f1c4e464b303704202467b140ea646a0f96c35a8a703da15a07bc5c3f952ed81565b600081565b611c4487878787878787606580610ec1565b50505050505050565b600280541415611c6f5760405162461bcd60e51b815260040161062090613b83565b600280556000818152600560208190526040909120015481906001600160a01b0316611cad5760405162461bcd60e51b8152600401610620906137bf565b6003548290610100900460ff1615611cd75760405162461bcd60e51b81526004016106209061397b565b60008181526005602052604090206004015460ff1615611d095760405162461bcd60e51b815260040161062090613944565b6000838152600560205260409020600601546001600160a01b0316611d405760405162461bcd60e51b8152600401610620906132d3565b60008381526005602052604090205415801590611d655750611d618361259a565b4210155b611d815760405162461bcd60e51b8152600401610620906138e7565b611d89612be6565b506000838152600560208181526040808420815161016081018352815481526001820154818501526002820154818401526003820154606080830191909152600483015460ff81161515608080850191909152610100918290046001600160a01b0390811660a08087019190915298860154811660c08601526006860154811660e08601526007860154169184019190915284519687018552600884015463ffffffff808216895264010000000082048116898901526801000000000000000082048116898801526c0100000000000000000000000082048116898501527001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff16918801919091526101208301968752845180860190955260098401548552600a909301549484019490945261014081018390529351909201519051929392611ee292606492610e8492919081169061287616565b90506000611f0283610140015160200151836126df90919063ffffffff16565b1115611fab57611fab600460009054906101000a90046001600160a01b03166001600160a01b031663931742d36040518163ffffffff1660e01b815260040160206040518083038186803b158015611f5957600080fd5b505afa158015611f6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f919190612cfe565b61014084015160200151611fa69084906126df565b612704565b60035460a083015160608401516040517fb85ed7e40000000000000000000000000000000000000000000000000000000081526000936201000090046001600160a01b03169263b85ed7e492612003926004016130e9565b60206040518083038186803b15801561201b57600080fd5b505afa15801561202f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120539190612cfe565b905060008360c001516001600160a01b0316826001600160a01b0316141561209a5760c0840151610140850151516120959190612090908661277c565b6129e1565b612101565b61012084015160800151610140850151516120cd91606491610e84916fffffffffffffffffffffffffffffffff16612876565b90506120d982826129e1565b6121018460c0015161209085610a84858961014001516000015161277c90919063ffffffff16565b60a084015160e08501516060860151604051632142170760e11b81526001600160a01b03909316926342842e0e9261213d92309260040161309e565b600060405180830381600087803b15801561215757600080fd5b505af115801561216b573d6000803e3d6000fd5b5050505061217887612910565b60e084015160c085015161014086015180516020909101516001600160a01b0393841693909216918a917f5266f731bbd4fe6f9a1fb89425bfacb9adca3695584d4398361c2a5a32f97c6f9188876121d482610a84868461277c565b6040516121e5959493929190613d0e565b60405180910390a4505060016002555050505050565b612208600061046d612596565b6122245760405162461bcd60e51b815260040161062090613697565b6001600160a01b03811661224a5760405162461bcd60e51b8152600401610620906135a6565b6004805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600081815260016020526040812061199d90612a59565b6000828152600160205260409020600201546122ae9061046d612596565b610c525760405162461bcd60e51b815260040161062090613549565b600080546040517fe3a9db1a0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063e3a9db1a9061231490859060040161308a565b60206040518083038186803b15801561232c57600080fd5b505afa158015612340573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061199d9190612fc7565b6000828152600560208190526040909120015482906001600160a01b031661239e5760405162461bcd60e51b8152600401610620906137bf565b60008381526005602052604090206007015483906001600160a01b03166123c3612596565b6001600160a01b031614806123e057506123e0600061046d612596565b6123fc5760405162461bcd60e51b815260040161062090613bba565b60008481526005602052604090206004015460ff16151583151514156124215761257b565b821561244b57600084815260056020526040902067ffffffffffffffff42166001909101556124ea565b82158015612469575060008481526005602052604090206001015415155b8015612482575060008481526005602052604090205415155b156124ea576000848152600560205260409020600101546124a490429061277c565b600085815260056020526040812060088101805463ffffffff64010000000080830482169096011690940267ffffffff0000000019909416939093179092556001909101555b600084815260056020819052604090912060048101805460ff191686151517905501546001600160a01b0316847fae3de7f7c5462d334767296a417566554b9cc3078ea4d932182f55a4556cb400612540612596565b600088815260056020526040908190206008015490516125729291899164010000000090910463ffffffff16906130c2565b60405180910390a35b50505050565b600061199a836001600160a01b038416612a64565b3390565b60009081526005602052604090206008810154905464010000000090910463ffffffff160190565b6000828152600560205260408120600801548190819081906125eb90869063ffffffff16610e4e565b60008881526005602052604090206006015491935091506001600160a01b031661264f5760008681526005602052604090206002015467ffffffffffffffff8316101561264a5760405162461bcd60e51b81526004016106209061338d565b6126d4565b600086815260056020526040902060088101546009909101546126ab9161269391606491610e84919063ffffffff6801000000000000000090910481169061287616565b600088815260056020526040902060090154906126df565b8267ffffffffffffffff1610156126d45760405162461bcd60e51b815260040161062090613853565b909590945092505050565b60008282018381101561199a5760405162461bcd60e51b81526004016106209061329c565b6000826001600160a01b0316826175309060405161272190613087565b600060405180830381858888f193505050503d806000811461275f576040519150601f19603f3d011682016040523d82523d6000602084013e612764565b606091505b50509050806127775761277783836129e1565b505050565b60008282111561279e5760405162461bcd60e51b8152600401610620906133ea565b50900390565b60008281526001602052604090206127bc9082612581565b15610b98576127c9612596565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526001602052604090206128259082612aae565b15610b9857612832612596565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6000826128855750600061199d565b8282028284828161289257fe5b041461199a5760405162461bcd60e51b815260040161062090613762565b60008082116128d15760405162461bcd60e51b815260040161062090613512565b8183816128da57fe5b049392505050565b80546001019055565b5490565b600061199a8383612ac3565b600061199a836001600160a01b038416612b08565b60008181526005602081815260408084206004810180546003830180546101009092046001600160a01b0316885260068087528589209289529186529387208790559686529284905284815560018101859055600281018590559084905581547fffffffffffffffffffffff00000000000000000000000000000000000000000016909155908101805473ffffffffffffffffffffffffffffffffffffffff199081169091559281018054841690556007810180549093169092556008820181905560098201819055600a90910155565b6000546040517ff340fa010000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063f340fa01908390612a2c90869060040161308a565b6000604051808303818588803b158015612a4557600080fd5b505af1158015611c44573d6000803e3d6000fd5b600061199d826128eb565b6000612a708383612b08565b612aa65750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561199d565b50600061199d565b600061199a836001600160a01b038416612b20565b81546000908210612ae65760405162461bcd60e51b815260040161062090613185565b826000018281548110612af557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b60008181526001830160205260408120548015612bdc5783546000198083019190810190600090879083908110612b5357fe5b9060005260206000200154905080876000018481548110612b7057fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080612ba057fe5b6001900381819060005260206000200160009055905586600101600087815260200190815260200160002060009055600194505050505061199d565b600091505061199d565b6040518061016001604052806000815260200160008152602001600081526020016000815260200160001515815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b03168152602001612c5f612c71565b8152602001612c6c612c9f565b905290565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b604051806040016040528060008152602001600081525090565b803567ffffffffffffffff8116811461199d57600080fd5b803560ff8116811461199d57600080fd5b600060208284031215612cf3578081fd5b813561199a81613d7c565b600060208284031215612d0f578081fd5b815161199a81613d7c565b60008060008060808587031215612d2f578283fd5b8435612d3a81613d7c565b9350602085810135612d4b81613d7c565b935060408601359250606086013567ffffffffffffffff80821115612d6e578384fd5b818801915088601f830112612d81578384fd5b813581811115612d8f578485fd5b604051601f8201601f1916810185018381118282101715612dae578687fd5b60405281815283820185018b1015612dc4578586fd5b81858501868301379081019093019390935250939692955090935050565b60008060408385031215612df4578182fd5b8235612dff81613d7c565b946020939093013593505050565b600080600080600080600060e0888a031215612e27578283fd5b8735612e3281613d7c565b965060208801359550612e488960408a01612cb9565b94506060880135612e5881613d94565b9350612e678960808a01612cb9565b925060a0880135612e7781613da2565b9150612e868960c08a01612cd1565b905092959891949750929550565b60008060008060008060008060006101208a8c031215612eb2578182fd5b8935612ebd81613d7c565b985060208a0135975060408a0135612ed481613db4565b965060608a0135612ee481613d94565b955060808a0135612ef481613db4565b945060a08a0135612f0481613da2565b935060c08a0135612f1481613dca565b925060e08a0135612f2481613dca565b9150612f348b6101008c01612cd1565b90509295985092959850929598565b600060208284031215612f54578081fd5b813561199a81613d94565b600060208284031215612f70578081fd5b5035919050565b60008060408385031215612f89578182fd5b823591506020830135612f9b81613d7c565b809150509250929050565b60008060408385031215612fb8578182fd5b50508035926020909101359150565b600060208284031215612fd8578081fd5b5051919050565b60008060408385031215612ff1578182fd5b823591506020830135612f9b81613d94565b60008060408385031215613015578182fd5b823591506130268460208501612cb9565b90509250929050565b600060208284031215613040578081fd5b815161199a81613da2565b6000806040838503121561305d578182fd5b823561306881613db4565b91506020830135612f9b81613db4565b80518252602090810151910152565b90565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03939093168352901515602083015263ffffffff16604082015260600190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b03958616815267ffffffffffffffff9490941660208501529115156040840152909216606082015263ffffffff909116608082015260a00190565b901515815260200190565b90815260200190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b60208082526022908201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e60408201527f6473000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60408201527f2061646d696e20746f206772616e740000000000000000000000000000000000606082015260800190565b60208082526033908201527f61646d696e43726561746541756374696f6e3a206475726174696f6e206d757360408201527f74206265203e3d2074696d652062756666657200000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526029908201527f656e6441756374696f6e3a206e6f20626964646572733b207573652063616e6360408201527f656c41756374696f6e0000000000000000000000000000000000000000000000606082015260800190565b60208082526034908201527f63616e63656c41756374696f6e3a2061756374696f6e2077697468206269647360408201527f206d6179206e6f742062652063616e63656c6564000000000000000000000000606082015260800190565b60208082526023908201527f5f76616c6964617465416e644765744269643a2072657365727665206e6f742060408201527f6d65740000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526030908201527f61646d696e43726561746541756374696f6e3a206d75737420626520746f6b6560408201527f6e206f776e6572206f722061646d696e00000000000000000000000000000000606082015260800190565b6020808252602b908201527f6269643a20746f6b656e206f776e6572206d6179206e6f7420626964206f6e2060408201527f6f776e2061756374696f6e000000000000000000000000000000000000000000606082015260800190565b60208082526016908201527f6269643a2076616c7565206d757374206265203e203000000000000000000000604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b60208082526030908201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60408201527f2061646d696e20746f207265766f6b6500000000000000000000000000000000606082015260800190565b60208082526032908201527f736574494669727374446962734d61726b657453657474696e67733a2030206160408201527f646472657373206e6f7420616c6c6f7765640000000000000000000000000000606082015260800190565b60208082526034908201527f61646d696e43726561746541756374696f6e3a2073746172742074696d65206d60408201527f75737420626520696e2074686520667574757265000000000000000000000000606082015260800190565b60208082526014908201527f62696464657220726f6c65207265717569726564000000000000000000000000604082015260600190565b60208082526016908201527f63616c6c6572206973206e6f7420616e2061646d696e00000000000000000000604082015260600190565b60208082526030908201527f61646d696e43726561746541756374696f6e3a2061756374696f6e732061726560408201527f20676c6f62616c6c792070617573656400000000000000000000000000000000606082015260800190565b60208082526014908201527f6269643a2061756374696f6e2065787069726564000000000000000000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526015908201527f41756374696f6e20646f65736e27742065786973740000000000000000000000604082015260600190565b6020808252602a908201527f61646d696e43726561746541756374696f6e3a2061756374696f6e20616c726560408201527f6164792065786973747300000000000000000000000000000000000000000000606082015260800190565b60208082526027908201527f5f76616c6964617465416e644765744269643a206d696e696d756d206269642060408201527f6e6f74206d657400000000000000000000000000000000000000000000000000606082015260800190565b6020808252601a908201527f6269643a20616d6f756e742f76616c7565206d69736d61746368000000000000604082015260600190565b60208082526023908201527f656e6441756374696f6e3a2061756374696f6e206973206e6f7420636f6d706c60408201527f6574650000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526012908201527f41756374696f6e206973207061757365642e0000000000000000000000000000604082015260600190565b6020808252601c908201527f41756374696f6e732061726520676c6f62616c6c792070617573656400000000604082015260600190565b60208082526041908201527f61646d696e43726561746541756374696f6e3a20636f6d6d697373696f6e207260408201527f617465202b20726f79616c74792072617465206d757374206265203c3d20313060608201527f3000000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526035908201527f73657449455243373231546f6b656e43726561746f7252656769737472793a2060408201527f302061646472657373206e6f7420616c6c6f7765640000000000000000000000606082015260800190565b60208082526027908201527f61646d696e43726561746541756374696f6e3a2052657365727665206d75737460408201527f206265203e203000000000000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f6269643a2073656e6465722069732063757272656e742068696768657374206260408201527f6964646572000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526018908201527f6269643a2061756374696f6e206e6f7420737461727465640000000000000000604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252818101527f4d7573742062652061756374696f6e2063726561746f72206f722061646d696e604082015260600190565b6020808252602f908201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560408201527f20726f6c657320666f722073656c660000000000000000000000000000000000606082015260800190565b6000610200820190508c82528b60208301528a604083015289606083015288151560808301526001600160a01b0380891660a084015280881660c084015280871660e08401528086166101008401525063ffffffff80855116610120840152806020860151166101408401528060408601511661016084015280606086015116610180840152506fffffffffffffffffffffffffffffffff6080850151166101a0830152613cfe6101c0830184613078565b9c9b505050505050505050505050565b948552602085019390935260408401919091526060830152608082015260a00190565b67ffffffffffffffff92831681529116602082015260400190565b67ffffffffffffffff948516815292909316602083015263ffffffff166040820152606081019190915260800190565b6001600160a01b0381168114613d9157600080fd5b50565b8015158114613d9157600080fd5b63ffffffff81168114613d9157600080fd5b67ffffffffffffffff81168114613d9157600080fd5b60ff81168114613d9157600080fdfea2646970667358221220dc89d3c164e8030f84107c0cd8c3b8aee328b174aec7466719b997057e9d383364736f6c634300060c0033608060405234801561001057600080fd5b50600061001b61006a565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061006e565b3390565b61074c8061007d6000396000f3fe6080604052600436106100655760003560e01c8063e3a9db1a11610043578063e3a9db1a146100e5578063f2fde38b1461012a578063f340fa011461015d57610065565b806351cff8d91461006a578063715018a61461009f5780638da5cb5b146100b4575b600080fd5b34801561007657600080fd5b5061009d6004803603602081101561008d57600080fd5b50356001600160a01b0316610183565b005b3480156100ab57600080fd5b5061009d610262565b3480156100c057600080fd5b506100c961032d565b604080516001600160a01b039092168252519081900360200190f35b3480156100f157600080fd5b506101186004803603602081101561010857600080fd5b50356001600160a01b031661033c565b60408051918252519081900360200190f35b34801561013657600080fd5b5061009d6004803603602081101561014d57600080fd5b50356001600160a01b0316610357565b61009d6004803603602081101561017357600080fd5b50356001600160a01b0316610478565b61018b610567565b6001600160a01b031661019c61032d565b6001600160a01b0316146101f7576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116600081815260016020526040812080549190559061021f908261056b565b6040805182815290516001600160a01b038416917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b61026a610567565b6001600160a01b031661027b61032d565b6001600160a01b0316146102d6576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000546001600160a01b031690565b6001600160a01b031660009081526001602052604090205490565b61035f610567565b6001600160a01b031661037061032d565b6001600160a01b0316146103cb576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166104105760405162461bcd60e51b81526004018080602001828103825260268152602001806106b76026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b610480610567565b6001600160a01b031661049161032d565b6001600160a01b0316146104ec576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811660009081526001602052604090205434906105119082610655565b6001600160a01b038316600081815260016020908152604091829020939093558051848152905191927f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c492918290030190a25050565b3390565b804710156105c0576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015290519081900360640190fd5b6040516000906001600160a01b0384169083908381818185875af1925050503d806000811461060b576040519150601f19603f3d011682016040523d82523d6000602084013e610610565b606091505b50509050806106505760405162461bcd60e51b815260040180806020018281038252603a8152602001806106dd603a913960400191505060405180910390fd5b505050565b6000828201838110156106af576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564a26469706673582212204e75e906e114d4826d2c80612d1d3c65fd67e6d681579dc36f95a1110c854a6564736f6c634300060c0033636f6e7374727563746f723a20302061646472657373206e6f7420616c6c6f7798f1c4e464b303704202467b140ea646a0f96c35a8a703da15a07bc5c3f952ed80f9b792196f21120f021903634877a78a3dd5e8ef643701b99dae7bb938062d00000000000000000000000075affe4580cd74ab7258572ebcc15d6727c864bd0000000000000000000000002a9699de82f9f057638fcaed65e886847a17c4ef
Deployed Bytecode
0x6080604052600436106101cd5760003560e01c806372fb2ec3116100f7578063a217fddf11610095578063ca15c87311610064578063ca15c8731461051c578063d547741f1461053c578063e2982c211461055c578063e597a2091461057c576101cd565b8063a217fddf146104a7578063a6213e88146104bc578063b9a2de3a146104dc578063c40119f8146104fc576101cd565b80639010d07c116100d15780639010d07c1461043257806391d148541461045257806396b5a7551461047257806396e978ff14610492576101cd565b806372fb2ec3146103dd57806376cad834146103fd5780637ccfdbfe1461041d576101cd565b806336568abe1161016f5780634199e02b1161013e5780634199e02b14610343578063571a26a0146103635780635d56b1141461039a57806361a552dc146103c8576101cd565b806336568abe146102c1578063398109a3146102e15780633a80e893146103015780633dd0a7e414610323576101cd565b806325e2ba9e116101ab57806325e2ba9e1461024a5780632badf25c1461025f5780632f2ff15d1461028157806331b3eb94146102a1576101cd565b80630ce526d1146101d2578063150b7a02146101fd578063248a9ca31461022a575b600080fd5b3480156101de57600080fd5b506101e761059c565b6040516101f4919061314f565b60405180910390f35b34801561020957600080fd5b5061021d610218366004612d1a565b6105c0565b6040516101f49190613158565b34801561023657600080fd5b506101e7610245366004612f5f565b6105e9565b61025d610258366004613003565b6105fe565b005b34801561026b57600080fd5b50610274610b4b565b6040516101f49190613144565b34801561028d57600080fd5b5061025d61029c366004612f77565b610b54565b3480156102ad57600080fd5b5061025d6102bc366004612ce2565b610b9c565b3480156102cd57600080fd5b5061025d6102dc366004612f77565b610c1a565b3480156102ed57600080fd5b5061025d6102fc366004612f43565b610c5c565b34801561030d57600080fd5b50610316610c98565b6040516101f4919061308a565b34801561032f57600080fd5b5061025d61033e366004612ce2565b610cad565b34801561034f57600080fd5b506101e761035e366004612de2565b610d3c565b34801561036f57600080fd5b5061038361037e366004612f5f565b610d59565b6040516101f49b9a99989796959493929190613c4c565b3480156103a657600080fd5b506103ba6103b536600461304b565b610e4e565b6040516101f4929190613d31565b3480156103d457600080fd5b50610274610eb3565b3480156103e957600080fd5b5061025d6103f8366004612e94565b610ec1565b34801561040957600080fd5b5061025d610418366004612f43565b611930565b34801561042957600080fd5b50610316611973565b34801561043e57600080fd5b5061031661044d366004612fa6565b611982565b34801561045e57600080fd5b5061027461046d366004612f77565b6119a3565b34801561047e57600080fd5b5061025d61048d366004612f5f565b6119bb565b34801561049e57600080fd5b506101e7611c09565b3480156104b357600080fd5b506101e7611c2d565b3480156104c857600080fd5b5061025d6104d7366004612e0d565b611c32565b3480156104e857600080fd5b5061025d6104f7366004612f5f565b611c4d565b34801561050857600080fd5b5061025d610517366004612ce2565b6121fb565b34801561052857600080fd5b506101e7610537366004612f5f565b612279565b34801561054857600080fd5b5061025d610557366004612f77565b612290565b34801561056857600080fd5b506101e7610577366004612ce2565b6122ca565b34801561058857600080fd5b5061025d610597366004612fdf565b612364565b7f80f9b792196f21120f021903634877a78a3dd5e8ef643701b99dae7bb938062d81565b7f150b7a0200000000000000000000000000000000000000000000000000000000949350505050565b60009081526001602052604090206002015490565b6002805414156106295760405162461bcd60e51b815260040161062090613b83565b60405180910390fd5b6002805560035460ff16151560011415610685576106697f80f9b792196f21120f021903634877a78a3dd5e8ef643701b99dae7bb938062d61046d612596565b6106855760405162461bcd60e51b815260040161062090613660565b6000828152600560208190526040909120015482906001600160a01b03166106bf5760405162461bcd60e51b8152600401610620906137bf565b6003548390610100900460ff16156106e95760405162461bcd60e51b81526004016106209061397b565b60008181526005602052604090206004015460ff161561071b5760405162461bcd60e51b815260040161062090613944565b6000341161073b5760405162461bcd60e51b8152600401610620906134db565b348367ffffffffffffffff16146107645760405162461bcd60e51b8152600401610620906138b0565b600084815260056020526040902054158061078d57506000848152600560205260409020544210155b6107a95760405162461bcd60e51b815260040161062090613b4c565b60008481526005602052604090205415806107cb57506107c88461259a565b42105b6107e75760405162461bcd60e51b81526004016106209061372b565b6107ef612596565b600085815260056020819052604090912001546001600160a01b039081169116141561082d5760405162461bcd60e51b81526004016106209061347e565b610835612596565b6000858152600560205260409020600601546001600160a01b03908116911614156108725760405162461bcd60e51b815260040161062090613aef565b60008061087f86866125c2565b60008881526005602052604090205491935091506108b757600086815260056020526040902067ffffffffffffffff42169055610924565b6000868152600560205260409020600601546001600160a01b031615610924576000868152600560205260408120600a8101546009909101546108f9916126df565b6000888152600560205260409020600601549091506001600160a01b03166109218183612704565b50505b600086815260056020526040902067ffffffffffffffff80841660098301558216600a90910155610953612596565b600087815260056020908152604091829020600601805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0394851617905560048054835163e536f52360e01b81529351610a1895919091169363e536f5239381840193909291829003018186803b1580156109cb57600080fd5b505afa1580156109df573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a03919061302f565b63ffffffff16426126df90919063ffffffff16565b610a218761259a565b1015610ac857610a8a610a338761259a565b610a84600460009054906101000a90046001600160a01b03166001600160a01b031663e536f5236040518163ffffffff1660e01b815260040160206040518083038186803b1580156109cb57600080fd5b9061277c565b6000878152600560205260409020600801805463ffffffff64010000000080830482169094011690920267ffffffff00000000199092169190911790555b610ad0612596565b600087815260056020526040908190206008810154905491516001600160a01b03939093169289927fd66b5764c67c36e32461c93c76dc6bd7a7a8d9ec4ed13647a30f88b9b5f3aef192610b369288928892640100000000900463ffffffff1691613d4c565b60405180910390a35050600160025550505050565b60035460ff1681565b600082815260016020526040902060020154610b729061046d612596565b610b8e5760405162461bcd60e51b8152600401610620906131e2565b610b9882826127a4565b5050565b6000546040517f51cff8d90000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906351cff8d990610be590849060040161308a565b600060405180830381600087803b158015610bff57600080fd5b505af1158015610c13573d6000803e3d6000fd5b5050505050565b610c22612596565b6001600160a01b0316816001600160a01b031614610c525760405162461bcd60e51b815260040161062090613bef565b610b98828261280d565b610c69600061046d612596565b610c855760405162461bcd60e51b815260040161062090613697565b6003805460ff1916911515919091179055565b6003546201000090046001600160a01b031681565b610cba600061046d612596565b610cd65760405162461bcd60e51b815260040161062090613697565b6001600160a01b038116610cfc5760405162461bcd60e51b815260040161062090613a35565b600380546001600160a01b0390921662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff909216919091179055565b600660209081526000928352604080842090915290825290205481565b6005602081815260009283526040928390208054600182015460028301546003840154600485015496850154600686015460078701548a5160a081018c52600889015463ffffffff808216835264010000000082048116838d01526801000000000000000082048116838f01526c01000000000000000000000000820416606083015270010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1660808201528b51808d01909c5260098901548c52600a90980154988b0198909852949893979296919560ff8416956101009094046001600160a01b03908116959281169481169316918b565b60008080610e6767ffffffffffffffff851660646126df565b90506000610e8a82610e8467ffffffffffffffff89166064612876565b906128b0565b90506000610ea567ffffffffffffffff88811690841661277c565b919791965090945050505050565b600354610100900460ff1681565b600280541415610ee35760405162461bcd60e51b815260040161062090613b83565b60028055600354610100900460ff1615610f0f5760405162461bcd60e51b8152600401610620906136ce565b6040517f6352211e0000000000000000000000000000000000000000000000000000000081526001600160a01b038a1690636352211e90610f54908b9060040161314f565b60206040518083038186803b158015610f6c57600080fd5b505afa158015610f80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa49190612cfe565b6001600160a01b0316610fb5612596565b6001600160a01b03161480610fd25750610fd2600061046d612596565b610fee5760405162461bcd60e51b815260040161062090613421565b6001600160a01b03891660009081526006602090815260408083208b84529091529020541561102f5760405162461bcd60e51b8152600401610620906137f6565b60008767ffffffffffffffff16116110595760405162461bcd60e51b815260040161062090613a92565b611061612be6565b60405180610160016040528060008152602001600081526020018967ffffffffffffffff1681526020018a815260200188151581526020018b6001600160a01b031681526020018b6001600160a01b0316636352211e8c6040518263ffffffff1660e01b81526004016110d4919061314f565b60206040518083038186803b1580156110ec57600080fd5b505afa158015611100573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111249190612cfe565b6001600160a01b0316815260006020820152604001611141612596565b6001600160a01b031681526020016040518060a00160405280600460009054906101000a90046001600160a01b03166001600160a01b031663e092c7fd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111a857600080fd5b505afa1580156111bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e0919061302f565b63ffffffff168152602001600460009054906101000a90046001600160a01b03166001600160a01b031663f309051c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561123957600080fd5b505afa15801561124d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611271919061302f565b63ffffffff168152602001600460009054906101000a90046001600160a01b03166001600160a01b03166346d3eb356040518163ffffffff1660e01b815260040160206040518083038186803b1580156112ca57600080fd5b505afa1580156112de573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611302919061302f565b63ffffffff168152602001600460009054906101000a90046001600160a01b03166001600160a01b0316637cdd2a566040518163ffffffff1660e01b815260040160206040518083038186803b15801561135b57600080fd5b505afa15801561136f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611393919061302f565b63ffffffff168152602001600460009054906101000a90046001600160a01b03166001600160a01b031663cf9a95f66040518163ffffffff1660e01b815260040160206040518083038186803b1580156113ec57600080fd5b505afa158015611400573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611424919061302f565b63ffffffff16905281526040805180820190915260008082526020828101829052909201529091506114589061046d612596565b156115c25763ffffffff85161561152257600480546040805163e536f52360e01b815290516001600160a01b039092169263e536f523928282019260209290829003018186803b1580156114ab57600080fd5b505afa1580156114bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e3919061302f565b63ffffffff168563ffffffff16101561150e5760405162461bcd60e51b81526004016106209061323f565b61012081015163ffffffff86166020909101525b67ffffffffffffffff861615611570578567ffffffffffffffff16421061155b5760405162461bcd60e51b815260040161062090613603565b67ffffffffffffffff86168152600060808201525b60ff84161561158a5761012081015160ff85166040909101525b60648360ff16116115a65761012081015160ff84166060909101525b60648260ff16116115c25761012081015160ff83166080909101525b6064611601826101200151608001516fffffffffffffffffffffffffffffffff168361012001516060015163ffffffff166126df90919063ffffffff16565b111561161f5760405162461bcd60e51b8152600401610620906139b2565b61162960076128e2565b806005600061163860076128eb565b8152602080820192909252604090810160002083518155838301516001820155838201516002820155606080850151600383015560808086015160048401805460a089015160ff19909116921515929092177fffffffffffffffffffffff0000000000000000000000000000000000000000ff166101006001600160a01b0393841681029190911790915560c088015160058601805473ffffffffffffffffffffffffffffffffffffffff1990811692851692909217905560e089015160068701805483169185169190911790559088015160078087018054909316919093161790556101208701518051600886018054838a01519884015196840151939095015163ffffffff1990951663ffffffff9283161767ffffffff00000000191664010000000098831698909802979097177fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000095821695909502949094177fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c010000000000000000000000009490911693909302929092176fffffffffffffffffffffffffffffffff908116700100000000000000000000000000000000919092160217909255610140909301518051600985015590910151600a9092019190915561182e906128eb565b6001600160a01b038b1660008181526006602090815260408083208e8452909152908190209290925560c08301519151632142170760e11b815290916342842e0e91611881919030908e9060040161309e565b600060405180830381600087803b15801561189b57600080fd5b505af11580156118af573d6000803e3d6000fd5b50505050888a6001600160a01b03166118c860076128eb565b7f3379874afd33ac61edf4b8af3a03c30f782441d9481f3a36833d3be8022e50018460c001518c86608001516118fc612596565b88610120015160200151604051611917959493929190613102565b60405180910390a4505060016002555050505050505050565b61193d600061046d612596565b6119595760405162461bcd60e51b815260040161062090613697565b600380549115156101000261ff0019909216919091179055565b6004546001600160a01b031681565b600082815260016020526040812061199a90836128ef565b90505b92915050565b600082815260016020526040812061199a90836128fb565b6002805414156119dd5760405162461bcd60e51b815260040161062090613b83565b600280556000818152600560208190526040909120015481906001600160a01b0316611a1b5760405162461bcd60e51b8152600401610620906137bf565b60008281526005602052604090206007015482906001600160a01b0316611a40612596565b6001600160a01b03161480611a5d5750611a5d600061046d612596565b611a795760405162461bcd60e51b815260040161062090613bba565b611a86600061046d612596565b611ac2576000838152600560205260409020600601546001600160a01b031615611ac25760405162461bcd60e51b815260040161062090613330565b600083815260056020819052604091829020600480820154928201546003909201549351632142170760e11b81526001600160a01b036101009094048416946342842e0e94611b169430949116920161309e565b600060405180830381600087803b158015611b3057600080fd5b505af1158015611b44573d6000803e3d6000fd5b5050506000848152600560205260408120600601549091506001600160a01b031615611bb4576000848152600560205260409020600a810154600990910154611b8c916126df565b600085815260056020526040902060060154909150611bb4906001600160a01b031682612704565b611bbd84612910565b837fc326dcfb5d4e924f5e3e717c0f667b0eecb5abb73fc0b33236b6107c1fd48a57611be7612596565b83604051611bf69291906130e9565b60405180910390a2505060016002555050565b7f98f1c4e464b303704202467b140ea646a0f96c35a8a703da15a07bc5c3f952ed81565b600081565b611c4487878787878787606580610ec1565b50505050505050565b600280541415611c6f5760405162461bcd60e51b815260040161062090613b83565b600280556000818152600560208190526040909120015481906001600160a01b0316611cad5760405162461bcd60e51b8152600401610620906137bf565b6003548290610100900460ff1615611cd75760405162461bcd60e51b81526004016106209061397b565b60008181526005602052604090206004015460ff1615611d095760405162461bcd60e51b815260040161062090613944565b6000838152600560205260409020600601546001600160a01b0316611d405760405162461bcd60e51b8152600401610620906132d3565b60008381526005602052604090205415801590611d655750611d618361259a565b4210155b611d815760405162461bcd60e51b8152600401610620906138e7565b611d89612be6565b506000838152600560208181526040808420815161016081018352815481526001820154818501526002820154818401526003820154606080830191909152600483015460ff81161515608080850191909152610100918290046001600160a01b0390811660a08087019190915298860154811660c08601526006860154811660e08601526007860154169184019190915284519687018552600884015463ffffffff808216895264010000000082048116898901526801000000000000000082048116898801526c0100000000000000000000000082048116898501527001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff16918801919091526101208301968752845180860190955260098401548552600a909301549484019490945261014081018390529351909201519051929392611ee292606492610e8492919081169061287616565b90506000611f0283610140015160200151836126df90919063ffffffff16565b1115611fab57611fab600460009054906101000a90046001600160a01b03166001600160a01b031663931742d36040518163ffffffff1660e01b815260040160206040518083038186803b158015611f5957600080fd5b505afa158015611f6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f919190612cfe565b61014084015160200151611fa69084906126df565b612704565b60035460a083015160608401516040517fb85ed7e40000000000000000000000000000000000000000000000000000000081526000936201000090046001600160a01b03169263b85ed7e492612003926004016130e9565b60206040518083038186803b15801561201b57600080fd5b505afa15801561202f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120539190612cfe565b905060008360c001516001600160a01b0316826001600160a01b0316141561209a5760c0840151610140850151516120959190612090908661277c565b6129e1565b612101565b61012084015160800151610140850151516120cd91606491610e84916fffffffffffffffffffffffffffffffff16612876565b90506120d982826129e1565b6121018460c0015161209085610a84858961014001516000015161277c90919063ffffffff16565b60a084015160e08501516060860151604051632142170760e11b81526001600160a01b03909316926342842e0e9261213d92309260040161309e565b600060405180830381600087803b15801561215757600080fd5b505af115801561216b573d6000803e3d6000fd5b5050505061217887612910565b60e084015160c085015161014086015180516020909101516001600160a01b0393841693909216918a917f5266f731bbd4fe6f9a1fb89425bfacb9adca3695584d4398361c2a5a32f97c6f9188876121d482610a84868461277c565b6040516121e5959493929190613d0e565b60405180910390a4505060016002555050505050565b612208600061046d612596565b6122245760405162461bcd60e51b815260040161062090613697565b6001600160a01b03811661224a5760405162461bcd60e51b8152600401610620906135a6565b6004805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600081815260016020526040812061199d90612a59565b6000828152600160205260409020600201546122ae9061046d612596565b610c525760405162461bcd60e51b815260040161062090613549565b600080546040517fe3a9db1a0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063e3a9db1a9061231490859060040161308a565b60206040518083038186803b15801561232c57600080fd5b505afa158015612340573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061199d9190612fc7565b6000828152600560208190526040909120015482906001600160a01b031661239e5760405162461bcd60e51b8152600401610620906137bf565b60008381526005602052604090206007015483906001600160a01b03166123c3612596565b6001600160a01b031614806123e057506123e0600061046d612596565b6123fc5760405162461bcd60e51b815260040161062090613bba565b60008481526005602052604090206004015460ff16151583151514156124215761257b565b821561244b57600084815260056020526040902067ffffffffffffffff42166001909101556124ea565b82158015612469575060008481526005602052604090206001015415155b8015612482575060008481526005602052604090205415155b156124ea576000848152600560205260409020600101546124a490429061277c565b600085815260056020526040812060088101805463ffffffff64010000000080830482169096011690940267ffffffff0000000019909416939093179092556001909101555b600084815260056020819052604090912060048101805460ff191686151517905501546001600160a01b0316847fae3de7f7c5462d334767296a417566554b9cc3078ea4d932182f55a4556cb400612540612596565b600088815260056020526040908190206008015490516125729291899164010000000090910463ffffffff16906130c2565b60405180910390a35b50505050565b600061199a836001600160a01b038416612a64565b3390565b60009081526005602052604090206008810154905464010000000090910463ffffffff160190565b6000828152600560205260408120600801548190819081906125eb90869063ffffffff16610e4e565b60008881526005602052604090206006015491935091506001600160a01b031661264f5760008681526005602052604090206002015467ffffffffffffffff8316101561264a5760405162461bcd60e51b81526004016106209061338d565b6126d4565b600086815260056020526040902060088101546009909101546126ab9161269391606491610e84919063ffffffff6801000000000000000090910481169061287616565b600088815260056020526040902060090154906126df565b8267ffffffffffffffff1610156126d45760405162461bcd60e51b815260040161062090613853565b909590945092505050565b60008282018381101561199a5760405162461bcd60e51b81526004016106209061329c565b6000826001600160a01b0316826175309060405161272190613087565b600060405180830381858888f193505050503d806000811461275f576040519150601f19603f3d011682016040523d82523d6000602084013e612764565b606091505b50509050806127775761277783836129e1565b505050565b60008282111561279e5760405162461bcd60e51b8152600401610620906133ea565b50900390565b60008281526001602052604090206127bc9082612581565b15610b98576127c9612596565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526001602052604090206128259082612aae565b15610b9857612832612596565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6000826128855750600061199d565b8282028284828161289257fe5b041461199a5760405162461bcd60e51b815260040161062090613762565b60008082116128d15760405162461bcd60e51b815260040161062090613512565b8183816128da57fe5b049392505050565b80546001019055565b5490565b600061199a8383612ac3565b600061199a836001600160a01b038416612b08565b60008181526005602081815260408084206004810180546003830180546101009092046001600160a01b0316885260068087528589209289529186529387208790559686529284905284815560018101859055600281018590559084905581547fffffffffffffffffffffff00000000000000000000000000000000000000000016909155908101805473ffffffffffffffffffffffffffffffffffffffff199081169091559281018054841690556007810180549093169092556008820181905560098201819055600a90910155565b6000546040517ff340fa010000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063f340fa01908390612a2c90869060040161308a565b6000604051808303818588803b158015612a4557600080fd5b505af1158015611c44573d6000803e3d6000fd5b600061199d826128eb565b6000612a708383612b08565b612aa65750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561199d565b50600061199d565b600061199a836001600160a01b038416612b20565b81546000908210612ae65760405162461bcd60e51b815260040161062090613185565b826000018281548110612af557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b60008181526001830160205260408120548015612bdc5783546000198083019190810190600090879083908110612b5357fe5b9060005260206000200154905080876000018481548110612b7057fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080612ba057fe5b6001900381819060005260206000200160009055905586600101600087815260200190815260200160002060009055600194505050505061199d565b600091505061199d565b6040518061016001604052806000815260200160008152602001600081526020016000815260200160001515815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b03168152602001612c5f612c71565b8152602001612c6c612c9f565b905290565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b604051806040016040528060008152602001600081525090565b803567ffffffffffffffff8116811461199d57600080fd5b803560ff8116811461199d57600080fd5b600060208284031215612cf3578081fd5b813561199a81613d7c565b600060208284031215612d0f578081fd5b815161199a81613d7c565b60008060008060808587031215612d2f578283fd5b8435612d3a81613d7c565b9350602085810135612d4b81613d7c565b935060408601359250606086013567ffffffffffffffff80821115612d6e578384fd5b818801915088601f830112612d81578384fd5b813581811115612d8f578485fd5b604051601f8201601f1916810185018381118282101715612dae578687fd5b60405281815283820185018b1015612dc4578586fd5b81858501868301379081019093019390935250939692955090935050565b60008060408385031215612df4578182fd5b8235612dff81613d7c565b946020939093013593505050565b600080600080600080600060e0888a031215612e27578283fd5b8735612e3281613d7c565b965060208801359550612e488960408a01612cb9565b94506060880135612e5881613d94565b9350612e678960808a01612cb9565b925060a0880135612e7781613da2565b9150612e868960c08a01612cd1565b905092959891949750929550565b60008060008060008060008060006101208a8c031215612eb2578182fd5b8935612ebd81613d7c565b985060208a0135975060408a0135612ed481613db4565b965060608a0135612ee481613d94565b955060808a0135612ef481613db4565b945060a08a0135612f0481613da2565b935060c08a0135612f1481613dca565b925060e08a0135612f2481613dca565b9150612f348b6101008c01612cd1565b90509295985092959850929598565b600060208284031215612f54578081fd5b813561199a81613d94565b600060208284031215612f70578081fd5b5035919050565b60008060408385031215612f89578182fd5b823591506020830135612f9b81613d7c565b809150509250929050565b60008060408385031215612fb8578182fd5b50508035926020909101359150565b600060208284031215612fd8578081fd5b5051919050565b60008060408385031215612ff1578182fd5b823591506020830135612f9b81613d94565b60008060408385031215613015578182fd5b823591506130268460208501612cb9565b90509250929050565b600060208284031215613040578081fd5b815161199a81613da2565b6000806040838503121561305d578182fd5b823561306881613db4565b91506020830135612f9b81613db4565b80518252602090810151910152565b90565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03939093168352901515602083015263ffffffff16604082015260600190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b03958616815267ffffffffffffffff9490941660208501529115156040840152909216606082015263ffffffff909116608082015260a00190565b901515815260200190565b90815260200190565b7fffffffff0000000000000000000000000000000000000000000000000000000091909116815260200190565b60208082526022908201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e60408201527f6473000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60408201527f2061646d696e20746f206772616e740000000000000000000000000000000000606082015260800190565b60208082526033908201527f61646d696e43726561746541756374696f6e3a206475726174696f6e206d757360408201527f74206265203e3d2074696d652062756666657200000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526029908201527f656e6441756374696f6e3a206e6f20626964646572733b207573652063616e6360408201527f656c41756374696f6e0000000000000000000000000000000000000000000000606082015260800190565b60208082526034908201527f63616e63656c41756374696f6e3a2061756374696f6e2077697468206269647360408201527f206d6179206e6f742062652063616e63656c6564000000000000000000000000606082015260800190565b60208082526023908201527f5f76616c6964617465416e644765744269643a2072657365727665206e6f742060408201527f6d65740000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526030908201527f61646d696e43726561746541756374696f6e3a206d75737420626520746f6b6560408201527f6e206f776e6572206f722061646d696e00000000000000000000000000000000606082015260800190565b6020808252602b908201527f6269643a20746f6b656e206f776e6572206d6179206e6f7420626964206f6e2060408201527f6f776e2061756374696f6e000000000000000000000000000000000000000000606082015260800190565b60208082526016908201527f6269643a2076616c7565206d757374206265203e203000000000000000000000604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b60208082526030908201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60408201527f2061646d696e20746f207265766f6b6500000000000000000000000000000000606082015260800190565b60208082526032908201527f736574494669727374446962734d61726b657453657474696e67733a2030206160408201527f646472657373206e6f7420616c6c6f7765640000000000000000000000000000606082015260800190565b60208082526034908201527f61646d696e43726561746541756374696f6e3a2073746172742074696d65206d60408201527f75737420626520696e2074686520667574757265000000000000000000000000606082015260800190565b60208082526014908201527f62696464657220726f6c65207265717569726564000000000000000000000000604082015260600190565b60208082526016908201527f63616c6c6572206973206e6f7420616e2061646d696e00000000000000000000604082015260600190565b60208082526030908201527f61646d696e43726561746541756374696f6e3a2061756374696f6e732061726560408201527f20676c6f62616c6c792070617573656400000000000000000000000000000000606082015260800190565b60208082526014908201527f6269643a2061756374696f6e2065787069726564000000000000000000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526015908201527f41756374696f6e20646f65736e27742065786973740000000000000000000000604082015260600190565b6020808252602a908201527f61646d696e43726561746541756374696f6e3a2061756374696f6e20616c726560408201527f6164792065786973747300000000000000000000000000000000000000000000606082015260800190565b60208082526027908201527f5f76616c6964617465416e644765744269643a206d696e696d756d206269642060408201527f6e6f74206d657400000000000000000000000000000000000000000000000000606082015260800190565b6020808252601a908201527f6269643a20616d6f756e742f76616c7565206d69736d61746368000000000000604082015260600190565b60208082526023908201527f656e6441756374696f6e3a2061756374696f6e206973206e6f7420636f6d706c60408201527f6574650000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526012908201527f41756374696f6e206973207061757365642e0000000000000000000000000000604082015260600190565b6020808252601c908201527f41756374696f6e732061726520676c6f62616c6c792070617573656400000000604082015260600190565b60208082526041908201527f61646d696e43726561746541756374696f6e3a20636f6d6d697373696f6e207260408201527f617465202b20726f79616c74792072617465206d757374206265203c3d20313060608201527f3000000000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526035908201527f73657449455243373231546f6b656e43726561746f7252656769737472793a2060408201527f302061646472657373206e6f7420616c6c6f7765640000000000000000000000606082015260800190565b60208082526027908201527f61646d696e43726561746541756374696f6e3a2052657365727665206d75737460408201527f206265203e203000000000000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f6269643a2073656e6465722069732063757272656e742068696768657374206260408201527f6964646572000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526018908201527f6269643a2061756374696f6e206e6f7420737461727465640000000000000000604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252818101527f4d7573742062652061756374696f6e2063726561746f72206f722061646d696e604082015260600190565b6020808252602f908201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560408201527f20726f6c657320666f722073656c660000000000000000000000000000000000606082015260800190565b6000610200820190508c82528b60208301528a604083015289606083015288151560808301526001600160a01b0380891660a084015280881660c084015280871660e08401528086166101008401525063ffffffff80855116610120840152806020860151166101408401528060408601511661016084015280606086015116610180840152506fffffffffffffffffffffffffffffffff6080850151166101a0830152613cfe6101c0830184613078565b9c9b505050505050505050505050565b948552602085019390935260408401919091526060830152608082015260a00190565b67ffffffffffffffff92831681529116602082015260400190565b67ffffffffffffffff948516815292909316602083015263ffffffff166040820152606081019190915260800190565b6001600160a01b0381168114613d9157600080fd5b50565b8015158114613d9157600080fd5b63ffffffff81168114613d9157600080fd5b67ffffffffffffffff81168114613d9157600080fd5b60ff81168114613d9157600080fdfea2646970667358221220dc89d3c164e8030f84107c0cd8c3b8aee328b174aec7466719b997057e9d383364736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000075affe4580cd74ab7258572ebcc15d6727c864bd0000000000000000000000002a9699de82f9f057638fcaed65e886847a17c4ef
-----Decoded View---------------
Arg [0] : _marketSettings (address): 0x75AFfe4580cd74AB7258572ebCC15D6727c864BD
Arg [1] : _creatorRegistry (address): 0x2a9699dE82f9F057638fCaED65E886847A17c4EF
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000075affe4580cd74ab7258572ebcc15d6727c864bd
Arg [1] : 0000000000000000000000002a9699de82f9f057638fcaed65e886847a17c4ef
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.