DEV Community

Discussion on: How to create a smart contract to receive payments

Collapse
 
roni_sommerfeld profile image
RoNi Sommerfeld

Hello, is it possible to use an ERC20 token inside a function of an ERC721 token?
To better explain what I want to do is as follows.
Before minting an ERC721 token (Item of my game) I want to check if the player has my token (ERC20) in his wallet, if he has he could mint it...
Is it possible to do that? Thanks.

Collapse
 
emanuelferreira profile image
Emanuel Ferreira

Hey RoNi, yes!

on your ERC721 mint function you need to connect with your ERC20 contract and verify the balance of the user