1

a solidity newbie here. I have been playing around with ERC-721 contracts and I have a question regarding the price.

The usual way of assigning price is this:

uint256 public price= 0.05 ether;

How can this price be set in some other toke? Is it only restricted to ETH?

1 Answer 1

0

the 0.05 ether; is only for Ether since it's the native token on ethereum blockchain. But you can easily use an erc20 as payment for a mint.

I did a quick google search and found something that will help you.

You should look into this.

Hope this helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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