Payable mint function

I'm trying to add a payable mint function to a smart contract created using the OZ contracts wizard, would I just use function mint payable and require "xyz" amount and make this callable by the public? Also how would this integrate into being called from a website using a button/metamask, surely there will have to be a verify and msg.sender function?

Are you trying to create an erc721 mint function, where the buyer pays the token mint gas fee and the mint fee

yes i am trying to do this

Just change the onlyowner access in the mint function to payable

1 Like