3

I have discovered NFTs and ETH recently and would like to build a marketplace like opensea but allows resale of NFTs that are already minted on various block chains(ETH, FLOW). Starting with just ETH, when some one comes to marketplace to sell their NFT, I would like to :

  • Verify the ownership of NFT that the seller is claiming to resell on my marketplace. How do I do this? Can I take the seller’s wallet’s public information and query the blockchain somehow?
  • when the seller sends the NFT to the buyer and claims that he sent it, how do i verify that the nft was safely sent to the buyer’s wallet?

From what I have read so far, etherscan seems to have a way to keep track of transactions and also extract NFT metadata to verify ownership of the NFT, how can I do the same?

2

Seems like you have two problems - the first is ownership verification and the second is trusted exchange. The first is pretty easy to solve with the OpenZeppelin docs for ERC-721. Looks like you're looking for ownerOf(tokenId), which assuming you know the address of the ERC-721 contract and the tokenId should return the address of the owner which you can match against who is sending the message.

However, if you solve the second problem, it automatically solves the first. Check out this Hacker Noon article about implementing an NFT marketplace, where the user with the NFT deposits it into an escrow smart contract (thus proving they own it; you can't deposit what you don't own) and it sits there waiting for someone else to purchase it.

Good luck!

3
  • Great, thanks for your reply. For #2 i will read through the article. On a side note, if I dont want to have an escrow wallet, and expect the seller to transfer the NFT from his wallet to buyer’s wallet, and assume he could give me the transaction id, would i be able to use the transaction id to query the block chain to verify the transaction? For #1 is it possible for me to aquire the meta data of an NFT? I am hoping i could skip asking the seller for the NFT properties. – Eswar Rajesh Pinapala Apr 3 at 1:41
  • @EswarRajeshPinapala From a business perspective, I don't see how any user would want to use a system where they aren't 100% guaranteed to receive something in return for the assets they transfer. But if you're still going through with it, you could either query the transaction itself, or call ownerOf(tokenId) and see that the return value matched that of the buyer. – Alex Otsu Apr 3 at 2:43
  • Thanks, Alex. For the question around business value - I should have made it clear. When I say I won't ask the seller for the NFT properties, I meant I would extract that from the address he provides, I am trying to make this as seamless as possible for the seller onboarding. Followup question - When you say "query the transaction"- do you mean query blockchain ? or interact with etherscan? – Eswar Rajesh Pinapala Apr 3 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.