How to mint erc20 tokens inside erc721 smart contract?

Continuing the discussion from Where is ERC20Mintable.sol in OpenZeppelin Contracts 3.0?:

Hi guys,
so what is the way to mint my ERC20 tokens through some other smart contract now?
Let's say I have two separate contracts: ERC20 and ERC721, and I want to mint ERC20 tokens in my ERC721 smart contract.

Hello @Urszula_Kalinowska

Your ERC20 contract will have to expose a minting function, and allow the ERC721 to call it.

For example: this ERC721 contract does mints on this ERC20.

1 Like

ahh, so I have to implement interface with mint function
Thank you, great example!