How to selling NFT items on BSC by a token other than BNB

Hi,
I want to sell my NFT game items to users by a own token (like GLBX for example) on BSC. My token has deployed on BSC. I don’t want users pay BNB for item’s price. Is it possible? and if yes, how?
Thank you.
@filip

Hello,
Presenting an idea how to do it:

  • building your own marketplace, you present your NFT game items in there (Moralis Web3 will streamline that)
  • users will have to approve that your marketplace can spend GLBX (as an example) in their wallet (pretty much they have to get the tokens somewhere, maybe in Pancake swap if some liquidity is available there)
  • then the marketplace invoke the ‘sell’, receive the tokens and transfer the NFT to them

Otherwise, if there is a decentralized marketplace out there that allows customized tokens as currency that will be great.

(side note: I realize that is a good idea, haven’t seen one so far, thanks for the question :slight_smile: )

With kind regards

1 Like

@alp257 Thanks for your answer.
One point in this scenario is ambiguous for me:
Suppose I used the web3 to refer a user to Metamask to buy an item priced at 5,000 GLBX. We know that anyone can easily create and own a token called GLBX. Which token is for me? In fact, I think the purchase should be based on the contract address of the token, otherwise anyone can make that token for themselves.
Now I do not know if this problem is true or not and what is the solution.

Hello,
I think I will find the answer to my questions. My solution is:

  1. I add a GLBX-USDT liquidity to Pancakeswap.
  2. Users buy GLBX from Pancakeswap.
  3. When a user wants to buy a product from my market, I call tranferFrom function from my GLBX smart contract and transfer the price amount of the product from the user’s wallet to my wallet.
  4. After confirming the above transaction, I call my NFT smart contact safeTranferFrom function and transfer an NFT token from my wallet to the user’s wallet, and after confirming this transaction, I have reached to my goal.
    Do you think this is the right solution? I want to implement it.
1 Like

Hi @Mahdi, greetings

Yes, the steps for your solution is good. For number four (4), what you can do is give your marketplace contract an approval that it can transfer your NFT token once you list an NFT token for sale. So, when a user buys a listed NFT token in the marketplace, you setup the marketplace contract where it will execute the transfer/transaction right away.

Just to add, the user still need a small amount of BNB to pay for the gas fees.

With kind regards

1 Like

Hi @alp257
You’re right. Thanks for your help and guide.

1 Like