Add contract to project
Add a smart contract to a Tenderly project.
Note: If a contract is unverified on both Tenderly and external providers like Etherscan, Blockscout, or Routescan, it will be added to the project as unverified. However, if the contract is verified on an external provider, Tenderly will retrieve and apply the verification, subsequently adding the verified contract to the project.
Path parameters
Account slug of the user
Project slug of the account
Request body
Example request
{
"network_id": "1",
"address": "0x94C87A7b26980AE7AAA361c5C7e03E632ab36e6C",
"display_name": "My new contract name"
}Response
A successful response.
An object with details about added contract.
Example response
{
"id": "eth:1:0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c",
"contract": {
"id": "eth:1:0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c",
"contract_id": "eth:1:0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c",
"network_id": "1",
"public": true,
"verified_by": "etherscan",
"address": "0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c",
"contract_name": "ERC20ByMetadrop",
"type": "contract",
"compiler_version": "v0.8.21+commit.d9974bed",
"optimizations_used": true,
"optimization_runs": "200",
"created_at": "2023-12-08 22:36:21 +0000 UTC",
"language": "solidity"
},
"account": {
"id": "eth:1:0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c",
"contract_id": "eth:1:0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c",
"network_id": "1",
"public": true,
"verified_by": "etherscan",
"address": "0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c",
"contract_name": "ERC20ByMetadrop",
"type": "contract",
"compiler_version": "v0.8.21+commit.d9974bed",
"optimizations_used": true,
"optimization_runs": "200",
"created_at": "2023-12-08 22:36:21 +0000 UTC",
"language": "solidity"
},
"project_id": "1830efff-aa75-481e-b464-cedaf8b90960",
"added_by_id": "7d5e8b1f-8bf8-4eae-a70f-fb7d354b1cc2",
"details_visible": true,
"include_in_transaction_listing": true,
"display_name": "My new contract name",
"account_type": "contract",
"added_at": "2023-12-08 22:36:26.410442295 +0000 UTC m=+33221.750982874"
}Changes
Changed in 2 of the 4 revisions of this API.61
- ●
added the new
rid:simulation_draftenum value to the//response property for the response statusresponse-property-enum-value-added
- ●
added the new
rid:simulation_draftenum value to the//response property for the response statusresponse-property-enum-value-added
- ●
added the new
rid:simulation_draftenum value to the//response property for the response statusresponse-property-enum-value-added
- ●
added the new
rid:simulation_draftenum value to the//response property for the response statusresponse-property-enum-value-added
- ●
added the new
rid:simulation_draftenum value to the//response property for the response statusresponse-property-enum-value-added
- ●
added the new
rid:simulation_draftenum value to the//response property for the response statusresponse-property-enum-value-added
- ●
- ○
added the non-success response with the status
response-non-success-status-added
This revision also has 9 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○