Skip to main content

Verify a contract

Khromosome runs a self-hosted Sourcify instance so you can verify your deployed contracts and publish their source + metadata.

  • Sourcify: https://sourcify.khromosome.network
  • Explorer: verified contracts show their source on https://explorer.khromosome.network.

With Foundry

forge verify-contract \
--rpc-url https://rpc.khromosome.xyz \
--verifier sourcify \
--verifier-url https://sourcify.khromosome.network/server \
<DEPLOYED_ADDRESS> \
src/MyContract.sol:MyContract

With Hardhat

Use the Sourcify plugin (@nomicfoundation/hardhat-verify with Sourcify enabled) and point it at the Khromosome Sourcify server:

// hardhat.config.ts
sourcify: {
enabled: true,
apiUrl: 'https://sourcify.khromosome.network/server',
browserUrl: 'https://sourcify.khromosome.network',
},
npx hardhat verify --network khromosome <DEPLOYED_ADDRESS> [constructor args]

A full match means the on-chain bytecode and your source + metadata agree exactly; a partial match allows for metadata differences. After verification, the contract's source is viewable on the explorer.