At this point, your contract should be deployed and you should have your contract’s address copied. Paste it in the Polygon Mumbai block explorer: https://mumbai.polygonscan.com/.
You might notice that the contract tab on PolygonScan doesn’t have a copy of your contract code like blockchain scanner sites (like Etherscan) might.
To fix this, we can give PolygonScan our contract code so that it:
Using the search bar, paste the contract deployment address shown inside your terminal.
Click the ‘Contract’ tab on PolygonScan and hit ‘Verify and publish’.
Select 'single file' and the correct compiler that matches your contract. In our case, it's 0.8.4 and 'MIT license'. Double check for your solidity version and license type for your own case.
Finally, copy everything from your smart contract file and paste it into the box on PolygonScan, and hit 'verify and publish.' You will get brought to a new page that shows a Compiler Output tab. It should say something similar to: Note: Contract was created during TxHash# 0x0f5b4cf1be68a6b82fc88f1d6a9431b40e9662e16ee68a82fe31489bbec99eeb
and Successfully generated ByteCode and ABI for Contract Address
if the contract was successfully verified.
You did it! This process of creating scripts, deploying, and verifying is something you will use in all of your future projects, and now you know exactly how to do it. Hit the Share button below to document your #30DaysOfWeb3 and drop the link to your tweet in #builders-hype to enter the raffle for a giveaway.
Writers: Cami, Sarah Schwartz, Editors: Kristen