Analyzing Pepsi NFT’s Smart Contract | by Sicong Zhao | Jan, 2022

NFT tutorial for beginners

Pepsi’s NFT collection
Fig.1 Screenshot of Etherscan contract page
Fig.2 The structure of Pepsi NFT contract

(1) Constructor

(2) Mint

require(saleStarted == true, "The sale is paused");
require(msg.sender != address(0x0), "Public address is not correct");
require(alreadyMinted[msg.sender] == false, "Address already used");
require(micDropsId <= maxMint, "Mint limit reached");
_safeMint(msg.sender, micDropsId++);
alreadyMinted[msg.sender] = true;

(3) Update URI

(4) Other Parts

Want to Connect?Please feel free to reach out (my LinkedIn) if you have any questions, feedback, or even just a random chat.

Leave a Comment