ETH Price: $2,046.34 (+0.49%)

Contract

0xFac458d01fD5E56485Ca353ff5ea4515807cfFc4
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Advanced mode:
Parent Transaction Hash Method Block
From
To
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SimpleMarketplace

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 100 runs

Other Settings:
paris EvmVersion
// +==========================================================================+
// |███╗    ███╗   ███╗██╗███╗   ██╗████████╗██████╗  █████╗ ██╗   ██╗    ███╗|
// |██╔╝    ████╗ ████║██║████╗  ██║╚══██╔══╝██╔══██╗██╔══██╗╚██╗ ██╔╝    ╚██║|
// |██║     ██╔████╔██║██║██╔██╗ ██║   ██║   ██████╔╝███████║ ╚████╔╝      ██║|
// |██║     ██║╚██╔╝██║██║██║╚██╗██║   ██║   ██╔══██╗██╔══██║  ╚██╔╝       ██║|
// |███╗    ██║ ╚═╝ ██║██║██║ ╚████║   ██║   ██████╔╝██║  ██║   ██║       ███║|
// |╚══╝    ╚═╝     ╚═╝╚═╝╚═╝  ╚═══╝   ╚═╝   ╚═════╝ ╚═╝  ╚═╝   ╚═╝       ╚══╝|
// |                                                                          |
// |            ███╗   ███╗ █████╗ ██████╗ ██╗  ██╗███████╗████████╗          |
// |            ████╗ ████║██╔══██╗██╔══██╗██║ ██╔╝██╔════╝╚══██╔══╝          |
// |            ██╔████╔██║███████║██████╔╝█████╔╝ █████╗     ██║             |
// |            ██║╚██╔╝██║██╔══██║██╔══██╗██╔═██╗ ██╔══╝     ██║             |
// |            ██║ ╚═╝ ██║██║  ██║██║  ██║██║  ██╗███████╗   ██║             |
// |            ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═╝╚══════╝   ╚═╝             |
// +==========================================================================+

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract SimpleMarketplace is ReentrancyGuard, Ownable {
    struct Listing {
        address seller;
        uint256 price;
        uint256 expiry; // Timestamp when listing expires (0 for no expiration)
    }

    // NFT contract => tokenId => listing
    mapping(address => mapping(uint256 => Listing)) public listings;

    // Factory contract that deployed all valid NFT collections
    address public immutable factory;

    // Platform fee in basis points (e.g., 250 = 2.5%)
    uint256 public feeBPS = 250; // Initial fee: 2.5%
    uint256 public constant MAX_FEE_BPS = 500; // Max fee: 5%
    uint256 public constant BPS_DENOMINATOR = 10000; // Basis points denominator
    address public feeRecipient;

    // Events for indexing
    event ListingCreated(
        address indexed nft,
        uint256 indexed tokenId,
        address indexed seller,
        uint256 price,
        uint256 expiry
    );
    event ListingCanceled(
        address indexed nft,
        uint256 indexed tokenId,
        address indexed seller
    );
    event NFTPurchased(
        address indexed nft,
        uint256 indexed tokenId,
        address indexed buyer,
        address seller,
        uint256 price,
        uint256 platformFee,
        uint256 royaltyAmount,
        address royaltyRecipient
    );
    event FeeRecipientUpdated(address indexed newRecipient);
    event FeeUpdated(uint256 newFeeBPS);

    constructor(address _factory, address _feeRecipient, address initialOwner) Ownable(initialOwner) {
        require(_factory != address(0), "Invalid factory address");
        require(_feeRecipient != address(0), "Invalid fee recipient");
        factory = _factory;
        feeRecipient = _feeRecipient;
    }

    modifier onlyFromFactory(address nft) {
        require(IFactory(factory).isDeployedByFactory(nft), "Not from factory");
        _;
    }

    function listNFT(address nft, uint256 tokenId, uint256 price, uint256 expiry)
        external
        onlyFromFactory(nft)
    {
        require(price > 0, "Price must be positive");
        // Verify NFT exists and is owned by sender
        require(IERC721(nft).ownerOf(tokenId) == msg.sender, "Not owner");
        // Verify approval (either setApprovalForAll or approve)
        require(
            IERC721(nft).isApprovedForAll(msg.sender, address(this)) ||
                IERC721(nft).getApproved(tokenId) == address(this),
            "Not approved"
        );
        // Verify expiry is in the future (if set)
        require(expiry == 0 || expiry > block.timestamp, "Invalid expiry");

        listings[nft][tokenId] = Listing({
            seller: msg.sender,
            price: price,
            expiry: expiry
        });

        emit ListingCreated(nft, tokenId, msg.sender, price, expiry);
    }

    function cancelListing(address nft, uint256 tokenId) external {
        Listing memory listing = listings[nft][tokenId];
        require(listing.seller == msg.sender, "Not seller");
        require(listing.price > 0, "Not listed");

        delete listings[nft][tokenId];
        emit ListingCanceled(nft, tokenId, msg.sender);
    }

    function buy(address nft, uint256 tokenId) external payable nonReentrant {
        Listing memory listing = listings[nft][tokenId];
        require(listing.price > 0, "Not listed");
        require(msg.value == listing.price, "Incorrect ETH amount");
        require(
            listing.expiry == 0 || block.timestamp <= listing.expiry,
            "Listing expired"
        );

        // Calculate platform fee
        uint256 platformFee = (msg.value * feeBPS) / BPS_DENOMINATOR;

        // Query royalty information (ERC-2981)
        uint256 royaltyAmount = 0;
        address royaltyRecipient = address(0);
        try IERC2981(nft).royaltyInfo(tokenId, msg.value) returns (address recipient, uint256 amount) {
            royaltyRecipient = recipient;
            royaltyAmount = amount;
        } catch {
            // If the NFT doesn't support ERC-2981, proceed without royalties
        }

        // Calculate amount to seller
        uint256 sellerAmount = msg.value - platformFee - royaltyAmount;
        require(sellerAmount > 0, "Seller amount must be positive");

        // Store seller address before deleting listing
        address seller = listing.seller;

        // Delete listing to prevent reentrancy
        delete listings[nft][tokenId];

        // Transfer platform fee
        if (platformFee > 0) {
            (bool feeSent, ) = feeRecipient.call{value: platformFee}("");
            require(feeSent, "Platform fee transfer failed");
        }

        // Transfer royalty if applicable
        if (royaltyAmount > 0 && royaltyRecipient != address(0)) {
            (bool royaltySent, ) = royaltyRecipient.call{value: royaltyAmount}("");
            require(royaltySent, "Royalty transfer failed");
        }

        // Transfer payment to seller
        (bool sellerSent, ) = seller.call{value: sellerAmount}("");
        require(sellerSent, "Seller transfer failed");

        // Transfer NFT to buyer
        IERC721(nft).safeTransferFrom(seller, msg.sender, tokenId);

        emit NFTPurchased(nft, tokenId, msg.sender, seller, listing.price, platformFee, royaltyAmount, royaltyRecipient);
    }

    function setFeeRecipient(address newRecipient) external onlyOwner {
        require(newRecipient != address(0), "Invalid recipient");
        feeRecipient = newRecipient;
        emit FeeRecipientUpdated(newRecipient);
    }

    function setFeeBPS(uint256 newFeeBPS) external onlyOwner {
        require(newFeeBPS <= MAX_FEE_BPS, "Fee too high");
        feeBPS = newFeeBPS;
        emit FeeUpdated(newFeeBPS);
    }
}

