Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
12589544 | 1246 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
FNDNFTMarket
Compiler Version
v0.7.6+commit.7338295f
Optimization Enabled:
Yes with 1337 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/* ・ * ★ ・ 。 ・ ゚☆ 。 * ★ ゚・。 * 。 * ☆ 。・゚*.。 ゚ *.。☆。★ ・ ` .-:::::-.` `-::---...``` `-:` .:+ssssoooo++//:.` .-/+shhhhhhhhhhhhhyyyssooo: .--::. .+ossso+/////++/:://-` .////+shhhhhhhhhhhhhhhhhhhhhy `-----::. `/+////+++///+++/:--:/+/- -////+shhhhhhhhhhhhhhhhhhhhhy `------:::-` `//-.``.-/+ooosso+:-.-/oso- -////+shhhhhhhhhhhhhhhhhhhhhy .--------:::-` :+:.` .-/osyyyyyyso++syhyo.-////+shhhhhhhhhhhhhhhhhhhhhy `-----------:::-. +o+:-.-:/oyhhhhhhdhhhhhdddy:-////+shhhhhhhhhhhhhhhhhhhhhy .------------::::-- `oys+/::/+shhhhhhhdddddddddy/-////+shhhhhhhhhhhhhhhhhhhhhy .--------------:::::-` +ys+////+yhhhhhhhddddddddhy:-////+yhhhhhhhhhhhhhhhhhhhhhy `----------------::::::-`.ss+/:::+oyhhhhhhhhhhhhhhho`-////+shhhhhhhhhhhhhhhhhhhhhy .------------------:::::::.-so//::/+osyyyhhhhhhhhhys` -////+shhhhhhhhhhhhhhhhhhhhhy `.-------------------::/:::::..+o+////+oosssyyyyyyys+` .////+shhhhhhhhhhhhhhhhhhhhhy .--------------------::/:::.` -+o++++++oooosssss/. `-//+shhhhhhhhhhhhhhhhhhhhyo .------- ``````.......--` `-/+ooooosso+/-` `./++++///:::--...``hhhhyo ````` * ・ 。 ・ ゚☆ 。 * ★ ゚・。 * 。 * ☆ 。・゚*.。 ゚ *.。☆。★ ・ * ゚。·*・。 ゚* ☆゚・。°*. ゚ ・ ゚*。・゚★。 ・ *゚。 * ・゚*。★・ ☆∴。 * ・ 。 */ // SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; pragma abicoder v2; // solhint-disable-line import "./mixins/FoundationTreasuryNode.sol"; import "./mixins/roles/FoundationAdminRole.sol"; import "./mixins/NFTMarketCore.sol"; import "./mixins/SendValueWithFallbackWithdraw.sol"; import "./mixins/NFTMarketCreators.sol"; import "./mixins/NFTMarketFees.sol"; import "./mixins/NFTMarketAuction.sol"; import "./mixins/NFTMarketReserveAuction.sol"; import "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol"; /** * @title A market for NFTs on Foundation. * @dev This top level file holds no data directly to ease future upgrades. */ contract FNDNFTMarket is FoundationTreasuryNode, FoundationAdminRole, NFTMarketCore, ReentrancyGuardUpgradeable, NFTMarketCreators, SendValueWithFallbackWithdraw, NFTMarketFees, NFTMarketAuction, NFTMarketReserveAuction { /** * @notice Called once to configure the contract after the initial deployment. * @dev This farms the initialize call out to inherited contracts as needed. */ function initialize(address payable treasury) public initializer { FoundationTreasuryNode._initializeFoundationTreasuryNode(treasury); NFTMarketAuction._initializeNFTMarketAuction(); NFTMarketReserveAuction._initializeNFTMarketReserveAuction(); } /** * @notice Allows Foundation to update the market configuration. */ function adminUpdateConfig( uint256 minPercentIncrementInBasisPoints, uint256 duration, uint256 primaryF8nFeeBasisPoints, uint256 secondaryF8nFeeBasisPoints, uint256 secondaryCreatorFeeBasisPoints ) public onlyFoundationAdmin { _updateReserveAuctionConfig(minPercentIncrementInBasisPoints, duration); _updateMarketFees(primaryF8nFeeBasisPoints, secondaryF8nFeeBasisPoints, secondaryCreatorFeeBasisPoints); } /** * @dev Checks who the seller for an NFT is, this will check escrow or return the current owner if not in escrow. * This is a no-op function required to avoid compile errors. */ function _getSellerFor(address nftContract, uint256 tokenId) internal view virtual override(NFTMarketCore, NFTMarketReserveAuction) returns (address payable) { return super._getSellerFor(nftContract, tokenId); } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; /** * @notice A mixin that stores a reference to the Foundation treasury contract. */ abstract contract FoundationTreasuryNode is Initializable { using AddressUpgradeable for address payable; address payable private treasury; /** * @dev Called once after the initial deployment to set the Foundation treasury address. */ function _initializeFoundationTreasuryNode(address payable _treasury) internal initializer { require(_treasury.isContract(), "FoundationTreasuryNode: Address is not a contract"); treasury = _treasury; } /** * @notice Returns the address of the Foundation treasury. */ function getFoundationTreasury() public view returns (address payable) { return treasury; } // `______gap` is added to each mixin to allow adding new data slots or additional mixins in an upgrade-safe way. uint256[2000] private __gap; }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; import "../../interfaces/IAdminRole.sol"; import "../FoundationTreasuryNode.sol"; /** * @notice Allows a contract to leverage an admin role defined by the Foundation contract. */ abstract contract FoundationAdminRole is FoundationTreasuryNode { // This file uses 0 data slots (other than what's included via FoundationTreasuryNode) modifier onlyFoundationAdmin() { require( IAdminRole(getFoundationTreasury()).isAdmin(msg.sender), "FoundationAdminRole: caller does not have the Admin role" ); _; } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol"; /** * @notice A place for common modifiers and functions used by various NFTMarket mixins, if any. * @dev This also leaves a gap which can be used to add a new mixin to the top of the inheritance tree. */ abstract contract NFTMarketCore { /** * @dev If the auction did not have an escrowed seller to return, this falls back to return the current owner. * This allows functions to calculate the correct fees before the NFT has been listed in auction. */ function _getSellerFor(address nftContract, uint256 tokenId) internal view virtual returns (address payable) { return payable(IERC721Upgradeable(nftContract).ownerOf(tokenId)); } // 50 slots were consumed by adding ReentrancyGuardUpgradeable uint256[950] private ______gap; }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol"; /** * @notice Attempt to send ETH and if the transfer fails or runs out of gas, store the balance * for future withdrawal instead. */ abstract contract SendValueWithFallbackWithdraw is ReentrancyGuardUpgradeable { using AddressUpgradeable for address payable; using SafeMathUpgradeable for uint256; mapping(address => uint256) private pendingWithdrawals; event WithdrawPending(address indexed user, uint256 amount); event Withdrawal(address indexed user, uint256 amount); /** * @notice Returns how much funds are available for manual withdraw due to failed transfers. */ function getPendingWithdrawal(address user) public view returns (uint256) { return pendingWithdrawals[user]; } /** * @notice Allows a user to manually withdraw funds which originally failed to transfer to themselves. */ function withdraw() public { withdrawFor(msg.sender); } /** * @notice Allows anyone to manually trigger a withdrawal of funds which originally failed to transfer for a user. */ function withdrawFor(address payable user) public nonReentrant { uint256 amount = pendingWithdrawals[user]; require(amount > 0, "No funds are pending withdrawal"); pendingWithdrawals[user] = 0; user.sendValue(amount); emit Withdrawal(user, amount); } /** * @dev Attempt to send a user ETH with a reasonably low gas limit of 20k, * which is enough to send to contracts as well. */ function _sendValueWithFallbackWithdrawWithLowGasLimit(address payable user, uint256 amount) internal { _sendValueWithFallbackWithdraw(user, amount, 20000); } /** * @dev Attempt to send a user or contract ETH with a moderate gas limit of 90k, * which is enough for a 5-way split. */ function _sendValueWithFallbackWithdrawWithMediumGasLimit(address payable user, uint256 amount) internal { _sendValueWithFallbackWithdraw(user, amount, 210000); } /** * @dev Attempt to send a user or contract ETH and if it fails store the amount owned for later withdrawal. */ function _sendValueWithFallbackWithdraw( address payable user, uint256 amount, uint256 gasLimit ) private { if (amount == 0) { return; } // Cap the gas to prevent consuming all available gas to block a tx from completing successfully // solhint-disable-next-line avoid-low-level-calls (bool success, ) = user.call{ value: amount, gas: gasLimit }(""); if (!success) { // Record failed sends for a withdrawal later // Transfers could fail if sent to a multisig with non-trivial receiver logic // solhint-disable-next-line reentrancy pendingWithdrawals[user] = pendingWithdrawals[user].add(amount); emit WithdrawPending(user, amount); } } uint256[499] private ______gap; }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; import "../interfaces/IFNDNFT721.sol"; import "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol"; /** * @notice A mixin for associating creators to NFTs. * @dev In the future this may store creators directly in order to support NFTs created on a different platform. */ abstract contract NFTMarketCreators is ReentrancyGuardUpgradeable // Adding this unused mixin to help with linearization { /** * @dev If the creator is not available then 0x0 is returned. Downstream this indicates that the creator * fee should be sent to the current seller instead. * This may apply when selling NFTs that were not minted on Foundation. */ function _getCreator(address nftContract, uint256 tokenId) internal view returns (address payable) { try IFNDNFT721(nftContract).tokenCreator(tokenId) returns (address payable creator) { return creator; } catch { return address(0); } } /** * @dev Returns the creator and a destination address for any payments to the creator, * returns address(0) if the creator is unknown. */ function _getCreatorAndPaymentAddress(address nftContract, uint256 tokenId) internal view returns (address payable, address payable) { address payable creator = _getCreator(nftContract, tokenId); try IFNDNFT721(nftContract).getTokenCreatorPaymentAddress(tokenId) returns ( address payable tokenCreatorPaymentAddress ) { if (tokenCreatorPaymentAddress != address(0)) { return (creator, tokenCreatorPaymentAddress); } } catch // solhint-disable-next-line no-empty-blocks { // Fall through to return (creator, creator) below } return (creator, creator); } // 500 slots were added via the new SendValueWithFallbackWithdraw mixin uint256[500] private ______gap; }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol"; import "./FoundationTreasuryNode.sol"; import "./Constants.sol"; import "./NFTMarketCore.sol"; import "./NFTMarketCreators.sol"; import "./SendValueWithFallbackWithdraw.sol"; /** * @notice A mixin to distribute funds when an NFT is sold. */ abstract contract NFTMarketFees is Constants, Initializable, FoundationTreasuryNode, NFTMarketCore, NFTMarketCreators, SendValueWithFallbackWithdraw { using SafeMathUpgradeable for uint256; event MarketFeesUpdated( uint256 primaryFoundationFeeBasisPoints, uint256 secondaryFoundationFeeBasisPoints, uint256 secondaryCreatorFeeBasisPoints ); uint256 private _primaryFoundationFeeBasisPoints; uint256 private _secondaryFoundationFeeBasisPoints; uint256 private _secondaryCreatorFeeBasisPoints; mapping(address => mapping(uint256 => bool)) private nftContractToTokenIdToFirstSaleCompleted; /** * @notice Returns true if the given NFT has not been sold in this market previously and is being sold by the creator. */ function getIsPrimary(address nftContract, uint256 tokenId) public view returns (bool) { return _getIsPrimary(nftContract, tokenId, _getCreator(nftContract, tokenId), _getSellerFor(nftContract, tokenId)); } /** * @dev A helper that determines if this is a primary sale given the current seller. * This is a minor optimization to use the seller if already known instead of making a redundant lookup call. */ function _getIsPrimary( address nftContract, uint256 tokenId, address creator, address seller ) private view returns (bool) { return !nftContractToTokenIdToFirstSaleCompleted[nftContract][tokenId] && creator == seller; } /** * @notice Returns the current fee configuration in basis points. */ function getFeeConfig() public view returns ( uint256 primaryFoundationFeeBasisPoints, uint256 secondaryFoundationFeeBasisPoints, uint256 secondaryCreatorFeeBasisPoints ) { return (_primaryFoundationFeeBasisPoints, _secondaryFoundationFeeBasisPoints, _secondaryCreatorFeeBasisPoints); } /** * @notice Returns how funds will be distributed for a sale at the given price point. * @dev This could be used to present exact fee distributing on listing or before a bid is placed. */ function getFees( address nftContract, uint256 tokenId, uint256 price ) public view returns ( uint256 foundationFee, uint256 creatorSecondaryFee, uint256 ownerRev ) { (foundationFee, , creatorSecondaryFee, , ownerRev) = _getFees( nftContract, tokenId, _getSellerFor(nftContract, tokenId), price ); } /** * @dev Calculates how funds should be distributed for the given sale details. * If this is a primary sale, the creator revenue will appear as `ownerRev`. */ function _getFees( address nftContract, uint256 tokenId, address payable seller, uint256 price ) private view returns ( uint256 foundationFee, address payable creatorSecondaryFeeTo, uint256 creatorSecondaryFee, address payable ownerRevTo, uint256 ownerRev ) { // The tokenCreatorPaymentAddress replaces the creator as the fee recipient. (address payable creator, address payable tokenCreatorPaymentAddress) = _getCreatorAndPaymentAddress(nftContract, tokenId); uint256 foundationFeeBasisPoints; if (_getIsPrimary(nftContract, tokenId, creator, seller)) { foundationFeeBasisPoints = _primaryFoundationFeeBasisPoints; // On a primary sale, the creator is paid the remainder via `ownerRev`. ownerRevTo = tokenCreatorPaymentAddress; } else { foundationFeeBasisPoints = _secondaryFoundationFeeBasisPoints; // If there is no creator then funds go to the seller instead. if (tokenCreatorPaymentAddress != address(0)) { // SafeMath is not required when dividing by a constant value > 0. creatorSecondaryFee = price.mul(_secondaryCreatorFeeBasisPoints) / BASIS_POINTS; creatorSecondaryFeeTo = tokenCreatorPaymentAddress; } if (seller == creator) { ownerRevTo = tokenCreatorPaymentAddress; } else { ownerRevTo = seller; } } // SafeMath is not required when dividing by a constant value > 0. foundationFee = price.mul(foundationFeeBasisPoints) / BASIS_POINTS; ownerRev = price.sub(foundationFee).sub(creatorSecondaryFee); } /** * @dev Distributes funds to foundation, creator, and NFT owner after a sale. */ function _distributeFunds( address nftContract, uint256 tokenId, address payable seller, uint256 price ) internal returns ( uint256 foundationFee, uint256 creatorFee, uint256 ownerRev ) { address payable creatorFeeTo; address payable ownerRevTo; (foundationFee, creatorFeeTo, creatorFee, ownerRevTo, ownerRev) = _getFees(nftContract, tokenId, seller, price); // Anytime fees are distributed that indicates the first sale is complete, // which will not change state during a secondary sale. // This must come after the `_getFees` call above as this state is considered in the function. nftContractToTokenIdToFirstSaleCompleted[nftContract][tokenId] = true; _sendValueWithFallbackWithdrawWithLowGasLimit(getFoundationTreasury(), foundationFee); _sendValueWithFallbackWithdrawWithMediumGasLimit(creatorFeeTo, creatorFee); _sendValueWithFallbackWithdrawWithMediumGasLimit(ownerRevTo, ownerRev); } /** * @notice Allows Foundation to change the market fees. */ function _updateMarketFees( uint256 primaryFoundationFeeBasisPoints, uint256 secondaryFoundationFeeBasisPoints, uint256 secondaryCreatorFeeBasisPoints ) internal { require(primaryFoundationFeeBasisPoints < BASIS_POINTS, "NFTMarketFees: Fees >= 100%"); require( secondaryFoundationFeeBasisPoints.add(secondaryCreatorFeeBasisPoints) < BASIS_POINTS, "NFTMarketFees: Fees >= 100%" ); _primaryFoundationFeeBasisPoints = primaryFoundationFeeBasisPoints; _secondaryFoundationFeeBasisPoints = secondaryFoundationFeeBasisPoints; _secondaryCreatorFeeBasisPoints = secondaryCreatorFeeBasisPoints; emit MarketFeesUpdated( primaryFoundationFeeBasisPoints, secondaryFoundationFeeBasisPoints, secondaryCreatorFeeBasisPoints ); } uint256[1000] private ______gap; }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; /** * @notice An abstraction layer for auctions. * @dev This contract can be expanded with reusable calls and data as more auction types are added. */ abstract contract NFTMarketAuction { /** * @dev A global id for auctions of any type. */ uint256 private nextAuctionId; function _initializeNFTMarketAuction() internal { nextAuctionId = 1; } function _getNextAndIncrementAuctionId() internal returns (uint256) { return nextAuctionId++; } uint256[1000] private ______gap; }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; pragma abicoder v2; // solhint-disable-line import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol"; import "./Constants.sol"; import "./NFTMarketCore.sol"; import "./NFTMarketFees.sol"; import "./SendValueWithFallbackWithdraw.sol"; import "./NFTMarketAuction.sol"; import "./roles/FoundationAdminRole.sol"; /** * @notice Manages a reserve price auction for NFTs. */ abstract contract NFTMarketReserveAuction is Constants, FoundationAdminRole, NFTMarketCore, ReentrancyGuardUpgradeable, SendValueWithFallbackWithdraw, NFTMarketFees, NFTMarketAuction { using SafeMathUpgradeable for uint256; struct ReserveAuction { address nftContract; uint256 tokenId; address payable seller; uint256 duration; uint256 extensionDuration; uint256 endTime; address payable bidder; uint256 amount; } mapping(address => mapping(uint256 => uint256)) private nftContractToTokenIdToAuctionId; mapping(uint256 => ReserveAuction) private auctionIdToAuction; uint256 private _minPercentIncrementInBasisPoints; // This variable was used in an older version of the contract, left here as a gap to ensure upgrade compatibility uint256 private ______gap_was_maxBidIncrementRequirement; uint256 private _duration; // These variables were used in an older version of the contract, left here as gaps to ensure upgrade compatibility uint256 private ______gap_was_extensionDuration; uint256 private ______gap_was_goLiveDate; // Cap the max duration so that overflows will not occur uint256 private constant MAX_MAX_DURATION = 1000 days; uint256 private constant EXTENSION_DURATION = 15 minutes; event ReserveAuctionConfigUpdated( uint256 minPercentIncrementInBasisPoints, uint256 maxBidIncrementRequirement, uint256 duration, uint256 extensionDuration, uint256 goLiveDate ); event ReserveAuctionCreated( address indexed seller, address indexed nftContract, uint256 indexed tokenId, uint256 duration, uint256 extensionDuration, uint256 reservePrice, uint256 auctionId ); event ReserveAuctionUpdated(uint256 indexed auctionId, uint256 reservePrice); event ReserveAuctionCanceled(uint256 indexed auctionId); event ReserveAuctionBidPlaced(uint256 indexed auctionId, address indexed bidder, uint256 amount, uint256 endTime); event ReserveAuctionFinalized( uint256 indexed auctionId, address indexed seller, address indexed bidder, uint256 f8nFee, uint256 creatorFee, uint256 ownerRev ); event ReserveAuctionCanceledByAdmin(uint256 indexed auctionId, string reason); modifier onlyValidAuctionConfig(uint256 reservePrice) { require(reservePrice > 0, "NFTMarketReserveAuction: Reserve price must be at least 1 wei"); _; } /** * @notice Returns auction details for a given auctionId. */ function getReserveAuction(uint256 auctionId) public view returns (ReserveAuction memory) { return auctionIdToAuction[auctionId]; } /** * @notice Returns the auctionId for a given NFT, or 0 if no auction is found. * @dev If an auction is canceled, it will not be returned. However the auction may be over and pending finalization. */ function getReserveAuctionIdFor(address nftContract, uint256 tokenId) public view returns (uint256) { return nftContractToTokenIdToAuctionId[nftContract][tokenId]; } /** * @dev Returns the seller that put a given NFT into escrow, * or bubbles the call up to check the current owner if the NFT is not currently in escrow. */ function _getSellerFor(address nftContract, uint256 tokenId) internal view virtual override returns (address payable) { address payable seller = auctionIdToAuction[nftContractToTokenIdToAuctionId[nftContract][tokenId]].seller; if (seller == address(0)) { return super._getSellerFor(nftContract, tokenId); } return seller; } /** * @notice Returns the current configuration for reserve auctions. */ function getReserveAuctionConfig() public view returns (uint256 minPercentIncrementInBasisPoints, uint256 duration) { minPercentIncrementInBasisPoints = _minPercentIncrementInBasisPoints; duration = _duration; } function _initializeNFTMarketReserveAuction() internal { _duration = 24 hours; // A sensible default value } function _updateReserveAuctionConfig(uint256 minPercentIncrementInBasisPoints, uint256 duration) internal { require(minPercentIncrementInBasisPoints <= BASIS_POINTS, "NFTMarketReserveAuction: Min increment must be <= 100%"); // Cap the max duration so that overflows will not occur require(duration <= MAX_MAX_DURATION, "NFTMarketReserveAuction: Duration must be <= 1000 days"); require(duration >= EXTENSION_DURATION, "NFTMarketReserveAuction: Duration must be >= EXTENSION_DURATION"); _minPercentIncrementInBasisPoints = minPercentIncrementInBasisPoints; _duration = duration; // We continue to emit unused configuration variables to simplify the subgraph integration. emit ReserveAuctionConfigUpdated(minPercentIncrementInBasisPoints, 0, duration, EXTENSION_DURATION, 0); } /** * @notice Creates an auction for the given NFT. * The NFT is held in escrow until the auction is finalized or canceled. */ function createReserveAuction( address nftContract, uint256 tokenId, uint256 reservePrice ) public onlyValidAuctionConfig(reservePrice) nonReentrant { // If an auction is already in progress then the NFT would be in escrow and the modifier would have failed uint256 auctionId = _getNextAndIncrementAuctionId(); nftContractToTokenIdToAuctionId[nftContract][tokenId] = auctionId; auctionIdToAuction[auctionId] = ReserveAuction( nftContract, tokenId, msg.sender, _duration, EXTENSION_DURATION, 0, // endTime is only known once the reserve price is met address(0), // bidder is only known once a bid has been placed reservePrice ); IERC721Upgradeable(nftContract).transferFrom(msg.sender, address(this), tokenId); emit ReserveAuctionCreated( msg.sender, nftContract, tokenId, _duration, EXTENSION_DURATION, reservePrice, auctionId ); } /** * @notice If an auction has been created but has not yet received bids, the configuration * such as the reservePrice may be changed by the seller. */ function updateReserveAuction(uint256 auctionId, uint256 reservePrice) public onlyValidAuctionConfig(reservePrice) { ReserveAuction storage auction = auctionIdToAuction[auctionId]; require(auction.seller == msg.sender, "NFTMarketReserveAuction: Not your auction"); require(auction.endTime == 0, "NFTMarketReserveAuction: Auction in progress"); auction.amount = reservePrice; emit ReserveAuctionUpdated(auctionId, reservePrice); } /** * @notice If an auction has been created but has not yet received bids, it may be canceled by the seller. * The NFT is returned to the seller from escrow. */ function cancelReserveAuction(uint256 auctionId) public nonReentrant { ReserveAuction memory auction = auctionIdToAuction[auctionId]; require(auction.seller == msg.sender, "NFTMarketReserveAuction: Not your auction"); require(auction.endTime == 0, "NFTMarketReserveAuction: Auction in progress"); delete nftContractToTokenIdToAuctionId[auction.nftContract][auction.tokenId]; delete auctionIdToAuction[auctionId]; IERC721Upgradeable(auction.nftContract).transferFrom(address(this), auction.seller, auction.tokenId); emit ReserveAuctionCanceled(auctionId); } /** * @notice A bidder may place a bid which is at least the value defined by `getMinBidAmount`. * If this is the first bid on the auction, the countdown will begin. * If there is already an outstanding bid, the previous bidder will be refunded at this time * and if the bid is placed in the final moments of the auction, the countdown may be extended. */ function placeBid(uint256 auctionId) public payable nonReentrant { ReserveAuction storage auction = auctionIdToAuction[auctionId]; require(auction.amount != 0, "NFTMarketReserveAuction: Auction not found"); if (auction.endTime == 0) { // If this is the first bid, ensure it's >= the reserve price require(auction.amount <= msg.value, "NFTMarketReserveAuction: Bid must be at least the reserve price"); } else { // If this bid outbids another, confirm that the bid is at least x% greater than the last require(auction.endTime >= block.timestamp, "NFTMarketReserveAuction: Auction is over"); require(auction.bidder != msg.sender, "NFTMarketReserveAuction: You already have an outstanding bid"); uint256 minAmount = _getMinBidAmountForReserveAuction(auction.amount); require(msg.value >= minAmount, "NFTMarketReserveAuction: Bid amount too low"); } if (auction.endTime == 0) { auction.amount = msg.value; auction.bidder = msg.sender; // On the first bid, the endTime is now + duration auction.endTime = block.timestamp + auction.duration; } else { // Cache and update bidder state before a possible reentrancy (via the value transfer) uint256 originalAmount = auction.amount; address payable originalBidder = auction.bidder; auction.amount = msg.value; auction.bidder = msg.sender; // When a bid outbids another, check to see if a time extension should apply. if (auction.endTime - block.timestamp < auction.extensionDuration) { auction.endTime = block.timestamp + auction.extensionDuration; } // Refund the previous bidder _sendValueWithFallbackWithdrawWithLowGasLimit(originalBidder, originalAmount); } emit ReserveAuctionBidPlaced(auctionId, msg.sender, msg.value, auction.endTime); } /** * @notice Once the countdown has expired for an auction, anyone can settle the auction. * This will send the NFT to the highest bidder and distribute funds. */ function finalizeReserveAuction(uint256 auctionId) public nonReentrant { ReserveAuction memory auction = auctionIdToAuction[auctionId]; require(auction.endTime > 0, "NFTMarketReserveAuction: Auction was already settled"); require(auction.endTime < block.timestamp, "NFTMarketReserveAuction: Auction still in progress"); delete nftContractToTokenIdToAuctionId[auction.nftContract][auction.tokenId]; delete auctionIdToAuction[auctionId]; IERC721Upgradeable(auction.nftContract).transferFrom(address(this), auction.bidder, auction.tokenId); (uint256 f8nFee, uint256 creatorFee, uint256 ownerRev) = _distributeFunds(auction.nftContract, auction.tokenId, auction.seller, auction.amount); emit ReserveAuctionFinalized(auctionId, auction.seller, auction.bidder, f8nFee, creatorFee, ownerRev); } /** * @notice Returns the minimum amount a bidder must spend to participate in an auction. */ function getMinBidAmount(uint256 auctionId) public view returns (uint256) { ReserveAuction storage auction = auctionIdToAuction[auctionId]; if (auction.endTime == 0) { return auction.amount; } return _getMinBidAmountForReserveAuction(auction.amount); } /** * @dev Determines the minimum bid amount when outbidding another user. */ function _getMinBidAmountForReserveAuction(uint256 currentBidAmount) private view returns (uint256) { uint256 minIncrement = currentBidAmount.mul(_minPercentIncrementInBasisPoints) / BASIS_POINTS; if (minIncrement == 0) { // The next bid must be at least 1 wei greater than the current. return currentBidAmount.add(1); } return minIncrement.add(currentBidAmount); } /** * @notice Allows Foundation to cancel an auction, refunding the bidder and returning the NFT to the seller. * This should only be used for extreme cases such as DMCA takedown requests. The reason should always be provided. */ function adminCancelReserveAuction(uint256 auctionId, string memory reason) public onlyFoundationAdmin { require(bytes(reason).length > 0, "NFTMarketReserveAuction: Include a reason for this cancellation"); ReserveAuction memory auction = auctionIdToAuction[auctionId]; require(auction.amount > 0, "NFTMarketReserveAuction: Auction not found"); delete nftContractToTokenIdToAuctionId[auction.nftContract][auction.tokenId]; delete auctionIdToAuction[auctionId]; IERC721Upgradeable(auction.nftContract).transferFrom(address(this), auction.seller, auction.tokenId); if (auction.bidder != address(0)) { _sendValueWithFallbackWithdrawWithMediumGasLimit(auction.bidder, auction.amount); } emit ReserveAuctionCanceledByAdmin(auctionId, reason); } uint256[1000] private ______gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; import "../proxy/Initializable.sol"; /** * @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 ReentrancyGuardUpgradeable is Initializable { // 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; function __ReentrancyGuard_init() internal initializer { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal initializer { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // solhint-disable-next-line compiler-version pragma solidity >=0.4.24 <0.8.0; import "../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || _isConstructor() || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; /** * @notice Interface for AdminRole which wraps the default admin role from * OpenZeppelin's AccessControl for easy integration. */ interface IAdminRole { function isAdmin(address account) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; import "../../introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.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 IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT OR Apache-2.0 // solhint-disable pragma solidity ^0.7.0; interface IFNDNFT721 { function tokenCreator(uint256 tokenId) external view returns (address payable); function getTokenCreatorPaymentAddress(uint256 tokenId) external view returns (address payable); }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.7.0; /** * @dev Constant values shared across mixins. */ abstract contract Constants { uint256 internal constant BASIS_POINTS = 10000; }
{ "optimizer": { "enabled": true, "runs": 1337 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"primaryFoundationFeeBasisPoints","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"secondaryFoundationFeeBasisPoints","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"secondaryCreatorFeeBasisPoints","type":"uint256"}],"name":"MarketFeesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":true,"internalType":"address","name":"bidder","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"ReserveAuctionBidPlaced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"ReserveAuctionCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":false,"internalType":"string","name":"reason","type":"string"}],"name":"ReserveAuctionCanceledByAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"minPercentIncrementInBasisPoints","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxBidIncrementRequirement","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"extensionDuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"goLiveDate","type":"uint256"}],"name":"ReserveAuctionConfigUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":true,"internalType":"address","name":"nftContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"extensionDuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reservePrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"ReserveAuctionCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":true,"internalType":"address","name":"bidder","type":"address"},{"indexed":false,"internalType":"uint256","name":"f8nFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"creatorFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ownerRev","type":"uint256"}],"name":"ReserveAuctionFinalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reservePrice","type":"uint256"}],"name":"ReserveAuctionUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawPending","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawal","type":"event"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"},{"internalType":"string","name":"reason","type":"string"}],"name":"adminCancelReserveAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minPercentIncrementInBasisPoints","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"primaryF8nFeeBasisPoints","type":"uint256"},{"internalType":"uint256","name":"secondaryF8nFeeBasisPoints","type":"uint256"},{"internalType":"uint256","name":"secondaryCreatorFeeBasisPoints","type":"uint256"}],"name":"adminUpdateConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"cancelReserveAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"reservePrice","type":"uint256"}],"name":"createReserveAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"finalizeReserveAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getFeeConfig","outputs":[{"internalType":"uint256","name":"primaryFoundationFeeBasisPoints","type":"uint256"},{"internalType":"uint256","name":"secondaryFoundationFeeBasisPoints","type":"uint256"},{"internalType":"uint256","name":"secondaryCreatorFeeBasisPoints","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"getFees","outputs":[{"internalType":"uint256","name":"foundationFee","type":"uint256"},{"internalType":"uint256","name":"creatorSecondaryFee","type":"uint256"},{"internalType":"uint256","name":"ownerRev","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFoundationTreasury","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getIsPrimary","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"getMinBidAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getPendingWithdrawal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"getReserveAuction","outputs":[{"components":[{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address payable","name":"seller","type":"address"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"extensionDuration","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"address payable","name":"bidder","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct NFTMarketReserveAuction.ReserveAuction","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReserveAuctionConfig","outputs":[{"internalType":"uint256","name":"minPercentIncrementInBasisPoints","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getReserveAuctionIdFor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"treasury","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"placeBid","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"},{"internalType":"uint256","name":"reservePrice","type":"uint256"}],"name":"updateReserveAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"user","type":"address"}],"name":"withdrawFor","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061295e806100206000396000f3fe6080604052600436106101445760003560e01c80635ed31d8a116100c05780639979ef45116100745780639eca672c116100595780639eca672c1461036a578063c4d66de81461038a578063f7a2da23146103aa57610144565b80639979ef451461032a5780639e79b41f1461033d57610144565b80637430e0c6116100a55780637430e0c6146102ca57806374a45126146102ea5780637ee8b2f81461030a57610144565b80635ed31d8a146102865780635fbbc0d2146102a657610144565b80633b230bc91161011757806347e35740116100fc57806347e35740146102265780634ce6931a146102465780635d83d5621461026657610144565b80633b230bc9146101ee5780633ccfd60b1461021157610144565b806303ec16d714610149578063204767771461016b57806321506fff146101a15780632ab2b52b146101c1575b600080fd5b34801561015557600080fd5b50610169610164366004612144565b6103cc565b005b34801561017757600080fd5b5061018b61018636600461202c565b61049a565b60405161019891906121d7565b60405180910390f35b3480156101ad57600080fd5b506101696101bc36600461208b565b6104c3565b3480156101cd57600080fd5b506101e16101dc36600461202c565b610703565b60405161019891906127b3565b3480156101fa57600080fd5b5061020361072c565b6040516101989291906127df565b34801561021d57600080fd5b50610169610738565b34801561023257600080fd5b506101e161024136600461208b565b610743565b34801561025257600080fd5b50610169610261366004612057565b61077c565b34801561027257600080fd5b506101696102813660046120a3565b610a36565b34801561029257600080fd5b506101696102a1366004612165565b610cfe565b3480156102b257600080fd5b506102bb610dd5565b604051610198939291906127ed565b3480156102d657600080fd5b506101696102e536600461208b565b610de6565b3480156102f657600080fd5b506102bb610305366004612057565b61106d565b34801561031657600080fd5b506101e1610325366004612010565b611098565b61016961033836600461208b565b6110b4565b34801561034957600080fd5b5061035d61035836600461208b565b6112f1565b604051610198919061274b565b34801561037657600080fd5b50610169610385366004612010565b611376565b34801561039657600080fd5b506101696103a5366004612010565b6114ae565b3480156103b657600080fd5b506103bf61156a565b604051610198919061219f565b80600081116103f65760405162461bcd60e51b81526004016103ed90612235565b60405180910390fd5b60008381526117776020526040902060028101546001600160a01b031633146104315760405162461bcd60e51b81526004016103ed9061234c565b6005810154156104535760405162461bcd60e51b81526004016103ed906124c0565b828160070181905550837f0c0f2662914f0cd1e952db2aa425901cb00e7c1f507687d22cb04e836d55d9c78460405161048c91906127b3565b60405180910390a250505050565b60006104ba83836104ab868661157f565b6104b587876115fd565b611609565b90505b92915050565b6002610b8754141561051c576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002610b878190556000828152611777602090815260409182902082516101008101845281546001600160a01b0390811682526001830154938201939093529381015482169284018390526003810154606085015260048101546080850152600581015460a0850152600681015490911660c08401526007015460e083015233146105b95760405162461bcd60e51b81526004016103ed9061234c565b60a0810151156105db5760405162461bcd60e51b81526004016103ed906124c0565b80516001600160a01b0390811660009081526117766020908152604080832082860180518552908352818420849055868452611777909252808320805473ffffffffffffffffffffffffffffffffffffffff199081168255600182018590556002820180548216905560038201859055600480830186905560058301869055600683018054909216909155600790910193909355845181860151925191516323b872dd60e01b81529416936323b872dd9361069c93309390929091016121b3565b600060405180830381600087803b1580156106b657600080fd5b505af11580156106ca573d6000803e3d6000fd5b50506040518492507f14b9c40404d5b41deb481f9a40b8aeb2bf4b47679b38cf757075a66ed510f7f19150600090a250506001610b8755565b6001600160a01b0391909116600090815261177660209081526040808320938352929052205490565b6117785461177a549091565b61074133611376565b565b600081815261177760205260408120600581015461076657600701549050610777565b6107738160070154611658565b9150505b919050565b806000811161079d5760405162461bcd60e51b81526004016103ed90612235565b6002610b875414156107f6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002610b875560006108066116a0565b9050806117766000876001600160a01b03166001600160a01b03168152602001908152602001600020600086815260200190815260200160002081905550604051806101000160405280866001600160a01b03168152602001858152602001336001600160a01b0316815260200161177a54815260200161038481526020016000815260200160006001600160a01b0316815260200184815250611777600083815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060e08201518160070155905050846001600160a01b03166323b872dd3330876040518463ffffffff1660e01b81526004016109a0939291906121b3565b600060405180830381600087803b1580156109ba57600080fd5b505af11580156109ce573d6000803e3d6000fd5b5050505083856001600160a01b0316336001600160a01b03167f1062dd3b35f12b4064331244d00f40c1d4831965e4285654157a2409c6217cff61177a546103848887604051610a219493929190612803565b60405180910390a450506001610b8755505050565b610a3e61156a565b6001600160a01b03166324d7806c336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610a8a57600080fd5b505afa158015610a9e573d6000803e3d6000fd5b505050506040513d6020811015610ab457600080fd5b5051610af15760405162461bcd60e51b81526004018080602001828103825260388152602001806128a26038913960400191505060405180910390fd5b6000815111610b125760405162461bcd60e51b81526004016103ed906122ef565b6000828152611777602090815260409182902082516101008101845281546001600160a01b03908116825260018301549382019390935260028201548316938101939093526003810154606084015260048101546080840152600581015460a0840152600681015490911660c08301526007015460e08201819052610ba95760405162461bcd60e51b81526004016103ed906123a9565b80516001600160a01b0390811660009081526117766020908152604080832082860180518552908352818420849055878452611777909252808320805473ffffffffffffffffffffffffffffffffffffffff199081168255600182018590556002820180548216905560038201859055600480830186905560058301869055600683018054909216909155600790910193909355845181860151925191516323b872dd60e01b81529416936323b872dd93610c6a93309390929091016121b3565b600060405180830381600087803b158015610c8457600080fd5b505af1158015610c98573d6000803e3d6000fd5b5050505060c08101516001600160a01b031615610cc157610cc18160c001518260e001516116af565b827f1d56d378404d81e3fc5f3dfbf88359b8cb2ecafa73b3270c478bf7b2bdd1446983604051610cf191906121e2565b60405180910390a2505050565b610d0661156a565b6001600160a01b03166324d7806c336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610d5257600080fd5b505afa158015610d66573d6000803e3d6000fd5b505050506040513d6020811015610d7c57600080fd5b5051610db95760405162461bcd60e51b81526004018080602001828103825260388152602001806128a26038913960400191505060405180910390fd5b610dc385856116bd565b610dce838383611778565b5050505050565b610fa154610fa254610fa354909192565b6002610b87541415610e3f576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002610b878190556000828152611777602090815260409182902082516101008101845281546001600160a01b039081168252600183015493820193909352938101548216928401929092526003820154606084015260048201546080840152600582015460a08401819052600683015490911660c084015260079091015460e0830152610edf5760405162461bcd60e51b81526004016103ed906126ee565b428160a0015110610f025760405162461bcd60e51b81526004016103ed90612691565b80516001600160a01b0390811660009081526117766020908152604080832082860180518552908352818420849055868452611777909252808320805473ffffffffffffffffffffffffffffffffffffffff199081168255600182018590556002820180548216905560038201859055600480830186905560058301869055600683018054909216909155600790910193909355845160c0860151925191516323b872dd60e01b81529416936323b872dd93610fc493309390929091016121b3565b600060405180830381600087803b158015610fde57600080fd5b505af1158015610ff2573d6000803e3d6000fd5b5050505060008060006110178460000151856020015186604001518760e00151611884565b9250925092508360c001516001600160a01b031684604001516001600160a01b0316867f2edb0e99c6ac35be6731dab554c1d1fa1b7beb675090dbb09fb14e615aca1c4a868686604051610a21939291906127ed565b6000806000611087868661108189896115fd565b8761192d565b939a91995092975095505050505050565b6001600160a01b03166000908152610dad602052604090205490565b6002610b8754141561110d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002610b875560008181526117776020526040902060078101546111435760405162461bcd60e51b81526004016103ed906123a9565b60058101546111755734816007015411156111705760405162461bcd60e51b81526004016103ed90612406565b6111f9565b42816005015410156111995760405162461bcd60e51b81526004016103ed90612463565b60068101546001600160a01b03163314156111c65760405162461bcd60e51b81526004016103ed90612634565b60006111d58260070154611658565b9050803410156111f75760405162461bcd60e51b81526004016103ed90612292565b505b600581015461123a5734600782015560068101805473ffffffffffffffffffffffffffffffffffffffff19163317905560038101544201600582015561129f565b6007810180546006830180543490935573ffffffffffffffffffffffffffffffffffffffff198316331790556004830154600584015491926001600160a01b0316914290031015611292576004830154420160058401555b61129c8183611a03565b50505b336001600160a01b0316827f26ea3ebbda62eb1baef13e1c237dddd956c87f80b2801f2616d806d52557b1213484600501546040516112df9291906127df565b60405180910390a350506001610b8755565b6112f9611fb0565b506000908152611777602090815260409182902082516101008101845281546001600160a01b03908116825260018301549382019390935260028201548316938101939093526003810154606084015260048101546080840152600581015460a0840152600681015490911660c08301526007015460e082015290565b6002610b875414156113cf576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002610b87556001600160a01b0381166000908152610dad602052604090205480611441576040805162461bcd60e51b815260206004820152601f60248201527f4e6f2066756e6473206172652070656e64696e67207769746864726177616c00604482015290519081900360640190fd5b6001600160a01b0382166000818152610dad60205260408120556114659082611a10565b6040805182815290516001600160a01b038416917f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65919081900360200190a250506001610b8755565b600054610100900460ff16806114c757506114c7611afa565b806114d5575060005460ff16155b6115105760405162461bcd60e51b815260040180806020018281038252602e8152602001806128da602e913960400191505060405180910390fd5b600054610100900460ff1615801561153b576000805460ff1961ff0019909116610100171660011790555b61154482611b0b565b61154c611c32565b611554611c3a565b8015611566576000805461ff00191690555b5050565b6000546201000090046001600160a01b031690565b6000826001600160a01b03166340c1a064836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156115c557600080fd5b505afa9250505080156115ea57506040513d60208110156115e557600080fd5b505160015b6115f6575060006104bd565b90506104bd565b60006104ba8383611c44565b6001600160a01b0384166000908152610fa46020908152604080832086845290915281205460ff1615801561164f5750816001600160a01b0316836001600160a01b0316145b95945050505050565b6000806127106116746117785485611c9290919063ffffffff16565b8161167b57fe5b049050806116965761168e836001611ceb565b915050610777565b6107738184611ceb565b61138d80546001810190915590565b611566828262033450611d45565b6127108211156116df5760405162461bcd60e51b81526004016103ed9061251d565b6305265c008111156117035760405162461bcd60e51b81526004016103ed906125d7565b6103848110156117255760405162461bcd60e51b81526004016103ed9061257a565b61177882905561177a8190556040517f91b85a126da1d01639347f093e4267f458c9d95265414e2f0bd18e8c5b17d42a9061176c90849060009085906103849083906127bc565b60405180910390a15050565b61271083106117ce576040805162461bcd60e51b815260206004820152601b60248201527f4e46544d61726b6574466565733a2046656573203e3d20313030250000000000604482015290519081900360640190fd5b6127106117db8383611ceb565b1061182d576040805162461bcd60e51b815260206004820152601b60248201527f4e46544d61726b6574466565733a2046656573203e3d20313030250000000000604482015290519081900360640190fd5b610fa1839055610fa2829055610fa3819055604080518481526020810184905280820183905290517f556079cdcafac41390a4af41101fa806590aefd70725513ad900a1df6ef488799181900360600190a1505050565b60008060008060006118988989898961192d565b80975081955082985083965084995050505050506001610fa460008b6001600160a01b03166001600160a01b0316815260200190815260200160002060008a815260200190815260200160002060006101000a81548160ff02191690831515021790555061190d61190761156a565b86611a03565b61191782856116af565b61192181846116af565b50509450945094915050565b60008060008060008060006119428b8b611e29565b9150915060006119548c8c858d611609565b1561196757610fa15490508194506119c8565b50610fa2546001600160a01b038216156119a257612710611994610fa3548b611c9290919063ffffffff16565b8161199b57fe5b0495508196505b826001600160a01b03168a6001600160a01b031614156119c4578194506119c8565b8994505b6127106119d58a83611c92565b816119dc57fe5b0497506119f3866119ed8b8b611ed4565b90611ed4565b9350505050945094509450945094565b6115668282614e20611d45565b80471015611a65576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015290519081900360640190fd5b6040516000906001600160a01b0384169083908381818185875af1925050503d8060008114611ab0576040519150601f19603f3d011682016040523d82523d6000602084013e611ab5565b606091505b5050905080611af55760405162461bcd60e51b815260040180806020018281038252603a815260200180612868603a913960400191505060405180910390fd5b505050565b6000611b0530611f31565b15905090565b600054610100900460ff1680611b245750611b24611afa565b80611b32575060005460ff16155b611b6d5760405162461bcd60e51b815260040180806020018281038252602e8152602001806128da602e913960400191505060405180910390fd5b600054610100900460ff16158015611b98576000805460ff1961ff0019909116610100171660011790555b611baa826001600160a01b0316611f31565b611be55760405162461bcd60e51b81526004018080602001828103825260318152602001806128376031913960400191505060405180910390fd5b600080547fffffffffffffffffffff0000000000000000000000000000000000000000ffff16620100006001600160a01b038516021790558015611566576000805461ff00191690555050565b600161138d55565b6201518061177a55565b6001600160a01b038083166000908152611776602090815260408083208584528252808320548352611777909152812060020154909116806104ba57611c8a8484611f37565b9150506104bd565b600082611ca1575060006104bd565b82820282848281611cae57fe5b04146104ba5760405162461bcd60e51b81526004018080602001828103825260218152602001806129086021913960400191505060405180910390fd5b6000828201838110156104ba576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b81611d4f57611af5565b6040516000906001600160a01b038516908390859084818181858888f193505050503d8060008114611d9d576040519150601f19603f3d011682016040523d82523d6000602084013e611da2565b606091505b5050905080611e23576001600160a01b0384166000908152610dad6020526040902054611dcf9084611ceb565b6001600160a01b0385166000818152610dad6020908152604091829020939093558051868152905191927f9a92c3472ba0d2d183e38c3801bae5d41d693c2803377eae8b0f94683862253e92918290030190a25b50505050565b6000806000611e38858561157f565b9050846001600160a01b031663ec5f752e856040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611e7e57600080fd5b505afa925050508015611ea357506040513d6020811015611e9e57600080fd5b505160015b611eac57611ec7565b6001600160a01b03811615611ec5579092509050611ecd565b505b91508190505b9250929050565b600082821115611f2b576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b3b151590565b6000826001600160a01b0316636352211e836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611f7d57600080fd5b505afa158015611f91573d6000803e3d6000fd5b505050506040513d6020811015611fa757600080fd5b50519392505050565b60405180610100016040528060006001600160a01b031681526020016000815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b600060208284031215612021578081fd5b81356104ba8161281e565b6000806040838503121561203e578081fd5b82356120498161281e565b946020939093013593505050565b60008060006060848603121561206b578081fd5b83356120768161281e565b95602085013595506040909401359392505050565b60006020828403121561209c578081fd5b5035919050565b600080604083850312156120b5578182fd5b8235915060208084013567ffffffffffffffff808211156120d4578384fd5b818601915086601f8301126120e7578384fd5b8135818111156120f357fe5b604051601f8201601f191681018501838111828210171561211057fe5b6040528181528382018501891015612126578586fd5b81858501868301378585838301015280955050505050509250929050565b60008060408385031215612156578182fd5b50508035926020909101359150565b600080600080600060a0868803121561217c578081fd5b505083359560208501359550604085013594606081013594506080013592509050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b901515815260200190565b6000602080835283518082850152825b8181101561220e578581018301518582016040015282016121f2565b8181111561221f5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252603d908201527f4e46544d61726b65745265736572766541756374696f6e3a205265736572766560408201527f207072696365206d757374206265206174206c65617374203120776569000000606082015260800190565b6020808252602b908201527f4e46544d61726b65745265736572766541756374696f6e3a2042696420616d6f60408201527f756e7420746f6f206c6f77000000000000000000000000000000000000000000606082015260800190565b6020808252603f908201527f4e46544d61726b65745265736572766541756374696f6e3a20496e636c75646560408201527f206120726561736f6e20666f7220746869732063616e63656c6c6174696f6e00606082015260800190565b60208082526029908201527f4e46544d61726b65745265736572766541756374696f6e3a204e6f7420796f7560408201527f722061756374696f6e0000000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f4e46544d61726b65745265736572766541756374696f6e3a2041756374696f6e60408201527f206e6f7420666f756e6400000000000000000000000000000000000000000000606082015260800190565b6020808252603f908201527f4e46544d61726b65745265736572766541756374696f6e3a20426964206d757360408201527f74206265206174206c6561737420746865207265736572766520707269636500606082015260800190565b60208082526028908201527f4e46544d61726b65745265736572766541756374696f6e3a2041756374696f6e60408201527f206973206f766572000000000000000000000000000000000000000000000000606082015260800190565b6020808252602c908201527f4e46544d61726b65745265736572766541756374696f6e3a2041756374696f6e60408201527f20696e2070726f67726573730000000000000000000000000000000000000000606082015260800190565b60208082526036908201527f4e46544d61726b65745265736572766541756374696f6e3a204d696e20696e6360408201527f72656d656e74206d757374206265203c3d203130302500000000000000000000606082015260800190565b6020808252603f908201527f4e46544d61726b65745265736572766541756374696f6e3a204475726174696f60408201527f6e206d757374206265203e3d20455854454e53494f4e5f4455524154494f4e00606082015260800190565b60208082526036908201527f4e46544d61726b65745265736572766541756374696f6e3a204475726174696f60408201527f6e206d757374206265203c3d2031303030206461797300000000000000000000606082015260800190565b6020808252603c908201527f4e46544d61726b65745265736572766541756374696f6e3a20596f7520616c7260408201527f65616479206861766520616e206f75747374616e64696e672062696400000000606082015260800190565b60208082526032908201527f4e46544d61726b65745265736572766541756374696f6e3a2041756374696f6e60408201527f207374696c6c20696e2070726f67726573730000000000000000000000000000606082015260800190565b60208082526034908201527f4e46544d61726b65745265736572766541756374696f6e3a2041756374696f6e60408201527f2077617320616c726561647920736574746c6564000000000000000000000000606082015260800190565b6000610100820190506001600160a01b0380845116835260208401516020840152806040850151166040840152606084015160608401526080840151608084015260a084015160a08401528060c08501511660c08401525060e083015160e083015292915050565b90815260200190565b948552602085019390935260408401919091526060830152608082015260a00190565b918252602082015260400190565b9283526020830191909152604082015260600190565b93845260208401929092526040830152606082015260800190565b6001600160a01b038116811461283357600080fd5b5056fe466f756e646174696f6e54726561737572794e6f64653a2041646472657373206973206e6f74206120636f6e7472616374416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564466f756e646174696f6e41646d696e526f6c653a2063616c6c657220646f6573206e6f742068617665207468652041646d696e20726f6c65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212204367fb573b2d9527f2761764e28f4cbc43381b2a867a8449926a728b9d20358664736f6c63430007060033
Deployed Bytecode
0x6080604052600436106101445760003560e01c80635ed31d8a116100c05780639979ef45116100745780639eca672c116100595780639eca672c1461036a578063c4d66de81461038a578063f7a2da23146103aa57610144565b80639979ef451461032a5780639e79b41f1461033d57610144565b80637430e0c6116100a55780637430e0c6146102ca57806374a45126146102ea5780637ee8b2f81461030a57610144565b80635ed31d8a146102865780635fbbc0d2146102a657610144565b80633b230bc91161011757806347e35740116100fc57806347e35740146102265780634ce6931a146102465780635d83d5621461026657610144565b80633b230bc9146101ee5780633ccfd60b1461021157610144565b806303ec16d714610149578063204767771461016b57806321506fff146101a15780632ab2b52b146101c1575b600080fd5b34801561015557600080fd5b50610169610164366004612144565b6103cc565b005b34801561017757600080fd5b5061018b61018636600461202c565b61049a565b60405161019891906121d7565b60405180910390f35b3480156101ad57600080fd5b506101696101bc36600461208b565b6104c3565b3480156101cd57600080fd5b506101e16101dc36600461202c565b610703565b60405161019891906127b3565b3480156101fa57600080fd5b5061020361072c565b6040516101989291906127df565b34801561021d57600080fd5b50610169610738565b34801561023257600080fd5b506101e161024136600461208b565b610743565b34801561025257600080fd5b50610169610261366004612057565b61077c565b34801561027257600080fd5b506101696102813660046120a3565b610a36565b34801561029257600080fd5b506101696102a1366004612165565b610cfe565b3480156102b257600080fd5b506102bb610dd5565b604051610198939291906127ed565b3480156102d657600080fd5b506101696102e536600461208b565b610de6565b3480156102f657600080fd5b506102bb610305366004612057565b61106d565b34801561031657600080fd5b506101e1610325366004612010565b611098565b61016961033836600461208b565b6110b4565b34801561034957600080fd5b5061035d61035836600461208b565b6112f1565b604051610198919061274b565b34801561037657600080fd5b50610169610385366004612010565b611376565b34801561039657600080fd5b506101696103a5366004612010565b6114ae565b3480156103b657600080fd5b506103bf61156a565b604051610198919061219f565b80600081116103f65760405162461bcd60e51b81526004016103ed90612235565b60405180910390fd5b60008381526117776020526040902060028101546001600160a01b031633146104315760405162461bcd60e51b81526004016103ed9061234c565b6005810154156104535760405162461bcd60e51b81526004016103ed906124c0565b828160070181905550837f0c0f2662914f0cd1e952db2aa425901cb00e7c1f507687d22cb04e836d55d9c78460405161048c91906127b3565b60405180910390a250505050565b60006104ba83836104ab868661157f565b6104b587876115fd565b611609565b90505b92915050565b6002610b8754141561051c576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002610b878190556000828152611777602090815260409182902082516101008101845281546001600160a01b0390811682526001830154938201939093529381015482169284018390526003810154606085015260048101546080850152600581015460a0850152600681015490911660c08401526007015460e083015233146105b95760405162461bcd60e51b81526004016103ed9061234c565b60a0810151156105db5760405162461bcd60e51b81526004016103ed906124c0565b80516001600160a01b0390811660009081526117766020908152604080832082860180518552908352818420849055868452611777909252808320805473ffffffffffffffffffffffffffffffffffffffff199081168255600182018590556002820180548216905560038201859055600480830186905560058301869055600683018054909216909155600790910193909355845181860151925191516323b872dd60e01b81529416936323b872dd9361069c93309390929091016121b3565b600060405180830381600087803b1580156106b657600080fd5b505af11580156106ca573d6000803e3d6000fd5b50506040518492507f14b9c40404d5b41deb481f9a40b8aeb2bf4b47679b38cf757075a66ed510f7f19150600090a250506001610b8755565b6001600160a01b0391909116600090815261177660209081526040808320938352929052205490565b6117785461177a549091565b61074133611376565b565b600081815261177760205260408120600581015461076657600701549050610777565b6107738160070154611658565b9150505b919050565b806000811161079d5760405162461bcd60e51b81526004016103ed90612235565b6002610b875414156107f6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002610b875560006108066116a0565b9050806117766000876001600160a01b03166001600160a01b03168152602001908152602001600020600086815260200190815260200160002081905550604051806101000160405280866001600160a01b03168152602001858152602001336001600160a01b0316815260200161177a54815260200161038481526020016000815260200160006001600160a01b0316815260200184815250611777600083815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060e08201518160070155905050846001600160a01b03166323b872dd3330876040518463ffffffff1660e01b81526004016109a0939291906121b3565b600060405180830381600087803b1580156109ba57600080fd5b505af11580156109ce573d6000803e3d6000fd5b5050505083856001600160a01b0316336001600160a01b03167f1062dd3b35f12b4064331244d00f40c1d4831965e4285654157a2409c6217cff61177a546103848887604051610a219493929190612803565b60405180910390a450506001610b8755505050565b610a3e61156a565b6001600160a01b03166324d7806c336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610a8a57600080fd5b505afa158015610a9e573d6000803e3d6000fd5b505050506040513d6020811015610ab457600080fd5b5051610af15760405162461bcd60e51b81526004018080602001828103825260388152602001806128a26038913960400191505060405180910390fd5b6000815111610b125760405162461bcd60e51b81526004016103ed906122ef565b6000828152611777602090815260409182902082516101008101845281546001600160a01b03908116825260018301549382019390935260028201548316938101939093526003810154606084015260048101546080840152600581015460a0840152600681015490911660c08301526007015460e08201819052610ba95760405162461bcd60e51b81526004016103ed906123a9565b80516001600160a01b0390811660009081526117766020908152604080832082860180518552908352818420849055878452611777909252808320805473ffffffffffffffffffffffffffffffffffffffff199081168255600182018590556002820180548216905560038201859055600480830186905560058301869055600683018054909216909155600790910193909355845181860151925191516323b872dd60e01b81529416936323b872dd93610c6a93309390929091016121b3565b600060405180830381600087803b158015610c8457600080fd5b505af1158015610c98573d6000803e3d6000fd5b5050505060c08101516001600160a01b031615610cc157610cc18160c001518260e001516116af565b827f1d56d378404d81e3fc5f3dfbf88359b8cb2ecafa73b3270c478bf7b2bdd1446983604051610cf191906121e2565b60405180910390a2505050565b610d0661156a565b6001600160a01b03166324d7806c336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610d5257600080fd5b505afa158015610d66573d6000803e3d6000fd5b505050506040513d6020811015610d7c57600080fd5b5051610db95760405162461bcd60e51b81526004018080602001828103825260388152602001806128a26038913960400191505060405180910390fd5b610dc385856116bd565b610dce838383611778565b5050505050565b610fa154610fa254610fa354909192565b6002610b87541415610e3f576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002610b878190556000828152611777602090815260409182902082516101008101845281546001600160a01b039081168252600183015493820193909352938101548216928401929092526003820154606084015260048201546080840152600582015460a08401819052600683015490911660c084015260079091015460e0830152610edf5760405162461bcd60e51b81526004016103ed906126ee565b428160a0015110610f025760405162461bcd60e51b81526004016103ed90612691565b80516001600160a01b0390811660009081526117766020908152604080832082860180518552908352818420849055868452611777909252808320805473ffffffffffffffffffffffffffffffffffffffff199081168255600182018590556002820180548216905560038201859055600480830186905560058301869055600683018054909216909155600790910193909355845160c0860151925191516323b872dd60e01b81529416936323b872dd93610fc493309390929091016121b3565b600060405180830381600087803b158015610fde57600080fd5b505af1158015610ff2573d6000803e3d6000fd5b5050505060008060006110178460000151856020015186604001518760e00151611884565b9250925092508360c001516001600160a01b031684604001516001600160a01b0316867f2edb0e99c6ac35be6731dab554c1d1fa1b7beb675090dbb09fb14e615aca1c4a868686604051610a21939291906127ed565b6000806000611087868661108189896115fd565b8761192d565b939a91995092975095505050505050565b6001600160a01b03166000908152610dad602052604090205490565b6002610b8754141561110d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002610b875560008181526117776020526040902060078101546111435760405162461bcd60e51b81526004016103ed906123a9565b60058101546111755734816007015411156111705760405162461bcd60e51b81526004016103ed90612406565b6111f9565b42816005015410156111995760405162461bcd60e51b81526004016103ed90612463565b60068101546001600160a01b03163314156111c65760405162461bcd60e51b81526004016103ed90612634565b60006111d58260070154611658565b9050803410156111f75760405162461bcd60e51b81526004016103ed90612292565b505b600581015461123a5734600782015560068101805473ffffffffffffffffffffffffffffffffffffffff19163317905560038101544201600582015561129f565b6007810180546006830180543490935573ffffffffffffffffffffffffffffffffffffffff198316331790556004830154600584015491926001600160a01b0316914290031015611292576004830154420160058401555b61129c8183611a03565b50505b336001600160a01b0316827f26ea3ebbda62eb1baef13e1c237dddd956c87f80b2801f2616d806d52557b1213484600501546040516112df9291906127df565b60405180910390a350506001610b8755565b6112f9611fb0565b506000908152611777602090815260409182902082516101008101845281546001600160a01b03908116825260018301549382019390935260028201548316938101939093526003810154606084015260048101546080840152600581015460a0840152600681015490911660c08301526007015460e082015290565b6002610b875414156113cf576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002610b87556001600160a01b0381166000908152610dad602052604090205480611441576040805162461bcd60e51b815260206004820152601f60248201527f4e6f2066756e6473206172652070656e64696e67207769746864726177616c00604482015290519081900360640190fd5b6001600160a01b0382166000818152610dad60205260408120556114659082611a10565b6040805182815290516001600160a01b038416917f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65919081900360200190a250506001610b8755565b600054610100900460ff16806114c757506114c7611afa565b806114d5575060005460ff16155b6115105760405162461bcd60e51b815260040180806020018281038252602e8152602001806128da602e913960400191505060405180910390fd5b600054610100900460ff1615801561153b576000805460ff1961ff0019909116610100171660011790555b61154482611b0b565b61154c611c32565b611554611c3a565b8015611566576000805461ff00191690555b5050565b6000546201000090046001600160a01b031690565b6000826001600160a01b03166340c1a064836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156115c557600080fd5b505afa9250505080156115ea57506040513d60208110156115e557600080fd5b505160015b6115f6575060006104bd565b90506104bd565b60006104ba8383611c44565b6001600160a01b0384166000908152610fa46020908152604080832086845290915281205460ff1615801561164f5750816001600160a01b0316836001600160a01b0316145b95945050505050565b6000806127106116746117785485611c9290919063ffffffff16565b8161167b57fe5b049050806116965761168e836001611ceb565b915050610777565b6107738184611ceb565b61138d80546001810190915590565b611566828262033450611d45565b6127108211156116df5760405162461bcd60e51b81526004016103ed9061251d565b6305265c008111156117035760405162461bcd60e51b81526004016103ed906125d7565b6103848110156117255760405162461bcd60e51b81526004016103ed9061257a565b61177882905561177a8190556040517f91b85a126da1d01639347f093e4267f458c9d95265414e2f0bd18e8c5b17d42a9061176c90849060009085906103849083906127bc565b60405180910390a15050565b61271083106117ce576040805162461bcd60e51b815260206004820152601b60248201527f4e46544d61726b6574466565733a2046656573203e3d20313030250000000000604482015290519081900360640190fd5b6127106117db8383611ceb565b1061182d576040805162461bcd60e51b815260206004820152601b60248201527f4e46544d61726b6574466565733a2046656573203e3d20313030250000000000604482015290519081900360640190fd5b610fa1839055610fa2829055610fa3819055604080518481526020810184905280820183905290517f556079cdcafac41390a4af41101fa806590aefd70725513ad900a1df6ef488799181900360600190a1505050565b60008060008060006118988989898961192d565b80975081955082985083965084995050505050506001610fa460008b6001600160a01b03166001600160a01b0316815260200190815260200160002060008a815260200190815260200160002060006101000a81548160ff02191690831515021790555061190d61190761156a565b86611a03565b61191782856116af565b61192181846116af565b50509450945094915050565b60008060008060008060006119428b8b611e29565b9150915060006119548c8c858d611609565b1561196757610fa15490508194506119c8565b50610fa2546001600160a01b038216156119a257612710611994610fa3548b611c9290919063ffffffff16565b8161199b57fe5b0495508196505b826001600160a01b03168a6001600160a01b031614156119c4578194506119c8565b8994505b6127106119d58a83611c92565b816119dc57fe5b0497506119f3866119ed8b8b611ed4565b90611ed4565b9350505050945094509450945094565b6115668282614e20611d45565b80471015611a65576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015290519081900360640190fd5b6040516000906001600160a01b0384169083908381818185875af1925050503d8060008114611ab0576040519150601f19603f3d011682016040523d82523d6000602084013e611ab5565b606091505b5050905080611af55760405162461bcd60e51b815260040180806020018281038252603a815260200180612868603a913960400191505060405180910390fd5b505050565b6000611b0530611f31565b15905090565b600054610100900460ff1680611b245750611b24611afa565b80611b32575060005460ff16155b611b6d5760405162461bcd60e51b815260040180806020018281038252602e8152602001806128da602e913960400191505060405180910390fd5b600054610100900460ff16158015611b98576000805460ff1961ff0019909116610100171660011790555b611baa826001600160a01b0316611f31565b611be55760405162461bcd60e51b81526004018080602001828103825260318152602001806128376031913960400191505060405180910390fd5b600080547fffffffffffffffffffff0000000000000000000000000000000000000000ffff16620100006001600160a01b038516021790558015611566576000805461ff00191690555050565b600161138d55565b6201518061177a55565b6001600160a01b038083166000908152611776602090815260408083208584528252808320548352611777909152812060020154909116806104ba57611c8a8484611f37565b9150506104bd565b600082611ca1575060006104bd565b82820282848281611cae57fe5b04146104ba5760405162461bcd60e51b81526004018080602001828103825260218152602001806129086021913960400191505060405180910390fd5b6000828201838110156104ba576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b81611d4f57611af5565b6040516000906001600160a01b038516908390859084818181858888f193505050503d8060008114611d9d576040519150601f19603f3d011682016040523d82523d6000602084013e611da2565b606091505b5050905080611e23576001600160a01b0384166000908152610dad6020526040902054611dcf9084611ceb565b6001600160a01b0385166000818152610dad6020908152604091829020939093558051868152905191927f9a92c3472ba0d2d183e38c3801bae5d41d693c2803377eae8b0f94683862253e92918290030190a25b50505050565b6000806000611e38858561157f565b9050846001600160a01b031663ec5f752e856040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611e7e57600080fd5b505afa925050508015611ea357506040513d6020811015611e9e57600080fd5b505160015b611eac57611ec7565b6001600160a01b03811615611ec5579092509050611ecd565b505b91508190505b9250929050565b600082821115611f2b576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b3b151590565b6000826001600160a01b0316636352211e836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611f7d57600080fd5b505afa158015611f91573d6000803e3d6000fd5b505050506040513d6020811015611fa757600080fd5b50519392505050565b60405180610100016040528060006001600160a01b031681526020016000815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b600060208284031215612021578081fd5b81356104ba8161281e565b6000806040838503121561203e578081fd5b82356120498161281e565b946020939093013593505050565b60008060006060848603121561206b578081fd5b83356120768161281e565b95602085013595506040909401359392505050565b60006020828403121561209c578081fd5b5035919050565b600080604083850312156120b5578182fd5b8235915060208084013567ffffffffffffffff808211156120d4578384fd5b818601915086601f8301126120e7578384fd5b8135818111156120f357fe5b604051601f8201601f191681018501838111828210171561211057fe5b6040528181528382018501891015612126578586fd5b81858501868301378585838301015280955050505050509250929050565b60008060408385031215612156578182fd5b50508035926020909101359150565b600080600080600060a0868803121561217c578081fd5b505083359560208501359550604085013594606081013594506080013592509050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b901515815260200190565b6000602080835283518082850152825b8181101561220e578581018301518582016040015282016121f2565b8181111561221f5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252603d908201527f4e46544d61726b65745265736572766541756374696f6e3a205265736572766560408201527f207072696365206d757374206265206174206c65617374203120776569000000606082015260800190565b6020808252602b908201527f4e46544d61726b65745265736572766541756374696f6e3a2042696420616d6f60408201527f756e7420746f6f206c6f77000000000000000000000000000000000000000000606082015260800190565b6020808252603f908201527f4e46544d61726b65745265736572766541756374696f6e3a20496e636c75646560408201527f206120726561736f6e20666f7220746869732063616e63656c6c6174696f6e00606082015260800190565b60208082526029908201527f4e46544d61726b65745265736572766541756374696f6e3a204e6f7420796f7560408201527f722061756374696f6e0000000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f4e46544d61726b65745265736572766541756374696f6e3a2041756374696f6e60408201527f206e6f7420666f756e6400000000000000000000000000000000000000000000606082015260800190565b6020808252603f908201527f4e46544d61726b65745265736572766541756374696f6e3a20426964206d757360408201527f74206265206174206c6561737420746865207265736572766520707269636500606082015260800190565b60208082526028908201527f4e46544d61726b65745265736572766541756374696f6e3a2041756374696f6e60408201527f206973206f766572000000000000000000000000000000000000000000000000606082015260800190565b6020808252602c908201527f4e46544d61726b65745265736572766541756374696f6e3a2041756374696f6e60408201527f20696e2070726f67726573730000000000000000000000000000000000000000606082015260800190565b60208082526036908201527f4e46544d61726b65745265736572766541756374696f6e3a204d696e20696e6360408201527f72656d656e74206d757374206265203c3d203130302500000000000000000000606082015260800190565b6020808252603f908201527f4e46544d61726b65745265736572766541756374696f6e3a204475726174696f60408201527f6e206d757374206265203e3d20455854454e53494f4e5f4455524154494f4e00606082015260800190565b60208082526036908201527f4e46544d61726b65745265736572766541756374696f6e3a204475726174696f60408201527f6e206d757374206265203c3d2031303030206461797300000000000000000000606082015260800190565b6020808252603c908201527f4e46544d61726b65745265736572766541756374696f6e3a20596f7520616c7260408201527f65616479206861766520616e206f75747374616e64696e672062696400000000606082015260800190565b60208082526032908201527f4e46544d61726b65745265736572766541756374696f6e3a2041756374696f6e60408201527f207374696c6c20696e2070726f67726573730000000000000000000000000000606082015260800190565b60208082526034908201527f4e46544d61726b65745265736572766541756374696f6e3a2041756374696f6e60408201527f2077617320616c726561647920736574746c6564000000000000000000000000606082015260800190565b6000610100820190506001600160a01b0380845116835260208401516020840152806040850151166040840152606084015160608401526080840151608084015260a084015160a08401528060c08501511660c08401525060e083015160e083015292915050565b90815260200190565b948552602085019390935260408401919091526060830152608082015260a00190565b918252602082015260400190565b9283526020830191909152604082015260600190565b93845260208401929092526040830152606082015260800190565b6001600160a01b038116811461283357600080fd5b5056fe466f756e646174696f6e54726561737572794e6f64653a2041646472657373206973206e6f74206120636f6e7472616374416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564466f756e646174696f6e41646d696e526f6c653a2063616c6c657220646f6573206e6f742068617665207468652041646d696e20726f6c65496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212204367fb573b2d9527f2761764e28f4cbc43381b2a867a8449926a728b9d20358664736f6c63430007060033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ 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.