Overview
Thetenderly contracts verify command uploads and verifies your smart contracts on Tenderly. Unlike push, this command only verifies the contracts without enabling active monitoring.
Use
verify when you only need contract verification for debugging existing transactions. Use push when you want both verification and active monitoring of new transactions.Usage
Prerequisites
Flags
A comma-separated list of network IDs to verify. Only contracts deployed to the specified networks will be verified.Common Network IDs:
1- Ethereum Mainnet5- Goerli Testnet11155111- Sepolia Testnet137- Polygon Mainnet80001- Polygon Mumbai Testnet56- BNB Smart Chain Mainnet97- BNB Smart Chain Testnet42161- Arbitrum One421614- Arbitrum Sepolia10- Optimism Mainnet8453- Base Mainnet
Configuration
Configure yourtenderly.yaml file:
tenderly.yaml
Examples
Verify All Contracts
Verify all deployed contracts in your build directory:Verify Specific Networks
Verify contracts deployed only to Ethereum Mainnet and Polygon:Verify Testnet Contracts
Verify contracts on test networks:Verification Process
When you run the verify command:Upload to Tenderly
Contract source code, ABI, and metadata are uploaded to Tenderly servers for verification.
What Gets Verified
The verification process includes:- Source code: Solidity files with original structure
- Contract ABI: Interface definitions
- Bytecode: Compiled contract code
- Compiler settings: Version, optimization, and other metadata
- Dependencies: Imported libraries and contracts
Verify vs Push
tenderly contracts verify
Use when:
- You only need source code verification
- Debugging specific past transactions
- One-time contract verification
- No monitoring needed
tenderly contracts push
Use when:
- You want transaction monitoring
- Need real-time alerts
- Tracking contract activity
- Active development/production
Troubleshooting
No contracts detected in build directory
No contracts detected in build directory
Cause: Missing or invalid build artifacts.Solution:
No migrated contracts detected
No migrated contracts detected
Cause: Contracts haven’t been deployed to any network.Solution:
- Deploy contracts to a network first
- Ensure deployment information is in build artifacts
- For OpenZeppelin projects, run:
Wrong folder structure detected
Wrong folder structure detected
Cause: CLI can’t find framework configuration files.Solution:
- Ensure you’re in the project root directory
- Use
--project-dirflag to specify directory: - Or use
--forceflag to bypass structure check:
Some contracts not verified
Some contracts not verified
Cause: Contracts may be on unsupported networks or have issues.Solution:
- Check the network IDs in error output
- Verify deployment addresses are correct
- Ensure all networks are supported by Tenderly
- Check compiler version compatibility
Supported Frameworks
The verify command works with:- Hardhat: Reads from
artifacts/directory - Truffle: Reads from
build/contracts/directory - Foundry: Reads from
out/directory - Brownie: Reads from
build/contracts/directory - OpenZeppelin: Requires special setup (see troubleshooting)
Advanced Usage
Verify with Project Directory Flag
Specify a custom project directory:Force Verification
Bypass directory structure validation:Verify Specific Network Deployments
Combine with network filtering for precise control:Network ID Reference
Common network IDs for verification:| Network | Chain ID | Network ID |
|---|---|---|
| Ethereum Mainnet | 1 | "1" |
| Sepolia | 11155111 | "11155111" |
| Polygon | 137 | "137" |
| Polygon Mumbai | 80001 | "80001" |
| BSC | 56 | "56" |
| Arbitrum One | 42161 | "42161" |
| Optimism | 10 | "10" |
| Base | 8453 | "8453" |
| Avalanche C-Chain | 43114 | "43114" |
Network IDs should be passed as strings in the
--networks flag.Best Practices
- Verify immediately after deployment: This ensures your contracts are debuggable right away
- Use network filters: Only verify networks you’re actively working with
- Keep build artifacts: Don’t delete build directories between deployment and verification
- Check framework compatibility: Ensure your framework is supported
- Upgrade to push: Consider using
pushinstead if you need monitoring
Related Commands
tenderly contracts push- Push and monitor contractstenderly contracts remove- Remove verified contractstenderly init- Initialize project configurationtenderly login- Authenticate with Tenderly