// Interface for factory contract
interface IFactory {
    function isDeployedByFactory(address nft) external view returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC2981.sol)

pragma solidity >=0.6.2;

import {IERC165} from "../utils/introspection/IERC165.sol";

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
     *
     * NOTE: ERC-2981 allows setting the royalty to 100% of the price. In that case all the price would be sent to the
     * royalty receiver and 0 tokens to the seller. Contracts dealing with royalty should consider empty transfers.
     */
    function royaltyInfo(
        uint256 tokenId,
        uint256 salePrice
    ) external view returns (address receiver, uint256 royaltyAmount);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC721/IERC721.sol)

pragma solidity >=0.6.2;

import {IERC165} from "../../utils/introspection/IERC165.sol";

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)

pragma solidity >=0.4.16;

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @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 EIP-1153 (transient storage) is available on the chain you're deploying at,
 * consider using {ReentrancyGuardTransient} instead.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

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

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

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

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 100
  },
  "viaIR": true,
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_feeRecipient","type":"address"},{"internalType":"address","name":"initialOwner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newRecipient","type":"address"}],"name":"FeeRecipientUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFeeBPS","type":"uint256"}],"name":"FeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"nft","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"seller","type":"address"}],"name":"ListingCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"nft","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"expiry","type":"uint256"}],"name":"ListingCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"nft","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"platformFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"royaltyAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"royaltyRecipient","type":"address"}],"name":"NFTPurchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"BPS_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FEE_BPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"nft","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"nft","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"cancelListing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeBPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"nft","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"}],"name":"listNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"listings","outputs":[{"internalType":"address","name":"seller","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFeeBPS","type":"uint256"}],"name":"setFeeBPS","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newRecipient","type":"address"}],"name":"setFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a03461019757601f61104b38819003918201601f191683019291906001600160401b0384118385101761019c5781606092849260409687528339810103126101975761004b816101b2565b906100638361005c602084016101b2565b92016101b2565b60016000556001600160a01b0390811691821561017f57600180546001600160a01b03198082168617909255865191949084167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a360fa6003558285161561013d5750169182156100f957608052600454161760045551610e8490816101c7823960805181818161069901526109470152f35b835162461bcd60e51b815260206004820152601560248201527f496e76616c69642066656520726563697069656e7400000000000000000000006044820152606490fd5b62461bcd60e51b815260206004820152601760248201527f496e76616c696420666163746f727920616464726573730000000000000000006044820152606490fd5b8451631e4fbdf760e01b815260006004820152602490fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036101975756fe60806040818152600436101561001457600080fd5b600091823560e01c90816207df3014610c8c575080631a1c6e5314610c6e5780633c44a5f0146108f357806346904840146108cb578063604b6a9c14610841578063715018a6146107e15780638da5cb5b146107b9578063b2ddee06146106c8578063c45a015514610685578063cce7ec1314610222578063d55be8c614610206578063e1a45218146101ea578063e74b981b146101475763f2fde38b146100bb57600080fd5b34610143576020366003190112610143576100d4610ceb565b6100dc610d06565b6001600160a01b0390811691821561012c5750600180546001600160a01b031981168417909155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b51631e4fbdf760e01b815260048101849052602490fd5b5080fd5b503461014357602036600319011261014357610161610ceb565b610169610d06565b6001600160a01b03169081156101b35750600480546001600160a01b031916821790557f7a7b5a0a132f9e0581eb8527f66eae9ee89c2a3e79d4ac7e41a1f1f4d48a7fc28280a280f35b5162461bcd60e51b8152602060048201526011602482015270125b9d985b1a59081c9958da5c1a595b9d607a1b6044820152606490fd5b5034610143578160031936011261014357602090516127108152f35b5034610143578160031936011261014357602090516101f48152f35b508060031936011261014357610236610ceb565b60028354146106745760028084556001600160a01b03828116855260209182528385206024358652909152828420835191939061027283610d32565b84815416835261029960026001830154928360208701520154918385019283521515610db2565b602083015134036106395751801590811561062e575b50156105f957600354908134029134830414341517156105e55785908692815163152a902d60e11b8152602435600482015234602482015282816044818b8b165afa90818a918b936105a3575b50610598575b505061031b83610316612710840434610deb565b610deb565b9485156105545787815116958888168a526002602052838a206024358b52602052896002858220828155826001820155015561271083046104f3575b89851515806104e8575b61048f575b808080938a5af1610375610e0e565b5015610452578787163b1561044e578251632142170760e11b815286600482015233602482015260243560448201528981606481838d8d165af1801561044457610415575b508794939291602061271092015183519788526020880152049085015260608401521660808201527ffa2fcaccb6985e234e8c5dcb9385e8ebaf755134e4b3d81ec2444644a8fbedb960a03394602435941692a46001815580f35b67ffffffffffffffff819a929a1161043057835297876103ba565b634e487b7160e01b82526041600452602482fd5b84513d8c823e3d90fd5b8880fd5b825162461bcd60e51b815260206004820152601660248201527514d95b1b195c881d1c985b9cd9995c8819985a5b195960521b6044820152606490fd5b808080888a5af161049e610e0e565b50156104aa5789610366565b835162461bcd60e51b8152602060048201526017602482015276149bde585b1d1e481d1c985b9cd9995c8819985a5b1959604a1b6044820152606490fd5b508987161515610361565b8980808061271087048d600454165af161050b610e0e565b5061035757835162461bcd60e51b815260206004820152601c60248201527f506c6174666f726d20666565207472616e73666572206661696c6564000000006044820152606490fd5b825162461bcd60e51b815260206004820152601e60248201527f53656c6c657220616d6f756e74206d75737420626520706f73697469766500006044820152606490fd5b945092503880610302565b85809294508193503d83116105de575b6105bd8183610d64565b810103126105da5760206105d082610d9e565b91015191386102fc565b8980fd5b503d6105b3565b634e487b7160e01b86526011600452602486fd5b5162461bcd60e51b815260206004820152600f60248201526e131a5cdd1a5b99c8195e1c1a5c9959608a1b6044820152606490fd5b9050421115386102af565b815162461bcd60e51b8152602060048201526014602482015273125b98dbdc9c9958dd0811551208185b5bdd5b9d60621b6044820152606490fd5b8151633ee5aeb560e01b8152600490fd5b5034610143578160031936011261014357517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b50346101435780600319360112610143576106e1610ceb565b906024359060018060a01b03809316928385526020906002825282862084875282528286209083519061071382610d32565b825416908181528460026001850154948684019586520154910152330361078957916002916107458794511515610db2565b85845282815281842090858552528220828155826001820155015533917fcf45896873f759e6a8c2348e49ff9892b89458850ab6c70339e1c430227ce91d8480a480f35b50606491519062461bcd60e51b82526004820152600a6024820152692737ba1039b2b63632b960b11b6044820152fd5b503461014357816003193601126101435760015490516001600160a01b039091168152602090f35b823461083e578060031936011261083e576107fa610d06565b600180546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b5034610143576020366003190112610143576004359061085f610d06565b6101f4821161089957816020917f8c4d35e54a3f2ef1134138fd8ea3daee6a3c89e10d2665996babdf70261e2c769360035551908152a180f35b5162461bcd60e51b815260206004820152600c60248201526b08ccaca40e8dede40d0d2ced60a31b6044820152606490fd5b503461014357816003193601126101435760045490516001600160a01b039091168152602090f35b50346101435760803660031901126101435761090d610ceb565b9060248035916044938435946064918235928451926316e33dc560e21b845260018060a01b038093169687600486015260209485818381887f0000000000000000000000000000000000000000000000000000000000000000165afa908115610b50578c91610c51575b5015610c1f578915610be75786516331a9108f60e11b8152600481018a9052858183818c5afa908115610b50578c91610bb2575b508433911603610b8757865163e985e9c560e01b81523360048201523082820152858184818c5afa908115610b50578c91610b5a575b508015610ae4575b15610ab65785158015610aad575b15610a7d575050509083929160027f81cc9d0dcc671d2335481cdaa5af1e25fc5cf004a309d6ab49ec443e0e979380955191610a3283610d32565b3383528383018a815286840191868352898d528386528c8b89822091528652878d2094511660018060a01b03198554161784555160018401555191015582519687528601523394a480f35b8491600e6d496e76616c69642065787069727960901b9289519462461bcd60e51b86526004860152840152820152fd5b504286116109f7565b8491600c6b139bdd08185c1c1c9bdd995960a21b9289519462461bcd60e51b86526004860152840152820152fd5b50865163020604bf60e21b8152600481018a9052858183818c5afa908115610b50578c91610b17575b50841630146109e9565b90508581813d8311610b49575b610b2e8183610d64565b81010312610b4557610b3f90610d9e565b38610b0d565b8b80fd5b503d610b24565b88513d8e823e3d90fd5b610b7a9150863d8811610b80575b610b728183610d64565b810190610d86565b386109e1565b503d610b68565b84916009682737ba1037bbb732b960b91b9289519462461bcd60e51b86526004860152840152820152fd5b90508581813d8311610be0575b610bc98183610d64565b81010312610b4557610bda90610d9e565b386109ab565b503d610bbf565b84916016755072696365206d75737420626520706f73697469766560501b9289519462461bcd60e51b86526004860152840152820152fd5b849160106f4e6f742066726f6d20666163746f727960801b9289519462461bcd60e51b86526004860152840152820152fd5b610c689150863d8811610b8057610b728183610d64565b38610977565b50346101435781600319360112610143576020906003549051908152f35b91905034610ce75780600319360112610ce7576060926001600160a01b039190819083610cb7610ceb565b16815260026020528181206024358252602052209182541691600260018201549101549284526020840152820152f35b8280fd5b600435906001600160a01b0382168203610d0157565b600080fd5b6001546001600160a01b03163303610d1a57565b60405163118cdaa760e01b8152336004820152602490fd5b6060810190811067ffffffffffffffff821117610d4e57604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff821117610d4e57604052565b90816020910312610d0157518015158103610d015790565b51906001600160a01b0382168203610d0157565b15610db957565b60405162461bcd60e51b815260206004820152600a602482015269139bdd081b1a5cdd195960b21b6044820152606490fd5b91908203918211610df857565b634e487b7160e01b600052601160045260246000fd5b3d15610e49573d9067ffffffffffffffff8211610d4e5760405191610e3d601f8201601f191660200184610d64565b82523d6000602084013e565b60609056fea26469706673582212202ad602af70dc9c464d5de25621b8f7561da13b7334a1868fcf74d0b01c04cdf064736f6c6343000814003300000000000000000000000048d0d0b20990dd7c8d2404d1f8f6a3f6a446571b00000000000000000000000088aeff85890ba7cd70ddd0e128c93fd12623c1bb00000000000000000000000088aeff85890ba7cd70ddd0e128c93fd12623c1bb

