'How to generate ERC20 coins into an NFT Marketplace when mint function is not available
Disclaimer: I'm 2 weeks into Blockchain and Blockchain Security. If I'm missing out on some basic concept, please gently point in the right direction. Thanks!
I have an NFTMarketPlace smart contract that accepts memory address of ERC20, ERC721 and AccessControlEnumerable abstract contracts in the constructor.
constructor(
address governance,
address erc20token,
address nftToken
) {
require((governance != address(0)) && (erc20token != address(0)) && (nftToken != address(0)), "NFTMarketplace: address(0)");
ApeCoin = IERC20(erc20token);
NFTcollection = IERC721(nftToken);
ADMIN_ROLE = keccak256("ADMIN_ROLE");
ADMIN_ROLE_ADMIN = keccak256("ADMIN_ROLE_ADMIN");
_setRoleAdmin(ADMIN_ROLE, ADMIN_ROLE_ADMIN);
_setupRole(ADMIN_ROLE_ADMIN, governance);
_setupRole(ADMIN_ROLE, governance);
}
I used Remix IDE and deployed the 3 Abstract contracts into 3 memory address and supplied these addresses to the above constructor.
However, the totalsupply of the ERC20 is 0. And there is no mint function coded.
In this case, Is the NFTMarketplace contract supposed to work? ( As there is no currency to circulate )
I'm looking to mint coins, transfer it to few users, create an NFT collection and perform marketplace operations to understand the security posture in the process.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

