Detailed Guide to Verify the "SunFlower" NFT Smart Contract on flascan
This guide will walk you through the process of verifying the "SunFlower" NFT smart contract on Blockscout, using the example contract that was previously deployed. Verifying your contract ensures transparency and allows others to view the source code and interact with the contract.
Prerequisites
- Remix IDE: Your contract should be deployed via Remix IDE.
- Source Code: Your smart contract source code and its dependencies. (e.g., SunFlower NFT Collection
0x9FC12F47Bf48ECF3C16b90551be372a7F31764cB
) - Flascan: https://testnet.flascan.net (opens in a new tab).
If you have not already deployed the contract, please refer to the instructions provided Deploying an ERC-721 NFT Collection.
Step 1: Obtain Contract Details
SunFlower NFT Example:
Contract: 0x9FC12F47Bf48ECF3C16b90551be372a7F31764cB
Step 2: Flatten the Contracts
Go to Remix (opens in a new tab).
- Right-click on the
SunFlower.sol
file in the Remix file explorer. - Select "Flatten" from the context menu.
- Remix will generate a flattened version of the contract
sunflower_flattened.sol
and open it in a new file.
Step 3: Start Verification on flascan
-
Go to contract SunFlower (opens in a new tab).
-
On the contract page, click on the “Verify & Publish” button.
-
Enter Verification Details:
-
Contract license
Select "No License"
-
Verification method
Solidity (Flattened source code)
-
Compiler
v0.8.26+commit.8a97fa7a
-
EVM Version
paris
-
Optimization enabled
200
-
Contract code
Copy and paste
sunflower_flattened.sol
. -
Verify & Publish
Submit your contract for verification.
The page should be like:
Step 4: Verification Status
-
Wait for Verification:
Wait for Blockscout to process the verification.
If successful, your contract source code and ABI will be publicly available on flascan.
-
Troubleshooting:
If verification fails, check for common issues such as mismatched compiler versions, incorrect optimization settings, or incorrectly entered constructor arguments.
Well done! Congrats on successfully verifying your contract! 🎉