Giter Site home page Giter Site logo

nftmarketplace's Introduction

Token Address: The address of the ERC721 token that you want to list for sale. Token ID: The unique identifier of the ERC721 token you want to sell. Price: The price at which you want to sell the token, specified in Ether. Signature: A cryptographic signature to authorize and authenticate the order. Deadline: The timestamp indicating until when the order remains valid. Preconditions Owner

Verify that the msg.sender is the actual owner of the specified tokenId using the ownerOf() function. Ensure that the owner has approved the contract address (this) to spend the token by checking isApprovedForAll(). Token Address

Check that the tokenAddress is not set to address(0) (zero address). Validate if the specified tokenAddress has a contract associated with it. Price

Confirm that the price specified for the order is greater than zero. Signature

(Additional information needed to define the precondition for the signature) Deadline

Verify that the deadline is set to a timestamp greater than the current block.timestamp. Logic Store the order details in the contract's storage. Increment the order ID or counter. Optionally, emit an event to notify relevant parties about the order creation. Execute a Listing (Payable) Preconditions Listing ID

Ensure that the listingId is within the valid range of existing listings (less than the public counter). Payment

Confirm that the value sent with the transaction (msg.value) is equal to the price of the listing. Deadline

Check that the current block.timestamp is before or equal to the deadline of the listing. Signature

(Additional information needed to define the precondition for the signature) Logic Retrieve the order details from storage based on the listingId. Transfer the Ether from the buyer to the seller as payment for the listing. Transfer ownership of the ERC721 token from the seller to the buyer. Optionally, emit an event to record the execution of the listing. Please note that the documentation outlines the key steps and preconditions for creating and executing listings in your ERC721 Marketplace contract. You will need to provide additional details and implementation specifics related to the signature and any other custom logic you may have in your contract.

Regene

nftmarketplace's People

Contributors

mujibat avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.