Verifying Contracts Using the Tenderly Dashboard
Learn how to verify a Smart Contract using the Tenderly Dashboard, both in private and public modes of verification.
You can verify Smart Contracts using the Dashboard UI. This allows you to gain an in-depth understanding of the Smart Contract execution.
To verify a contract, you need to provide:
- The source code of the Smart Contract
- The exact Compiler settings you used to compile the deployed version
You can upload the source code in several ways using the Dashboard:
- By pasting the source code
- By uploading the source file from your file-system
- By uploading the entire directory with all your Smart Contracts. This makes it easy to verify contracts that have imports from other files on your file-system.
When verifying Smart Contracts, you have to choose between two modes: private and public. Here's a refresher about the key differences.
Verification Status of added contracts
1. Find the unverified contract in the contract list and click the Verify button next to the verification status.
Starting contract verification
2. Choose between JSON Upload and Contract File Upload to verify the contract.
- Pick JSON Upload if you want to enter the JSON metadata generated by the Solidity compiler.
- Select Contract File upload if you want to paste the contract source code directly, upload a single source file, or upload a source directory when importing an entire project such as a Hardhat project. The latter works best for Smart Contracts that import other contracts within your local project.
File Upload Options
3. Mark the target contract in the next window and click the Make Private switch to go with private contract verification.
4. If the file contains several contracts, pick the one you wish to verify (the deployed to the address shown in step 2) and repeat the process for others if needed.
Selecting the mode ("Make Private" switch) and the contract to verify
If there are any missing contract files, a notification will show up and prompt you to add them to complete the contract verification process.
5. Fill in the compiler parameters, including the compiler version, optimization used (true/false), optimization count, EVM version (the latest set by default), and library (one or more library name-address pairs, if required).
Enter precise compiler settings. Any mismatch will result in failure to validate.
6. Click the Finish button to complete the verification.
If you add several unverified contracts to your project, it's possible to verify them in bulk. Follow these steps:
1. Click the Verify All Contracts in the Contract section. This will open a modal that lists all the unverified contracts in your project.
3. Click the Make Private switch if you want to go with private verification for any of the contracts.
4. Click the Finish button after adding the required verification information and complete the process.
Once you upload and verify the Smart Contracts, choose whether to display them all in the transaction list.