Appearance
Verifying contracts
Verifying publishes a contract's source alongside its bytecode, so anyone can read what the contract does and call it from the explorer.
Why verify
- Users can read the code rather than trusting a description of it.
- The explorer decodes transaction input and event logs into readable names.
- A read and write interface appears on the contract's page.
- Integrators get the ABI without asking you for it.
Every platform contract — the AMM factory and router, the governance contracts, the launchpad — is verified.
What you need
| Contract address | Where it is deployed |
| Source | The exact source that produced the deployed bytecode |
| Compiler version | Exactly the one used |
| Optimisation | Enabled or not, and the runs count |
| Constructor arguments | ABI-encoded, if the constructor took any |
The source must match exactly
Verification compiles your source and compares the result against the deployed bytecode. A whitespace change is fine; a different compiler version, a different optimiser setting or a changed import is not. Keep the exact source that was deployed.
Verifying through the explorer
- Open the contract address in the explorer.
- Choose to verify, and select how you will supply the source — flattened source, standard JSON input, or multi-part files.
- Supply the compiler version and optimisation settings used at deployment.
- Add the ABI-encoded constructor arguments if the constructor took any.
- Submit. On success the source appears immediately.
Standard JSON input is the most reliable route, because it captures the compiler settings and every import exactly as the compiler saw them. Hardhat and Foundry both emit it as a build artefact.
After verification
bash
curl -s https://api.testnet.kriptonyx.com/api/v2/smart-contracts/0xYourContractreturns the source and ABI, which you can feed straight into ethers.js.
If verification fails
| Symptom | Likely cause |
|---|---|
| Bytecode mismatch | Wrong compiler version, or optimisation settings differ from deployment |
| Missing imports | Use standard JSON input, or flatten the source first |
| Constructor mismatch | Arguments not ABI-encoded, or in the wrong order |
| Metadata hash differs | Source differs in a way the compiler records — confirm you have the deployed source, not a later edit |