Deployed Bytecode

0x60806040818152600436101561001457600080fd5b600091823560e01c90816207df3014610c8c575080631a1c6e5314610c6e5780633c44a5f0146108f357806346904840146108cb578063604b6a9c14610841578063715018a6146107e15780638da5cb5b146107b9578063b2ddee06146106c8578063c45a015514610685578063cce7ec1314610222578063d55be8c614610206578063e1a45218146101ea578063e74b981b146101475763f2fde38b146100bb57600080fd5b34610143576020366003190112610143576100d4610ceb565b6100dc610d06565b6001600160a01b0390811691821561012c5750600180546001600160a01b031981168417909155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b51631e4fbdf760e01b815260048101849052602490fd5b5080fd5b503461014357602036600319011261014357610161610ceb565b610169610d06565b6001600160a01b03169081156101b35750600480546001600160a01b031916821790557f7a7b5a0a132f9e0581eb8527f66eae9ee89c2a3e79d4ac7e41a1f1f4d48a7fc28280a280f35b5162461bcd60e51b8152602060048201526011602482015270125b9d985b1a59081c9958da5c1a595b9d607a1b6044820152606490fd5b5034610143578160031936011261014357602090516127108152f35b5034610143578160031936011261014357602090516101f48152f35b508060031936011261014357610236610ceb565b60028354146106745760028084556001600160a01b03828116855260209182528385206024358652909152828420835191939061027283610d32565b84815416835261029960026001830154928360208701520154918385019283521515610db2565b602083015134036106395751801590811561062e575b50156105f957600354908134029134830414341517156105e55785908692815163152a902d60e11b8152602435600482015234602482015282816044818b8b165afa90818a918b936105a3575b50610598575b505061031b83610316612710840434610deb565b610deb565b9485156105545787815116958888168a526002602052838a206024358b52602052896002858220828155826001820155015561271083046104f3575b89851515806104e8575b61048f575b808080938a5af1610375610e0e565b5015610452578787163b1561044e578251632142170760e11b815286600482015233602482015260243560448201528981606481838d8d165af1801561044457610415575b508794939291602061271092015183519788526020880152049085015260608401521660808201527ffa2fcaccb6985e234e8c5dcb9385e8ebaf755134e4b3d81ec2444644a8fbedb960a03394602435941692a46001815580f35b67ffffffffffffffff819a929a1161043057835297876103ba565b634e487b7160e01b82526041600452602482fd5b84513d8c823e3d90fd5b8880fd5b825162461bcd60e51b815260206004820152601660248201527514d95b1b195c881d1c985b9cd9995c8819985a5b195960521b6044820152606490fd5b808080888a5af161049e610e0e565b50156104aa5789610366565b835162461bcd60e51b8152602060048201526017602482015276149bde585b1d1e481d1c985b9cd9995c8819985a5b1959604a1b6044820152606490fd5b508987161515610361565b8980808061271087048d600454165af161050b610e0e565b5061035757835162461bcd60e51b815260206004820152601c60248201527f506c6174666f726d20666565207472616e73666572206661696c6564000000006044820152606490fd5b825162461bcd60e51b815260206004820152601e60248201527f53656c6c657220616d6f756e74206d75737420626520706f73697469766500006044820152606490fd5b945092503880610302565b85809294508193503d83116105de575b6105bd8183610d64565b810103126105da5760206105d082610d9e565b91015191386102fc565b8980fd5b503d6105b3565b634e487b7160e01b86526011600452602486fd5b5162461bcd60e51b815260206004820152600f60248201526e131a5cdd1a5b99c8195e1c1a5c9959608a1b6044820152606490fd5b9050421115386102af565b815162461bcd60e51b8152602060048201526014602482015273125b98dbdc9c9958dd0811551208185b5bdd5b9d60621b6044820152606490fd5b8151633ee5aeb560e01b8152600490fd5b5034610143578160031936011261014357517f00000000000000000000000048d0d0b20990dd7c8d2404d1f8f6a3f6a446571b6001600160a01b03168152602090f35b50346101435780600319360112610143576106e1610ceb565b906024359060018060a01b03809316928385526020906002825282862084875282528286209083519061071382610d32565b825416908181528460026001850154948684019586520154910152330361078957916002916107458794511515610db2565b85845282815281842090858552528220828155826001820155015533917fcf45896873f759e6a8c2348e49ff9892b89458850ab6c70339e1c430227ce91d8480a480f35b50606491519062461bcd60e51b82526004820152600a6024820152692737ba1039b2b63632b960b11b6044820152fd5b503461014357816003193601126101435760015490516001600160a01b039091168152602090f35b823461083e578060031936011261083e576107fa610d06565b600180546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b5034610143576020366003190112610143576004359061085f610d06565b6101f4821161089957816020917f8c4d35e54a3f2ef1134138fd8ea3daee6a3c89e10d2665996babdf70261e2c769360035551908152a180f35b5162461bcd60e51b815260206004820152600c60248201526b08ccaca40e8dede40d0d2ced60a31b6044820152606490fd5b503461014357816003193601126101435760045490516001600160a01b039091168152602090f35b50346101435760803660031901126101435761090d610ceb565b9060248035916044938435946064918235928451926316e33dc560e21b845260018060a01b038093169687600486015260209485818381887f00000000000000000000000048d0d0b20990dd7c8d2404d1f8f6a3f6a446571b165afa908115610b50578c91610c51575b5015610c1f578915610be75786516331a9108f60e11b8152600481018a9052858183818c5afa908115610b50578c91610bb2575b508433911603610b8757865163e985e9c560e01b81523360048201523082820152858184818c5afa908115610b50578c91610b5a575b508015610ae4575b15610ab65785158015610aad575b15610a7d575050509083929160027f81cc9d0dcc671d2335481cdaa5af1e25fc5cf004a309d6ab49ec443e0e979380955191610a3283610d32565b3383528383018a815286840191868352898d528386528c8b89822091528652878d2094511660018060a01b03198554161784555160018401555191015582519687528601523394a480f35b8491600e6d496e76616c69642065787069727960901b9289519462461bcd60e51b86526004860152840152820152fd5b504286116109f7565b8491600c6b139bdd08185c1c1c9bdd995960a21b9289519462461bcd60e51b86526004860152840152820152fd5b50865163020604bf60e21b8152600481018a9052858183818c5afa908115610b50578c91610b17575b50841630146109e9565b90508581813d8311610b49575b610b2e8183610d64565b81010312610b4557610b3f90610d9e565b38610b0d565b8b80fd5b503d610b24565b88513d8e823e3d90fd5b610b7a9150863d8811610b80575b610b728183610d64565b810190610d86565b386109e1565b503d610b68565b84916009682737ba1037bbb732b960b91b9289519462461bcd60e51b86526004860152840152820152fd5b90508581813d8311610be0575b610bc98183610d64565b81010312610b4557610bda90610d9e565b386109ab565b503d610bbf565b84916016755072696365206d75737420626520706f73697469766560501b9289519462461bcd60e51b86526004860152840152820152fd5b849160106f4e6f742066726f6d20666163746f727960801b9289519462461bcd60e51b86526004860152840152820152fd5b610c689150863d8811610b8057610b728183610d64565b38610977565b50346101435781600319360112610143576020906003549051908152f35b91905034610ce75780600319360112610ce7576060926001600160a01b039190819083610cb7610ceb565b16815260026020528181206024358252602052209182541691600260018201549101549284526020840152820152f35b8280fd5b600435906001600160a01b0382168203610d0157565b600080fd5b6001546001600160a01b03163303610d1a57565b60405163118cdaa760e01b8152336004820152602490fd5b6060810190811067ffffffffffffffff821117610d4e57604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff821117610d4e57604052565b90816020910312610d0157518015158103610d015790565b51906001600160a01b0382168203610d0157565b15610db957565b60405162461bcd60e51b815260206004820152600a602482015269139bdd081b1a5cdd195960b21b6044820152606490fd5b91908203918211610df857565b634e487b7160e01b600052601160045260246000fd5b3d15610e49573d9067ffffffffffffffff8211610d4e5760405191610e3d601f8201601f191660200184610d64565b82523d6000602084013e565b60609056fea26469706673582212202ad602af70dc9c464d5de25621b8f7561da13b7334a1868fcf74d0b01c04cdf064736f6c63430008140033

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

00000000000000000000000048d0d0b20990dd7c8d2404d1f8f6a3f6a446571b00000000000000000000000088aeff85890ba7cd70ddd0e128c93fd12623c1bb00000000000000000000000088aeff85890ba7cd70ddd0e128c93fd12623c1bb

-----Decoded View---------------
Arg [0] : _factory (address): 0x48d0d0b20990dd7C8d2404D1F8F6a3f6a446571b
Arg [1] : _feeRecipient (address): 0x88aefF85890Ba7cD70ddD0e128C93fD12623C1BB
Arg [2] : initialOwner (address): 0x88aefF85890Ba7cD70ddD0e128C93fD12623C1BB

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000048d0d0b20990dd7c8d2404d1f8f6a3f6a446571b
Arg [1] : 00000000000000000000000088aeff85890ba7cd70ddd0e128c93fd12623c1bb
Arg [2] : 00000000000000000000000088aeff85890ba7cd70ddd0e128c93fd12623c1bb


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

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.