Tutorial: Selling NFTs for ERC20 tokens

Tutorial: Selling NFTs for ERC20 tokens

In Tatum, we have created an instantly deployable NFT marketplace smart contract that allows you to create fixed-price, peer-to-peer, NFT listings at the blockchain level. Once an NFT is sold, the funds are automatically transferred to the seller, the NFT to the buyer, and the marketplace fee to the marketplace owner.

You can sell NFTs for native assets (i.e. ETH on Ethereum or MATIC on Polygon) or for ERC20 tokens. If you want to sell NFTs for ERC20 tokens, there are a few extra steps you'll need to take, and we'll show you exactly how to do it in this video.

Check out the full guide to creating peer-to-peer fixed-price NFT listings here: https://docs.tatum.io/tutorials/how-to-create-a-peer-to-peer-nft-marketplace


Here is a Postman collection with all of the API calls we use in the video:
https://www.getpostman.com/collections/85cfd3422b4eaffea666

And here are all of the blockchain transactions from the video:

NFT minted:
https://mumbai.polygonscan.com/tx/0xad60a7c5b73b4204cc94e1ce83da62a8f9f3a060e7c6fc1496699e1ec6ac15a6

Deploy NFT marketplace:
https://mumbai.polygonscan.com/tx/0xe72a38d2161b10a9513ea0e6f71ae9f3fc2474f9f130ed0ea9d64affd4c6fd4b

Create NFT listing:
https://mumbai.polygonscan.com/tx/0x5e7d3659f2f5dee5ac45d2215c539caa798369435306af95e5266c4d4f31f5d6

Transfer NFT:
https://mumbai.polygonscan.com/tx/0x0212fa028294ff5a21743eb6f6fe14433c7cc8bb46e1c49b9767be4a6f56b739

Approve ERC20 spending: https://mumbai.polygonscan.com/tx/0x9e9da579294a02bb3410bca90e60e350ca1652569458301b76c04592ce09b441

Buy NFT from listing:
https://mumbai.polygonscan.com/tx/0x4daec77475c60ce7bf60daa70b3ce378b6a7eb1486b823956bf6bf099aadd459

--------
JOIN the Tatum Discord: https://discord.gg/4TWtSP3vxU
START building your first blockchain app for free: https://dashboard.tatum.io/
LEARN about Tatum: https://docs.tatum.io/
EXPLORE over 300 features in our API documentation: https://tatum.io/apidoc

Tatumblockchaindevelopers

Post a Comment

0 Comments