Verifying a Smart Contract
After deploying a contract (for example to a Tenderly Fork) you can verify your contract so Tenderly can decode everything into a human readable format. This is especially useful if you want to use the full power of our Debugger.
Click on the Contracts tab in the left navigation bar, and then on Add Contract in the top right after which you will be shown the following screen:

File(s) Upload

You can paste the contract source directly - alternatively you can upload a single contract file, or a folder from which Tenderly will recognize all the contracts.
This is a contract source example we will be using:
1
// SPDX-License-Identifier: MIT
2
pragma solidity ^0.8.3;
3
โ€‹
4
contract Counter {
5
uint public count;
6
โ€‹
7
// Function to get the current count
8
function get() public view returns (uint) {
9
return count;
10
}
11
โ€‹
12
// Function to increment count by 1
13
function inc() public {
14
count += 1;
15
}
16
โ€‹
17
// Function to decrement count by 1
18
function dec() public {
19
count -= 1;
20
}
21
}
Copied!
We named the contracts and pasted its source into the input field:
You can choose whether to verify your contract privately or publicly.
If the contract is verified privately, only you (and other people who you shared your project with) will be able to see and use it.
If the contract is verified publicly, it will be visible to everyone using Tenderly.
If you uploaded a folder and have multiple contracts, you can choose which one(s) you want to verify, and fill out the contract info by choosing its Network and pasting the contract address from where it was deployed.
After you add your contract, you can add other from your folder by clicking on the Add more button:
Finally you need to fill-out the compiler info, which needs to match the parameters you chose when you deployed the contract:
You can now see all of the contracts that you have verified:
And we can now see the verified contract(s) in the project contract list:

JSON Upload

You can insert the contract metadata, that is generated by default by the Solidity compiler, to upload the contract to this project:
You can choose whether to verify your contract privately or publicly.
If the contract is verified privately, only you (and other people who you shared your project with) will be able to see and use it.
If the contract is verified publicly, it will be visible to everyone using Tenderly.
If you uploaded a JSON which contains multiple contracts, you can choose which one(s) you want to verify, and fill out the contract info by choosing its Network and pasting the contract address from where it was deployed.
After you add your contract, you can add other from your folder by clicking on the Add more button.
Finally you need to fill-out the compiler info, which needs to match the parameters you chose when you deployed the contract:
You can now see all of the contracts that you have verified:
And we can now see the verified contract(s) in the project contract list:
Last modified 1mo ago
Copy link