How to read a NFT Smart Contract ?
NFTs are minted through smart contracts.
Smart Contract is a program that executes code on the blockchain when conditions are met. Parties sign the contract digitally, giving it permission to execute.This could be anything from fractionalizing an NFT, assign ownership, manage transferability or any other functionality depending on your specific requirement.
When someone creates or mints an NFT, they execute code stored in smart contracts that conform to different standards, such as ERC-721.
Why you should read the Smart Contract ?
As NFT use cases are expanding, it’s also getting exposed to scams.Lot of additional functionality and provisions can be coded into smart contracts, some of which may harm your interests.
In the physical world before signing any contract you read it carefully , same holds true for smart contracts in web3.0
How do you find a smart contract?
To look up an NFT contract, navigate to the listing on OpenSea and tap “Details.” This reveals a “Contract address” link.
Click it.
Ethereum contracts, transactions, and wallets are browsable on @etherscan
Lots to look at here, so let’s break it down.
Balance + Value- This shows how much coin the contract holds.
My Name Tag- you can create private notes to yourself here
Creator- The wallet that created the contract, and a link to the original tx. Let’s click it.
When you click the original transaction You can see details on the transaction that created the contract:
Transaction confirmation
Timestamp
Quantity minted of each token
Contract creator
Fees paid
Now, back to the main contract.
Click on Tracker
Tracker gives insight into:
-minimum token value
-max total supply of the token (if a maximum has been set)
-how many wallets hold the token
-how many transfers have occurred
Very valuable info. But there’s another cool thing here that most people don’t know about
Click “Holders” in the list of tabs.
This displays a ranking of who holds the most tokens in the contract. If you click “Token Holders Chart,” you can even see a chart. 📊👀
👉 OK, back to the main contract page.
Let’s dive into the “Transactions” tab.
Column 1 is a chronological list of all transactions. Each can be clicked into.
Next is “Method.” These are functions executed via the contract. Every contract is different, but common methods include mint, transfer, and approval setting
Now, let’s investigate the “Contracts” tab.
Code: Displays the contract’s source code.
Read Contract: Displays the functions.
Write Contract: Allows you to initiate functions (if your wallet has permission) like burning tokens, granting roles, pausing, and more.
Finally, let's check “Analytics.”
Here, we find charts showcasing transactions, fees, ETH balance, and more. The chart below highlights the rise of Cryptopunks.
Also check @nansen_ai for more detail on volume, project wallet overlaps, notable token holders, and more.
That concludes NFT Contract Reading 101! Now you're better equipped to interact with web3 contracts.
Acknowledgement
This article is based on tweets of Chris Cantino @chriscantino