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 | |||
---|---|---|---|---|---|---|
17237546 | 477 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
NFTMarketRouter
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 1337000 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.8.18; import "./mixins/shared/TxDeadline.sol"; import "./mixins/nftMarketRouter/NFTMarketRouterCore.sol"; import "./mixins/nftMarketRouter/NFTMarketRouterList.sol"; import "./mixins/nftMarketRouter/NFTCreateAndListTimedEditionCollection.sol"; import "./mixins/nftMarketRouter/apis/NFTMarketRouterAPIs.sol"; import "./mixins/nftMarketRouter/apis/NFTDropMarketRouterAPIs.sol"; import "./mixins/nftMarketRouter/apis/NFTCollectionFactoryRouterAPIs.sol"; /** * @title A contract which offers value-added APIs and routes requests to the NFTMarket's existing API. * @dev Features in this contract can be created with a clear separation of concerns from the NFTMarket contract. * It also provides the contract size space required for targeted APIs and to experiment with new features. * @author batu-inal & HardlyDifficult & reggieag */ contract NFTMarketRouter is TxDeadline, NFTMarketRouterCore, NFTMarketRouterAPIs, NFTCollectionFactoryRouterAPIs, NFTDropMarketRouterAPIs, NFTMarketRouterList, NFTCreateAndListTimedEditionCollection { /** * @notice Initialize the template's immutable variables. * @param _nftMarket The address of the NFTMarket contract to which requests will be routed. * @param _nftDropMarket The address of the NFTDropMarket contract to which requests will be routed. * @param _nftCollectionFactory The address of the NFTCollectionFactory contract to which requests will be routed. */ constructor( address _nftMarket, address _nftDropMarket, address _nftCollectionFactory ) NFTMarketRouterCore(_nftMarket, _nftDropMarket, _nftCollectionFactory) {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://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"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.18; import "../../../libraries/AddressLibrary.sol"; /** * @title Interface for routing calls to the NFT Collection Factory to create drop collections. * @author reggieag */ interface INFTCollectionFactoryDrops { function createNFTDropCollection( string calldata name, string calldata symbol, string calldata baseURI, bool isRevealed, uint32 maxTokenId, address approvedMinter, uint96 nonce ) external returns (address collection); function createNFTDropCollectionWithPaymentFactory( string calldata name, string calldata symbol, string calldata baseURI, bool isRevealed, uint32 maxTokenId, address approvedMinter, uint96 nonce, CallWithoutValue calldata paymentAddressFactoryCall ) external returns (address collection); }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.18; import "../../../libraries/AddressLibrary.sol"; /** * @title Interface for routing calls to the NFT Collection Factory to create timed edition collections. * @author HardlyDifficult */ interface INFTCollectionFactoryTimedEditions { function createNFTTimedEditionCollection( string calldata name, string calldata symbol, string calldata tokenURI, uint256 mintEndTime, address approvedMinter, uint96 nonce ) external returns (address collection); function createNFTTimedEditionCollectionWithPaymentFactory( string calldata name, string calldata symbol, string calldata tokenURI, uint256 mintEndTime, address approvedMinter, uint96 nonce, CallWithoutValue calldata paymentAddressFactoryCall ) external returns (address collection); }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.18; /** * @title Interface for routing calls to the NFT Drop Market to create fixed price sales. * @author HardlyDifficult & reggieag */ interface INFTDropMarketFixedPriceSale { function createFixedPriceSaleV3( address nftContract, uint256 exhibitionId, uint256 price, uint256 limitPerAccount, uint256 generalAvailabilityStartTime, uint256 txDeadlineTime ) external; function createFixedPriceSaleWithEarlyAccessAllowlistV2( address nftContract, uint256 exhibitionId, uint256 price, uint256 limitPerAccount, uint256 generalAvailabilityStartTime, uint256 earlyAccessStartTime, bytes32 merkleRoot, string calldata merkleTreeUri, uint256 txDeadlineTime ) external; }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.18; /** * @title Interface for routing calls to the NFT Market to set buy now prices. * @author HardlyDifficult */ interface INFTMarketBuyNow { function setBuyPrice(address nftContract, uint256 tokenId, uint256 price) external; }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.18; /** * @title Interface for routing calls to the NFT Market to create reserve auctions. * @author HardlyDifficult */ interface INFTMarketReserveAuction { function createReserveAuctionV2( address nftContract, uint256 tokenId, uint256 reservePrice, uint256 exhibitionId ) external returns (uint256 auctionId); }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.18; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; struct CallWithoutValue { address target; bytes callData; } error AddressLibrary_Proxy_Call_Did_Not_Return_A_Contract(address addressReturned); /** * @title A library for address helpers not already covered by the OZ library. * @author batu-inal & HardlyDifficult */ library AddressLibrary { using AddressUpgradeable for address; using AddressUpgradeable for address payable; /** * @notice Calls an external contract with arbitrary data and parse the return value into an address. * @param externalContract The address of the contract to call. * @param callData The data to send to the contract. * @return contractAddress The address of the contract returned by the call. */ function callAndReturnContractAddress( address externalContract, bytes calldata callData ) internal returns (address payable contractAddress) { bytes memory returnData = externalContract.functionCall(callData); contractAddress = abi.decode(returnData, (address)); if (!contractAddress.isContract()) { revert AddressLibrary_Proxy_Call_Did_Not_Return_A_Contract(contractAddress); } } function callAndReturnContractAddress( CallWithoutValue calldata call ) internal returns (address payable contractAddress) { contractAddress = callAndReturnContractAddress(call.target, call.callData); } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.18; /** * @title Helpers for working with time. * @author batu-inal & HardlyDifficult */ library TimeLibrary { /** * @notice Checks if the given timestamp is in the past. * @dev This helper ensures a consistent interpretation of expiry across the codebase. * This is different than `hasBeenReached` in that it will return false if the expiry is now. */ function hasExpired(uint256 expiry) internal view returns (bool) { return expiry < block.timestamp; } /** * @notice Checks if the given timestamp is now or in the past. * @dev This helper ensures a consistent interpretation of expiry across the codebase. * This is different from `hasExpired` in that it will return true if the timestamp is now. */ function hasBeenReached(uint256 timestamp) internal view returns (bool) { return timestamp <= block.timestamp; } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.18; import "../../../interfaces/internal/routes/INFTCollectionFactoryDrops.sol"; import "../../../interfaces/internal/routes/INFTCollectionFactoryTimedEditions.sol"; import "../../../libraries/AddressLibrary.sol"; import "../NFTMarketRouterCore.sol"; /// @notice Parameters used to create a drop collection. struct DropCollectionCreationParams { /// @notice The collection's `name`. string name; /// @notice The collection's `symbol`. string symbol; /// @notice The base URI for the collection. string baseURI; /// @notice Whether the collection is revealed or not. bool isRevealed; /// @notice The max `tokenID` for this collection. uint32 maxTokenId; /// @notice The nonce used by the creator to create this collection. uint96 nonce; } /// @notice Parameters used to create a timed edition collection. struct TimedEditionCollectionCreationParams { /// @notice The collection's `name`. string name; /// @notice The collection's `symbol`. string symbol; /// @notice The token URI for the collection. string tokenURI; /// @notice The nonce used by the creator to create this collection. uint96 nonce; } /** * @title Wraps external calls to the NFTCollectionFactory contract. * @dev Each call uses standard APIs and params, along with the msg.sender appended to the calldata. They will decode * return values as appropriate. If any of these calls fail, the tx will revert with the original reason. * @author HardlyDifficult & reggieag */ abstract contract NFTCollectionFactoryRouterAPIs is NFTMarketRouterCore { function _createNFTDropCollection( DropCollectionCreationParams calldata collectionParams ) internal returns (address collection) { bytes memory returnData = _routeCallFromMsgSender( nftCollectionFactory, abi.encodeWithSelector( INFTCollectionFactoryDrops.createNFTDropCollection.selector, collectionParams.name, collectionParams.symbol, collectionParams.baseURI, collectionParams.isRevealed, collectionParams.maxTokenId, nftDropMarket, collectionParams.nonce ) ); collection = abi.decode(returnData, (address)); } function _createNFTDropCollectionWithPaymentFactory( DropCollectionCreationParams calldata collectionParams, CallWithoutValue calldata paymentAddressFactoryCall ) internal returns (address collection) { bytes memory returnData = _routeCallFromMsgSender( nftCollectionFactory, abi.encodeWithSelector( INFTCollectionFactoryDrops.createNFTDropCollectionWithPaymentFactory.selector, collectionParams.name, collectionParams.symbol, collectionParams.baseURI, collectionParams.isRevealed, collectionParams.maxTokenId, nftDropMarket, collectionParams.nonce, paymentAddressFactoryCall ) ); collection = abi.decode(returnData, (address)); } function _createNFTTimedEditionCollection( string calldata name, string calldata symbol, string calldata tokenURI, uint256 mintEndTime, address approvedMinter, uint96 nonce ) internal returns (address collection) { bytes memory returnData = _routeCallFromMsgSender( nftCollectionFactory, abi.encodeWithSelector( INFTCollectionFactoryTimedEditions.createNFTTimedEditionCollection.selector, name, symbol, tokenURI, mintEndTime, approvedMinter, nonce ) ); collection = abi.decode(returnData, (address)); } function _createNFTTimedEditionCollectionWithPaymentFactory( string calldata name, string calldata symbol, string calldata tokenURI, uint256 mintEndTime, address approvedMinter, uint96 nonce, CallWithoutValue calldata paymentAddressFactoryCall ) internal returns (address collection) { bytes memory returnData = _routeCallFromMsgSender( nftCollectionFactory, abi.encodeWithSelector( INFTCollectionFactoryTimedEditions.createNFTTimedEditionCollectionWithPaymentFactory.selector, name, symbol, tokenURI, mintEndTime, approvedMinter, nonce, paymentAddressFactoryCall ) ); collection = abi.decode(returnData, (address)); } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.18; import "../../../interfaces/internal/routes/INFTDropMarketFixedPriceSale.sol"; import "../NFTMarketRouterCore.sol"; /// @notice Parameters used to create a fixed price sale. struct FixedPriceSaleParams { /// @notice The exhibition to associate this fix priced sale to. /// Set this to 0 to exist outside of an exhibition. uint256 exhibitionId; /// @notice The fixed price per NFT in the collection. uint256 price; /// @notice The max number of NFTs an account may mint in this sale. uint256 limitPerAccount; /// @notice The start time of the general availability period, in seconds since the Unix epoch. /// @dev When set to 0, general availability is set to the block timestamp the transaction is mined. uint256 generalAvailabilityStartTime; } /// @notice Parameters used to create a fixed price sale. struct FixedPriceSaleParamsV2 { /// @notice The exhibition to associate this fix priced sale to. /// Set this to 0 to exist outside of an exhibition. uint256 exhibitionId; /// @notice The fixed price per NFT in the collection. uint256 price; /// @notice The max number of NFTs an account may mint in this sale. uint256 limitPerAccount; /// @notice The start time of the general availability period, in seconds since the Unix epoch. /// @dev When set to 0, general availability is set to the block timestamp the transaction is mined. uint256 generalAvailabilityStartTime; /// @notice The sale duration in seconds. uint256 saleDuration; } /** * @title Wraps external calls to the NFTDropMarket contract. * @dev Each call uses standard APIs and params, along with the msg.sender appended to the calldata. They will decode * return values as appropriate. If any of these calls fail, the tx will revert with the original reason. * @author HardlyDifficult & reggieag */ abstract contract NFTDropMarketRouterAPIs is NFTMarketRouterCore { function _createFixedPriceSaleV3( address nftContract, FixedPriceSaleParamsV2 memory fixedPriceSaleParams, uint256 txDeadlineTime ) internal { _routeCallFromMsgSender( nftDropMarket, abi.encodeWithSelector( INFTDropMarketFixedPriceSale.createFixedPriceSaleV3.selector, nftContract, fixedPriceSaleParams.exhibitionId, fixedPriceSaleParams.price, fixedPriceSaleParams.limitPerAccount, fixedPriceSaleParams.generalAvailabilityStartTime, txDeadlineTime ) ); } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.18; import "../../../interfaces/internal/routes/INFTMarketBuyNow.sol"; import "../../../interfaces/internal/routes/INFTMarketReserveAuction.sol"; import "../NFTMarketRouterCore.sol"; /** * @title Wraps external calls to the NFTMarket contract. * @dev Each call uses standard APIs and params, along with the msg.sender appended to the calldata. They will decode * return values as appropriate. If any of these calls fail, the tx will revert with the original reason. * @author HardlyDifficult */ abstract contract NFTMarketRouterAPIs is NFTMarketRouterCore { function _createReserveAuctionV2( address nftContract, uint256 tokenId, uint256 reservePrice, uint256 exhibitionId ) internal returns (uint auctionId) { bytes memory returnData = _routeCallFromMsgSender( nftMarket, abi.encodeWithSelector( INFTMarketReserveAuction.createReserveAuctionV2.selector, nftContract, tokenId, reservePrice, exhibitionId ) ); auctionId = abi.decode(returnData, (uint256)); } function _setBuyPrice(address nftContract, uint256 tokenId, uint256 price) internal { _routeCallFromMsgSender( nftMarket, abi.encodeWithSelector(INFTMarketBuyNow.setBuyPrice.selector, nftContract, tokenId, price) ); } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.18; import "../../libraries/AddressLibrary.sol"; import "../shared/TxDeadline.sol"; import "./apis/NFTCollectionFactoryRouterAPIs.sol"; import "./apis/NFTDropMarketRouterAPIs.sol"; error NFTCreateAndListTimedEditionCollection_Sale_Duration_Cannot_Be_Zero(); /** * @title Offers value-added functions for creating edition collections using the NFTCollectionFactory contract * and creating sales using the NFTDropMarket contract. * An example of a value-added function is the ability to create a collection and sale in a single transaction. * @author reggieag & HardlyDifficult & gosseti */ abstract contract NFTCreateAndListTimedEditionCollection is TxDeadline, NFTCollectionFactoryRouterAPIs, NFTDropMarketRouterAPIs { /** * @notice How long the minting period is open, after the general availability start time. */ uint256 private constant DEFAULT_MINT_END_TIME_DURATION = 1 days; /** * @notice [DEPRECATED] use `createTimedEditionCollectionAndFixedPriceSaleV2` instead. * The sale will last for 24 hours starting at `fixedPriceSaleParams.generalAvailabilityStartTime`. * @param collectionParams The parameters for the edition collection creation. * @param fixedPriceSaleParams The parameters for the sale creation. * @param txDeadlineTime The deadline timestamp for the transaction to be mined, in seconds since Unix epoch. * @return collection The address of the newly created collection contract. * @dev The collection will include the `nftDropMarket` as an approved minter. */ function createTimedEditionCollectionAndFixedPriceSale( TimedEditionCollectionCreationParams calldata collectionParams, FixedPriceSaleParams calldata fixedPriceSaleParams, uint256 txDeadlineTime ) external returns (address collection) { FixedPriceSaleParamsV2 memory mappedFixedPriceSaleParams = FixedPriceSaleParamsV2({ exhibitionId: fixedPriceSaleParams.exhibitionId, price: fixedPriceSaleParams.price, limitPerAccount: fixedPriceSaleParams.limitPerAccount, generalAvailabilityStartTime: fixedPriceSaleParams.generalAvailabilityStartTime, saleDuration: DEFAULT_MINT_END_TIME_DURATION }); collection = _createTimedEditionCollectionAndFixedPriceSale( collectionParams, mappedFixedPriceSaleParams, txDeadlineTime ); } /** * @notice Create a new edition collection contract and timed sale. * @param collectionParams The parameters for the edition collection creation. * @param fixedPriceSaleParams The parameters for the sale creation. * @param txDeadlineTime The deadline timestamp for the transaction to be mined, in seconds since Unix epoch. * @return collection The address of the newly created collection contract. * @dev The collection will include the `nftDropMarket` as an approved minter. */ function createTimedEditionCollectionAndFixedPriceSaleV2( TimedEditionCollectionCreationParams calldata collectionParams, FixedPriceSaleParamsV2 calldata fixedPriceSaleParams, uint256 txDeadlineTime ) external returns (address collection) { collection = _createTimedEditionCollectionAndFixedPriceSale(collectionParams, fixedPriceSaleParams, txDeadlineTime); } /** * @notice Create a new edition collection contract and timed sale. * @param collectionParams The parameters for the edition collection creation. * @param fixedPriceSaleParams The parameters for the sale creation. * @param txDeadlineTime The deadline timestamp for the transaction to be mined, in seconds since Unix epoch. * @return collection The address of the newly created collection contract. * @dev The collection will include the `nftDropMarket` as an approved minter. */ function _createTimedEditionCollectionAndFixedPriceSale( TimedEditionCollectionCreationParams calldata collectionParams, FixedPriceSaleParamsV2 memory fixedPriceSaleParams, uint256 txDeadlineTime ) private txDeadlineNotExpired(txDeadlineTime) returns (address collection) { if (fixedPriceSaleParams.saleDuration == 0) { revert NFTCreateAndListTimedEditionCollection_Sale_Duration_Cannot_Be_Zero(); } uint256 generalAvailabilityStartTime = fixedPriceSaleParams.generalAvailabilityStartTime; if (generalAvailabilityStartTime == 0) { generalAvailabilityStartTime = block.timestamp; } collection = _createNFTTimedEditionCollection({ name: collectionParams.name, symbol: collectionParams.symbol, tokenURI: collectionParams.tokenURI, mintEndTime: generalAvailabilityStartTime + fixedPriceSaleParams.saleDuration, approvedMinter: nftDropMarket, nonce: collectionParams.nonce }); _createFixedPriceSaleV3({ nftContract: collection, fixedPriceSaleParams: fixedPriceSaleParams, // The deadline provided has already been validated above. txDeadlineTime: 0 }); } /** * @notice [DEPRECATED] use `createTimedEditionCollectionAndFixedPriceSaleWithPaymentFactoryV2` instead. * The sale will last for 24 hours starting at `fixedPriceSaleParams.generalAvailabilityStartTime`. * @param collectionParams The parameters for the edition collection creation. * @param paymentAddressFactoryCall The contract call which will return the address to use for payments. * @param fixedPriceSaleParams The parameters for the sale creation. * @param txDeadlineTime The deadline timestamp for the transaction to be mined, in seconds since Unix epoch. * @return collection The address of the newly created collection contract. * @dev The collection will include the `nftDropMarket` as an approved minter. */ function createTimedEditionCollectionAndFixedPriceSaleWithPaymentFactory( TimedEditionCollectionCreationParams calldata collectionParams, CallWithoutValue calldata paymentAddressFactoryCall, FixedPriceSaleParams calldata fixedPriceSaleParams, uint256 txDeadlineTime ) external returns (address collection) { FixedPriceSaleParamsV2 memory mappedFixedPriceSaleParams = FixedPriceSaleParamsV2({ exhibitionId: fixedPriceSaleParams.exhibitionId, price: fixedPriceSaleParams.price, limitPerAccount: fixedPriceSaleParams.limitPerAccount, generalAvailabilityStartTime: fixedPriceSaleParams.generalAvailabilityStartTime, saleDuration: DEFAULT_MINT_END_TIME_DURATION }); collection = _createTimedEditionCollectionAndFixedPriceSaleWithPaymentFactory( collectionParams, paymentAddressFactoryCall, mappedFixedPriceSaleParams, txDeadlineTime ); } /** * @notice Create a new edition collection contract and timed sale with a payment factory. * @param collectionParams The parameters for the edition collection creation. * @param paymentAddressFactoryCall The contract call which will return the address to use for payments. * @param fixedPriceSaleParams The parameters for the sale creation. * @param txDeadlineTime The deadline timestamp for the transaction to be mined, in seconds since Unix epoch. * @return collection The address of the newly created collection contract. * @dev The collection will include the `nftDropMarket` as an approved minter. */ function createTimedEditionCollectionAndFixedPriceSaleWithPaymentFactoryV2( TimedEditionCollectionCreationParams calldata collectionParams, CallWithoutValue calldata paymentAddressFactoryCall, FixedPriceSaleParamsV2 calldata fixedPriceSaleParams, uint256 txDeadlineTime ) external returns (address collection) { collection = _createTimedEditionCollectionAndFixedPriceSaleWithPaymentFactory( collectionParams, paymentAddressFactoryCall, fixedPriceSaleParams, txDeadlineTime ); } /** * @notice Create a new edition collection contract and timed sale with a payment factory. * @param collectionParams The parameters for the edition collection creation. * @param paymentAddressFactoryCall The contract call which will return the address to use for payments. * @param fixedPriceSaleParams The parameters for the sale creation. * @param txDeadlineTime The deadline timestamp for the transaction to be mined, in seconds since Unix epoch. * @return collection The address of the newly created collection contract. * @dev The collection will include the `nftDropMarket` as an approved minter. */ function _createTimedEditionCollectionAndFixedPriceSaleWithPaymentFactory( TimedEditionCollectionCreationParams calldata collectionParams, CallWithoutValue calldata paymentAddressFactoryCall, FixedPriceSaleParamsV2 memory fixedPriceSaleParams, uint256 txDeadlineTime ) private txDeadlineNotExpired(txDeadlineTime) returns (address collection) { if (fixedPriceSaleParams.saleDuration == 0) { revert NFTCreateAndListTimedEditionCollection_Sale_Duration_Cannot_Be_Zero(); } uint256 generalAvailabilityStartTime = fixedPriceSaleParams.generalAvailabilityStartTime; if (generalAvailabilityStartTime == 0) { generalAvailabilityStartTime = block.timestamp; } collection = _createNFTTimedEditionCollectionWithPaymentFactory({ name: collectionParams.name, symbol: collectionParams.symbol, tokenURI: collectionParams.tokenURI, mintEndTime: generalAvailabilityStartTime + fixedPriceSaleParams.saleDuration, approvedMinter: nftDropMarket, nonce: collectionParams.nonce, paymentAddressFactoryCall: paymentAddressFactoryCall }); _createFixedPriceSaleV3({ nftContract: collection, fixedPriceSaleParams: fixedPriceSaleParams, // The deadline provided has already been validated above. txDeadlineTime: 0 }); } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.18; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; error NFTMarketRouterCore_Call_Failed_Without_Revert_Reason(); error NFTMarketRouterCore_NFT_Collection_Factory_Is_Not_A_Contract(); error NFTMarketRouterCore_NFT_Drop_Market_Is_Not_A_Contract(); error NFTMarketRouterCore_NFT_Market_Is_Not_A_Contract(); /** * @title Shared logic for NFT Market Router mixins. * @author HardlyDifficult */ abstract contract NFTMarketRouterCore { using AddressUpgradeable for address; /** * @notice The address of the NFTMarket contract to which requests will be routed. */ address internal immutable nftMarket; /** * @notice The address of the NFTDropMarket contract to which requests will be routed. */ address internal immutable nftDropMarket; /** * @notice The address of the NFTCollectionFactory contract to which requests will be routed. */ address internal immutable nftCollectionFactory; /** * @notice Initialize the template's immutable variables. * @param _nftMarket The address of the NFTMarket contract to which requests will be routed. * @param _nftDropMarket The address of the NFTDropMarket contract to which requests will be routed. * @param _nftCollectionFactory The address of the NFTCollectionFactory contract to which requests will be routed. */ constructor(address _nftMarket, address _nftDropMarket, address _nftCollectionFactory) { if (!_nftCollectionFactory.isContract()) { revert NFTMarketRouterCore_NFT_Collection_Factory_Is_Not_A_Contract(); } if (!_nftMarket.isContract()) { revert NFTMarketRouterCore_NFT_Market_Is_Not_A_Contract(); } if (!_nftDropMarket.isContract()) { revert NFTMarketRouterCore_NFT_Drop_Market_Is_Not_A_Contract(); } nftCollectionFactory = _nftCollectionFactory; nftDropMarket = _nftDropMarket; nftMarket = _nftMarket; } /** * @notice The address of the NFTMarket contract to which requests will be routed. * @return market The address of the NFTMarket contract. */ function getNftMarketAddress() external view returns (address market) { market = nftMarket; } /** * @notice The address of the NFTDropMarket contract to which requests will be routed. * @return market The address of the NFTDropMarket contract. */ function getNftDropMarketAddress() external view returns (address market) { market = nftDropMarket; } /** * @notice The address of the NFTCollectionFactory contract to which requests will be routed. * @return collectionFactory The address of the NFTCollectionFactory contract. */ function getNftCollectionFactory() external view returns (address collectionFactory) { collectionFactory = nftCollectionFactory; } /** * @notice Routes a call to the specified contract, appending the msg.sender to the end of the calldata. * If the call reverts, this will revert the transaction and the original reason is bubbled up. * @param to The contract address to call. * @param callData The call data to use when calling the contract, without the msg.sender. */ function _routeCallFromMsgSender(address to, bytes memory callData) internal returns (bytes memory returnData) { // Forward the call, with the packed msg.sender appended, to the specified contract. bool success; // solhint-disable-next-line avoid-low-level-calls (success, returnData) = to.call(abi.encodePacked(callData, msg.sender)); // If the call failed, bubble up the revert reason. if (!success) { _revert(returnData); } } /** * @notice Bubbles up the original revert reason of a low-level call failure where possible. * @dev Copied from OZ's `Address.sol` library, with a minor modification to the final revert scenario. * This should only be used when a low-level call fails. */ function _revert(bytes memory returnData) private pure { // Look for revert reason and bubble it up if present if (returnData.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returnData_size := mload(returnData) revert(add(32, returnData), returnData_size) } } else { revert NFTMarketRouterCore_Call_Failed_Without_Revert_Reason(); } } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.18; import "./apis/NFTMarketRouterAPIs.sol"; error NFTMarketRouterList_Token_Ids_Not_Set(); error NFTMarketRouterList_Must_Set_Reserve_Or_Buy_Price(); error NFTMarketRouterList_Exhibition_Id_Set_Without_Reserve_Price(); error NFTMarketRouterList_Buy_Price_Set_But_Should_Set_Buy_Price_Is_False(); /** * @title Offers value-added functions for listing NFTs in the NFTMarket contract. * @author batu-inal & HardlyDifficult & reggieag */ abstract contract NFTMarketRouterList is NFTMarketRouterAPIs { /** * @notice Batch create reserve auction and/or set a buy price for many NFTs and escrow in the market contract. * A reserve auction price and/or a buy price must be set. * @param nftContract The address of the NFT contract. * @param tokenIds The ids of NFTs from the collection to set prices for. * @param exhibitionId The id of the exhibition the auctions are to be listed with. * Set this to 0 if n/a. Only applies to creating auctions. * @param reservePrice The initial reserve price for the auctions created. * Set the reservePrice to 0 to skip creating auctions. * @param shouldSetBuyPrice True if buy prices should be set for these NFTs. * Set this to false to skip setting buy prices. 0 is a valid buy price enabling a giveaway. * @param buyPrice The price at which someone could buy these NFTs. * @return firstAuctionIdOfSequence 0 if reservePrice is 0, otherwise this is the id of the first auction listed. * The other auctions in the batch are listed sequentially from `first id` to `first id + count`. * @dev Notes: * a) Approval should be granted for the NFTMarket contract before using this function. * b) If any NFT is already listed for auction then the entire batch call will revert. */ function batchListFromCollection( address nftContract, uint256[] calldata tokenIds, uint256 exhibitionId, uint256 reservePrice, bool shouldSetBuyPrice, uint256 buyPrice ) external returns (uint256 firstAuctionIdOfSequence) { // Validate input. if (tokenIds.length == 0) { revert NFTMarketRouterList_Token_Ids_Not_Set(); } if (!shouldSetBuyPrice && buyPrice != 0) { revert NFTMarketRouterList_Buy_Price_Set_But_Should_Set_Buy_Price_Is_False(); } // List NFTs for sale. if (reservePrice != 0) { // Create auctions. // Process the first NFT in order to capture that auction ID as the return value. firstAuctionIdOfSequence = _createReserveAuctionV2(nftContract, tokenIds[0], reservePrice, exhibitionId); if (shouldSetBuyPrice) { // And set buy prices. _setBuyPrice(nftContract, tokenIds[0], buyPrice); } for (uint256 i = 1; i < tokenIds.length; ) { _createReserveAuctionV2(nftContract, tokenIds[i], reservePrice, exhibitionId); if (shouldSetBuyPrice) { _setBuyPrice(nftContract, tokenIds[i], buyPrice); } unchecked { ++i; } } } else { // Set buy prices only (no auctions). if (exhibitionId != 0) { // Exhibitions are only for auctions ATM. revert NFTMarketRouterList_Exhibition_Id_Set_Without_Reserve_Price(); } if (!shouldSetBuyPrice) { revert NFTMarketRouterList_Must_Set_Reserve_Or_Buy_Price(); } for (uint256 i = 0; i < tokenIds.length; ) { _setBuyPrice(nftContract, tokenIds[i], buyPrice); unchecked { ++i; } } } } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.18; import "../../libraries/TimeLibrary.sol"; error TxDeadline_Tx_Deadline_Expired(); /** * @title A mixin that provides a modifier to check that a transaction deadline has not expired. * @author HardlyDifficult */ abstract contract TxDeadline { using TimeLibrary for uint256; /// @notice Requires the deadline provided is 0, now, or in the future. modifier txDeadlineNotExpired(uint256 txDeadlineTime) { // No transaction deadline when set to 0. if (txDeadlineTime != 0 && txDeadlineTime.hasExpired()) { revert TxDeadline_Tx_Deadline_Expired(); } _; } // This mixin does not use any storage. }
{ "optimizer": { "enabled": true, "runs": 1337000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_nftMarket","type":"address"},{"internalType":"address","name":"_nftDropMarket","type":"address"},{"internalType":"address","name":"_nftCollectionFactory","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"NFTCreateAndListTimedEditionCollection_Sale_Duration_Cannot_Be_Zero","type":"error"},{"inputs":[],"name":"NFTMarketRouterCore_Call_Failed_Without_Revert_Reason","type":"error"},{"inputs":[],"name":"NFTMarketRouterCore_NFT_Collection_Factory_Is_Not_A_Contract","type":"error"},{"inputs":[],"name":"NFTMarketRouterCore_NFT_Drop_Market_Is_Not_A_Contract","type":"error"},{"inputs":[],"name":"NFTMarketRouterCore_NFT_Market_Is_Not_A_Contract","type":"error"},{"inputs":[],"name":"NFTMarketRouterList_Buy_Price_Set_But_Should_Set_Buy_Price_Is_False","type":"error"},{"inputs":[],"name":"NFTMarketRouterList_Exhibition_Id_Set_Without_Reserve_Price","type":"error"},{"inputs":[],"name":"NFTMarketRouterList_Must_Set_Reserve_Or_Buy_Price","type":"error"},{"inputs":[],"name":"NFTMarketRouterList_Token_Ids_Not_Set","type":"error"},{"inputs":[],"name":"TxDeadline_Tx_Deadline_Expired","type":"error"},{"inputs":[{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"exhibitionId","type":"uint256"},{"internalType":"uint256","name":"reservePrice","type":"uint256"},{"internalType":"bool","name":"shouldSetBuyPrice","type":"bool"},{"internalType":"uint256","name":"buyPrice","type":"uint256"}],"name":"batchListFromCollection","outputs":[{"internalType":"uint256","name":"firstAuctionIdOfSequence","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"uint96","name":"nonce","type":"uint96"}],"internalType":"struct TimedEditionCollectionCreationParams","name":"collectionParams","type":"tuple"},{"components":[{"internalType":"uint256","name":"exhibitionId","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"limitPerAccount","type":"uint256"},{"internalType":"uint256","name":"generalAvailabilityStartTime","type":"uint256"}],"internalType":"struct FixedPriceSaleParams","name":"fixedPriceSaleParams","type":"tuple"},{"internalType":"uint256","name":"txDeadlineTime","type":"uint256"}],"name":"createTimedEditionCollectionAndFixedPriceSale","outputs":[{"internalType":"address","name":"collection","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"uint96","name":"nonce","type":"uint96"}],"internalType":"struct TimedEditionCollectionCreationParams","name":"collectionParams","type":"tuple"},{"components":[{"internalType":"uint256","name":"exhibitionId","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"limitPerAccount","type":"uint256"},{"internalType":"uint256","name":"generalAvailabilityStartTime","type":"uint256"},{"internalType":"uint256","name":"saleDuration","type":"uint256"}],"internalType":"struct FixedPriceSaleParamsV2","name":"fixedPriceSaleParams","type":"tuple"},{"internalType":"uint256","name":"txDeadlineTime","type":"uint256"}],"name":"createTimedEditionCollectionAndFixedPriceSaleV2","outputs":[{"internalType":"address","name":"collection","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"uint96","name":"nonce","type":"uint96"}],"internalType":"struct TimedEditionCollectionCreationParams","name":"collectionParams","type":"tuple"},{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct CallWithoutValue","name":"paymentAddressFactoryCall","type":"tuple"},{"components":[{"internalType":"uint256","name":"exhibitionId","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"limitPerAccount","type":"uint256"},{"internalType":"uint256","name":"generalAvailabilityStartTime","type":"uint256"}],"internalType":"struct FixedPriceSaleParams","name":"fixedPriceSaleParams","type":"tuple"},{"internalType":"uint256","name":"txDeadlineTime","type":"uint256"}],"name":"createTimedEditionCollectionAndFixedPriceSaleWithPaymentFactory","outputs":[{"internalType":"address","name":"collection","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"uint96","name":"nonce","type":"uint96"}],"internalType":"struct TimedEditionCollectionCreationParams","name":"collectionParams","type":"tuple"},{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct CallWithoutValue","name":"paymentAddressFactoryCall","type":"tuple"},{"components":[{"internalType":"uint256","name":"exhibitionId","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"limitPerAccount","type":"uint256"},{"internalType":"uint256","name":"generalAvailabilityStartTime","type":"uint256"},{"internalType":"uint256","name":"saleDuration","type":"uint256"}],"internalType":"struct FixedPriceSaleParamsV2","name":"fixedPriceSaleParams","type":"tuple"},{"internalType":"uint256","name":"txDeadlineTime","type":"uint256"}],"name":"createTimedEditionCollectionAndFixedPriceSaleWithPaymentFactoryV2","outputs":[{"internalType":"address","name":"collection","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getNftCollectionFactory","outputs":[{"internalType":"address","name":"collectionFactory","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNftDropMarketAddress","outputs":[{"internalType":"address","name":"market","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNftMarketAddress","outputs":[{"internalType":"address","name":"market","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60e06040523480156200001157600080fd5b50604051620013b7380380620013b78339810160408190526200003491620000f1565b8282826001600160a01b0381163b6200006057604051630632cbbd60e41b815260040160405180910390fd5b6001600160a01b0383163b6200008957604051638021eeff60e01b815260040160405180910390fd5b6001600160a01b0382163b620000b25760405163ad9a1b4960e01b815260040160405180910390fd5b6001600160a01b0390811660c05290811660a05216608052506200013b915050565b80516001600160a01b0381168114620000ec57600080fd5b919050565b6000806000606084860312156200010757600080fd5b6200011284620000d4565b92506200012260208501620000d4565b91506200013260408501620000d4565b90509250925092565b60805160a05160c05161121c6200019b6000396000818161014d0152818161084901526109620152600081816101270152818161052f015281816106510152610910015260008181608f015281816106e001526107f1015261121c6000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806365c2cd911161005b57806365c2cd9114610112578063b590104e14610125578063be7ef14c1461014b578063f16188cb1461017157600080fd5b8063331aaf9e1461008d5780633d2c6eef146100d95780635599dfd7146100ec57806362428b32146100ff575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100af6100e7366004610af1565b610192565b6100af6100fa366004610b5b565b6101e5565b6100af61010d366004610bc5565b610208565b6100af610120366004610c42565b61025d565b7f00000000000000000000000000000000000000000000000000000000000000006100af565b7f00000000000000000000000000000000000000000000000000000000000000006100af565b61018461017f366004610cf7565b610279565b6040519081526020016100d0565b6000806040518060a00160405280856000013581526020018560200135815260200185604001358152602001856060013581526020016201518081525090506101dc85828561045b565b95945050505050565b6000610200846101fa36869003860186610dad565b8461045b565b949350505050565b6000806040518060a00160405280856000013581526020018560200135815260200185604001358152602001856060013581526020016201518081525090506102538686838661057d565b9695505050505050565b60006101dc858561027336879003870187610dad565b8561057d565b60008581036102b4576040517fa9d004a500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b821580156102c157508115155b156102f8576040517f1a8a2c1000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83156103b657610323888888600081811061031557610315610e44565b9050602002013586886106a1565b9050821561034f5761034f888888600081811061034257610342610e44565b90506020020135846107be565b60015b868110156103b05761037e8989898481811061037057610370610e44565b9050602002013587896106a1565b5083156103a8576103a88989898481811061039b5761039b610e44565b90506020020135856107be565b600101610352565b50610450565b84156103ee576040517f2c05a27000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82610425576040517f75ce98b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8681101561044e576104468989898481811061039b5761039b610e44565b600101610428565b505b979650505050505050565b6000818015801590610471575061047181421190565b156104a8576040517fbcb9700400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83608001516000036104e6576040517fa87860d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606084015160008190036104f75750425b6105666105048780610e73565b61051160208a018a610e73565b61051e60408c018c610e73565b60808c015161052d9089610edf565b7f00000000000000000000000000000000000000000000000000000000000000008e60600160208101906105619190610f1f565b610841565b9250610574838660006108b6565b50509392505050565b6000818015801590610593575061059381421190565b156105ca576040517fbcb9700400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8360800151600003610608576040517fa87860d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606084015160008190036106195750425b6106896106268880610e73565b61063360208b018b610e73565b61064060408d018d610e73565b60808c015161064f9089610edf565b7f00000000000000000000000000000000000000000000000000000000000000008f60600160208101906106839190610f1f565b8f61095a565b9250610697838660006108b6565b5050949350505050565b60405173ffffffffffffffffffffffffffffffffffffffff8516602482015260448101849052606481018390526084810182905260009081906107a8907f0000000000000000000000000000000000000000000000000000000000000000907fbeb5127c000000000000000000000000000000000000000000000000000000009060a4015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526109d2565b9050808060200190518101906102539190610f54565b60405173ffffffffffffffffffffffffffffffffffffffff84166024820152604481018390526064810182905261083b907f0000000000000000000000000000000000000000000000000000000000000000907f798bac8d0000000000000000000000000000000000000000000000000000000090608401610726565b50505050565b6000806108917f000000000000000000000000000000000000000000000000000000000000000063189267b260e01b8d8d8d8d8d8d8d8d8d60405160240161072699989796959493929190610fb6565b9050808060200190518101906108a79190611038565b9b9a5050505050505050505050565b815160208301516040808501516060860151915173ffffffffffffffffffffffffffffffffffffffff8816602482015260448101949094526064840192909252608483019190915260a482015260c4810182905261083b907f0000000000000000000000000000000000000000000000000000000000000000907f42017634000000000000000000000000000000000000000000000000000000009060e401610726565b6000806109ac7f000000000000000000000000000000000000000000000000000000000000000063a973d0e860e01b8e8e8e8e8e8e8e8e8e8e6040516024016107269a99989796959493929190611055565b9050808060200190518101906109c29190611038565b9c9b505050505050505050505050565b606060008373ffffffffffffffffffffffffffffffffffffffff168333604051602001610a0092919061119a565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610a38916111da565b6000604051808303816000865af19150503d8060008114610a75576040519150601f19603f3d011682016040523d82523d6000602084013e610a7a565b606091505b509250905080610a8d57610a8d82610a94565b5092915050565b805115610aa45780518082602001fd5b6040517f5ee6411500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b600060808284031215610aeb57600080fd5b50919050565b600080600060c08486031215610b0657600080fd5b833567ffffffffffffffff811115610b1d57600080fd5b610b2986828701610ad9565b935050610b398560208601610ad9565b915060a084013590509250925092565b600060a08284031215610aeb57600080fd5b600080600060e08486031215610b7057600080fd5b833567ffffffffffffffff811115610b8757600080fd5b610b9386828701610ad9565b935050610ba38560208601610b49565b915060c084013590509250925092565b600060408284031215610aeb57600080fd5b60008060008060e08587031215610bdb57600080fd5b843567ffffffffffffffff80821115610bf357600080fd5b610bff88838901610ad9565b95506020870135915080821115610c1557600080fd5b50610c2287828801610bb3565b935050610c328660408701610ad9565b9396929550929360c00135925050565b6000806000806101008587031215610c5957600080fd5b843567ffffffffffffffff80821115610c7157600080fd5b610c7d88838901610ad9565b95506020870135915080821115610c9357600080fd5b50610ca087828801610bb3565b935050610cb08660408701610b49565b9396929550929360e00135925050565b73ffffffffffffffffffffffffffffffffffffffff81168114610ad657600080fd5b80358015158114610cf257600080fd5b919050565b600080600080600080600060c0888a031215610d1257600080fd5b8735610d1d81610cc0565b9650602088013567ffffffffffffffff80821115610d3a57600080fd5b818a0191508a601f830112610d4e57600080fd5b813581811115610d5d57600080fd5b8b60208260051b8501011115610d7257600080fd5b6020830198508097505050506040880135935060608801359250610d9860808901610ce2565b915060a0880135905092959891949750929550565b600060a08284031215610dbf57600080fd5b60405160a0810181811067ffffffffffffffff82111715610e09577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b806040525082358152602083013560208201526040830135604082015260608301356060820152608083013560808201528091505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112610ea857600080fd5b83018035915067ffffffffffffffff821115610ec357600080fd5b602001915036819003821315610ed857600080fd5b9250929050565b80820180821115610f19577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b600060208284031215610f3157600080fd5b81356bffffffffffffffffffffffff81168114610f4d57600080fd5b9392505050565b600060208284031215610f6657600080fd5b5051919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60c081526000610fca60c083018b8d610f6d565b8281036020840152610fdd818a8c610f6d565b90508281036040840152610ff281888a610f6d565b6060840196909652505073ffffffffffffffffffffffffffffffffffffffff9290921660808301526bffffffffffffffffffffffff1660a0909101529695505050505050565b60006020828403121561104a57600080fd5b8151610f4d81610cc0565b60e08152600061106960e083018c8e610f6d565b828103602084015261107c818b8d610f6d565b9050828103604084015261109181898b610f6d565b905086606084015273ffffffffffffffffffffffffffffffffffffffff80871660808501526bffffffffffffffffffffffff861660a085015283820360c085015284356110dd81610cc0565b1681526020840135368590037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe101811261111657600080fd5b840160208101903567ffffffffffffffff81111561113357600080fd5b80360382131561114257600080fd5b60406020840152611157604084018284610f6d565b9f9e505050505050505050505050505050565b6000815160005b8181101561118b5760208185018101518683015201611171565b50600093019283525090919050565b60006111a6828561116a565b60609390931b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001683525050601401919050565b6000610f4d828461116a56fea2646970667358221220c94645288fcb36f0233b5a0f1fc3ffced2deb601cc5b33bb6bb40bd5b06d58f464736f6c63430008130033000000000000000000000000cda72070e455bb31c7690a170224ce43623d0b6f00000000000000000000000053f451165ba6fdbe39a134673d13948261b2334a000000000000000000000000612e2daddc89d91409e40f946f9f7cfe422e777e
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100885760003560e01c806365c2cd911161005b57806365c2cd9114610112578063b590104e14610125578063be7ef14c1461014b578063f16188cb1461017157600080fd5b8063331aaf9e1461008d5780633d2c6eef146100d95780635599dfd7146100ec57806362428b32146100ff575b600080fd5b7f000000000000000000000000cda72070e455bb31c7690a170224ce43623d0b6f5b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100af6100e7366004610af1565b610192565b6100af6100fa366004610b5b565b6101e5565b6100af61010d366004610bc5565b610208565b6100af610120366004610c42565b61025d565b7f00000000000000000000000053f451165ba6fdbe39a134673d13948261b2334a6100af565b7f000000000000000000000000612e2daddc89d91409e40f946f9f7cfe422e777e6100af565b61018461017f366004610cf7565b610279565b6040519081526020016100d0565b6000806040518060a00160405280856000013581526020018560200135815260200185604001358152602001856060013581526020016201518081525090506101dc85828561045b565b95945050505050565b6000610200846101fa36869003860186610dad565b8461045b565b949350505050565b6000806040518060a00160405280856000013581526020018560200135815260200185604001358152602001856060013581526020016201518081525090506102538686838661057d565b9695505050505050565b60006101dc858561027336879003870187610dad565b8561057d565b60008581036102b4576040517fa9d004a500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b821580156102c157508115155b156102f8576040517f1a8a2c1000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83156103b657610323888888600081811061031557610315610e44565b9050602002013586886106a1565b9050821561034f5761034f888888600081811061034257610342610e44565b90506020020135846107be565b60015b868110156103b05761037e8989898481811061037057610370610e44565b9050602002013587896106a1565b5083156103a8576103a88989898481811061039b5761039b610e44565b90506020020135856107be565b600101610352565b50610450565b84156103ee576040517f2c05a27000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82610425576040517f75ce98b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8681101561044e576104468989898481811061039b5761039b610e44565b600101610428565b505b979650505050505050565b6000818015801590610471575061047181421190565b156104a8576040517fbcb9700400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83608001516000036104e6576040517fa87860d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606084015160008190036104f75750425b6105666105048780610e73565b61051160208a018a610e73565b61051e60408c018c610e73565b60808c015161052d9089610edf565b7f00000000000000000000000053f451165ba6fdbe39a134673d13948261b2334a8e60600160208101906105619190610f1f565b610841565b9250610574838660006108b6565b50509392505050565b6000818015801590610593575061059381421190565b156105ca576040517fbcb9700400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8360800151600003610608576040517fa87860d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606084015160008190036106195750425b6106896106268880610e73565b61063360208b018b610e73565b61064060408d018d610e73565b60808c015161064f9089610edf565b7f00000000000000000000000053f451165ba6fdbe39a134673d13948261b2334a8f60600160208101906106839190610f1f565b8f61095a565b9250610697838660006108b6565b5050949350505050565b60405173ffffffffffffffffffffffffffffffffffffffff8516602482015260448101849052606481018390526084810182905260009081906107a8907f000000000000000000000000cda72070e455bb31c7690a170224ce43623d0b6f907fbeb5127c000000000000000000000000000000000000000000000000000000009060a4015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526109d2565b9050808060200190518101906102539190610f54565b60405173ffffffffffffffffffffffffffffffffffffffff84166024820152604481018390526064810182905261083b907f000000000000000000000000cda72070e455bb31c7690a170224ce43623d0b6f907f798bac8d0000000000000000000000000000000000000000000000000000000090608401610726565b50505050565b6000806108917f000000000000000000000000612e2daddc89d91409e40f946f9f7cfe422e777e63189267b260e01b8d8d8d8d8d8d8d8d8d60405160240161072699989796959493929190610fb6565b9050808060200190518101906108a79190611038565b9b9a5050505050505050505050565b815160208301516040808501516060860151915173ffffffffffffffffffffffffffffffffffffffff8816602482015260448101949094526064840192909252608483019190915260a482015260c4810182905261083b907f00000000000000000000000053f451165ba6fdbe39a134673d13948261b2334a907f42017634000000000000000000000000000000000000000000000000000000009060e401610726565b6000806109ac7f000000000000000000000000612e2daddc89d91409e40f946f9f7cfe422e777e63a973d0e860e01b8e8e8e8e8e8e8e8e8e8e6040516024016107269a99989796959493929190611055565b9050808060200190518101906109c29190611038565b9c9b505050505050505050505050565b606060008373ffffffffffffffffffffffffffffffffffffffff168333604051602001610a0092919061119a565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610a38916111da565b6000604051808303816000865af19150503d8060008114610a75576040519150601f19603f3d011682016040523d82523d6000602084013e610a7a565b606091505b509250905080610a8d57610a8d82610a94565b5092915050565b805115610aa45780518082602001fd5b6040517f5ee6411500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b600060808284031215610aeb57600080fd5b50919050565b600080600060c08486031215610b0657600080fd5b833567ffffffffffffffff811115610b1d57600080fd5b610b2986828701610ad9565b935050610b398560208601610ad9565b915060a084013590509250925092565b600060a08284031215610aeb57600080fd5b600080600060e08486031215610b7057600080fd5b833567ffffffffffffffff811115610b8757600080fd5b610b9386828701610ad9565b935050610ba38560208601610b49565b915060c084013590509250925092565b600060408284031215610aeb57600080fd5b60008060008060e08587031215610bdb57600080fd5b843567ffffffffffffffff80821115610bf357600080fd5b610bff88838901610ad9565b95506020870135915080821115610c1557600080fd5b50610c2287828801610bb3565b935050610c328660408701610ad9565b9396929550929360c00135925050565b6000806000806101008587031215610c5957600080fd5b843567ffffffffffffffff80821115610c7157600080fd5b610c7d88838901610ad9565b95506020870135915080821115610c9357600080fd5b50610ca087828801610bb3565b935050610cb08660408701610b49565b9396929550929360e00135925050565b73ffffffffffffffffffffffffffffffffffffffff81168114610ad657600080fd5b80358015158114610cf257600080fd5b919050565b600080600080600080600060c0888a031215610d1257600080fd5b8735610d1d81610cc0565b9650602088013567ffffffffffffffff80821115610d3a57600080fd5b818a0191508a601f830112610d4e57600080fd5b813581811115610d5d57600080fd5b8b60208260051b8501011115610d7257600080fd5b6020830198508097505050506040880135935060608801359250610d9860808901610ce2565b915060a0880135905092959891949750929550565b600060a08284031215610dbf57600080fd5b60405160a0810181811067ffffffffffffffff82111715610e09577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b806040525082358152602083013560208201526040830135604082015260608301356060820152608083013560808201528091505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112610ea857600080fd5b83018035915067ffffffffffffffff821115610ec357600080fd5b602001915036819003821315610ed857600080fd5b9250929050565b80820180821115610f19577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b600060208284031215610f3157600080fd5b81356bffffffffffffffffffffffff81168114610f4d57600080fd5b9392505050565b600060208284031215610f6657600080fd5b5051919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60c081526000610fca60c083018b8d610f6d565b8281036020840152610fdd818a8c610f6d565b90508281036040840152610ff281888a610f6d565b6060840196909652505073ffffffffffffffffffffffffffffffffffffffff9290921660808301526bffffffffffffffffffffffff1660a0909101529695505050505050565b60006020828403121561104a57600080fd5b8151610f4d81610cc0565b60e08152600061106960e083018c8e610f6d565b828103602084015261107c818b8d610f6d565b9050828103604084015261109181898b610f6d565b905086606084015273ffffffffffffffffffffffffffffffffffffffff80871660808501526bffffffffffffffffffffffff861660a085015283820360c085015284356110dd81610cc0565b1681526020840135368590037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe101811261111657600080fd5b840160208101903567ffffffffffffffff81111561113357600080fd5b80360382131561114257600080fd5b60406020840152611157604084018284610f6d565b9f9e505050505050505050505050505050565b6000815160005b8181101561118b5760208185018101518683015201611171565b50600093019283525090919050565b60006111a6828561116a565b60609390931b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001683525050601401919050565b6000610f4d828461116a56fea2646970667358221220c94645288fcb36f0233b5a0f1fc3ffced2deb601cc5b33bb6bb40bd5b06d58f464736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000cda72070e455bb31c7690a170224ce43623d0b6f00000000000000000000000053f451165ba6fdbe39a134673d13948261b2334a000000000000000000000000612e2daddc89d91409e40f946f9f7cfe422e777e
-----Decoded View---------------
Arg [0] : _nftMarket (address): 0xcDA72070E455bb31C7690a170224Ce43623d0B6f
Arg [1] : _nftDropMarket (address): 0x53F451165Ba6fdbe39A134673d13948261B2334A
Arg [2] : _nftCollectionFactory (address): 0x612E2DadDc89d91409e40f946f9f7CfE422e777E
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000cda72070e455bb31c7690a170224ce43623d0b6f
Arg [1] : 00000000000000000000000053f451165ba6fdbe39a134673d13948261b2334a
Arg [2] : 000000000000000000000000612e2daddc89d91409e40f946f9f7cfe422e777e
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 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.