Overview
ETH Balance
0.04 ETH
Eth Value
$137.77 (@ $3,444.37/ETH)More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 134 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Public Sale Mint | 18644138 | 242 days ago | IN | 0.04 ETH | 0.00331553 | ||||
Withdraw | 18516278 | 260 days ago | IN | 0 ETH | 0.00247654 | ||||
Public Sale Mint | 18178377 | 307 days ago | IN | 0.04 ETH | 0.00174311 | ||||
Public Sale Mint | 17931717 | 342 days ago | IN | 0.04 ETH | 0.00238806 | ||||
Public Sale Mint | 17641815 | 382 days ago | IN | 0.04 ETH | 0.0023232 | ||||
Public Sale Mint | 17593221 | 389 days ago | IN | 0.04 ETH | 0.00370713 | ||||
Public Sale Mint | 17571624 | 392 days ago | IN | 0.04 ETH | 0.0026113 | ||||
Public Sale Mint | 17570266 | 392 days ago | IN | 0.04 ETH | 0.0013914 | ||||
Public Sale Mint | 17553462 | 395 days ago | IN | 0.04 ETH | 0.00134867 | ||||
Public Sale Mint | 17551831 | 395 days ago | IN | 0.04 ETH | 0.00121507 | ||||
Public Sale Mint | 17550256 | 395 days ago | IN | 0.04 ETH | 0.00186996 | ||||
Public Sale Mint | 17548047 | 395 days ago | IN | 0.04 ETH | 0.00126674 | ||||
Public Sale Mint | 17545725 | 396 days ago | IN | 0.04 ETH | 0.00150617 | ||||
Public Sale Mint | 17545332 | 396 days ago | IN | 0.04 ETH | 0.00156755 | ||||
Public Sale Mint... | 17544432 | 396 days ago | IN | 0.12 ETH | 0.002667 | ||||
Public Sale Mint | 17544038 | 396 days ago | IN | 0.04 ETH | 0.00174768 | ||||
Public Sale Mint | 17543810 | 396 days ago | IN | 0.04 ETH | 0.00232996 | ||||
Public Sale Mint | 17543621 | 396 days ago | IN | 0.04 ETH | 0.0035918 | ||||
Public Sale Mint | 17542924 | 396 days ago | IN | 0.04 ETH | 0.00211198 | ||||
Public Sale Mint | 17542507 | 396 days ago | IN | 0.04 ETH | 0.00166045 | ||||
Public Sale Mint | 17541430 | 396 days ago | IN | 0.04 ETH | 0.00150788 | ||||
Public Sale Mint | 17541405 | 396 days ago | IN | 0.04 ETH | 0.00164451 | ||||
Public Sale Mint | 17540934 | 396 days ago | IN | 0.04 ETH | 0.00146738 | ||||
Public Sale Mint | 17540062 | 397 days ago | IN | 0.04 ETH | 0.00145876 | ||||
Public Sale Mint | 17539805 | 397 days ago | IN | 0.04 ETH | 0.00179642 |
Loading...
Loading
Contract Name:
AuctionHouse
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 // The Wildxyz AuctionHouse.sol // AuctionHouse.sol is a modified version of the original code from the // NounsAuctionHouse.sol which is a modified version of Zora's AuctionHouse.sol: // https://github.com/ourzora/auction-house/ // licensed under the GPL-3.0 license. pragma solidity ^0.8.17; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import {Math} from '@openzeppelin/contracts/utils/math/Math.sol'; import {ECDSA} from '@openzeppelin/contracts/utils/cryptography/ECDSA.sol'; import './WildNFT.sol'; import './IAuctionHouse.sol'; interface SanctionsList { function isSanctioned(address addr) external view returns (bool); } interface IOasis { function balanceOf(address _address) external view returns (uint256); function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); } interface IDelegationRegistry { /** * @notice Returns true if the address is delegated to act on your behalf for a token contract or an entire vault * @param delegate The hotwallet to act on your behalf * @param contract_ The address for the contract you're delegating * @param vault The cold wallet who issued the delegation */ function checkDelegateForContract(address delegate, address vault, address contract_) external view returns (bool); } contract AuctionHouse is IAuctionHouse, Pausable, ReentrancyGuard, Ownable { // auction variables (packed) uint256 public oasisPrice; // oasis allowlist price uint256 public allowListPrice; // The allowlist price uint256 public minimumBid; // The minimum price accepted in an auction uint256 public minBidIncrement; // The minimum amount by which a bid must exceed the current highest bid uint256 public publicPrice; // public price uint256 public publicSaleMintMax; // max number of tokens per public sale mint uint256 public allowlistMintMax; // max number of tokens per allowlist mint uint256 public timeBuffer; // min amount of time left in an auction after last bid uint256 public duration; // 86400 == 1 day The duration of a single auction in seconds uint256 public raffleSupply; // max number of raffle winners uint256 public auctionSupply; // number of auction supply max of raffle ticket uint256 public allowlistSupply; // number allowlist supply uint256 public maxSupply; // max supply uint256 public promoSupply; // promo supply uint256 public oasisListStartDateTime; //oasislistStartDate uint256 public allowListStartDateTime; //allowListStartDateTime uint256 public allowListEndDateTime; //allowListEndDateTime uint256 public auctionStartDateTime; //==allowListEndDateTime; uint256 public auctionEndDateTime; //auctionEndDateTime uint256 public auctionExtentedTime; uint256 public wildPrimaryRoyalty; uint256 public primaryFeeNumerator; address payable public wildPayee; // wild primary sale royalty payee address payable public payee; // The artist address that receives funds from the auction address payable public admin; // for admin functions address public allowlistSigner; // The signer for the allowlist minting bool public auctionWinnersSet = false; bool public raffleWinnersSet = false; bool public auctionSettled = false; bool public settled = false; bool public publicSale = false; bool public useOasisPriceForPublicSale; // use oasis price for public sale // the Oasis contract object IOasis public oasis; // NFT to auction WildNFT public nft; // OFAC sanctions list // mainnet: 0x40C57923924B5c5c5455c48D93317139ADDaC8fb // goerli: 0x5EBdB1188c0D54efB0a004c1d8737A922C1Ad8D2 SanctionsList public sanctionsList; // pass manager address public manager; // Bids Struct struct Bid { address payable bidder; // The address of the bidder uint256 amount; // The amount of the bid bool minted; // has the bid been minted uint256 timestamp; // timestamp of the bid bool refunded; // refund difference between winning_bid and max_bid for winner; and all for losers bool winner; // is the bid the winner uint256 finalprice; // if won, what price won at bool rafflewinner; // only true if they were a raffle winner } // mapping of Bid structs mapping(address => Bid) public Bids; // allowList mapping 1=oasis;2=allowlist;0=not on list mapping(address => uint8) public allowList; mapping(address => uint256) public allowListMinted; mapping(uint256 => uint8) public oasisPassMints; /* MODIFIERS */ // used by setVariablesBatch<X> methods mapping(uint64 => bool) private onlyOnceMapping; modifier onlyOnce(uint64 key) { require(onlyOnceMapping[key] == false); onlyOnceMapping[key] = true; _; } // only admin or manager modifier onlyAdminOrManager() { require(msg.sender == admin || msg.sender == manager, 'AuctionHouse: only admin or manager permitted.'); _; } // Only allow the auction functions to be active when not paused modifier onlyUnpaused() { require(!paused(), 'AuctionHouse: paused'); _; } // only allows admin to run function modifier onlyAdmin() { require(msg.sender == admin, 'AuctionHouse: only admin permitted.'); _; } // Not on OFAC list modifier onlyUnsanctioned(address _to) { bool isToSanctioned = sanctionsList.isSanctioned(_to); require(!isToSanctioned, 'Blocked: OFAC sanctioned address'); _; } /* CONSTRUCTOR */ constructor(WildNFT _nft, address _payee, address _oasis, address _sanctions, address _allowlistSigner, address _wildPayee, uint256 _wildPrimaryRoyalty, uint256 _primaryFeeNumerator) { nft = _nft; payee = payable(_payee); oasis = IOasis(_oasis); sanctionsList = SanctionsList(_sanctions); allowlistSigner = _allowlistSigner; admin = payable(0x9DAF56fB5d08b1dad7e6A46e0d5E814F41d1b7F9); wildPayee = payable(_wildPayee); wildPrimaryRoyalty = _wildPrimaryRoyalty; primaryFeeNumerator = _primaryFeeNumerator; manager = msg.sender; } /* INITIALIZER FUNCTIONS */ function setVariablesBatch1(uint256 _allowlistMintMax, uint256 _timeBuffer, uint256 _minimumBid, uint256 _minBidIncrement, uint256 _allowListPrice, uint256 _duration, uint256 _publicSaleMintMax, uint256 _oasisPrice, uint256 _publicPrice, bool _useOasisPriceForPublicSale) public onlyOwner onlyOnce(1) { allowlistMintMax = _allowlistMintMax; timeBuffer = _timeBuffer; minimumBid = _minimumBid; minBidIncrement = _minBidIncrement; allowListPrice = _allowListPrice; duration = _duration; publicSaleMintMax = _publicSaleMintMax; oasisPrice = _oasisPrice; publicPrice = _publicPrice; useOasisPriceForPublicSale = _useOasisPriceForPublicSale; } function setVariablesBatch2(uint256 _raffleSupply, uint256 _auctionSupply, uint256 _allowlistSupply, uint256 _maxSupply, uint256 _promoSupply, uint256 _oasisListStartDateTime, uint256 _allowListStartDateTime, uint256 _allowListEndDateTime, uint256 _auctionStartDateTime, uint256 _auctionEndDateTime) public onlyOwner onlyOnce(2) { raffleSupply = _raffleSupply; auctionSupply = _auctionSupply; allowlistSupply = _allowlistSupply; maxSupply = _maxSupply; promoSupply = _promoSupply; oasisListStartDateTime = _oasisListStartDateTime; allowListStartDateTime = _allowListStartDateTime; allowListEndDateTime = _allowListEndDateTime; auctionStartDateTime = _auctionStartDateTime; auctionEndDateTime = _auctionEndDateTime; } function skipToPublicSale() public onlyOwner onlyOnce(3) { auctionWinnersSet = true; raffleWinnersSet = true; auctionSettled = true; settled = true; publicSale = true; } /* OWNER FUNCTIONS */ // set admin address; function setAdmin(address _admin) public onlyOwner { admin = payable(_admin); } // update payee for withdraw function setPayee(address payable _payee) public onlyOwner { payee = _payee; } // set manager function setManager(address _manager) public onlyOwner { manager = _manager; } // set wildPayee for withdraw function setWildPayee(address payable _wildPayee) public onlyOwner { wildPayee = _wildPayee; } // set wildPrimaryRoyalty function setWildPrimaryRoyalty(uint256 _wildPrimaryRoyalty) public onlyOwner { wildPrimaryRoyalty = _wildPrimaryRoyalty; } // set primaryFeeNumerator function setPrimaryFeeNumerator(uint256 _primaryFeeNumerator) public onlyOwner { primaryFeeNumerator = _primaryFeeNumerator; } // pause function pause() external override onlyOwner { _pause(); } // unpause function unpause() external override onlyOwner { _unpause(); } // withdraw function _withdraw() internal { require(auctionSettled == true && block.timestamp > auctionEndDateTime, 'Auction not settled||not ended. Cannot withdraw.'); // send a fraction of the balance to wild first if (wildPrimaryRoyalty > 0) { (bool successWild, ) = wildPayee.call{value: ((address(this).balance * wildPrimaryRoyalty) / primaryFeeNumerator)}(''); require(successWild, 'AuctionHouse: Failed to withdraw to wild payee.'); } // then, send the rest to payee (bool successPayee, ) = payee.call{value: address(this).balance}(''); require(successPayee, 'AuctionHouse: Failed to withdraw to artist payee.'); } function withdraw() public onlyOwner { _withdraw(); } function setRaffleWinners(address[] memory _raffleWinners) external onlyOwner { require(block.timestamp > auctionEndDateTime, 'Auction not over yet.'); require(raffleWinnersSet == false, 'Raffle already settled'); require(_raffleWinners.length <= raffleSupply, 'Incorrect number of winners'); for (uint256 i = 0; i < _raffleWinners.length; i++) { Bid storage bid = Bids[_raffleWinners[i]]; bid.winner = true; bid.finalprice = minimumBid; bid.rafflewinner = true; } raffleWinnersSet = true; } function setAuctionWinners(address[] memory _auctionWinners, uint256[] memory _prices) external onlyOwner { require(block.timestamp > auctionEndDateTime, 'Auction not over yet.'); require(auctionWinnersSet == false, 'Auction already settled'); for (uint256 i = 0; i < _auctionWinners.length; i++) { Bid storage bid = Bids[_auctionWinners[i]]; bid.winner = true; bid.finalprice = _prices[i]; bid.rafflewinner = false; } auctionWinnersSet = true; } /** * Settle an auction. */ function settleBidder(address[] memory _bidders) external onlyOwner nonReentrant { require(block.timestamp > auctionEndDateTime, "Auction hasn't ended."); require(auctionWinnersSet == true && raffleWinnersSet == true, 'Auction winners not set'); for (uint256 i = 0; i < _bidders.length; i++) { address bidder = _bidders[i]; Bid storage bid = Bids[bidder]; if (bid.winner == true && bid.minted == false && bid.refunded == false) { // if winner, mint and refunde diff if any, update Bids uint256 difference = bid.amount - bid.finalprice; if (difference > 0) { (bool success, ) = bidder.call{value: difference}(''); require(success, 'Failed to refund difference to winner.'); } uint256 tokenId = nft.mint(bidder); uint256[] memory tokenIds = new uint256[](1); tokenIds[0] = tokenId; // different mint type for raffle winner if (bid.rafflewinner == true) { emit TokenMint(bidder, tokenIds, MintType.Raffle, bid.finalprice, false, address(0), false, new uint256[](0)); } else { emit TokenMint(bidder, tokenIds, MintType.Auction, bid.finalprice, false, address(0), false, new uint256[](0)); } bid.minted = true; bid.refunded = true; } else if (bid.winner == false && bid.refunded == false) { // if not winner, refund (bool success, ) = bidder.call{value: bid.amount}(''); require(success, 'Failed to send refund to loser.'); bid.refunded = true; } } } /** @notice Set the base URI for the NFTs. @dev Calls _setBaseURI internally, while emitting the event RevealMetadata. Only callable by the owner. */ function revealMetadata(string memory _newBaseURI) external onlyOwner { nft.setBaseURIMinter(_newBaseURI); emit MetadataRevealed(); } // Q: Should this be combined with settleBidder? function setAuctionSettled() external onlyOwner { require(auctionSettled == false, 'Auction already settled'); auctionSettled = !auctionSettled; _withdraw(); emit AuctionSettled(); } function setTimes(uint256 allowListStart, uint256 _duration) public onlyOwner { oasisListStartDateTime = allowListStart + 90; allowListStartDateTime = allowListStart + 90; allowListEndDateTime = allowListStartDateTime + _duration; auctionStartDateTime = allowListEndDateTime; auctionEndDateTime = auctionStartDateTime + _duration; } function setAllowListPrice(uint256 _allowListPrice) public onlyOwner { allowListPrice = _allowListPrice; } /* ADMIN VARIABLE SETTERS FUNCTIONS */ function setAllowlistSigner(address _signer) public onlyAdmin { allowlistSigner = _signer; } // set the 721 contract address function set721ContractAddress(WildNFT _nft) public onlyAdmin { nft = _nft; } function setAllowlistSupply(uint256 _allowlistSupply) public onlyAdmin { allowlistSupply = _allowlistSupply; } function setAuctionSupply(uint256 _newAuctionSupply) public onlyAdmin { auctionSupply = _newAuctionSupply; } function setPromoSupply(uint256 _newPromoSupply) public onlyAdmin { promoSupply = _newPromoSupply; } function addToAllowList(address[] memory _addresses, uint8 _state) public onlyAdmin { for (uint256 i = 0; i < _addresses.length; i++) { address _address = _addresses[i]; allowList[_address] = _state; emit AddedToAllowList(_address, _state); } } function removeFromAllowList(address[] memory _addresses) public onlyAdmin { for (uint256 i = 0; i < _addresses.length; i++) { address _address = _addresses[i]; allowList[_address] = 0; emit RemovedFromAllowList(_address); } } function setPublicSaleMintMax(uint256 _newPublicSaleMintMax) public onlyAdmin { publicSaleMintMax = _newPublicSaleMintMax; } function setAllowlistMintMax(uint256 _newAllowlistMintMax) public onlyAdmin { allowlistMintMax = _newAllowlistMintMax; } function setOasislistStartDateTime(uint256 _newOasislistStartDateTime) public onlyAdmin { oasisListStartDateTime = _newOasislistStartDateTime; } function setAuctionStartDateTime(uint256 _newAuctionStartDateTime) public onlyAdmin { auctionStartDateTime = _newAuctionStartDateTime; } function setAuctionEndDateTime(uint256 _newAuctionEndDateTime) public onlyAdmin { auctionEndDateTime = _newAuctionEndDateTime; } function setAllowListStartDateTime(uint256 _newAllowListStartDateTime) public onlyAdmin { allowListStartDateTime = _newAllowListStartDateTime; } function setAllowListEndDateTime(uint256 _newAllowListEndDateTime) public onlyAdmin { allowListEndDateTime = _newAllowListEndDateTime; } function setPublicSale() public onlyAdmin { publicSale = !publicSale; } function setRaffleSupply(uint256 _newRaffleSupply) public onlyAdmin { raffleSupply = _newRaffleSupply; } function setMaxSupply(uint256 _newMaxSupply) public onlyAdmin { maxSupply = _newMaxSupply; } // set the time buffer function setTimeBuffer(uint256 _timeBuffer) external override onlyAdmin { timeBuffer = _timeBuffer; emit AuctionTimeBufferUpdated(_timeBuffer); } // set the minimum bid function setMinimumBid(uint256 _minimumBid) external onlyAdmin { minimumBid = _minimumBid; emit AuctionMinimumBidUpdated(_minimumBid); } // set oasis list price function setOasisPrice(uint256 _oasisPrice) external onlyAdmin { oasisPrice = _oasisPrice; } // set public price function setPublicPrice(uint256 _publicPrice) external onlyAdmin { publicPrice = _publicPrice; } function setUseOasisPriceForPublicSale(bool _useOasisPriceForPublicSale) external onlyAdmin { useOasisPriceForPublicSale = _useOasisPriceForPublicSale; } // set min bid incr function setMinBidIncrement(uint256 _minBidIncrement) external onlyAdmin { minBidIncrement = _minBidIncrement; emit AuctionMinBidIncrementUpdated(_minBidIncrement); } // set the duration function setDuration(uint256 _duration) external override onlyAdmin { duration = _duration; emit AuctionDurationUpdated(_duration); } // junepass mints function passMint(uint256 _qty, address _to) external payable onlyAdminOrManager { require(msg.value > 0, 'Must be paid.'); _promoMint(_to, _qty, MintType.WildPass); } /* PUBLIC FUNCTIONS */ function allowlistMint(uint256 _qty, bytes memory _signature) external payable onlyUnsanctioned(msg.sender) { _allowlistMint(_qty, msg.sender, _signature); } function allowlistMintDelegated(uint256 _qty, address _vault) external payable onlyUnsanctioned(msg.sender) { require(IDelegationRegistry(0x00000000000076A84feF008CDAbe6409d2FE638B).checkDelegateForContract(msg.sender, _vault, address(oasis)), 'DelegateRegistry: wallet address not registered'); _allowlistMint(_qty, _vault, ''); } function verifySignature(address _address, bytes memory _signature) public view returns (bool valid) { if (_signature.length == 65) { // we pass the uers _address and this contracts address to // verify that it is intended for this contract specifically bytes32 addressHash = keccak256(abi.encodePacked(_address, address(this))); bytes32 message = ECDSA.toEthSignedMessageHash(addressHash); address signerAddress = ECDSA.recover(message, _signature); return (signerAddress != address(0) && signerAddress == allowlistSigner); } else { return false; } } /* is address on allowlist returns which group (1 = oasis, 2 = allowlist) and tokens left to mint */ function checkAllowlist(address _address, bytes memory _signature) public view returns (uint8 group, uint256 tokens) { uint256 oasisBalance = oasis.balanceOf(_address); if (oasisBalance > 0) { return (1, _oasisListQuantity(_address)); } // must recover allowlistSigner from signature bool isValid = verifySignature(_address, _signature); if (isValid) { return (2, allowlistMintMax - allowListMinted[_address]); } return (0, 0); } /* INTERNAL FUNCTIONS */ function _oasisListQuantity(address _address) internal view returns (uint256) { uint256 oasisCount = oasis.balanceOf(_address); uint256 quantity = 0; for (uint256 i = 0; i < oasisCount; i++) { uint256 tokenId = oasis.tokenOfOwnerByIndex(_address, i); quantity += allowlistMintMax - oasisPassMints[tokenId]; } return quantity; } // allowlist mint function _allowlistMint(uint256 _qty, address requester, bytes memory _signature) internal { require(allowlistSupply - _qty >= 0, 'No more allowlist supply'); uint256 msgValue = msg.value; address receiver = msg.sender; (uint group, uint256 allowance) = checkAllowlist(requester, _signature); require(group > 0, 'Not allowed'); require(_qty <= allowance, 'Qty exceeds max allowed.'); // this require is to avoid an empty error string if a transaction fails require((maxSupply - nft.totalSupply() - _qty) >= raffleSupply, 'Not enough supply remaining for raffle'); if (group == 1) { // oasis list minter require(msgValue >= oasisPrice * _qty, 'Oasis allowlist minting: Not enough ETH sent'); require(block.timestamp >= oasisListStartDateTime && block.timestamp <= allowListEndDateTime, 'Outside Oasis allowlist window'); // start of markOasisPassesUsed uint256 oasisCount = oasis.balanceOf(requester); uint256 mintsLeft = _qty; uint256 totalMinted = 0; uint256[] memory tokenIds = new uint256[](_qty); uint256[] memory oasisIds = new uint256[](_qty); for (uint256 i = 0; i < oasisCount; i++) { uint256 oasisId = oasis.tokenOfOwnerByIndex(requester, i); uint256 tokenAllowance = allowlistMintMax - oasisPassMints[oasisId]; if (tokenAllowance == 0) { // Oasis pass been fully minted continue; } uint8 quantityMintedWithOasis = uint8(Math.min(tokenAllowance, mintsLeft)); oasisPassMints[oasisId] += quantityMintedWithOasis; mintsLeft -= quantityMintedWithOasis; for (uint256 j = 0; j < quantityMintedWithOasis; j++) { uint256 tokenId = nft.mint(receiver); tokenIds[totalMinted + j] = tokenId; oasisIds[totalMinted + j] = oasisId; allowlistSupply--; } totalMinted += quantityMintedWithOasis; } require(mintsLeft == 0, 'Not enough Oasis mint available'); _emitAllowListTokenMint(requester, receiver, tokenIds, msgValue, true, oasisIds); // end of markOasisPassesUsed } else { // other allowlist minter require(msgValue >= allowListPrice * _qty, 'Public allowlist minting: Not enough ETH sent'); require(block.timestamp >= allowListStartDateTime && block.timestamp <= allowListEndDateTime, 'Outside allowlist window'); uint256[] memory tokenIds = new uint256[](_qty); for (uint256 i = 0; i < _qty; i++) { uint256 tokenId = nft.mint(receiver); tokenIds[i] = tokenId; allowlistSupply--; } _emitAllowListTokenMint(requester, receiver, tokenIds, msgValue, false, new uint256[](0)); allowListMinted[requester] += _qty; } auctionSupply = maxSupply - nft.totalSupply() - raffleSupply; } // helper to check if this is a delegated mint or not function _emitAllowListTokenMint(address requester, address receiver, uint256[] memory tokenIds, uint256 pricePaid, bool oasisUsed, uint256[] memory oasisIds) internal { if (requester != receiver) { // delegated emit TokenMint(receiver, tokenIds, MintType.Allowlist, pricePaid, true, requester, oasisUsed, oasisIds); } else { // not delegated emit TokenMint(receiver, tokenIds, MintType.Allowlist, pricePaid, false, address(0), oasisUsed, oasisIds); } } /** * Transfer ETH and return the success status. * This function only forwards 30,000 gas to the callee. */ function _safeTransferETH(address to, uint256 value) internal returns (bool) { (bool success, ) = to.call{value: value, gas: 30_000}(new bytes(0)); return success; } /* PUBLIC FUNCTIONS */ // UNIVERSAL GETTER FOR AUCTION-RELATED VARIABLES function getAuctionInfo() public view returns (uint256 _auctionSupply, uint256 _auctionStartDateTime, uint256 _auctionEndDateTime, uint256 _auctionExtentedTime, bool _auctionWinnersSet, bool _auctionSettled, bool _settled, uint256 _timeBuffer, uint256 _duration, uint256 _minimumBid, uint256 _minBidIncrement) { return (auctionSupply, auctionStartDateTime, auctionEndDateTime, auctionExtentedTime, auctionWinnersSet, auctionSettled, settled, timeBuffer, duration, minimumBid, minBidIncrement); } // UNIVERSAL GETTER FOR ALLOWLIST AND RAFFLE-RELATED VARIABLES function getAllowlistAndRaffleInfo() public view returns (uint256 _raffleSupply, uint256 _allowListPrice, uint256 _allowListStartDateTime, uint256 _allowListEndDateTime, bool _raffleWinnersSet, bool _publicSale, uint256 _allowlistSupply, uint256 _totalMinted, uint256 _oasislistStartDateTime, uint256 _allowlistMintMax, uint256 _oasisPrice, uint256 _publicPrice, bool _useOasisPriceForPublicSale, uint256 _publicSaleMintMax) { return (raffleSupply, allowListPrice, allowListStartDateTime, allowListEndDateTime, raffleWinnersSet, publicSale, allowlistSupply, nft.totalSupply(), oasisListStartDateTime, allowlistMintMax, oasisPrice, publicPrice, useOasisPriceForPublicSale, publicSaleMintMax); } // Creates bids for the current auction function createBid() external payable nonReentrant onlyUnpaused onlyUnsanctioned(msg.sender) { address bidder = msg.sender; uint256 bidAmount = msg.value; // Check that the auction is live && Bid Amount is greater than minimum bid require(block.timestamp < auctionEndDateTime && block.timestamp >= auctionStartDateTime, 'Outside auction window.'); require(bidAmount >= minimumBid, 'Bid amount too low.'); // check if bidder already has bid if (Bids[bidder].amount > 0) { // if so, refund old and replace with new Bid storage existingBid = Bids[bidder]; require(bidAmount > existingBid.amount, 'You can only increase your bid, not decrease.'); _safeTransferETH(payable(bidder), existingBid.amount); existingBid.amount = bidAmount; } else { // otherwise, enter new bid. Bid memory new_bid; new_bid.bidder = payable(bidder); new_bid.amount = bidAmount; new_bid.timestamp = block.timestamp; new_bid.winner = false; new_bid.refunded = false; new_bid.minted = false; new_bid.finalprice = 0; Bids[bidder] = new_bid; } // Extend the auction if the bid was received within the time buffer // bool extended = auctionEndDateTime - block.timestamp < timeBuffer; //if (extended) { // auctionEndDateTime = auctionEndDateTime + timeBuffer; // auctionExtentedTime = auctionExtentedTime + timeBuffer; //} emit AuctionBid(bidder, bidAmount, false); } function publicSaleMint() public payable nonReentrant onlyUnpaused onlyUnsanctioned(msg.sender) { // if we didnt sell out, we can mint the remaining // for price of min bid // will error when supply is 0 // Note: 1) is the auction closed and 2) is the raffle set and // 3) if the total supply is less than the max supply, then you can allow ppl to mint // require(auctionEndDateTime < block.timestamp, "Auction not over yet."); // require(raffleWinnersSet == true, "Raffle not settled yet."); require(nft.totalSupply() < nft.maxSupply(), 'No more tokens available.'); require(publicSale == true, 'Not authorized.'); address receiver = msg.sender; uint256 msgValue = msg.value; if (useOasisPriceForPublicSale) { uint256 oasisBalance = oasis.balanceOf(receiver); if (oasisBalance > 0) { require(msg.value >= oasisPrice, 'Oasis price: Amount too low.'); } else { require(msg.value >= publicPrice, 'Public price: Amount too low.'); } } else { require(msg.value >= publicPrice, 'Amount too low.'); } uint256 tokenId = nft.mint(receiver); uint256[] memory tokenIds = new uint256[](1); tokenIds[0] = tokenId; emit TokenMint(receiver, tokenIds, MintType.PublicSale, msgValue, false, address(0), false, new uint256[](0)); } // multiple minting for public sale (do not use this for one mint, use publicSaleMint() instead) function publicSaleMintMultiple(uint256 _qty) public payable nonReentrant onlyUnpaused onlyUnsanctioned(msg.sender) { uint256 _maxSupply = nft.maxSupply(); uint256 _totalSupply = nft.totalSupply(); require(_qty <= publicSaleMintMax, 'Too many tokens requested.'); require(_totalSupply < _maxSupply, 'No more tokens available.'); // which one is better? require((_maxSupply - _totalSupply) >= _qty, 'Not enough supply left - 1.'); require(publicSale == true, 'Not authorized.'); address receiver = msg.sender; uint256 msgValue = msg.value; bool usedOasisPrice = false; if (useOasisPriceForPublicSale) { uint256 oasisBalance = oasis.balanceOf(receiver); if (oasisBalance > 0) { require(msg.value >= (oasisPrice * _qty), 'Oasis price: Amount too low.'); usedOasisPrice = true; } else { require(msg.value >= (publicPrice * _qty), 'Public price: Amount too low.'); } } else { require(msgValue >= (publicPrice * _qty), 'Amount too low.'); } uint256[] memory tokenIds = new uint256[](_qty); for (uint256 i = 0; i < _qty; i++) { uint256 tokenId = nft.mint(receiver); tokenIds[i] = tokenId; } // here we don't care which oasisId's they used so we leave that as an empty array emit TokenMint(receiver, tokenIds, MintType.PublicSale, msgValue, false, address(0), usedOasisPrice, new uint256[](0)); } // airdrop mint function _promoMint(address _to, uint256 _qty, MintType mintType) internal { require(promoSupply >= _qty, 'Not enough promo supply'); require(block.timestamp <= allowListStartDateTime, 'Outside promo mint window'); // this require is to avoid an empty error string if a transaction fails require((maxSupply - nft.totalSupply() - _qty) >= raffleSupply, 'Not enough supply remaining for raffle'); uint256[] memory tokenIds = new uint256[](_qty); for (uint256 i = 0; i < _qty; i++) { uint256 tokenId = nft.mint(_to); tokenIds[i] = tokenId; } emit TokenMint(_to, tokenIds, mintType, 0, false, address(0), false, new uint256[](0)); promoSupply -= _qty; auctionSupply = maxSupply - nft.totalSupply() - raffleSupply; } function promoMint(address _to, uint256 _qty, MintType mintType) external onlyAdmin { _promoMint(_to, _qty, mintType); } // airdrop batch mint; sends _amounts[i] to each address in array function promoMintBatch(address[] memory _to, uint256[] memory _amounts, MintType mintType) external onlyAdmin { uint256 numAddresses = _to.length; require(_to.length == _amounts.length, '_to and _amounts array lengths must match'); require(promoSupply >= numAddresses, 'Not enough promo supply'); require(block.timestamp <= allowListStartDateTime, 'Outside promo mint window'); // this require is to avoid an empty error string if a transaction fails require((maxSupply - nft.totalSupply() - numAddresses) >= raffleSupply, 'Not enough supply remaining for raffle'); for (uint256 i = 0; i < _to.length; i++) { address to = _to[i]; uint256 amount = _amounts[i]; uint256[] memory tokenIds = new uint256[](amount); for (uint256 j = 0; j < amount; j++) { uint256 tokenId = nft.mint(to); tokenIds[j] = tokenId; } emit TokenMint(to, tokenIds, mintType, 0, false, address(0), false, new uint256[](0)); promoSupply -= amount; } auctionSupply = maxSupply - nft.totalSupply() - raffleSupply; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (finance/PaymentSplitter.sol) pragma solidity ^0.8.0; import "../token/ERC20/utils/SafeERC20.sol"; import "../utils/Address.sol"; import "../utils/Context.sol"; /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the * time of contract deployment and can't be updated thereafter. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. * * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you * to run tests before sending real value to this contract. */ contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; mapping(IERC20 => uint256) private _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) private _erc20Released; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor(address[] memory payees, uint256[] memory shares_) payable { require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); require(payees.length > 0, "PaymentSplitter: no payees"); for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares_[i]); } } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { emit PaymentReceived(_msgSender(), msg.value); } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { return _totalShares; } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { return _totalReleased; } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { return _erc20TotalReleased[token]; } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { return _shares[account]; } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { return _released[account]; } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { return _erc20Released[token][account]; } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { return _payees[index]; } /** * @dev Getter for the amount of payee's releasable Ether. */ function releasable(address account) public view returns (uint256) { uint256 totalReceived = address(this).balance + totalReleased(); return _pendingPayment(account, totalReceived, released(account)); } /** * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an * IERC20 contract. */ function releasable(IERC20 token, address account) public view returns (uint256) { uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); return _pendingPayment(account, totalReceived, released(token, account)); } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 payment = releasable(account); require(payment != 0, "PaymentSplitter: account is not due payment"); // _totalReleased is the sum of all values in _released. // If "_totalReleased += payment" does not overflow, then "_released[account] += payment" cannot overflow. _totalReleased += payment; unchecked { _released[account] += payment; } Address.sendValue(account, payment); emit PaymentReleased(account, payment); } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 payment = releasable(token, account); require(payment != 0, "PaymentSplitter: account is not due payment"); // _erc20TotalReleased[token] is the sum of all values in _erc20Released[token]. // If "_erc20TotalReleased[token] += payment" does not overflow, then "_erc20Released[token][account] += payment" // cannot overflow. _erc20TotalReleased[token] += payment; unchecked { _erc20Released[token][account] += payment; } SafeERC20.safeTransfer(token, account, payment); emit ERC20PaymentReleased(token, account, payment); } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { return (totalReceived * _shares[account]) / _totalShares - alreadyReleased; } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { require(account != address(0), "PaymentSplitter: account is the zero address"); require(shares_ > 0, "PaymentSplitter: shares are 0"); require(_shares[account] == 0, "PaymentSplitter: account already has shares"); _payees.push(account); _shares[account] = shares_; _totalShares = _totalShares + shares_; emit PayeeAdded(account, shares_); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo( uint256 tokenId, uint256 salePrice ) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to * 0 before setting it to a non-zero value. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _ownerOf(tokenId); require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner or approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom(address from, address to, uint256 tokenId) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _safeTransfer(from, to, tokenId, data); } /** * @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. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _ownerOf(tokenId) != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId, 1); // Check that tokenId was not minted by `_beforeTokenTransfer` hook require(!_exists(tokenId), "ERC721: token already minted"); unchecked { // Will not overflow unless all 2**256 token ids are minted to the same owner. // Given that tokens are minted one by one, it is impossible in practice that // this ever happens. Might change if we allow batch minting. // The ERC fails to describe this case. _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId, 1); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721.ownerOf(tokenId); // Clear approvals delete _tokenApprovals[tokenId]; unchecked { // Cannot overflow, as that would require more tokens to be burned/transferred // out than the owner initially received through minting and transferring in. _balances[owner] -= 1; } delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId, 1); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer(address from, address to, uint256 tokenId) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId, 1); // Check that tokenId was not transferred by `_beforeTokenTransfer` hook require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; unchecked { // `_balances[from]` cannot overflow for the same reason as described in `_burn`: // `from`'s balance is the number of token held, which is at least one before the current // transfer. // `_balances[to]` could overflow in the conditions described in `_mint`. That would require // all 2**256 token ids to be minted, which in practice is impossible. _balances[from] -= 1; _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. * - When `from` is zero, the tokens will be minted for `to`. * - When `to` is zero, ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. * - When `from` is zero, the tokens were minted for `to`. * - When `to` is zero, ``from``'s tokens were burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {} /** * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override. * * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such * that `ownerOf(tokenId)` is `a`. */ // solhint-disable-next-line func-name-mixedcase function __unsafe_increaseBalance(address account, uint256 amount) internal { _balances[account] += amount; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/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`. * * 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; /** * @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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * 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 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 the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^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 `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/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.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol) pragma solidity ^0.8.0; /** * @dev Provides a set of functions to operate with Base64 strings. * * _Available since v4.5._ */ library Base64 { /** * @dev Base64 Encoding/Decoding Table */ string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /** * @dev Converts a `bytes` to its Bytes64 `string` representation. */ function encode(bytes memory data) internal pure returns (string memory) { /** * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol */ if (data.length == 0) return ""; // Loads the table into memory string memory table = _TABLE; // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter // and split into 4 numbers of 6 bits. // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up // - `data.length + 2` -> Round up // - `/ 3` -> Number of 3-bytes chunks // - `4 *` -> 4 characters for each chunk string memory result = new string(4 * ((data.length + 2) / 3)); /// @solidity memory-safe-assembly assembly { // Prepare the lookup table (skip the first "length" byte) let tablePtr := add(table, 1) // Prepare result pointer, jump over length let resultPtr := add(result, 32) // Run over the input, 3 bytes at a time for { let dataPtr := data let endPtr := add(data, mload(data)) } lt(dataPtr, endPtr) { } { // Advance 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // To write each character, shift the 3 bytes (18 bits) chunk // 4 times in blocks of 6 bits for each character (18, 12, 6, 0) // and apply logical AND with 0x3F which is the number of // the previous character in the ASCII table prior to the Base64 Table // The result is then added to the table to get the character to write, // and finally write it in the result pointer but with a left shift // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F)))) resultPtr := add(resultPtr, 1) // Advance } // When data `bytes` is not exactly 3 bytes long // it is padded with `=` characters at the end switch mod(mload(data), 3) case 1 { mstore8(sub(resultPtr, 1), 0x3d) mstore8(sub(resultPtr, 2), 0x3d) } case 2 { mstore8(sub(resultPtr, 1), 0x3d) } } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) { // 32 is the length in bytes of hash, // enforced by the type signature above /// @solidity memory-safe-assembly assembly { mstore(0x00, "\x19Ethereum Signed Message:\n32") mstore(0x1c, hash) message := keccak256(0x00, 0x3c) } } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, "\x19\x01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) data := keccak256(ptr, 0x42) } } /** * @dev Returns an Ethereum Signed Data with intended validator, created from a * `validator` and `data` according to the version 0 of EIP-191. * * See {recover}. */ function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x00", validator, data)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^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 // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: GPL-3.0 /// @title Interface for Auction Houses pragma solidity ^0.8.6; interface IAuctionHouse { /// @notice MintType enum used to distinguish nft mint types enum MintType { Promo, Allowlist, Auction, Raffle, PublicSale, CreditCard, WildPass } /** @notice Emitted when a new token is minted @dev Generalized mint event, uses the MintType parameter to distinguish mint types @param to - address of the token owner @param tokenIds - token ID array @param mintType - MintType enum @param amountPaid - amount paid for the mint @param isDelegated - whether or not the mint was delegated @param delegatedVault - address of the delegated vault @param oasisUsed - whether or not an Oasis pass was used. Can be true even if oasisIds is empty (ex. oasis price in public sale). @param oasisIds - Oasis pass ID array (same index/length as tokenId). Empty if ids not specified. */ event TokenMint(address indexed to, uint256[] tokenIds, MintType indexed mintType, uint256 amountPaid, bool isDelegated, address delegatedVault, bool oasisUsed, uint256[] oasisIds); /** @notice Emitted when AuctionHouse.revealMetadata(_newBaseURI) is called @dev Used to trigger webhook listeners */ event MetadataRevealed(); event AddedToAllowList(address indexed addedAddress, uint8 indexed state); event RemovedFromAllowList(address indexed removedAddress); event AuctionBid(address sender, uint256 value, bool extended); event AuctionSettled(); event AuctionTimeBufferUpdated(uint256 timeBuffer); event AuctionMinimumBidUpdated(uint256 minimumBid); event AuctionMinBidIncrementUpdated(uint256 minBidIncrementPercentage); event AuctionDurationUpdated(uint256 duration); function setAuctionWinners(address[] memory _auctionWinners, uint256[] memory _price) external; function setTimes(uint256 _startTime, uint256 _duration) external; function createBid() external payable; function pause() external; function unpause() external; function setTimeBuffer(uint256 timeBuffer) external; function setDuration(uint256 _duration) external; }
// SPDX-License-Identifier: GPL-3.0 // LICENSE // This is a modified version of the original code from the // NounsToken.sol— an implementation of OpenZeppelin's ERC-721: // https://github.com/nounsDAO/nouns-monorepo/blob/master/packages/nouns-contracts/contracts/NounsToken.sol // The original code is licensed under the GPL-3.0 license // Thank you to the Nouns team for the inspiration and code! pragma solidity ^0.8.6; import {UpdatableOperatorFilterer} from '../../utils/operator-filter-registry/UpdatableOperatorFilterer.sol'; import {RevokableDefaultOperatorFilterer} from '../../utils/operator-filter-registry/RevokableDefaultOperatorFilterer.sol'; import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol'; import {Strings} from '@openzeppelin/contracts/utils/Strings.sol'; import {Base64} from '@openzeppelin/contracts/utils/Base64.sol'; import {Math} from '@openzeppelin/contracts/utils/math/Math.sol'; import {IERC721} from '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import {ERC721} from '@openzeppelin/contracts/token/ERC721/ERC721.sol'; import {ERC2981} from '@openzeppelin/contracts/token/common/ERC2981.sol'; import {IERC165} from '@openzeppelin/contracts/utils/introspection/IERC165.sol'; import {PaymentSplitter} from '@openzeppelin/contracts/finance/PaymentSplitter.sol'; import {WildNFT} from './WildNFT.sol'; interface IWildNFT is IERC721 { event TokenCreated(uint256 indexed tokenId, address mintedTo); event TokenBurned(uint256 indexed tokenId); event MetadataUpdate(uint256 _tokenId); event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); function mint(address _to) external returns (uint256); function burn(uint256 tokenId) external; function setMinter(address minter) external; function setBaseURI(string memory _newBaseURI) external; function totalSupply() external view returns (uint256); function maxSupply() external view returns (uint256); } abstract contract WildNFT is IWildNFT, Ownable, RevokableDefaultOperatorFilterer, ERC721, ERC2981, PaymentSplitter { // An address who has permissions to mint qf tokens address public minter; // Mapping of operators to whether they are approved or not mapping(address => bool) public authorized; // Mapping of addresses flagged for denying token interactions mapping(address => bool) public blockList; uint256 public _currentTokenId; uint256 public maxSupply; string public baseURI; constructor(string memory name_, string memory symbol_, address _minter, uint256 _maxSupply, string memory _baseURI, address[] memory _payees, uint256[] memory _shares, uint96 _feeNumerator) PaymentSplitter(_payees, _shares) ERC721(name_, symbol_) { minter = _minter; maxSupply = _maxSupply; baseURI = _baseURI; _setDefaultRoyalty(address(this), _feeNumerator); } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, IERC165, ERC2981) returns (bool) { return super.supportsInterface(interfaceId); } /** * @notice Require that the sender is the minter. */ modifier onlyMinter() { require(msg.sender == minter, 'Sender is not the minter'); _; } /** * @notice updates the deny list * @param flaggedOperator the address to be added to the deny list * @param status whether the address is to be added or removed from the deny list */ function updateDenyList(address flaggedOperator, bool status) public onlyOwner { _updateDenyList(flaggedOperator, status); } /* * @notice Override isApprovedForAll * @param owner The owner of the Nouns * @param operator The operator to check if approved */ function isApprovedForAll(address _owner, address operator) public view override(IERC721, ERC721) returns (bool) { require(blockList[operator] == false, 'Operator has been denied by contract owner.'); if (authorized[operator] == true) { return true; } return super.isApprovedForAll(_owner, operator); } /* OS */ function setApprovalForAll(address operator, bool approved) public override(IERC721, ERC721) onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function approve(address operator, uint256 tokenId) public override(IERC721, ERC721) onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } function transferFrom(address from, address to, uint256 tokenId) public override(IERC721, ERC721) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId) public override(IERC721, ERC721) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override(IERC721, ERC721) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } function owner() public view virtual override(Ownable, UpdatableOperatorFilterer) returns (address) { return Ownable.owner(); } /** * @notice sets the authorized operators for interacting with the contract * @param operator the address to be added to the authorized operators * @param approved whether the address is approved or not within authorized operators */ function setAuthorized(address operator, bool approved) public onlyOwner { authorized[operator] = approved; } /** * @notice Set the token minter. * @dev Only callable by the owner when not locked. * @param _minter The address of the new minter. */ function setMinter(address _minter) external onlyOwner { minter = _minter; } /** * @notice updates the deny list * @param flaggedOperator The address to be approved. * @param status True if the operator is approved, false to revoke approval. */ function _updateDenyList(address flaggedOperator, bool status) internal virtual { blockList[flaggedOperator] = status; } /** * @notice Mint a token to the given address. * @dev Only callable by the minter. * @param _to The address to mint the qf token to. * @return The ID of the newly minted qf token. */ function mint(address _to) public override onlyMinter returns (uint256) { require(_currentTokenId < maxSupply, 'Max supply reached'); return _mintTo(_to, _currentTokenId++); } /** * @notice Burn a pass. * @dev Only callable by the minter. * @param tokenId The ID of the qf token to burn. */ function burn(uint256 tokenId) public override onlyMinter { _burn(tokenId); emit TokenBurned(tokenId); } /** * @notice Set the base URI. * @dev Only callable by the owner. * @param _newBaseURI The new base URI. */ function setBaseURI(string memory _newBaseURI) public onlyOwner { baseURI = _newBaseURI; emit BatchMetadataUpdate(0, maxSupply - 1); } /// @notice Identical to setBaseURI but callable by minter only. function setBaseURIMinter(string memory _newBaseURI) public onlyMinter { baseURI = _newBaseURI; emit BatchMetadataUpdate(0, maxSupply - 1); } /** @notice Mints a new token * @param to: the address of the new owner looking to mint * @param tokenId: the token ID * @return the ID of the newly minted token */ function _mintTo(address to, uint256 tokenId) internal returns (uint256) { _mint(to, tokenId); emit TokenCreated(tokenId, to); return tokenId; } function totalSupply() public view returns (uint256) { return _currentTokenId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E; address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { /** * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns * true if supplied registrant address is not registered. */ function isOperatorAllowed(address registrant, address operator) external view returns (bool); /** * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner. */ function register(address registrant) external; /** * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes. */ function registerAndSubscribe(address registrant, address subscription) external; /** * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another * address without subscribing. */ function registerAndCopyEntries(address registrant, address registrantToCopy) external; /** * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner. * Note that this does not remove any filtered addresses or codeHashes. * Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes. */ function unregister(address addr) external; /** * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered. */ function updateOperator(address registrant, address operator, bool filtered) external; /** * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates. */ function updateOperators(address registrant, address[] calldata operators, bool filtered) external; /** * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered. */ function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; /** * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates. */ function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; /** * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous * subscription if present. * Note that accounts with subscriptions may go on to subscribe to other accounts - in this case, * subscriptions will not be forwarded. Instead the former subscription's existing entries will still be * used. */ function subscribe(address registrant, address registrantToSubscribe) external; /** * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes. */ function unsubscribe(address registrant, bool copyExistingEntries) external; /** * @notice Get the subscription address of a given registrant, if any. */ function subscriptionOf(address addr) external returns (address registrant); /** * @notice Get the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscribers(address registrant) external returns (address[] memory); /** * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscriberAt(address registrant, uint256 index) external returns (address); /** * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr. */ function copyEntriesOf(address registrant, address registrantToCopy) external; /** * @notice Returns true if operator is filtered by a given address or its subscription. */ function isOperatorFiltered(address registrant, address operator) external returns (bool); /** * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription. */ function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); /** * @notice Returns true if a codeHash is filtered by a given address or its subscription. */ function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); /** * @notice Returns a list of filtered operators for a given address or its subscription. */ function filteredOperators(address addr) external returns (address[] memory); /** * @notice Returns the set of filtered codeHashes for a given address or its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashes(address addr) external returns (bytes32[] memory); /** * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredOperatorAt(address registrant, uint256 index) external returns (address); /** * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); /** * @notice Returns true if an address has registered */ function isRegistered(address addr) external returns (bool); /** * @dev Convenience method to compute the code hash of an arbitrary contract */ function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {RevokableOperatorFilterer} from './RevokableOperatorFilterer.sol'; import {CANONICAL_CORI_SUBSCRIPTION, CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS} from './Constants.sol'; /** * @title RevokableDefaultOperatorFilterer * @notice Inherits from RevokableOperatorFilterer and automatically subscribes to the default OpenSea subscription. * Note that OpenSea will disable creator earnings enforcement if filtered operators begin fulfilling orders * on-chain, eg, if the registry is revoked or bypassed. */ abstract contract RevokableDefaultOperatorFilterer is RevokableOperatorFilterer { /// @dev The constructor that is called when the contract is being deployed. constructor() RevokableOperatorFilterer(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS, CANONICAL_CORI_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {UpdatableOperatorFilterer} from './UpdatableOperatorFilterer.sol'; import {IOperatorFilterRegistry} from './IOperatorFilterRegistry.sol'; /** * @title RevokableOperatorFilterer * @notice This contract is meant to allow contracts to permanently skip OperatorFilterRegistry checks if desired. The * Registry itself has an "unregister" function, but if the contract is ownable, the owner can re-register at * any point. As implemented, this abstract contract allows the contract owner to permanently skip the * OperatorFilterRegistry checks by calling revokeOperatorFilterRegistry. Once done, the registry * address cannot be further updated. * Note that OpenSea will still disable creator earnings enforcement if filtered operators begin fulfilling orders * on-chain, eg, if the registry is revoked or bypassed. */ abstract contract RevokableOperatorFilterer is UpdatableOperatorFilterer { /// @dev Emitted when the registry has already been revoked. error RegistryHasBeenRevoked(); /// @dev Emitted when the initial registry address is attempted to be set to the zero address. error InitialRegistryAddressCannotBeZeroAddress(); event OperatorFilterRegistryRevoked(); bool public isOperatorFilterRegistryRevoked; /// @dev The constructor that is called when the contract is being deployed. constructor(address _registry, address subscriptionOrRegistrantToCopy, bool subscribe) UpdatableOperatorFilterer(_registry, subscriptionOrRegistrantToCopy, subscribe) { // don't allow creating a contract with a permanently revoked registry if (_registry == address(0)) { revert InitialRegistryAddressCannotBeZeroAddress(); } } /** * @notice Update the address that the contract will make OperatorFilter checks against. When set to the zero * address, checks will be permanently bypassed, and the address cannot be updated again. OnlyOwner. */ function updateOperatorFilterRegistryAddress(address newRegistry) public override { if (msg.sender != owner()) { revert OnlyOwner(); } // if registry has been revoked, do not allow further updates if (isOperatorFilterRegistryRevoked) { revert RegistryHasBeenRevoked(); } operatorFilterRegistry = IOperatorFilterRegistry(newRegistry); emit OperatorFilterRegistryAddressUpdated(newRegistry); } /** * @notice Revoke the OperatorFilterRegistry address, permanently bypassing checks. OnlyOwner. */ function revokeOperatorFilterRegistry() public { if (msg.sender != owner()) { revert OnlyOwner(); } // if registry has been revoked, do not allow further updates if (isOperatorFilterRegistryRevoked) { revert RegistryHasBeenRevoked(); } // set to zero address to bypass checks operatorFilterRegistry = IOperatorFilterRegistry(address(0)); isOperatorFilterRegistryRevoked = true; emit OperatorFilterRegistryRevoked(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from './IOperatorFilterRegistry.sol'; /** * @title UpdatableOperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. This contract allows the Owner to update the * OperatorFilterRegistry address via updateOperatorFilterRegistryAddress, including to the zero address, * which will bypass registry checks. * Note that OpenSea will still disable creator earnings enforcement if filtered operators begin fulfilling orders * on-chain, eg, if the registry is revoked or bypassed. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. */ abstract contract UpdatableOperatorFilterer { /// @dev Emitted when an operator is not allowed. error OperatorNotAllowed(address operator); /// @dev Emitted when someone other than the owner is trying to call an only owner function. error OnlyOwner(); event OperatorFilterRegistryAddressUpdated(address newRegistry); IOperatorFilterRegistry public operatorFilterRegistry; /// @dev The constructor that is called when the contract is being deployed. constructor(address _registry, address subscriptionOrRegistrantToCopy, bool subscribe) { IOperatorFilterRegistry registry = IOperatorFilterRegistry(_registry); operatorFilterRegistry = registry; // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(registry).code.length > 0) { if (subscribe) { registry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { registry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { registry.register(address(this)); } } } } /** * @dev A helper function to check if the operator is allowed. */ modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } /** * @dev A helper function to check if the operator approval is allowed. */ modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } /** * @notice Update the address that the contract will make OperatorFilter checks against. When set to the zero * address, checks will be bypassed. OnlyOwner. */ function updateOperatorFilterRegistryAddress(address newRegistry) public virtual { if (msg.sender != owner()) { revert OnlyOwner(); } operatorFilterRegistry = IOperatorFilterRegistry(newRegistry); emit OperatorFilterRegistryAddressUpdated(newRegistry); } /** * @dev Assume the contract has an owner, but leave specific Ownable implementation up to inheriting contract. */ function owner() public view virtual returns (address); /** * @dev A helper function to check if the operator is allowed. */ function _checkFilterOperator(address operator) internal view virtual { IOperatorFilterRegistry registry = operatorFilterRegistry; // Check registry code length to facilitate testing in environments without a deployed registry. if (address(registry) != address(0) && address(registry).code.length > 0) { // under normal circumstances, this function will revert rather than return false, but inheriting contracts // may specify their own OperatorFilterRegistry implementations, which may behave differently if (!registry.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract WildNFT","name":"_nft","type":"address"},{"internalType":"address","name":"_payee","type":"address"},{"internalType":"address","name":"_oasis","type":"address"},{"internalType":"address","name":"_sanctions","type":"address"},{"internalType":"address","name":"_allowlistSigner","type":"address"},{"internalType":"address","name":"_wildPayee","type":"address"},{"internalType":"uint256","name":"_wildPrimaryRoyalty","type":"uint256"},{"internalType":"uint256","name":"_primaryFeeNumerator","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addedAddress","type":"address"},{"indexed":true,"internalType":"uint8","name":"state","type":"uint8"}],"name":"AddedToAllowList","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"bool","name":"extended","type":"bool"}],"name":"AuctionBid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"AuctionDurationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"minBidIncrementPercentage","type":"uint256"}],"name":"AuctionMinBidIncrementUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"minimumBid","type":"uint256"}],"name":"AuctionMinimumBidUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"AuctionSettled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timeBuffer","type":"uint256"}],"name":"AuctionTimeBufferUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"MetadataRevealed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"removedAddress","type":"address"}],"name":"RemovedFromAllowList","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"indexed":true,"internalType":"enum IAuctionHouse.MintType","name":"mintType","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"amountPaid","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isDelegated","type":"bool"},{"indexed":false,"internalType":"address","name":"delegatedVault","type":"address"},{"indexed":false,"internalType":"bool","name":"oasisUsed","type":"bool"},{"indexed":false,"internalType":"uint256[]","name":"oasisIds","type":"uint256[]"}],"name":"TokenMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"Bids","outputs":[{"internalType":"address payable","name":"bidder","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"minted","type":"bool"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"bool","name":"refunded","type":"bool"},{"internalType":"bool","name":"winner","type":"bool"},{"internalType":"uint256","name":"finalprice","type":"uint256"},{"internalType":"bool","name":"rafflewinner","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"},{"internalType":"uint8","name":"_state","type":"uint8"}],"name":"addToAllowList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allowList","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allowListEndDateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allowListMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allowListPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allowListStartDateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_qty","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"allowlistMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_qty","type":"uint256"},{"internalType":"address","name":"_vault","type":"address"}],"name":"allowlistMintDelegated","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"allowlistMintMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allowlistSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allowlistSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"auctionEndDateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"auctionExtentedTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"auctionSettled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"auctionStartDateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"auctionSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"auctionWinnersSet","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"checkAllowlist","outputs":[{"internalType":"uint8","name":"group","type":"uint8"},{"internalType":"uint256","name":"tokens","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"createBid","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"duration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllowlistAndRaffleInfo","outputs":[{"internalType":"uint256","name":"_raffleSupply","type":"uint256"},{"internalType":"uint256","name":"_allowListPrice","type":"uint256"},{"internalType":"uint256","name":"_allowListStartDateTime","type":"uint256"},{"internalType":"uint256","name":"_allowListEndDateTime","type":"uint256"},{"internalType":"bool","name":"_raffleWinnersSet","type":"bool"},{"internalType":"bool","name":"_publicSale","type":"bool"},{"internalType":"uint256","name":"_allowlistSupply","type":"uint256"},{"internalType":"uint256","name":"_totalMinted","type":"uint256"},{"internalType":"uint256","name":"_oasislistStartDateTime","type":"uint256"},{"internalType":"uint256","name":"_allowlistMintMax","type":"uint256"},{"internalType":"uint256","name":"_oasisPrice","type":"uint256"},{"internalType":"uint256","name":"_publicPrice","type":"uint256"},{"internalType":"bool","name":"_useOasisPriceForPublicSale","type":"bool"},{"internalType":"uint256","name":"_publicSaleMintMax","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAuctionInfo","outputs":[{"internalType":"uint256","name":"_auctionSupply","type":"uint256"},{"internalType":"uint256","name":"_auctionStartDateTime","type":"uint256"},{"internalType":"uint256","name":"_auctionEndDateTime","type":"uint256"},{"internalType":"uint256","name":"_auctionExtentedTime","type":"uint256"},{"internalType":"bool","name":"_auctionWinnersSet","type":"bool"},{"internalType":"bool","name":"_auctionSettled","type":"bool"},{"internalType":"bool","name":"_settled","type":"bool"},{"internalType":"uint256","name":"_timeBuffer","type":"uint256"},{"internalType":"uint256","name":"_duration","type":"uint256"},{"internalType":"uint256","name":"_minimumBid","type":"uint256"},{"internalType":"uint256","name":"_minBidIncrement","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"manager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBidIncrement","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumBid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nft","outputs":[{"internalType":"contract WildNFT","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oasis","outputs":[{"internalType":"contract IOasis","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oasisListStartDateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"oasisPassMints","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oasisPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_qty","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"passMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"payee","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"primaryFeeNumerator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_qty","type":"uint256"},{"internalType":"enum IAuctionHouse.MintType","name":"mintType","type":"uint8"}],"name":"promoMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_to","type":"address[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"enum IAuctionHouse.MintType","name":"mintType","type":"uint8"}],"name":"promoMintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"promoSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"publicSaleMintMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_qty","type":"uint256"}],"name":"publicSaleMintMultiple","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"raffleSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"raffleWinnersSet","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"removeFromAllowList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"revealMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sanctionsList","outputs":[{"internalType":"contract SanctionsList","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract WildNFT","name":"_nft","type":"address"}],"name":"set721ContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newAllowListEndDateTime","type":"uint256"}],"name":"setAllowListEndDateTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allowListPrice","type":"uint256"}],"name":"setAllowListPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newAllowListStartDateTime","type":"uint256"}],"name":"setAllowListStartDateTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newAllowlistMintMax","type":"uint256"}],"name":"setAllowlistMintMax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setAllowlistSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allowlistSupply","type":"uint256"}],"name":"setAllowlistSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newAuctionEndDateTime","type":"uint256"}],"name":"setAuctionEndDateTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setAuctionSettled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newAuctionStartDateTime","type":"uint256"}],"name":"setAuctionStartDateTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newAuctionSupply","type":"uint256"}],"name":"setAuctionSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_auctionWinners","type":"address[]"},{"internalType":"uint256[]","name":"_prices","type":"uint256[]"}],"name":"setAuctionWinners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_duration","type":"uint256"}],"name":"setDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_manager","type":"address"}],"name":"setManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMaxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minBidIncrement","type":"uint256"}],"name":"setMinBidIncrement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minimumBid","type":"uint256"}],"name":"setMinimumBid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_oasisPrice","type":"uint256"}],"name":"setOasisPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newOasislistStartDateTime","type":"uint256"}],"name":"setOasislistStartDateTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_payee","type":"address"}],"name":"setPayee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_primaryFeeNumerator","type":"uint256"}],"name":"setPrimaryFeeNumerator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPromoSupply","type":"uint256"}],"name":"setPromoSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_publicPrice","type":"uint256"}],"name":"setPublicPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setPublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPublicSaleMintMax","type":"uint256"}],"name":"setPublicSaleMintMax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newRaffleSupply","type":"uint256"}],"name":"setRaffleSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_raffleWinners","type":"address[]"}],"name":"setRaffleWinners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timeBuffer","type":"uint256"}],"name":"setTimeBuffer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"allowListStart","type":"uint256"},{"internalType":"uint256","name":"_duration","type":"uint256"}],"name":"setTimes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_useOasisPriceForPublicSale","type":"bool"}],"name":"setUseOasisPriceForPublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allowlistMintMax","type":"uint256"},{"internalType":"uint256","name":"_timeBuffer","type":"uint256"},{"internalType":"uint256","name":"_minimumBid","type":"uint256"},{"internalType":"uint256","name":"_minBidIncrement","type":"uint256"},{"internalType":"uint256","name":"_allowListPrice","type":"uint256"},{"internalType":"uint256","name":"_duration","type":"uint256"},{"internalType":"uint256","name":"_publicSaleMintMax","type":"uint256"},{"internalType":"uint256","name":"_oasisPrice","type":"uint256"},{"internalType":"uint256","name":"_publicPrice","type":"uint256"},{"internalType":"bool","name":"_useOasisPriceForPublicSale","type":"bool"}],"name":"setVariablesBatch1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_raffleSupply","type":"uint256"},{"internalType":"uint256","name":"_auctionSupply","type":"uint256"},{"internalType":"uint256","name":"_allowlistSupply","type":"uint256"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_promoSupply","type":"uint256"},{"internalType":"uint256","name":"_oasisListStartDateTime","type":"uint256"},{"internalType":"uint256","name":"_allowListStartDateTime","type":"uint256"},{"internalType":"uint256","name":"_allowListEndDateTime","type":"uint256"},{"internalType":"uint256","name":"_auctionStartDateTime","type":"uint256"},{"internalType":"uint256","name":"_auctionEndDateTime","type":"uint256"}],"name":"setVariablesBatch2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_wildPayee","type":"address"}],"name":"setWildPayee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_wildPrimaryRoyalty","type":"uint256"}],"name":"setWildPrimaryRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_bidders","type":"address[]"}],"name":"settleBidder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"settled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"skipToPublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timeBuffer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"useOasisPriceForPublicSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"verifySignature","outputs":[{"internalType":"bool","name":"valid","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wildPayee","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wildPrimaryRoyalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052601c805464ffffffffff60a01b191690553480156200002257600080fd5b5060405162005f1338038062005f13833981016040819052620000459162000174565b6000805460ff19169055600180556200005e3362000109565b601e80546001600160a01b03199081166001600160a01b039a8b1617909155601a80548216988a1698909817909755601d8054881696891696909617909555601f8054871694881694909417909355601c8054861692871692909217909155601b8054739daf56fb5d08b1dad7e6a46e0d5e814f41d1b7f99086161790556019805485169190951617909355601792909255601891909155602080543392169190911790556200021a565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03811681146200017157600080fd5b50565b600080600080600080600080610100898b0312156200019257600080fd5b88516200019f816200015b565b60208a0151909850620001b2816200015b565b60408a0151909750620001c5816200015b565b60608a0151909650620001d8816200015b565b60808a0151909550620001eb816200015b565b60a08a0151909450620001fe816200015b565b60c08a015160e0909a0151989b979a5095989497939692505050565b615ce9806200022a6000396000f3fe6080604052600436106105745760003560e01c80638456cb59116102d8578063cdd5bcc211610180578063dd6d1cd1116100e7578063f2c6cc52116100a0578063f851a4401161007a578063f851a44014611186578063fa1431da146111a6578063fc3a6353146111d3578063fd49af13146111f357600080fd5b8063f2c6cc5214611130578063f2fde38b14611146578063f6be71d11461116657600080fd5b8063dd6d1cd114611085578063e30ac003146110a5578063e474def4146110ba578063e5481754146110da578063ec571c6a146110fa578063ec91f2a41461111a57600080fd5b8063d3a8638611610139578063d3a8638614610f68578063d3e761a414610f7e578063d5abeb0114610f9f578063d8e003d614610fb5578063d94a350514610fcb578063d9ad7f911461106557600080fd5b8063cdd5bcc214610eca578063d0ebdbe714610eea578063d16c536f14610f0a578063d1b7bda314610f2a578063d2b898df14610f40578063d2eb86ee14610f6057600080fd5b8063a3afda1a1161023f578063bbf25c5b116101f8578063c403b5b2116101d2578063c403b5b214610e5e578063c417f57f14610e74578063c5693a8414610e94578063c627525514610eaa57600080fd5b8063bbf25c5b14610e09578063c1b819b914610e1e578063c32fe11b14610e3e57600080fd5b8063a3afda1a14610d5c578063a51312c814610d7c578063a945bf8014610d9c578063ae90b21314610db2578063b59f6bf514610dd2578063ba060b7d14610df357600080fd5b80638bab534d116102915780638bab534d14610cb45780638d57c9a914610cd45780638da5cb5b14610cf45780638f77583914610d125780639a3afdec14610d33578063a24e515314610d4657600080fd5b80638456cb5914610bfc578063852fedc914610c1157806386495b0414610c3157806388bbba1214610c5157806389b8c18014610c815780638a64bbf014610c9457600080fd5b806342ab5ee21161043b57806365d634c5116103a2578063710736641161035b5780637215ef60116103355780637215ef6014610b9d57806378f1988714610bbe57806380a06f9714610bde5780638362407414610bf457600080fd5b80637107366414610b2f5780637120334b14610b68578063715018a614610b8857600080fd5b806365d634c514610a6f5780636d8aded114610a8f5780636db471cb14610aaf5780636df9fa8814610acf5780636f8b44b014610aef578063704b6c0214610b0f57600080fd5b806355f15f0c116103f457806355f15f0c146109cb57806356f8f78c146109ec57806358151ef414610a0157806358d5d66614610a21578063599d127a14610a415780635c975abb14610a5757600080fd5b806342ab5ee21461090b57806347ccca021461092b578063481c6a751461094b5780634ce7e0821461096b578063510f615a1461098b57806355ee09d7146109ab57600080fd5b806323ab54b5116104df57806333bc1c5c1161049857806333bc1c5c14610874578063381bf932146108955780633ccfd60b146108ab5780633f17d40a146108c05780633f4ba83a146108d6578063410459ad146108eb57600080fd5b806323ab54b514610787578063258c1ef5146107a75780632848aeaf146107d7578063295636db14610819578063298230281461082f578063335b115e1461085e57600080fd5b806313cabd691161053157806313cabd69146106f557806315c8f1061461070b5780631c961d4a1461071e5780631eb8b343146107315780631f20389b14610747578063224348361461076757600080fd5b806301596309146105795780630251e03e1461059b5780630993dfab146106635780630cb715841461069b5780630fb5a6b4146106bb57806312300ba4146106df575b600080fd5b34801561058557600080fd5b50610599610594366004615432565b611209565b005b3480156105a757600080fd5b5061060d6105b6366004615489565b60216020526000908152604090208054600182015460028301546003840154600485015460058601546006909601546001600160a01b0390951695939460ff93841694929382811693610100909304811692911688565b604080516001600160a01b039099168952602089019790975294151595870195909552606086019290925215156080850152151560a084015260c0830191909152151560e0820152610100015b60405180910390f35b34801561066f57600080fd5b50601954610683906001600160a01b031681565b6040516001600160a01b03909116815260200161065a565b3480156106a757600080fd5b506105996106b63660046154fd565b6112d5565b3480156106c757600080fd5b506106d1600b5481565b60405190815260200161065a565b3480156106eb57600080fd5b506106d160165481565b34801561070157600080fd5b506106d160145481565b61059961071936600461556d565b61136b565b61059961072c3660046155b3565b61140e565b34801561073d57600080fd5b506106d160125481565b34801561075357600080fd5b506105996107623660046155d8565b6114e4565b34801561077357600080fd5b506105996107823660046155f1565b6114f1565b34801561079357600080fd5b506105996107a236600461566e565b61153e565b3480156107b357600080fd5b506107c76107c23660046156c7565b611697565b604051901515815260200161065a565b3480156107e357600080fd5b506108076107f2366004615489565b60226020526000908152604090205460ff1681565b60405160ff909116815260200161065a565b34801561082557600080fd5b506106d160185481565b34801561083b57600080fd5b50610844611768565b60405161065a9e9d9c9b9a99989796959493929190615700565b34801561086a57600080fd5b506106d160065481565b34801561088057600080fd5b50601c546107c790600160c01b900460ff1681565b3480156108a157600080fd5b506106d160085481565b3480156108b757600080fd5b5061059961186e565b3480156108cc57600080fd5b506106d160135481565b3480156108e257600080fd5b50610599611880565b3480156108f757600080fd5b50610599610906366004615489565b611890565b34801561091757600080fd5b5061059961092636600461578d565b6118ba565b34801561093757600080fd5b50601e54610683906001600160a01b031681565b34801561095757600080fd5b50602054610683906001600160a01b031681565b34801561097757600080fd5b50610599610986366004615489565b611902565b34801561099757600080fd5b506105996109a63660046155d8565b61192c565b3480156109b757600080fd5b506105996109c63660046155d8565b61195b565b3480156109d757600080fd5b50601c546107c790600160a01b900460ff1681565b3480156109f857600080fd5b506105996119c1565b348015610a0d57600080fd5b50610599610a1c3660046155d8565b611a0c565b348015610a2d57600080fd5b50610599610a3c366004615489565b611a3b565b348015610a4d57600080fd5b506106d1600c5481565b348015610a6357600080fd5b5060005460ff166107c7565b348015610a7b57600080fd5b50610599610a8a3660046155d8565b611a87565b348015610a9b57600080fd5b50610599610aaa3660046157aa565b611ab6565b348015610abb57600080fd5b50610599610aca3660046157de565b611c45565b348015610adb57600080fd5b50610599610aea3660046155d8565b611cf2565b348015610afb57600080fd5b50610599610b0a3660046155d8565b611cff565b348015610b1b57600080fd5b50610599610b2a366004615489565b611d2e565b348015610b3b57600080fd5b50610b4f610b4a3660046156c7565b611d58565b6040805160ff909316835260208301919091520161065a565b348015610b7457600080fd5b50610599610b833660046155d8565b611e42565b348015610b9457600080fd5b50610599611ea1565b348015610ba957600080fd5b50601c546107c790600160c81b900460ff1681565b348015610bca57600080fd5b50610599610bd93660046155d8565b611eb3565b348015610bea57600080fd5b506106d160095481565b610599611ee2565b348015610c0857600080fd5b5061059961222f565b348015610c1d57600080fd5b50610599610c2c3660046157aa565b61223f565b348015610c3d57600080fd5b50610599610c4c3660046155d8565b612730565b348015610c5d57600080fd5b50610807610c6c3660046155d8565b60246020526000908152604090205460ff1681565b610599610c8f3660046155b3565b61278f565b348015610ca057600080fd5b50610599610caf3660046155d8565b612927565b348015610cc057600080fd5b50610599610ccf3660046155d8565b612956565b348015610ce057600080fd5b50610599610cef3660046155d8565b612985565b348015610d0057600080fd5b506002546001600160a01b0316610683565b348015610d1e57600080fd5b50601c546107c790600160b81b900460ff1681565b610599610d413660046155d8565b6129b4565b348015610d5257600080fd5b506106d160045481565b348015610d6857600080fd5b50601d54610683906001600160a01b031681565b348015610d8857600080fd5b50610599610d973660046157aa565b612fb7565b348015610da857600080fd5b506106d160075481565b348015610dbe57600080fd5b50601a54610683906001600160a01b031681565b348015610dde57600080fd5b50601c546107c790600160a81b900460ff1681565b348015610dff57600080fd5b506106d1600d5481565b348015610e1557600080fd5b50610599613069565b348015610e2a57600080fd5b50610599610e393660046155d8565b6130ed565b348015610e4a57600080fd5b50601c54610683906001600160a01b031681565b348015610e6a57600080fd5b506106d160155481565b348015610e8057600080fd5b50610599610e8f36600461585d565b61311c565b348015610ea057600080fd5b506106d160115481565b348015610eb657600080fd5b50610599610ec53660046155d8565b6131b0565b348015610ed657600080fd5b50610599610ee53660046158d9565b6131df565b348015610ef657600080fd5b50610599610f05366004615489565b613214565b348015610f1657600080fd5b50610599610f253660046155d8565b61323e565b348015610f3657600080fd5b506106d160105481565b348015610f4c57600080fd5b50610599610f5b3660046155d8565b61324b565b61059961327a565b348015610f7457600080fd5b506106d160055481565b348015610f8a57600080fd5b50601c546107c790600160b01b900460ff1681565b348015610fab57600080fd5b506106d1600f5481565b348015610fc157600080fd5b506106d160175481565b348015610fd757600080fd5b50600d54601454601554601654601c54600a54600b5460055460065460408051998a5260208a019890985296880195909552606087019390935260ff600160a01b8304811615156080880152600160b01b83048116151560a0880152600160b81b909204909116151560c086015260e08501526101008401526101208301526101408201526101600161065a565b34801561107157600080fd5b506105996110803660046155d8565b613769565b34801561109157600080fd5b506105996110a0366004615917565b613798565b3480156110b157600080fd5b50610599613be3565b3480156110c657600080fd5b506105996110d5366004615489565b613c91565b3480156110e657600080fd5b506105996110f53660046155d8565b613cdd565b34801561110657600080fd5b50601f54610683906001600160a01b031681565b34801561112657600080fd5b506106d1600a5481565b34801561113c57600080fd5b506106d160035481565b34801561115257600080fd5b50610599611161366004615489565b613d0c565b34801561117257600080fd5b506105996111813660046155d8565b613d82565b34801561119257600080fd5b50601b54610683906001600160a01b031681565b3480156111b257600080fd5b506106d16111c1366004615489565b60236020526000908152604090205481565b3480156111df57600080fd5b506105996111ee3660046155d8565b613de1565b3480156111ff57600080fd5b506106d1600e5481565b601b546001600160a01b0316331461123c5760405162461bcd60e51b815260040161123390615981565b60405180910390fd5b60005b82518110156112d057600083828151811061125c5761125c6159c4565b6020908102919091018101516001600160a01b038116600081815260229093526040808420805460ff191660ff891690811790915590519294509290917f5e1c988ff223cdb5da0e9c3b4228dfe56444cb87e7d328c8495a1c40bfe9fa2a9190a350806112c8816159f0565b91505061123f565b505050565b6112dd613e10565b601e54604051630b85272160e11b81526001600160a01b039091169063170a4e429061130d908490600401615a2d565b600060405180830381600087803b15801561132757600080fd5b505af115801561133b573d6000803e3d6000fd5b50506040517ffaa4867c3ad82b35eef727eb877061cab7f6eb3576904aea9bc9520868076822925060009150a150565b601f5460405163df592f7d60e01b81523360048201819052916000916001600160a01b039091169063df592f7d90602401602060405180830381865afa1580156113b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113dd9190615a60565b905080156113fd5760405162461bcd60e51b815260040161123390615a7d565b611408843385613e6a565b50505050565b601b546001600160a01b031633148061143157506020546001600160a01b031633145b6114945760405162461bcd60e51b815260206004820152602e60248201527f41756374696f6e486f7573653a206f6e6c792061646d696e206f72206d616e6160448201526d33b2b9103832b936b4ba3a32b21760911b6064820152608401611233565b600034116114d45760405162461bcd60e51b815260206004820152600d60248201526c26bab9ba103132903830b4b21760991b6044820152606401611233565b6114e081836006614765565b5050565b6114ec613e10565b601855565b6114f9613e10565b61150482605a615ab2565b60115561151282605a615ab2565b6012819055611522908290615ab2565b60138190556014819055611537908290615ab2565b6015555050565b611546613e10565b601554421161158f5760405162461bcd60e51b815260206004820152601560248201527420bab1ba34b7b7103737ba1037bb32b9103cb2ba1760591b6044820152606401611233565b601c54600160a01b900460ff16156115e35760405162461bcd60e51b8152602060048201526017602482015276105d58dd1a5bdb88185b1c9958591e481cd95d1d1b1959604a1b6044820152606401611233565b60005b825181101561167f57600060216000858481518110611607576116076159c4565b6020908102919091018101516001600160a01b0316825281019190915260400160002060048101805461ff0019166101001790558351909150839083908110611652576116526159c4565b60209081029190910101516005820155600601805460ff1916905580611677816159f0565b9150506115e6565b5050601c805460ff60a01b1916600160a01b17905550565b6000815160410361175e576040516bffffffffffffffffffffffff19606085811b8216602084015230901b166034820152600090604801604051602081830303815290604052805190602001209050600061171f827f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050600061172d8286614a74565b90506001600160a01b038116158015906117545750601c546001600160a01b038281169116145b9350505050611762565b5060005b92915050565b600080600080600080600080600080600080600080600c54600454601254601354601c60159054906101000a900460ff16601c60189054906101000a900460ff16600e54601e60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118239190615ac5565b601154600954600354600754601c60199054906101000a900460ff166008549d509d509d509d509d509d509d509d509d509d509d509d509d509d50909192939495969798999a9b9c9d565b611876613e10565b61187e614a98565b565b611888613e10565b61187e614cb8565b611898613e10565b601a80546001600160a01b0319166001600160a01b0392909216919091179055565b601b546001600160a01b031633146118e45760405162461bcd60e51b815260040161123390615981565b601c8054911515600160c81b0260ff60c81b19909216919091179055565b61190a613e10565b601980546001600160a01b0319166001600160a01b0392909216919091179055565b601b546001600160a01b031633146119565760405162461bcd60e51b815260040161123390615981565b601355565b601b546001600160a01b031633146119855760405162461bcd60e51b815260040161123390615981565b60068190556040518181527fc3c898bec609452e0cecc8990f6692426351b704f348f19cc242bd4d42d65ce9906020015b60405180910390a150565b601b546001600160a01b031633146119eb5760405162461bcd60e51b815260040161123390615981565b601c805460ff60c01b198116600160c01b9182900460ff1615909102179055565b601b546001600160a01b03163314611a365760405162461bcd60e51b815260040161123390615981565b600855565b601b546001600160a01b03163314611a655760405162461bcd60e51b815260040161123390615981565b601e80546001600160a01b0319166001600160a01b0392909216919091179055565b601b546001600160a01b03163314611ab15760405162461bcd60e51b815260040161123390615981565b600c55565b611abe613e10565b6015544211611b075760405162461bcd60e51b815260206004820152601560248201527420bab1ba34b7b7103737ba1037bb32b9103cb2ba1760591b6044820152606401611233565b601c54600160a81b900460ff1615611b5a5760405162461bcd60e51b8152602060048201526016602482015275149859999b1948185b1c9958591e481cd95d1d1b195960521b6044820152606401611233565b600c5481511115611bad5760405162461bcd60e51b815260206004820152601b60248201527f496e636f7272656374206e756d626572206f662077696e6e65727300000000006044820152606401611233565b60005b8151811015611c2e57600060216000848481518110611bd157611bd16159c4565b6020908102919091018101516001600160a01b0316825281019190915260400160002060048101805461ff0019166101001790556005805490820155600601805460ff191660011790555080611c26816159f0565b915050611bb0565b5050601c805460ff60a81b1916600160a81b179055565b611c4d613e10565b6001600081905260256020527f20a3e2dd35f58e582c5288344c035e137cace924bb9daf3762b8ef5a58327e265460ff1615611c8857600080fd5b6001600160401b03166000908152602560205260409020805460ff19166001179055600999909955600a97909755600595909555600693909355600491909155600b55600855600355600755601c8054911515600160c81b0260ff60c81b19909216919091179055565b611cfa613e10565b600455565b601b546001600160a01b03163314611d295760405162461bcd60e51b815260040161123390615981565b600f55565b611d36613e10565b601b80546001600160a01b0319166001600160a01b0392909216919091179055565b601d546040516370a0823160e01b81526001600160a01b03848116600483015260009283928392909116906370a0823190602401602060405180830381865afa158015611da9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dcd9190615ac5565b90508015611dea576001611de086614d0a565b9250925050611e3b565b6000611df68686611697565b90508015611e31576001600160a01b038616600090815260236020526040902054600954600291611e2691615ade565b935093505050611e3b565b6000809350935050505b9250929050565b601b546001600160a01b03163314611e6c5760405162461bcd60e51b815260040161123390615981565b600a8190556040518181527f1b55d9f7002bda4490f467e326f22a4a847629c0f2d1ed421607d318d25b410d906020016119b6565b611ea9613e10565b61187e6000614e44565b601b546001600160a01b03163314611edd5760405162461bcd60e51b815260040161123390615981565b600355565b611eea614e96565b60005460ff1615611f0d5760405162461bcd60e51b815260040161123390615af1565b601f5460405163df592f7d60e01b81523360048201819052916000916001600160a01b039091169063df592f7d90602401602060405180830381865afa158015611f5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f7f9190615a60565b90508015611f9f5760405162461bcd60e51b815260040161123390615a7d565b6015543390349042108015611fb657506014544210155b6120025760405162461bcd60e51b815260206004820152601760248201527f4f7574736964652061756374696f6e2077696e646f772e0000000000000000006044820152606401611233565b60055481101561204a5760405162461bcd60e51b81526020600482015260136024820152722134b21030b6b7bab73a103a37b7903637bb9760691b6044820152606401611233565b6001600160a01b03821660009081526021602052604090206001015415612106576001600160a01b0382166000908152602160205260409020600181015482116120ec5760405162461bcd60e51b815260206004820152602d60248201527f596f752063616e206f6e6c7920696e63726561736520796f7572206269642c2060448201526c3737ba103232b1b932b0b9b29760991b6064820152608401611233565b6120fa838260010154614eef565b506001018190556121d9565b60408051610100808201835260008284018181526080840182815260a0850183815260c0860184815260e087018581526001600160a01b038b8116808a526020808b018d81524260608d01908152928a5260219091529a909720985189546001600160a01b031916911617885597516001880155925160028701805460ff19908116921515929092179055935160038701559051600486018054925161ffff1990931691151561ff0019169190911791151590940217909255905160058301559151600690910180549092169015151790555b604080516001600160a01b03841681526020810183905260008183015290517f4c59a472ced976904d21e373e2f2d8326defffabfe087e3d7886f0c516495ba79181900360600190a15050505061187e60018055565b612237613e10565b61187e614f6d565b612247613e10565b61224f614e96565b60155442116122985760405162461bcd60e51b815260206004820152601560248201527420bab1ba34b7b7103430b9b713ba1032b73232b21760591b6044820152606401611233565b601c54600160a01b900460ff16151560011480156122c45750601c54600160a81b900460ff1615156001145b6123105760405162461bcd60e51b815260206004820152601760248201527f41756374696f6e2077696e6e657273206e6f74207365740000000000000000006044820152606401611233565b60005b8151811015612723576000828281518110612330576123306159c4565b6020908102919091018101516001600160a01b03811660009081526021909252604090912060048101549192509060ff610100909104161515600114801561237d5750600281015460ff16155b801561238e5750600481015460ff16155b15612635576000816005015482600101546123a99190615ade565b90508015612465576000836001600160a01b03168260405160006040518083038185875af1925050503d80600081146123fe576040519150601f19603f3d011682016040523d82523d6000602084013e612403565b606091505b50509050806124635760405162461bcd60e51b815260206004820152602660248201527f4661696c656420746f20726566756e6420646966666572656e636520746f207760448201526534b73732b91760d11b6064820152608401611233565b505b601e546040516335313c2160e11b81526001600160a01b0385811660048301526000921690636a627842906024016020604051808303816000875af11580156124b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124d69190615ac5565b60408051600180825281830190925291925060009190602080830190803683370190505090508181600081518110612510576125106159c4565b6020908102919091010152600684015460ff16151560010361259e57600360058501546001600160a01b03871690600080516020615c94833981519152908490600080808060405190808252806020026020018201604052801561257e578160200160208202803683370190505b5060405161259196959493929190615b70565b60405180910390a361260c565b600260058501546001600160a01b03871690600080516020615c9483398151915290849060008080806040519080825280602002602001820160405280156125f0578160200160208202803683370190505b5060405161260396959493929190615b70565b60405180910390a35b505050600281018054600160ff199182168117909255600483018054909116909117905561270e565b6004810154610100900460ff161580156126545750600481015460ff16155b1561270e5760018101546040516000916001600160a01b038516918381818185875af1925050503d80600081146126a7576040519150601f19603f3d011682016040523d82523d6000602084013e6126ac565b606091505b50509050806126fd5760405162461bcd60e51b815260206004820152601f60248201527f4661696c656420746f2073656e6420726566756e6420746f206c6f7365722e006044820152606401611233565b5060048101805460ff191660011790555b5050808061271b906159f0565b915050612313565b5061272d60018055565b50565b601b546001600160a01b0316331461275a5760405162461bcd60e51b815260040161123390615981565b60058190556040518181527f0b2415f9ab63dbd60a9b1d42289c1deace6a9bbb6c006d8f3f2c1d872a471444906020016119b6565b601f5460405163df592f7d60e01b81523360048201819052916000916001600160a01b039091169063df592f7d90602401602060405180830381865afa1580156127dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128019190615a60565b905080156128215760405162461bcd60e51b815260040161123390615a7d565b601d5460405163090c9a2d60e41b81523360048201526001600160a01b03808616602483015290911660448201526d76a84fef008cdabe6409d2fe638b906390c9a2d090606401602060405180830381865afa158015612885573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128a99190615a60565b61290d5760405162461bcd60e51b815260206004820152602f60248201527f44656c656761746552656769737472793a2077616c6c6574206164647265737360448201526e081b9bdd081c9959da5cdd195c9959608a1b6064820152608401611233565b611408848460405180602001604052806000815250613e6a565b601b546001600160a01b031633146129515760405162461bcd60e51b815260040161123390615981565b601055565b601b546001600160a01b031633146129805760405162461bcd60e51b815260040161123390615981565b600e55565b601b546001600160a01b031633146129af5760405162461bcd60e51b815260040161123390615981565b601555565b6129bc614e96565b60005460ff16156129df5760405162461bcd60e51b815260040161123390615af1565b601f5460405163df592f7d60e01b81523360048201819052916000916001600160a01b039091169063df592f7d90602401602060405180830381865afa158015612a2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a519190615a60565b90508015612a715760405162461bcd60e51b815260040161123390615a7d565b601e546040805163d5abeb0160e01b815290516000926001600160a01b03169163d5abeb019160048083019260209291908290030181865afa158015612abb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612adf9190615ac5565b90506000601e60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b5a9190615ac5565b9050600854851115612bae5760405162461bcd60e51b815260206004820152601a60248201527f546f6f206d616e7920746f6b656e73207265717565737465642e0000000000006044820152606401611233565b818110612bf95760405162461bcd60e51b815260206004820152601960248201527827379036b7b932903a37b5b2b7399030bb30b4b630b136329760391b6044820152606401611233565b84612c048284615ade565b1015612c525760405162461bcd60e51b815260206004820152601b60248201527f4e6f7420656e6f75676820737570706c79206c656674202d20312e00000000006044820152606401611233565b601c54600160c01b900460ff161515600114612ca25760405162461bcd60e51b815260206004820152600f60248201526e2737ba1030baba3437b934bd32b21760891b6044820152606401611233565b601c5433903490600090600160c81b900460ff1615612dfb57601d546040516370a0823160e01b81526001600160a01b03858116600483015260009216906370a0823190602401602060405180830381865afa158015612d06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d2a9190615ac5565b90508015612d985788600354612d409190615bc8565b341015612d8f5760405162461bcd60e51b815260206004820152601c60248201527f4f617369732070726963653a20416d6f756e7420746f6f206c6f772e000000006044820152606401611233565b60019150612df5565b88600754612da69190615bc8565b341015612df55760405162461bcd60e51b815260206004820152601d60248201527f5075626c69632070726963653a20416d6f756e7420746f6f206c6f772e0000006044820152606401611233565b50612e4a565b87600754612e099190615bc8565b821015612e4a5760405162461bcd60e51b815260206004820152600f60248201526e20b6b7bab73a103a37b7903637bb9760891b6044820152606401611233565b6000886001600160401b03811115612e6457612e64615340565b604051908082528060200260200182016040528015612e8d578160200160208202803683370190505b50905060005b89811015612f3f57601e546040516335313c2160e11b81526001600160a01b0387811660048301526000921690636a627842906024016020604051808303816000875af1158015612ee8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f0c9190615ac5565b905080838381518110612f2157612f216159c4565b60209081029190910101525080612f37816159f0565b915050612e93565b5060046001600160a01b038516600080516020615c9483398151915283866000808881604051908082528060200260200182016040528015612f8b578160200160208202803683370190505b50604051612f9e96959493929190615b70565b60405180910390a3505050505050505061272d60018055565b601b546001600160a01b03163314612fe15760405162461bcd60e51b815260040161123390615981565b60005b81518110156114e0576000828281518110613001576130016159c4565b6020908102919091018101516001600160a01b038116600081815260229093526040808420805460ff1916905551919350917f29beb8aae77ba82cbb9d5a13ac9153539286534ddea0dc0a0aa61c484585a61491a25080613061816159f0565b915050612fe4565b613071613e10565b6003600081905260256020527fc5fdd46c9592bee36fcfadca77466e8856c74a47731422467f212e3622f92e335460ff16156130ac57600080fd5b6001600160401b03166000908152602560205260409020805460ff19166001179055601c805464010101010160a01b64ffffffffff60a01b19909116179055565b601b546001600160a01b031633146131175760405162461bcd60e51b815260040161123390615981565b601255565b613124613e10565b6002600081905260256020527ff1da3aed71bcbd4afa246ea3711ddde93661ac45b913264dbc974ee389cd7a635460ff161561315f57600080fd5b6001600160401b03166000908152602560205260409020805460ff19166001179055600c99909955600d97909755600e95909555600f93909355601091909155601155601255601355601455601555565b601b546001600160a01b031633146131da5760405162461bcd60e51b815260040161123390615981565b600755565b601b546001600160a01b031633146132095760405162461bcd60e51b815260040161123390615981565b6112d0838383614765565b61321c613e10565b602080546001600160a01b0319166001600160a01b0392909216919091179055565b613246613e10565b601755565b601b546001600160a01b031633146132755760405162461bcd60e51b815260040161123390615981565b600955565b613282614e96565b60005460ff16156132a55760405162461bcd60e51b815260040161123390615af1565b601f5460405163df592f7d60e01b81523360048201819052916000916001600160a01b039091169063df592f7d90602401602060405180830381865afa1580156132f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133179190615a60565b905080156133375760405162461bcd60e51b815260040161123390615a7d565b601e60009054906101000a90046001600160a01b03166001600160a01b031663d5abeb016040518163ffffffff1660e01b8152600401602060405180830381865afa15801561338a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133ae9190615ac5565b601e60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613401573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134259190615ac5565b1061346e5760405162461bcd60e51b815260206004820152601960248201527827379036b7b932903a37b5b2b7399030bb30b4b630b136329760391b6044820152606401611233565b601c54600160c01b900460ff1615156001146134be5760405162461bcd60e51b815260206004820152600f60248201526e2737ba1030baba3437b934bd32b21760891b6044820152606401611233565b601c5433903490600160c81b900460ff16156135fa57601d546040516370a0823160e01b81526001600160a01b03848116600483015260009216906370a0823190602401602060405180830381865afa15801561351f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135439190615ac5565b905080156135a25760035434101561359d5760405162461bcd60e51b815260206004820152601c60248201527f4f617369732070726963653a20416d6f756e7420746f6f206c6f772e000000006044820152606401611233565b6135f4565b6007543410156135f45760405162461bcd60e51b815260206004820152601d60248201527f5075626c69632070726963653a20416d6f756e7420746f6f206c6f772e0000006044820152606401611233565b5061363e565b60075434101561363e5760405162461bcd60e51b815260206004820152600f60248201526e20b6b7bab73a103a37b7903637bb9760891b6044820152606401611233565b601e546040516335313c2160e11b81526001600160a01b0384811660048301526000921690636a627842906024016020604051808303816000875af115801561368b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136af9190615ac5565b604080516001808252818301909252919250600091906020808301908036833701905050905081816000815181106136e9576136e96159c4565b602090810291909101015260046001600160a01b038516600080516020615c948339815191528386600080808060405190808252806020026020018201604052801561373f578160200160208202803683370190505b5060405161375296959493929190615b70565b60405180910390a350505050505061187e60018055565b601b546001600160a01b031633146137935760405162461bcd60e51b815260040161123390615981565b601455565b601b546001600160a01b031633146137c25760405162461bcd60e51b815260040161123390615981565b8251825181146138265760405162461bcd60e51b815260206004820152602960248201527f5f746f20616e64205f616d6f756e7473206172726179206c656e67746873206d6044820152680eae6e840dac2e8c6d60bb1b6064820152608401611233565b8060105410156138725760405162461bcd60e51b81526020600482015260176024820152764e6f7420656e6f7567682070726f6d6f20737570706c7960481b6044820152606401611233565b6012544211156138c05760405162461bcd60e51b81526020600482015260196024820152784f7574736964652070726f6d6f206d696e742077696e646f7760381b6044820152606401611233565b600c54601e54604080516318160ddd60e01b8152905184926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa15801561390c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139309190615ac5565b600f5461393d9190615ade565b6139479190615ade565b10156139655760405162461bcd60e51b815260040161123390615bdf565b60005b8451811015613b48576000858281518110613985576139856159c4565b6020026020010151905060008583815181106139a3576139a36159c4565b602002602001015190506000816001600160401b038111156139c7576139c7615340565b6040519080825280602002602001820160405280156139f0578160200160208202803683370190505b50905060005b82811015613aa257601e546040516335313c2160e11b81526001600160a01b0386811660048301526000921690636a627842906024016020604051808303816000875af1158015613a4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a6f9190615ac5565b905080838381518110613a8457613a846159c4565b60209081029190910101525080613a9a816159f0565b9150506139f6565b50856006811115613ab557613ab5615b1f565b6001600160a01b038416600080516020615c9483398151915283600080808080604051908082528060200260200182016040528015613afe578160200160208202803683370190505b50604051613b1196959493929190615b70565b60405180910390a38160106000828254613b2b9190615ade565b925050819055505050508080613b40906159f0565b915050613968565b50600c54601e60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613b9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613bc39190615ac5565b600f54613bd09190615ade565b613bda9190615ade565b600d5550505050565b613beb613e10565b601c54600160b01b900460ff1615613c3f5760405162461bcd60e51b8152602060048201526017602482015276105d58dd1a5bdb88185b1c9958591e481cd95d1d1b1959604a1b6044820152606401611233565b601c805460ff60b01b198116600160b01b9182900460ff1615909102179055613c66614a98565b6040517ffa73a4fea5fd06d0d6a99612856bf1c8c91b17959d34072d2d0230999f98671790600090a1565b601b546001600160a01b03163314613cbb5760405162461bcd60e51b815260040161123390615981565b601c80546001600160a01b0319166001600160a01b0392909216919091179055565b601b546001600160a01b03163314613d075760405162461bcd60e51b815260040161123390615981565b601155565b613d14613e10565b6001600160a01b038116613d795760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401611233565b61272d81614e44565b601b546001600160a01b03163314613dac5760405162461bcd60e51b815260040161123390615981565b600b8190556040518181527faab6389d8f1c16ba1deb6e9831f5c5442cf4fcf99bf5bfa867460be408a91118906020016119b6565b601b546001600160a01b03163314613e0b5760405162461bcd60e51b815260040161123390615981565b600d55565b6002546001600160a01b0316331461187e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611233565b600083600e54613e7a9190615ade565b1015613ec85760405162461bcd60e51b815260206004820152601860248201527f4e6f206d6f726520616c6c6f776c69737420737570706c7900000000000000006044820152606401611233565b3433600080613ed78686611d58565b915060ff16915060008211613f1c5760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b6044820152606401611233565b80871115613f6c5760405162461bcd60e51b815260206004820152601860248201527f5174792065786365656473206d617820616c6c6f7765642e00000000000000006044820152606401611233565b600c54601e54604080516318160ddd60e01b815290518a926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015613fb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fdc9190615ac5565b600f54613fe99190615ade565b613ff39190615ade565b10156140115760405162461bcd60e51b815260040161123390615bdf565b8160010361448157866003546140279190615bc8565b84101561408b5760405162461bcd60e51b815260206004820152602c60248201527f4f6173697320616c6c6f776c697374206d696e74696e673a204e6f7420656e6f60448201526b1d59da08115512081cd95b9d60a21b6064820152608401611233565b601154421015801561409f57506013544211155b6140eb5760405162461bcd60e51b815260206004820152601e60248201527f4f757473696465204f6173697320616c6c6f776c6973742077696e646f7700006044820152606401611233565b601d546040516370a0823160e01b81526001600160a01b03888116600483015260009216906370a0823190602401602060405180830381865afa158015614136573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061415a9190615ac5565b905087600080826001600160401b0381111561417857614178615340565b6040519080825280602002602001820160405280156141a1578160200160208202803683370190505b50905060008b6001600160401b038111156141be576141be615340565b6040519080825280602002602001820160405280156141e7578160200160208202803683370190505b50905060005b8581101561441957601d54604051632f745c5960e01b81526001600160a01b038e81166004830152602482018490526000921690632f745c5990604401602060405180830381865afa158015614247573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061426b9190615ac5565b600081815260246020526040812054600954929350909161428f9160ff1690615ade565b9050806000036142a0575050614407565b60006142ac8289614faa565b6000848152602460205260408120805492935083929091906142d290849060ff16615c25565b92506101000a81548160ff021916908360ff1602179055508060ff16886142f99190615ade565b975060005b8160ff168110156143f357601e546040516335313c2160e11b81526001600160a01b038f811660048301526000921690636a627842906024016020604051808303816000875af1158015614356573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061437a9190615ac5565b90508088614388848c615ab2565b81518110614398576143986159c4565b602090810291909101015284876143af848c615ab2565b815181106143bf576143bf6159c4565b6020908102919091010152600e80549060006143da83615c3e565b91905055505080806143eb906159f0565b9150506142fe565b5061440160ff821688615ab2565b96505050505b80614411816159f0565b9150506141ed565b5083156144685760405162461bcd60e51b815260206004820152601f60248201527f4e6f7420656e6f756768204f61736973206d696e7420617661696c61626c65006044820152606401611233565b6144778b89848c600186614fc2565b50505050506146c8565b8660045461448f9190615bc8565b8410156144f45760405162461bcd60e51b815260206004820152602d60248201527f5075626c696320616c6c6f776c697374206d696e74696e673a204e6f7420656e60448201526c1bdd59da08115512081cd95b9d609a1b6064820152608401611233565b601254421015801561450857506013544211155b6145545760405162461bcd60e51b815260206004820152601860248201527f4f75747369646520616c6c6f776c6973742077696e646f7700000000000000006044820152606401611233565b6000876001600160401b0381111561456e5761456e615340565b604051908082528060200260200182016040528015614597578160200160208202803683370190505b50905060005b8881101561465f57601e546040516335313c2160e11b81526001600160a01b0387811660048301526000921690636a627842906024016020604051808303816000875af11580156145f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906146169190615ac5565b90508083838151811061462b5761462b6159c4565b6020908102919091010152600e805490600061464683615c3e565b9190505550508080614657906159f0565b91505061459d565b5061469987858388600080604051908082528060200260200182016040528015614693578160200160208202803683370190505b50614fc2565b6001600160a01b038716600090815260236020526040812080548a92906146c1908490615ab2565b9091555050505b600c54601e60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561471e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906147429190615ac5565b600f5461474f9190615ade565b6147599190615ade565b600d5550505050505050565b8160105410156147b15760405162461bcd60e51b81526020600482015260176024820152764e6f7420656e6f7567682070726f6d6f20737570706c7960481b6044820152606401611233565b6012544211156147ff5760405162461bcd60e51b81526020600482015260196024820152784f7574736964652070726f6d6f206d696e742077696e646f7760381b6044820152606401611233565b600c54601e54604080516318160ddd60e01b8152905185926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa15801561484b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061486f9190615ac5565b600f5461487c9190615ade565b6148869190615ade565b10156148a45760405162461bcd60e51b815260040161123390615bdf565b6000826001600160401b038111156148be576148be615340565b6040519080825280602002602001820160405280156148e7578160200160208202803683370190505b50905060005b8381101561499957601e546040516335313c2160e11b81526001600160a01b0387811660048301526000921690636a627842906024016020604051808303816000875af1158015614942573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906149669190615ac5565b90508083838151811061497b5761497b6159c4565b60209081029190910101525080614991816159f0565b9150506148ed565b508160068111156149ac576149ac615b1f565b6001600160a01b038516600080516020615c94833981519152836000808080806040519080825280602002602001820160405280156149f5578160200160208202803683370190505b50604051614a0896959493929190615b70565b60405180910390a38260106000828254614a229190615ade565b9091555050600c54601e54604080516318160ddd60e01b815290516001600160a01b03909216916318160ddd916004808201926020929091908290030181865afa158015613b9f573d6000803e3d6000fd5b6000806000614a838585615061565b91509150614a90816150a3565b509392505050565b601c54600160b01b900460ff1615156001148015614ab7575060155442115b614b1c5760405162461bcd60e51b815260206004820152603060248201527f41756374696f6e206e6f7420736574746c65647c7c6e6f7420656e6465642e2060448201526f21b0b73737ba103bb4ba34323930bb9760811b6064820152608401611233565b60175415614bfb576019546018546017546000926001600160a01b03169190614b459047615bc8565b614b4f9190615c55565b604051600081818185875af1925050503d8060008114614b8b576040519150601f19603f3d011682016040523d82523d6000602084013e614b90565b606091505b5050905080614bf95760405162461bcd60e51b815260206004820152602f60248201527f41756374696f6e486f7573653a204661696c656420746f20776974686472617760448201526e103a37903bb4b632103830bcb2b29760891b6064820152608401611233565b505b601a546040516000916001600160a01b03169047908381818185875af1925050503d8060008114614c48576040519150601f19603f3d011682016040523d82523d6000602084013e614c4d565b606091505b505090508061272d5760405162461bcd60e51b815260206004820152603160248201527f41756374696f6e486f7573653a204661696c656420746f207769746864726177604482015270103a379030b93a34b9ba103830bcb2b29760791b6064820152608401611233565b614cc06151ed565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b601d546040516370a0823160e01b81526001600160a01b03838116600483015260009283929116906370a0823190602401602060405180830381865afa158015614d58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614d7c9190615ac5565b90506000805b82811015614a9057601d54604051632f745c5960e01b81526001600160a01b038781166004830152602482018490526000921690632f745c5990604401602060405180830381865afa158015614ddc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614e009190615ac5565b600081815260246020526040902054600954919250614e249160ff90911690615ade565b614e2e9084615ab2565b9250508080614e3c906159f0565b915050614d82565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600260015403614ee85760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611233565b6002600155565b6040805160008082526020820190925281906001600160a01b03851690617530908590604051614f1f9190615c77565b600060405180830381858888f193505050503d8060008114614f5d576040519150601f19603f3d011682016040523d82523d6000602084013e614f62565b606091505b509095945050505050565b614f75615236565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258614ced3390565b6000818310614fb95781614fbb565b825b9392505050565b846001600160a01b0316866001600160a01b03161461501c576001856001600160a01b0316600080516020615c94833981519152868660018b888860405161500f96959493929190615b70565b60405180910390a3615059565b6001856001600160a01b0316600080516020615c948339815191528686600080888860405161505096959493929190615b70565b60405180910390a35b505050505050565b60008082516041036150975760208301516040840151606085015160001a61508b8782858561527c565b94509450505050611e3b565b50600090506002611e3b565b60008160048111156150b7576150b7615b1f565b036150bf5750565b60018160048111156150d3576150d3615b1f565b036151205760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401611233565b600281600481111561513457615134615b1f565b036151815760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401611233565b600381600481111561519557615195615b1f565b0361272d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401611233565b60005460ff1661187e5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401611233565b60005460ff161561187e5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401611233565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156152b35750600090506003615337565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015615307573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661533057600060019250925050615337565b9150600090505b94509492505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561537e5761537e615340565b604052919050565b60006001600160401b0382111561539f5761539f615340565b5060051b60200190565b6001600160a01b038116811461272d57600080fd5b600082601f8301126153cf57600080fd5b813560206153e46153df83615386565b615356565b82815260059290921b8401810191818101908684111561540357600080fd5b8286015b8481101561542757803561541a816153a9565b8352918301918301615407565b509695505050505050565b6000806040838503121561544557600080fd5b82356001600160401b0381111561545b57600080fd5b615467858286016153be565b925050602083013560ff8116811461547e57600080fd5b809150509250929050565b60006020828403121561549b57600080fd5b8135614fbb816153a9565b60006001600160401b038311156154bf576154bf615340565b6154d2601f8401601f1916602001615356565b90508281528383830111156154e657600080fd5b828260208301376000602084830101529392505050565b60006020828403121561550f57600080fd5b81356001600160401b0381111561552557600080fd5b8201601f8101841361553657600080fd5b615545848235602084016154a6565b949350505050565b600082601f83011261555e57600080fd5b614fbb838335602085016154a6565b6000806040838503121561558057600080fd5b8235915060208301356001600160401b0381111561559d57600080fd5b6155a98582860161554d565b9150509250929050565b600080604083850312156155c657600080fd5b82359150602083013561547e816153a9565b6000602082840312156155ea57600080fd5b5035919050565b6000806040838503121561560457600080fd5b50508035926020909101359150565b600082601f83011261562457600080fd5b813560206156346153df83615386565b82815260059290921b8401810191818101908684111561565357600080fd5b8286015b848110156154275780358352918301918301615657565b6000806040838503121561568157600080fd5b82356001600160401b038082111561569857600080fd5b6156a4868387016153be565b935060208501359150808211156156ba57600080fd5b506155a985828601615613565b600080604083850312156156da57600080fd5b82356156e5816153a9565b915060208301356001600160401b0381111561559d57600080fd5b60006101c0820190508f82528e60208301528d60408301528c60608301528b151560808301528a151560a08301528960c08301528860e08301528761010083015286610120830152856101408301528461016083015261576561018083018515159052565b826101a08301529f9e505050505050505050505050505050565b801515811461272d57600080fd5b60006020828403121561579f57600080fd5b8135614fbb8161577f565b6000602082840312156157bc57600080fd5b81356001600160401b038111156157d257600080fd5b615545848285016153be565b6000806000806000806000806000806101408b8d0312156157fe57600080fd5b8a35995060208b0135985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b0135935060e08b013592506101008b013591506101208b013561584a8161577f565b809150509295989b9194979a5092959850565b6000806000806000806000806000806101408b8d03121561587d57600080fd5b505088359a60208a01359a5060408a013599606081013599506080810135985060a0810135975060c0810135965060e081013595506101008101359450610120013592509050565b8035600781106158d457600080fd5b919050565b6000806000606084860312156158ee57600080fd5b83356158f9816153a9565b92506020840135915061590e604085016158c5565b90509250925092565b60008060006060848603121561592c57600080fd5b83356001600160401b038082111561594357600080fd5b61594f878388016153be565b9450602086013591508082111561596557600080fd5b5061597286828701615613565b92505061590e604085016158c5565b60208082526023908201527f41756374696f6e486f7573653a206f6e6c792061646d696e207065726d69747460408201526232b21760e91b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201615a0257615a026159da565b5060010190565b60005b83811015615a24578181015183820152602001615a0c565b50506000910152565b6020815260008251806020840152615a4c816040850160208701615a09565b601f01601f19169190910160400192915050565b600060208284031215615a7257600080fd5b8151614fbb8161577f565b6020808252818101527f426c6f636b65643a204f4641432073616e6374696f6e65642061646472657373604082015260600190565b80820180821115611762576117626159da565b600060208284031215615ad757600080fd5b5051919050565b81810381811115611762576117626159da565b602080825260149082015273105d58dd1a5bdb921bdd5cd94e881c185d5cd95960621b604082015260600190565b634e487b7160e01b600052602160045260246000fd5b600081518084526020808501945080840160005b83811015615b6557815187529582019590820190600101615b49565b509495945050505050565b60c081526000615b8360c0830189615b35565b6020830188905286151560408401526001600160a01b0386166060840152841515608084015282810360a0840152615bbb8185615b35565b9998505050505050505050565b8082028115828204841417611762576117626159da565b60208082526026908201527f4e6f7420656e6f75676820737570706c792072656d61696e696e6720666f7220604082015265726166666c6560d01b606082015260800190565b60ff8181168382160190811115611762576117626159da565b600081615c4d57615c4d6159da565b506000190190565b600082615c7257634e487b7160e01b600052601260045260246000fd5b500490565b60008251615c89818460208701615a09565b919091019291505056fe96cf551c818da56faa6ddb7fd002e845e11366de7e533273e38729d7720c9215a2646970667358221220be7728457a3627379886208c11641736b6376533fee82b84077c9f01415c8fb264736f6c63430008120033000000000000000000000000487ee3b741c9d2ca743506d1b49a515c8ccc5797000000000000000000000000ae20f0454cc764619489087fb7ef4c3e890062a0000000000000000000000000898157afb3e158cc835d19b9ecd37c69bf460f8c00000000000000000000000040c57923924b5c5c5455c48d93317139addac8fb000000000000000000000000a8eaa9dc2d49624d0ca0bdefa30a6e2a957efb910000000000000000000000000d9d792a98e08d1c716f870d9b51ea5f64a24df400000000000000000000000000000000000000000000000000000000000000090000000000000000000000000000000000000000000000000000000000000064
Deployed Bytecode
0x6080604052600436106105745760003560e01c80638456cb59116102d8578063cdd5bcc211610180578063dd6d1cd1116100e7578063f2c6cc52116100a0578063f851a4401161007a578063f851a44014611186578063fa1431da146111a6578063fc3a6353146111d3578063fd49af13146111f357600080fd5b8063f2c6cc5214611130578063f2fde38b14611146578063f6be71d11461116657600080fd5b8063dd6d1cd114611085578063e30ac003146110a5578063e474def4146110ba578063e5481754146110da578063ec571c6a146110fa578063ec91f2a41461111a57600080fd5b8063d3a8638611610139578063d3a8638614610f68578063d3e761a414610f7e578063d5abeb0114610f9f578063d8e003d614610fb5578063d94a350514610fcb578063d9ad7f911461106557600080fd5b8063cdd5bcc214610eca578063d0ebdbe714610eea578063d16c536f14610f0a578063d1b7bda314610f2a578063d2b898df14610f40578063d2eb86ee14610f6057600080fd5b8063a3afda1a1161023f578063bbf25c5b116101f8578063c403b5b2116101d2578063c403b5b214610e5e578063c417f57f14610e74578063c5693a8414610e94578063c627525514610eaa57600080fd5b8063bbf25c5b14610e09578063c1b819b914610e1e578063c32fe11b14610e3e57600080fd5b8063a3afda1a14610d5c578063a51312c814610d7c578063a945bf8014610d9c578063ae90b21314610db2578063b59f6bf514610dd2578063ba060b7d14610df357600080fd5b80638bab534d116102915780638bab534d14610cb45780638d57c9a914610cd45780638da5cb5b14610cf45780638f77583914610d125780639a3afdec14610d33578063a24e515314610d4657600080fd5b80638456cb5914610bfc578063852fedc914610c1157806386495b0414610c3157806388bbba1214610c5157806389b8c18014610c815780638a64bbf014610c9457600080fd5b806342ab5ee21161043b57806365d634c5116103a2578063710736641161035b5780637215ef60116103355780637215ef6014610b9d57806378f1988714610bbe57806380a06f9714610bde5780638362407414610bf457600080fd5b80637107366414610b2f5780637120334b14610b68578063715018a614610b8857600080fd5b806365d634c514610a6f5780636d8aded114610a8f5780636db471cb14610aaf5780636df9fa8814610acf5780636f8b44b014610aef578063704b6c0214610b0f57600080fd5b806355f15f0c116103f457806355f15f0c146109cb57806356f8f78c146109ec57806358151ef414610a0157806358d5d66614610a21578063599d127a14610a415780635c975abb14610a5757600080fd5b806342ab5ee21461090b57806347ccca021461092b578063481c6a751461094b5780634ce7e0821461096b578063510f615a1461098b57806355ee09d7146109ab57600080fd5b806323ab54b5116104df57806333bc1c5c1161049857806333bc1c5c14610874578063381bf932146108955780633ccfd60b146108ab5780633f17d40a146108c05780633f4ba83a146108d6578063410459ad146108eb57600080fd5b806323ab54b514610787578063258c1ef5146107a75780632848aeaf146107d7578063295636db14610819578063298230281461082f578063335b115e1461085e57600080fd5b806313cabd691161053157806313cabd69146106f557806315c8f1061461070b5780631c961d4a1461071e5780631eb8b343146107315780631f20389b14610747578063224348361461076757600080fd5b806301596309146105795780630251e03e1461059b5780630993dfab146106635780630cb715841461069b5780630fb5a6b4146106bb57806312300ba4146106df575b600080fd5b34801561058557600080fd5b50610599610594366004615432565b611209565b005b3480156105a757600080fd5b5061060d6105b6366004615489565b60216020526000908152604090208054600182015460028301546003840154600485015460058601546006909601546001600160a01b0390951695939460ff93841694929382811693610100909304811692911688565b604080516001600160a01b039099168952602089019790975294151595870195909552606086019290925215156080850152151560a084015260c0830191909152151560e0820152610100015b60405180910390f35b34801561066f57600080fd5b50601954610683906001600160a01b031681565b6040516001600160a01b03909116815260200161065a565b3480156106a757600080fd5b506105996106b63660046154fd565b6112d5565b3480156106c757600080fd5b506106d1600b5481565b60405190815260200161065a565b3480156106eb57600080fd5b506106d160165481565b34801561070157600080fd5b506106d160145481565b61059961071936600461556d565b61136b565b61059961072c3660046155b3565b61140e565b34801561073d57600080fd5b506106d160125481565b34801561075357600080fd5b506105996107623660046155d8565b6114e4565b34801561077357600080fd5b506105996107823660046155f1565b6114f1565b34801561079357600080fd5b506105996107a236600461566e565b61153e565b3480156107b357600080fd5b506107c76107c23660046156c7565b611697565b604051901515815260200161065a565b3480156107e357600080fd5b506108076107f2366004615489565b60226020526000908152604090205460ff1681565b60405160ff909116815260200161065a565b34801561082557600080fd5b506106d160185481565b34801561083b57600080fd5b50610844611768565b60405161065a9e9d9c9b9a99989796959493929190615700565b34801561086a57600080fd5b506106d160065481565b34801561088057600080fd5b50601c546107c790600160c01b900460ff1681565b3480156108a157600080fd5b506106d160085481565b3480156108b757600080fd5b5061059961186e565b3480156108cc57600080fd5b506106d160135481565b3480156108e257600080fd5b50610599611880565b3480156108f757600080fd5b50610599610906366004615489565b611890565b34801561091757600080fd5b5061059961092636600461578d565b6118ba565b34801561093757600080fd5b50601e54610683906001600160a01b031681565b34801561095757600080fd5b50602054610683906001600160a01b031681565b34801561097757600080fd5b50610599610986366004615489565b611902565b34801561099757600080fd5b506105996109a63660046155d8565b61192c565b3480156109b757600080fd5b506105996109c63660046155d8565b61195b565b3480156109d757600080fd5b50601c546107c790600160a01b900460ff1681565b3480156109f857600080fd5b506105996119c1565b348015610a0d57600080fd5b50610599610a1c3660046155d8565b611a0c565b348015610a2d57600080fd5b50610599610a3c366004615489565b611a3b565b348015610a4d57600080fd5b506106d1600c5481565b348015610a6357600080fd5b5060005460ff166107c7565b348015610a7b57600080fd5b50610599610a8a3660046155d8565b611a87565b348015610a9b57600080fd5b50610599610aaa3660046157aa565b611ab6565b348015610abb57600080fd5b50610599610aca3660046157de565b611c45565b348015610adb57600080fd5b50610599610aea3660046155d8565b611cf2565b348015610afb57600080fd5b50610599610b0a3660046155d8565b611cff565b348015610b1b57600080fd5b50610599610b2a366004615489565b611d2e565b348015610b3b57600080fd5b50610b4f610b4a3660046156c7565b611d58565b6040805160ff909316835260208301919091520161065a565b348015610b7457600080fd5b50610599610b833660046155d8565b611e42565b348015610b9457600080fd5b50610599611ea1565b348015610ba957600080fd5b50601c546107c790600160c81b900460ff1681565b348015610bca57600080fd5b50610599610bd93660046155d8565b611eb3565b348015610bea57600080fd5b506106d160095481565b610599611ee2565b348015610c0857600080fd5b5061059961222f565b348015610c1d57600080fd5b50610599610c2c3660046157aa565b61223f565b348015610c3d57600080fd5b50610599610c4c3660046155d8565b612730565b348015610c5d57600080fd5b50610807610c6c3660046155d8565b60246020526000908152604090205460ff1681565b610599610c8f3660046155b3565b61278f565b348015610ca057600080fd5b50610599610caf3660046155d8565b612927565b348015610cc057600080fd5b50610599610ccf3660046155d8565b612956565b348015610ce057600080fd5b50610599610cef3660046155d8565b612985565b348015610d0057600080fd5b506002546001600160a01b0316610683565b348015610d1e57600080fd5b50601c546107c790600160b81b900460ff1681565b610599610d413660046155d8565b6129b4565b348015610d5257600080fd5b506106d160045481565b348015610d6857600080fd5b50601d54610683906001600160a01b031681565b348015610d8857600080fd5b50610599610d973660046157aa565b612fb7565b348015610da857600080fd5b506106d160075481565b348015610dbe57600080fd5b50601a54610683906001600160a01b031681565b348015610dde57600080fd5b50601c546107c790600160a81b900460ff1681565b348015610dff57600080fd5b506106d1600d5481565b348015610e1557600080fd5b50610599613069565b348015610e2a57600080fd5b50610599610e393660046155d8565b6130ed565b348015610e4a57600080fd5b50601c54610683906001600160a01b031681565b348015610e6a57600080fd5b506106d160155481565b348015610e8057600080fd5b50610599610e8f36600461585d565b61311c565b348015610ea057600080fd5b506106d160115481565b348015610eb657600080fd5b50610599610ec53660046155d8565b6131b0565b348015610ed657600080fd5b50610599610ee53660046158d9565b6131df565b348015610ef657600080fd5b50610599610f05366004615489565b613214565b348015610f1657600080fd5b50610599610f253660046155d8565b61323e565b348015610f3657600080fd5b506106d160105481565b348015610f4c57600080fd5b50610599610f5b3660046155d8565b61324b565b61059961327a565b348015610f7457600080fd5b506106d160055481565b348015610f8a57600080fd5b50601c546107c790600160b01b900460ff1681565b348015610fab57600080fd5b506106d1600f5481565b348015610fc157600080fd5b506106d160175481565b348015610fd757600080fd5b50600d54601454601554601654601c54600a54600b5460055460065460408051998a5260208a019890985296880195909552606087019390935260ff600160a01b8304811615156080880152600160b01b83048116151560a0880152600160b81b909204909116151560c086015260e08501526101008401526101208301526101408201526101600161065a565b34801561107157600080fd5b506105996110803660046155d8565b613769565b34801561109157600080fd5b506105996110a0366004615917565b613798565b3480156110b157600080fd5b50610599613be3565b3480156110c657600080fd5b506105996110d5366004615489565b613c91565b3480156110e657600080fd5b506105996110f53660046155d8565b613cdd565b34801561110657600080fd5b50601f54610683906001600160a01b031681565b34801561112657600080fd5b506106d1600a5481565b34801561113c57600080fd5b506106d160035481565b34801561115257600080fd5b50610599611161366004615489565b613d0c565b34801561117257600080fd5b506105996111813660046155d8565b613d82565b34801561119257600080fd5b50601b54610683906001600160a01b031681565b3480156111b257600080fd5b506106d16111c1366004615489565b60236020526000908152604090205481565b3480156111df57600080fd5b506105996111ee3660046155d8565b613de1565b3480156111ff57600080fd5b506106d1600e5481565b601b546001600160a01b0316331461123c5760405162461bcd60e51b815260040161123390615981565b60405180910390fd5b60005b82518110156112d057600083828151811061125c5761125c6159c4565b6020908102919091018101516001600160a01b038116600081815260229093526040808420805460ff191660ff891690811790915590519294509290917f5e1c988ff223cdb5da0e9c3b4228dfe56444cb87e7d328c8495a1c40bfe9fa2a9190a350806112c8816159f0565b91505061123f565b505050565b6112dd613e10565b601e54604051630b85272160e11b81526001600160a01b039091169063170a4e429061130d908490600401615a2d565b600060405180830381600087803b15801561132757600080fd5b505af115801561133b573d6000803e3d6000fd5b50506040517ffaa4867c3ad82b35eef727eb877061cab7f6eb3576904aea9bc9520868076822925060009150a150565b601f5460405163df592f7d60e01b81523360048201819052916000916001600160a01b039091169063df592f7d90602401602060405180830381865afa1580156113b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113dd9190615a60565b905080156113fd5760405162461bcd60e51b815260040161123390615a7d565b611408843385613e6a565b50505050565b601b546001600160a01b031633148061143157506020546001600160a01b031633145b6114945760405162461bcd60e51b815260206004820152602e60248201527f41756374696f6e486f7573653a206f6e6c792061646d696e206f72206d616e6160448201526d33b2b9103832b936b4ba3a32b21760911b6064820152608401611233565b600034116114d45760405162461bcd60e51b815260206004820152600d60248201526c26bab9ba103132903830b4b21760991b6044820152606401611233565b6114e081836006614765565b5050565b6114ec613e10565b601855565b6114f9613e10565b61150482605a615ab2565b60115561151282605a615ab2565b6012819055611522908290615ab2565b60138190556014819055611537908290615ab2565b6015555050565b611546613e10565b601554421161158f5760405162461bcd60e51b815260206004820152601560248201527420bab1ba34b7b7103737ba1037bb32b9103cb2ba1760591b6044820152606401611233565b601c54600160a01b900460ff16156115e35760405162461bcd60e51b8152602060048201526017602482015276105d58dd1a5bdb88185b1c9958591e481cd95d1d1b1959604a1b6044820152606401611233565b60005b825181101561167f57600060216000858481518110611607576116076159c4565b6020908102919091018101516001600160a01b0316825281019190915260400160002060048101805461ff0019166101001790558351909150839083908110611652576116526159c4565b60209081029190910101516005820155600601805460ff1916905580611677816159f0565b9150506115e6565b5050601c805460ff60a01b1916600160a01b17905550565b6000815160410361175e576040516bffffffffffffffffffffffff19606085811b8216602084015230901b166034820152600090604801604051602081830303815290604052805190602001209050600061171f827f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b9050600061172d8286614a74565b90506001600160a01b038116158015906117545750601c546001600160a01b038281169116145b9350505050611762565b5060005b92915050565b600080600080600080600080600080600080600080600c54600454601254601354601c60159054906101000a900460ff16601c60189054906101000a900460ff16600e54601e60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118239190615ac5565b601154600954600354600754601c60199054906101000a900460ff166008549d509d509d509d509d509d509d509d509d509d509d509d509d509d50909192939495969798999a9b9c9d565b611876613e10565b61187e614a98565b565b611888613e10565b61187e614cb8565b611898613e10565b601a80546001600160a01b0319166001600160a01b0392909216919091179055565b601b546001600160a01b031633146118e45760405162461bcd60e51b815260040161123390615981565b601c8054911515600160c81b0260ff60c81b19909216919091179055565b61190a613e10565b601980546001600160a01b0319166001600160a01b0392909216919091179055565b601b546001600160a01b031633146119565760405162461bcd60e51b815260040161123390615981565b601355565b601b546001600160a01b031633146119855760405162461bcd60e51b815260040161123390615981565b60068190556040518181527fc3c898bec609452e0cecc8990f6692426351b704f348f19cc242bd4d42d65ce9906020015b60405180910390a150565b601b546001600160a01b031633146119eb5760405162461bcd60e51b815260040161123390615981565b601c805460ff60c01b198116600160c01b9182900460ff1615909102179055565b601b546001600160a01b03163314611a365760405162461bcd60e51b815260040161123390615981565b600855565b601b546001600160a01b03163314611a655760405162461bcd60e51b815260040161123390615981565b601e80546001600160a01b0319166001600160a01b0392909216919091179055565b601b546001600160a01b03163314611ab15760405162461bcd60e51b815260040161123390615981565b600c55565b611abe613e10565b6015544211611b075760405162461bcd60e51b815260206004820152601560248201527420bab1ba34b7b7103737ba1037bb32b9103cb2ba1760591b6044820152606401611233565b601c54600160a81b900460ff1615611b5a5760405162461bcd60e51b8152602060048201526016602482015275149859999b1948185b1c9958591e481cd95d1d1b195960521b6044820152606401611233565b600c5481511115611bad5760405162461bcd60e51b815260206004820152601b60248201527f496e636f7272656374206e756d626572206f662077696e6e65727300000000006044820152606401611233565b60005b8151811015611c2e57600060216000848481518110611bd157611bd16159c4565b6020908102919091018101516001600160a01b0316825281019190915260400160002060048101805461ff0019166101001790556005805490820155600601805460ff191660011790555080611c26816159f0565b915050611bb0565b5050601c805460ff60a81b1916600160a81b179055565b611c4d613e10565b6001600081905260256020527f20a3e2dd35f58e582c5288344c035e137cace924bb9daf3762b8ef5a58327e265460ff1615611c8857600080fd5b6001600160401b03166000908152602560205260409020805460ff19166001179055600999909955600a97909755600595909555600693909355600491909155600b55600855600355600755601c8054911515600160c81b0260ff60c81b19909216919091179055565b611cfa613e10565b600455565b601b546001600160a01b03163314611d295760405162461bcd60e51b815260040161123390615981565b600f55565b611d36613e10565b601b80546001600160a01b0319166001600160a01b0392909216919091179055565b601d546040516370a0823160e01b81526001600160a01b03848116600483015260009283928392909116906370a0823190602401602060405180830381865afa158015611da9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dcd9190615ac5565b90508015611dea576001611de086614d0a565b9250925050611e3b565b6000611df68686611697565b90508015611e31576001600160a01b038616600090815260236020526040902054600954600291611e2691615ade565b935093505050611e3b565b6000809350935050505b9250929050565b601b546001600160a01b03163314611e6c5760405162461bcd60e51b815260040161123390615981565b600a8190556040518181527f1b55d9f7002bda4490f467e326f22a4a847629c0f2d1ed421607d318d25b410d906020016119b6565b611ea9613e10565b61187e6000614e44565b601b546001600160a01b03163314611edd5760405162461bcd60e51b815260040161123390615981565b600355565b611eea614e96565b60005460ff1615611f0d5760405162461bcd60e51b815260040161123390615af1565b601f5460405163df592f7d60e01b81523360048201819052916000916001600160a01b039091169063df592f7d90602401602060405180830381865afa158015611f5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f7f9190615a60565b90508015611f9f5760405162461bcd60e51b815260040161123390615a7d565b6015543390349042108015611fb657506014544210155b6120025760405162461bcd60e51b815260206004820152601760248201527f4f7574736964652061756374696f6e2077696e646f772e0000000000000000006044820152606401611233565b60055481101561204a5760405162461bcd60e51b81526020600482015260136024820152722134b21030b6b7bab73a103a37b7903637bb9760691b6044820152606401611233565b6001600160a01b03821660009081526021602052604090206001015415612106576001600160a01b0382166000908152602160205260409020600181015482116120ec5760405162461bcd60e51b815260206004820152602d60248201527f596f752063616e206f6e6c7920696e63726561736520796f7572206269642c2060448201526c3737ba103232b1b932b0b9b29760991b6064820152608401611233565b6120fa838260010154614eef565b506001018190556121d9565b60408051610100808201835260008284018181526080840182815260a0850183815260c0860184815260e087018581526001600160a01b038b8116808a526020808b018d81524260608d01908152928a5260219091529a909720985189546001600160a01b031916911617885597516001880155925160028701805460ff19908116921515929092179055935160038701559051600486018054925161ffff1990931691151561ff0019169190911791151590940217909255905160058301559151600690910180549092169015151790555b604080516001600160a01b03841681526020810183905260008183015290517f4c59a472ced976904d21e373e2f2d8326defffabfe087e3d7886f0c516495ba79181900360600190a15050505061187e60018055565b612237613e10565b61187e614f6d565b612247613e10565b61224f614e96565b60155442116122985760405162461bcd60e51b815260206004820152601560248201527420bab1ba34b7b7103430b9b713ba1032b73232b21760591b6044820152606401611233565b601c54600160a01b900460ff16151560011480156122c45750601c54600160a81b900460ff1615156001145b6123105760405162461bcd60e51b815260206004820152601760248201527f41756374696f6e2077696e6e657273206e6f74207365740000000000000000006044820152606401611233565b60005b8151811015612723576000828281518110612330576123306159c4565b6020908102919091018101516001600160a01b03811660009081526021909252604090912060048101549192509060ff610100909104161515600114801561237d5750600281015460ff16155b801561238e5750600481015460ff16155b15612635576000816005015482600101546123a99190615ade565b90508015612465576000836001600160a01b03168260405160006040518083038185875af1925050503d80600081146123fe576040519150601f19603f3d011682016040523d82523d6000602084013e612403565b606091505b50509050806124635760405162461bcd60e51b815260206004820152602660248201527f4661696c656420746f20726566756e6420646966666572656e636520746f207760448201526534b73732b91760d11b6064820152608401611233565b505b601e546040516335313c2160e11b81526001600160a01b0385811660048301526000921690636a627842906024016020604051808303816000875af11580156124b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124d69190615ac5565b60408051600180825281830190925291925060009190602080830190803683370190505090508181600081518110612510576125106159c4565b6020908102919091010152600684015460ff16151560010361259e57600360058501546001600160a01b03871690600080516020615c94833981519152908490600080808060405190808252806020026020018201604052801561257e578160200160208202803683370190505b5060405161259196959493929190615b70565b60405180910390a361260c565b600260058501546001600160a01b03871690600080516020615c9483398151915290849060008080806040519080825280602002602001820160405280156125f0578160200160208202803683370190505b5060405161260396959493929190615b70565b60405180910390a35b505050600281018054600160ff199182168117909255600483018054909116909117905561270e565b6004810154610100900460ff161580156126545750600481015460ff16155b1561270e5760018101546040516000916001600160a01b038516918381818185875af1925050503d80600081146126a7576040519150601f19603f3d011682016040523d82523d6000602084013e6126ac565b606091505b50509050806126fd5760405162461bcd60e51b815260206004820152601f60248201527f4661696c656420746f2073656e6420726566756e6420746f206c6f7365722e006044820152606401611233565b5060048101805460ff191660011790555b5050808061271b906159f0565b915050612313565b5061272d60018055565b50565b601b546001600160a01b0316331461275a5760405162461bcd60e51b815260040161123390615981565b60058190556040518181527f0b2415f9ab63dbd60a9b1d42289c1deace6a9bbb6c006d8f3f2c1d872a471444906020016119b6565b601f5460405163df592f7d60e01b81523360048201819052916000916001600160a01b039091169063df592f7d90602401602060405180830381865afa1580156127dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128019190615a60565b905080156128215760405162461bcd60e51b815260040161123390615a7d565b601d5460405163090c9a2d60e41b81523360048201526001600160a01b03808616602483015290911660448201526d76a84fef008cdabe6409d2fe638b906390c9a2d090606401602060405180830381865afa158015612885573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128a99190615a60565b61290d5760405162461bcd60e51b815260206004820152602f60248201527f44656c656761746552656769737472793a2077616c6c6574206164647265737360448201526e081b9bdd081c9959da5cdd195c9959608a1b6064820152608401611233565b611408848460405180602001604052806000815250613e6a565b601b546001600160a01b031633146129515760405162461bcd60e51b815260040161123390615981565b601055565b601b546001600160a01b031633146129805760405162461bcd60e51b815260040161123390615981565b600e55565b601b546001600160a01b031633146129af5760405162461bcd60e51b815260040161123390615981565b601555565b6129bc614e96565b60005460ff16156129df5760405162461bcd60e51b815260040161123390615af1565b601f5460405163df592f7d60e01b81523360048201819052916000916001600160a01b039091169063df592f7d90602401602060405180830381865afa158015612a2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a519190615a60565b90508015612a715760405162461bcd60e51b815260040161123390615a7d565b601e546040805163d5abeb0160e01b815290516000926001600160a01b03169163d5abeb019160048083019260209291908290030181865afa158015612abb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612adf9190615ac5565b90506000601e60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b5a9190615ac5565b9050600854851115612bae5760405162461bcd60e51b815260206004820152601a60248201527f546f6f206d616e7920746f6b656e73207265717565737465642e0000000000006044820152606401611233565b818110612bf95760405162461bcd60e51b815260206004820152601960248201527827379036b7b932903a37b5b2b7399030bb30b4b630b136329760391b6044820152606401611233565b84612c048284615ade565b1015612c525760405162461bcd60e51b815260206004820152601b60248201527f4e6f7420656e6f75676820737570706c79206c656674202d20312e00000000006044820152606401611233565b601c54600160c01b900460ff161515600114612ca25760405162461bcd60e51b815260206004820152600f60248201526e2737ba1030baba3437b934bd32b21760891b6044820152606401611233565b601c5433903490600090600160c81b900460ff1615612dfb57601d546040516370a0823160e01b81526001600160a01b03858116600483015260009216906370a0823190602401602060405180830381865afa158015612d06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d2a9190615ac5565b90508015612d985788600354612d409190615bc8565b341015612d8f5760405162461bcd60e51b815260206004820152601c60248201527f4f617369732070726963653a20416d6f756e7420746f6f206c6f772e000000006044820152606401611233565b60019150612df5565b88600754612da69190615bc8565b341015612df55760405162461bcd60e51b815260206004820152601d60248201527f5075626c69632070726963653a20416d6f756e7420746f6f206c6f772e0000006044820152606401611233565b50612e4a565b87600754612e099190615bc8565b821015612e4a5760405162461bcd60e51b815260206004820152600f60248201526e20b6b7bab73a103a37b7903637bb9760891b6044820152606401611233565b6000886001600160401b03811115612e6457612e64615340565b604051908082528060200260200182016040528015612e8d578160200160208202803683370190505b50905060005b89811015612f3f57601e546040516335313c2160e11b81526001600160a01b0387811660048301526000921690636a627842906024016020604051808303816000875af1158015612ee8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f0c9190615ac5565b905080838381518110612f2157612f216159c4565b60209081029190910101525080612f37816159f0565b915050612e93565b5060046001600160a01b038516600080516020615c9483398151915283866000808881604051908082528060200260200182016040528015612f8b578160200160208202803683370190505b50604051612f9e96959493929190615b70565b60405180910390a3505050505050505061272d60018055565b601b546001600160a01b03163314612fe15760405162461bcd60e51b815260040161123390615981565b60005b81518110156114e0576000828281518110613001576130016159c4565b6020908102919091018101516001600160a01b038116600081815260229093526040808420805460ff1916905551919350917f29beb8aae77ba82cbb9d5a13ac9153539286534ddea0dc0a0aa61c484585a61491a25080613061816159f0565b915050612fe4565b613071613e10565b6003600081905260256020527fc5fdd46c9592bee36fcfadca77466e8856c74a47731422467f212e3622f92e335460ff16156130ac57600080fd5b6001600160401b03166000908152602560205260409020805460ff19166001179055601c805464010101010160a01b64ffffffffff60a01b19909116179055565b601b546001600160a01b031633146131175760405162461bcd60e51b815260040161123390615981565b601255565b613124613e10565b6002600081905260256020527ff1da3aed71bcbd4afa246ea3711ddde93661ac45b913264dbc974ee389cd7a635460ff161561315f57600080fd5b6001600160401b03166000908152602560205260409020805460ff19166001179055600c99909955600d97909755600e95909555600f93909355601091909155601155601255601355601455601555565b601b546001600160a01b031633146131da5760405162461bcd60e51b815260040161123390615981565b600755565b601b546001600160a01b031633146132095760405162461bcd60e51b815260040161123390615981565b6112d0838383614765565b61321c613e10565b602080546001600160a01b0319166001600160a01b0392909216919091179055565b613246613e10565b601755565b601b546001600160a01b031633146132755760405162461bcd60e51b815260040161123390615981565b600955565b613282614e96565b60005460ff16156132a55760405162461bcd60e51b815260040161123390615af1565b601f5460405163df592f7d60e01b81523360048201819052916000916001600160a01b039091169063df592f7d90602401602060405180830381865afa1580156132f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133179190615a60565b905080156133375760405162461bcd60e51b815260040161123390615a7d565b601e60009054906101000a90046001600160a01b03166001600160a01b031663d5abeb016040518163ffffffff1660e01b8152600401602060405180830381865afa15801561338a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133ae9190615ac5565b601e60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613401573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134259190615ac5565b1061346e5760405162461bcd60e51b815260206004820152601960248201527827379036b7b932903a37b5b2b7399030bb30b4b630b136329760391b6044820152606401611233565b601c54600160c01b900460ff1615156001146134be5760405162461bcd60e51b815260206004820152600f60248201526e2737ba1030baba3437b934bd32b21760891b6044820152606401611233565b601c5433903490600160c81b900460ff16156135fa57601d546040516370a0823160e01b81526001600160a01b03848116600483015260009216906370a0823190602401602060405180830381865afa15801561351f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135439190615ac5565b905080156135a25760035434101561359d5760405162461bcd60e51b815260206004820152601c60248201527f4f617369732070726963653a20416d6f756e7420746f6f206c6f772e000000006044820152606401611233565b6135f4565b6007543410156135f45760405162461bcd60e51b815260206004820152601d60248201527f5075626c69632070726963653a20416d6f756e7420746f6f206c6f772e0000006044820152606401611233565b5061363e565b60075434101561363e5760405162461bcd60e51b815260206004820152600f60248201526e20b6b7bab73a103a37b7903637bb9760891b6044820152606401611233565b601e546040516335313c2160e11b81526001600160a01b0384811660048301526000921690636a627842906024016020604051808303816000875af115801561368b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136af9190615ac5565b604080516001808252818301909252919250600091906020808301908036833701905050905081816000815181106136e9576136e96159c4565b602090810291909101015260046001600160a01b038516600080516020615c948339815191528386600080808060405190808252806020026020018201604052801561373f578160200160208202803683370190505b5060405161375296959493929190615b70565b60405180910390a350505050505061187e60018055565b601b546001600160a01b031633146137935760405162461bcd60e51b815260040161123390615981565b601455565b601b546001600160a01b031633146137c25760405162461bcd60e51b815260040161123390615981565b8251825181146138265760405162461bcd60e51b815260206004820152602960248201527f5f746f20616e64205f616d6f756e7473206172726179206c656e67746873206d6044820152680eae6e840dac2e8c6d60bb1b6064820152608401611233565b8060105410156138725760405162461bcd60e51b81526020600482015260176024820152764e6f7420656e6f7567682070726f6d6f20737570706c7960481b6044820152606401611233565b6012544211156138c05760405162461bcd60e51b81526020600482015260196024820152784f7574736964652070726f6d6f206d696e742077696e646f7760381b6044820152606401611233565b600c54601e54604080516318160ddd60e01b8152905184926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa15801561390c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139309190615ac5565b600f5461393d9190615ade565b6139479190615ade565b10156139655760405162461bcd60e51b815260040161123390615bdf565b60005b8451811015613b48576000858281518110613985576139856159c4565b6020026020010151905060008583815181106139a3576139a36159c4565b602002602001015190506000816001600160401b038111156139c7576139c7615340565b6040519080825280602002602001820160405280156139f0578160200160208202803683370190505b50905060005b82811015613aa257601e546040516335313c2160e11b81526001600160a01b0386811660048301526000921690636a627842906024016020604051808303816000875af1158015613a4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a6f9190615ac5565b905080838381518110613a8457613a846159c4565b60209081029190910101525080613a9a816159f0565b9150506139f6565b50856006811115613ab557613ab5615b1f565b6001600160a01b038416600080516020615c9483398151915283600080808080604051908082528060200260200182016040528015613afe578160200160208202803683370190505b50604051613b1196959493929190615b70565b60405180910390a38160106000828254613b2b9190615ade565b925050819055505050508080613b40906159f0565b915050613968565b50600c54601e60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613b9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613bc39190615ac5565b600f54613bd09190615ade565b613bda9190615ade565b600d5550505050565b613beb613e10565b601c54600160b01b900460ff1615613c3f5760405162461bcd60e51b8152602060048201526017602482015276105d58dd1a5bdb88185b1c9958591e481cd95d1d1b1959604a1b6044820152606401611233565b601c805460ff60b01b198116600160b01b9182900460ff1615909102179055613c66614a98565b6040517ffa73a4fea5fd06d0d6a99612856bf1c8c91b17959d34072d2d0230999f98671790600090a1565b601b546001600160a01b03163314613cbb5760405162461bcd60e51b815260040161123390615981565b601c80546001600160a01b0319166001600160a01b0392909216919091179055565b601b546001600160a01b03163314613d075760405162461bcd60e51b815260040161123390615981565b601155565b613d14613e10565b6001600160a01b038116613d795760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401611233565b61272d81614e44565b601b546001600160a01b03163314613dac5760405162461bcd60e51b815260040161123390615981565b600b8190556040518181527faab6389d8f1c16ba1deb6e9831f5c5442cf4fcf99bf5bfa867460be408a91118906020016119b6565b601b546001600160a01b03163314613e0b5760405162461bcd60e51b815260040161123390615981565b600d55565b6002546001600160a01b0316331461187e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611233565b600083600e54613e7a9190615ade565b1015613ec85760405162461bcd60e51b815260206004820152601860248201527f4e6f206d6f726520616c6c6f776c69737420737570706c7900000000000000006044820152606401611233565b3433600080613ed78686611d58565b915060ff16915060008211613f1c5760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b6044820152606401611233565b80871115613f6c5760405162461bcd60e51b815260206004820152601860248201527f5174792065786365656473206d617820616c6c6f7765642e00000000000000006044820152606401611233565b600c54601e54604080516318160ddd60e01b815290518a926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015613fb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fdc9190615ac5565b600f54613fe99190615ade565b613ff39190615ade565b10156140115760405162461bcd60e51b815260040161123390615bdf565b8160010361448157866003546140279190615bc8565b84101561408b5760405162461bcd60e51b815260206004820152602c60248201527f4f6173697320616c6c6f776c697374206d696e74696e673a204e6f7420656e6f60448201526b1d59da08115512081cd95b9d60a21b6064820152608401611233565b601154421015801561409f57506013544211155b6140eb5760405162461bcd60e51b815260206004820152601e60248201527f4f757473696465204f6173697320616c6c6f776c6973742077696e646f7700006044820152606401611233565b601d546040516370a0823160e01b81526001600160a01b03888116600483015260009216906370a0823190602401602060405180830381865afa158015614136573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061415a9190615ac5565b905087600080826001600160401b0381111561417857614178615340565b6040519080825280602002602001820160405280156141a1578160200160208202803683370190505b50905060008b6001600160401b038111156141be576141be615340565b6040519080825280602002602001820160405280156141e7578160200160208202803683370190505b50905060005b8581101561441957601d54604051632f745c5960e01b81526001600160a01b038e81166004830152602482018490526000921690632f745c5990604401602060405180830381865afa158015614247573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061426b9190615ac5565b600081815260246020526040812054600954929350909161428f9160ff1690615ade565b9050806000036142a0575050614407565b60006142ac8289614faa565b6000848152602460205260408120805492935083929091906142d290849060ff16615c25565b92506101000a81548160ff021916908360ff1602179055508060ff16886142f99190615ade565b975060005b8160ff168110156143f357601e546040516335313c2160e11b81526001600160a01b038f811660048301526000921690636a627842906024016020604051808303816000875af1158015614356573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061437a9190615ac5565b90508088614388848c615ab2565b81518110614398576143986159c4565b602090810291909101015284876143af848c615ab2565b815181106143bf576143bf6159c4565b6020908102919091010152600e80549060006143da83615c3e565b91905055505080806143eb906159f0565b9150506142fe565b5061440160ff821688615ab2565b96505050505b80614411816159f0565b9150506141ed565b5083156144685760405162461bcd60e51b815260206004820152601f60248201527f4e6f7420656e6f756768204f61736973206d696e7420617661696c61626c65006044820152606401611233565b6144778b89848c600186614fc2565b50505050506146c8565b8660045461448f9190615bc8565b8410156144f45760405162461bcd60e51b815260206004820152602d60248201527f5075626c696320616c6c6f776c697374206d696e74696e673a204e6f7420656e60448201526c1bdd59da08115512081cd95b9d609a1b6064820152608401611233565b601254421015801561450857506013544211155b6145545760405162461bcd60e51b815260206004820152601860248201527f4f75747369646520616c6c6f776c6973742077696e646f7700000000000000006044820152606401611233565b6000876001600160401b0381111561456e5761456e615340565b604051908082528060200260200182016040528015614597578160200160208202803683370190505b50905060005b8881101561465f57601e546040516335313c2160e11b81526001600160a01b0387811660048301526000921690636a627842906024016020604051808303816000875af11580156145f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906146169190615ac5565b90508083838151811061462b5761462b6159c4565b6020908102919091010152600e805490600061464683615c3e565b9190505550508080614657906159f0565b91505061459d565b5061469987858388600080604051908082528060200260200182016040528015614693578160200160208202803683370190505b50614fc2565b6001600160a01b038716600090815260236020526040812080548a92906146c1908490615ab2565b9091555050505b600c54601e60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561471e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906147429190615ac5565b600f5461474f9190615ade565b6147599190615ade565b600d5550505050505050565b8160105410156147b15760405162461bcd60e51b81526020600482015260176024820152764e6f7420656e6f7567682070726f6d6f20737570706c7960481b6044820152606401611233565b6012544211156147ff5760405162461bcd60e51b81526020600482015260196024820152784f7574736964652070726f6d6f206d696e742077696e646f7760381b6044820152606401611233565b600c54601e54604080516318160ddd60e01b8152905185926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa15801561484b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061486f9190615ac5565b600f5461487c9190615ade565b6148869190615ade565b10156148a45760405162461bcd60e51b815260040161123390615bdf565b6000826001600160401b038111156148be576148be615340565b6040519080825280602002602001820160405280156148e7578160200160208202803683370190505b50905060005b8381101561499957601e546040516335313c2160e11b81526001600160a01b0387811660048301526000921690636a627842906024016020604051808303816000875af1158015614942573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906149669190615ac5565b90508083838151811061497b5761497b6159c4565b60209081029190910101525080614991816159f0565b9150506148ed565b508160068111156149ac576149ac615b1f565b6001600160a01b038516600080516020615c94833981519152836000808080806040519080825280602002602001820160405280156149f5578160200160208202803683370190505b50604051614a0896959493929190615b70565b60405180910390a38260106000828254614a229190615ade565b9091555050600c54601e54604080516318160ddd60e01b815290516001600160a01b03909216916318160ddd916004808201926020929091908290030181865afa158015613b9f573d6000803e3d6000fd5b6000806000614a838585615061565b91509150614a90816150a3565b509392505050565b601c54600160b01b900460ff1615156001148015614ab7575060155442115b614b1c5760405162461bcd60e51b815260206004820152603060248201527f41756374696f6e206e6f7420736574746c65647c7c6e6f7420656e6465642e2060448201526f21b0b73737ba103bb4ba34323930bb9760811b6064820152608401611233565b60175415614bfb576019546018546017546000926001600160a01b03169190614b459047615bc8565b614b4f9190615c55565b604051600081818185875af1925050503d8060008114614b8b576040519150601f19603f3d011682016040523d82523d6000602084013e614b90565b606091505b5050905080614bf95760405162461bcd60e51b815260206004820152602f60248201527f41756374696f6e486f7573653a204661696c656420746f20776974686472617760448201526e103a37903bb4b632103830bcb2b29760891b6064820152608401611233565b505b601a546040516000916001600160a01b03169047908381818185875af1925050503d8060008114614c48576040519150601f19603f3d011682016040523d82523d6000602084013e614c4d565b606091505b505090508061272d5760405162461bcd60e51b815260206004820152603160248201527f41756374696f6e486f7573653a204661696c656420746f207769746864726177604482015270103a379030b93a34b9ba103830bcb2b29760791b6064820152608401611233565b614cc06151ed565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b601d546040516370a0823160e01b81526001600160a01b03838116600483015260009283929116906370a0823190602401602060405180830381865afa158015614d58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614d7c9190615ac5565b90506000805b82811015614a9057601d54604051632f745c5960e01b81526001600160a01b038781166004830152602482018490526000921690632f745c5990604401602060405180830381865afa158015614ddc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614e009190615ac5565b600081815260246020526040902054600954919250614e249160ff90911690615ade565b614e2e9084615ab2565b9250508080614e3c906159f0565b915050614d82565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600260015403614ee85760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611233565b6002600155565b6040805160008082526020820190925281906001600160a01b03851690617530908590604051614f1f9190615c77565b600060405180830381858888f193505050503d8060008114614f5d576040519150601f19603f3d011682016040523d82523d6000602084013e614f62565b606091505b509095945050505050565b614f75615236565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258614ced3390565b6000818310614fb95781614fbb565b825b9392505050565b846001600160a01b0316866001600160a01b03161461501c576001856001600160a01b0316600080516020615c94833981519152868660018b888860405161500f96959493929190615b70565b60405180910390a3615059565b6001856001600160a01b0316600080516020615c948339815191528686600080888860405161505096959493929190615b70565b60405180910390a35b505050505050565b60008082516041036150975760208301516040840151606085015160001a61508b8782858561527c565b94509450505050611e3b565b50600090506002611e3b565b60008160048111156150b7576150b7615b1f565b036150bf5750565b60018160048111156150d3576150d3615b1f565b036151205760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401611233565b600281600481111561513457615134615b1f565b036151815760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401611233565b600381600481111561519557615195615b1f565b0361272d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401611233565b60005460ff1661187e5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401611233565b60005460ff161561187e5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401611233565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156152b35750600090506003615337565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015615307573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661533057600060019250925050615337565b9150600090505b94509492505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561537e5761537e615340565b604052919050565b60006001600160401b0382111561539f5761539f615340565b5060051b60200190565b6001600160a01b038116811461272d57600080fd5b600082601f8301126153cf57600080fd5b813560206153e46153df83615386565b615356565b82815260059290921b8401810191818101908684111561540357600080fd5b8286015b8481101561542757803561541a816153a9565b8352918301918301615407565b509695505050505050565b6000806040838503121561544557600080fd5b82356001600160401b0381111561545b57600080fd5b615467858286016153be565b925050602083013560ff8116811461547e57600080fd5b809150509250929050565b60006020828403121561549b57600080fd5b8135614fbb816153a9565b60006001600160401b038311156154bf576154bf615340565b6154d2601f8401601f1916602001615356565b90508281528383830111156154e657600080fd5b828260208301376000602084830101529392505050565b60006020828403121561550f57600080fd5b81356001600160401b0381111561552557600080fd5b8201601f8101841361553657600080fd5b615545848235602084016154a6565b949350505050565b600082601f83011261555e57600080fd5b614fbb838335602085016154a6565b6000806040838503121561558057600080fd5b8235915060208301356001600160401b0381111561559d57600080fd5b6155a98582860161554d565b9150509250929050565b600080604083850312156155c657600080fd5b82359150602083013561547e816153a9565b6000602082840312156155ea57600080fd5b5035919050565b6000806040838503121561560457600080fd5b50508035926020909101359150565b600082601f83011261562457600080fd5b813560206156346153df83615386565b82815260059290921b8401810191818101908684111561565357600080fd5b8286015b848110156154275780358352918301918301615657565b6000806040838503121561568157600080fd5b82356001600160401b038082111561569857600080fd5b6156a4868387016153be565b935060208501359150808211156156ba57600080fd5b506155a985828601615613565b600080604083850312156156da57600080fd5b82356156e5816153a9565b915060208301356001600160401b0381111561559d57600080fd5b60006101c0820190508f82528e60208301528d60408301528c60608301528b151560808301528a151560a08301528960c08301528860e08301528761010083015286610120830152856101408301528461016083015261576561018083018515159052565b826101a08301529f9e505050505050505050505050505050565b801515811461272d57600080fd5b60006020828403121561579f57600080fd5b8135614fbb8161577f565b6000602082840312156157bc57600080fd5b81356001600160401b038111156157d257600080fd5b615545848285016153be565b6000806000806000806000806000806101408b8d0312156157fe57600080fd5b8a35995060208b0135985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b0135935060e08b013592506101008b013591506101208b013561584a8161577f565b809150509295989b9194979a5092959850565b6000806000806000806000806000806101408b8d03121561587d57600080fd5b505088359a60208a01359a5060408a013599606081013599506080810135985060a0810135975060c0810135965060e081013595506101008101359450610120013592509050565b8035600781106158d457600080fd5b919050565b6000806000606084860312156158ee57600080fd5b83356158f9816153a9565b92506020840135915061590e604085016158c5565b90509250925092565b60008060006060848603121561592c57600080fd5b83356001600160401b038082111561594357600080fd5b61594f878388016153be565b9450602086013591508082111561596557600080fd5b5061597286828701615613565b92505061590e604085016158c5565b60208082526023908201527f41756374696f6e486f7573653a206f6e6c792061646d696e207065726d69747460408201526232b21760e91b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201615a0257615a026159da565b5060010190565b60005b83811015615a24578181015183820152602001615a0c565b50506000910152565b6020815260008251806020840152615a4c816040850160208701615a09565b601f01601f19169190910160400192915050565b600060208284031215615a7257600080fd5b8151614fbb8161577f565b6020808252818101527f426c6f636b65643a204f4641432073616e6374696f6e65642061646472657373604082015260600190565b80820180821115611762576117626159da565b600060208284031215615ad757600080fd5b5051919050565b81810381811115611762576117626159da565b602080825260149082015273105d58dd1a5bdb921bdd5cd94e881c185d5cd95960621b604082015260600190565b634e487b7160e01b600052602160045260246000fd5b600081518084526020808501945080840160005b83811015615b6557815187529582019590820190600101615b49565b509495945050505050565b60c081526000615b8360c0830189615b35565b6020830188905286151560408401526001600160a01b0386166060840152841515608084015282810360a0840152615bbb8185615b35565b9998505050505050505050565b8082028115828204841417611762576117626159da565b60208082526026908201527f4e6f7420656e6f75676820737570706c792072656d61696e696e6720666f7220604082015265726166666c6560d01b606082015260800190565b60ff8181168382160190811115611762576117626159da565b600081615c4d57615c4d6159da565b506000190190565b600082615c7257634e487b7160e01b600052601260045260246000fd5b500490565b60008251615c89818460208701615a09565b919091019291505056fe96cf551c818da56faa6ddb7fd002e845e11366de7e533273e38729d7720c9215a2646970667358221220be7728457a3627379886208c11641736b6376533fee82b84077c9f01415c8fb264736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000487ee3b741c9d2ca743506d1b49a515c8ccc5797000000000000000000000000ae20f0454cc764619489087fb7ef4c3e890062a0000000000000000000000000898157afb3e158cc835d19b9ecd37c69bf460f8c00000000000000000000000040c57923924b5c5c5455c48d93317139addac8fb000000000000000000000000a8eaa9dc2d49624d0ca0bdefa30a6e2a957efb910000000000000000000000000d9d792a98e08d1c716f870d9b51ea5f64a24df400000000000000000000000000000000000000000000000000000000000000090000000000000000000000000000000000000000000000000000000000000064
-----Decoded View---------------
Arg [0] : _nft (address): 0x487eE3b741C9d2CA743506D1b49A515C8cCc5797
Arg [1] : _payee (address): 0xae20f0454cc764619489087FB7eF4c3e890062A0
Arg [2] : _oasis (address): 0x898157afB3E158cc835D19B9ecd37C69bF460f8C
Arg [3] : _sanctions (address): 0x40C57923924B5c5c5455c48D93317139ADDaC8fb
Arg [4] : _allowlistSigner (address): 0xA8Eaa9DC2D49624d0ca0BDefa30A6e2A957Efb91
Arg [5] : _wildPayee (address): 0x0d9D792a98e08d1C716f870D9b51ea5F64a24dF4
Arg [6] : _wildPrimaryRoyalty (uint256): 9
Arg [7] : _primaryFeeNumerator (uint256): 100
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 000000000000000000000000487ee3b741c9d2ca743506d1b49a515c8ccc5797
Arg [1] : 000000000000000000000000ae20f0454cc764619489087fb7ef4c3e890062a0
Arg [2] : 000000000000000000000000898157afb3e158cc835d19b9ecd37c69bf460f8c
Arg [3] : 00000000000000000000000040c57923924b5c5c5455c48d93317139addac8fb
Arg [4] : 000000000000000000000000a8eaa9dc2d49624d0ca0bdefa30a6e2a957efb91
Arg [5] : 0000000000000000000000000d9d792a98e08d1c716f870d9b51ea5f64a24df4
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000064
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $3,444.68 | 0.04 | $137.79 |
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.