The Greeter reference contract is verified on chain 771002. Use your own deployment address when verifying your contract.
Before you begin
Complete write and compile and deploy and interact. Keep your contract address, original source files and compiler settings. Verification publishes your source. Review the files before submitting, including imported sources. Never include a seed phrase, private key or credential. The existing hosted Blockscout verifier processes verification requests. You do not need a wallet connection, transaction or Test TAV payment to verify source or read contract state.Verify through the explorer
- Open Tavchain’s explorer and search for your deployed contract address.
- Open Contract, then Verify & publish.
- Select a verification method. Use Solidity (Single file) for the tutorial’s standalone Greeter source. Use Solidity (Standard JSON input) when you have the original compiler input, particularly for contracts with imports.
- If you declare a license, use the one that actually applies to your source.
- Complete the selected form with the settings used for deployment, then click Verify & publish.
- Wait for the result. Open Contract → Code and check the verification message, contract name, source and compiler settings. For this tutorial, require Contract source code verified (exact match).
Single-file Greeter
Paste the original source from write and compile without editing it. Use these values only if you deployed with the tutorial’s settings:
A contract using other settings needs its own original values. Solidity’s metadata also depends on source filenames and contents; retain both when you need an exact match.
Standard JSON input
Upload the Solidity Standard JSON input, including the original source filenames, source contents and compiler settings. Select the exact compiler version separately in the form. Source entries must contain literalcontent, rather than only URLs.
The input is different from a compiler output file, ABI, deployed bytecode or metadata file. Do not rename source entries or change optimizer/EVM settings to match this tutorial if your deployment used different values.
See Solidity’s compiler input format and Blockscout’s verification instructions.
Verify with Hardhat
The Hardhat starter provides separate configurations for deployment and source verification. From starter version 2, verify without unlocking a signing key:CONTRACT_ADDRESS with your deployment. The constructor argument above applies only to the starter’s 1,000-GLD example; use your own original arguments for another contract.
Verification does not require unlocking a signing key. The separate configuration preserves compiler/plugin/explorer settings while using a keyless HTTP connection. Selecting the deployment configuration can unnecessarily request TAVCHAIN_PRIVATE_KEY; do not provide a key just to verify source.
Keep the original npm build artifacts when verifying a Hardhat deployment. Remix and npm imports can produce different metadata.
Read the verified contract
Open Contract → Read/Write contract. Expand greet to read the current greeting. The Read control can refresh it without a wallet signature or gas payment. The setGreeting method changes state. Using it requires connecting your wallet and reviewing a transaction, as explained in deploy and interact. The demonstration contract allows anyone to change its greeting.Example contract
Open the verified Greeter example at0x065c1c017b8EF74f3B6001b51d188665bA9f4cd1 on chain 771002. Its deployment transaction succeeded, and the explorer reports an exact source match. The source file is Greeter.sol, compiled with Solidity v0.8.21+commit.d9974bed, Shanghai, optimization enabled and 200 runs.
This shared contract allows anyone to change its greeting. Its current value may differ from a tutorial’s expected initial value. To verify your own instance, retain and submit its original filenames and compiler input.
If verification fails
- Confirm you selected the correct network and contract address.
- Match the full compiler version, optimizer settings and EVM target used at deployment.
- Check source contents, filenames, imports, library addresses and any constructor arguments.
- For Standard JSON, upload the original input rather than compiler output or metadata.
- If the request result is unclear, check the contract page before submitting again.