Realbits is developing NFT for renting and prompting images. This time, we will describe the normal NFT building process.
Realbits relies on OpenZeppelin open source for building NFT. OpenZeppelin provides a complete solution for NFT smart contracts, as well as a wizard for making them. Realbits uses Mintable with Auto Increment Ids, Burnable, Pausable, Enumerable, and Roles option. Realbits has three special functions.
First function is Roles of access control. Realbits uses DEFAULT_ADMIN_ROLE, PAUSER_ROLE, MINTER_ROLE, and SETTER_ROLE. MINTER_ROLE gives an account the ability to mint NFT contracts. If an account has DEFAULT_ADMIN_ROLE, it can grant or revoke the role to other accounts.
The second function is safeMintAmount. Miners can use this function to mint NFT by amount at a time.
Third one is setBaseURI. Setter who has SETTER_ROLE can set base uri of token.
Realbits will soon release this NFT source code on GitHub and start to release NFT with this smart contract.