Files
smom-dbis-138/docs/04-configuration/CRONOS_EXPLORER_OPERATIONS.md
2026-03-02 12:14:09 -08:00

5.1 KiB

Cronos Explorer Operations

Reference for Cronos Explorer API, contract verification, and deployment confirmation based on official Cronos docs.


Overview

Resource URL
Explorer https://explorer.cronos.org
API Docs https://explorer-api-doc.cronos.org/mainnet
API Base https://explorer-api.cronos.org/mainnet/api
Contract Verification https://explorer.cronos.org/verifyContract

API Key (CRONOSCAN_API_KEY)


API Format

Per Cronos docs:

GET https://explorer-api.cronos.org/mainnet/api/v1/{module}/{action}?apikey={key}

Working endpoint (tested):

  • api/v1/ethproxy/getBlockNumber — returns current block

Blockscout-style (?module=X&action=Y) is documented at cronos.org/explorer/api-docs. Forge verify-contract --verifier blockscout is incompatible (Cronos API path/format differs). Use manual verification at explorer.cronos.org/verifyContract.


Contract Verification

Per Contract Deployment and Verification:

2. Programmatic (Hardhat)

3. Foundry

  • forge verify-contract --verifier blockscout fails (Cronos Explorer API format differs)
  • Run ./scripts/deployment/verify-cronos-contracts.sh to attempt; falls back to manual verification
  • Recommended: Manual verification via the web interface above

Deployed Contracts (Cronos Chain 25)

Contract Address
WETH9 0x99B3511A2d315A497C8112C1fdd8D508d4B1E506
WETH10 0x3304b747E565a97ec8AC220b0B6A1f6ffDB837e6
CCIPWETH9Bridge 0x8078A09637e47Fa5Ed34F626046Ea2094a5CDE5e
CCIPWETH10Bridge 0x105F8A15b819948a89153505762444Ee9f324684

Confirmation Tasks

On-chain confirmation (RPC)

Use eth_getCode to confirm contracts have bytecode:

RPC="https://evm.cronos.org"
for addr in 0x99B3511A2d315A497C8112C1fdd8D508d4B1E506 0x3304b747E565a97ec8AC220b0B6A1f6ffDB837e6 0x8078A09637e47Fa5Ed34F626046Ea2094a5CDE5e 0x105F8A15b819948a89153505762444Ee9f324684; do
  code=$(cast code $addr --rpc-url $RPC 2>/dev/null)
  echo "$addr: $([ ${#code} -gt 10 ] && echo 'OK' || echo 'MISSING')"
done

API confirmation

./scripts/deployment/check-cronos-api.sh   # Tests CRONOSCAN_API_KEY, block number

Manual verification

  1. Run ./scripts/deployment/export-cronos-verification-sources.sh to generate flattened sources in .cronos-verify/
  2. Follow the step-by-step runbook: docs/deployment/CRONOS_VERIFICATION_RUNBOOK.md
  3. Check status: ./scripts/deployment/check-cronos-verification-status.sh
  4. Or: Open https://explorer.cronos.org/verifyContract, enter address, select compiler/optimization, paste flattened source

Cronos Explorer API Operations (per cronos.org/explorer/api-docs)

The Blockscout-style API supports:

Module Actions Description
account balance, balancemulti, txlist, txlistinternal, tokentx, tokenbalance, tokenlist, getminedblocks, listaccounts, eth_get_balance, pendingtxlist Account balances, transactions
logs getLogs Event logs
token getToken, getTokenHolders ERC-20/721 info
stats tokensupply, ethsupply, ethsupplyexchange, coinsupply, coinprice, totalfees Supply and price
block getblockreward, getblocknobytime, eth_block_number Block data
contract getsourcecode, getabi ( Blockscout) Contract source/ABI

Note: Actual base URL for module/action format on Cronos may differ; explorer.cronos.org/api returns HTML. Use RPC for reliable on-chain checks.


  • scripts/deployment/check-cronos-api.sh — Test API key, block number, list deployed addresses
  • scripts/deployment/export-cronos-verification-sources.sh — Export flattened source for manual verification
  • scripts/deployment/check-cronos-verification-status.sh — Check deployment status and verification links
  • scripts/deployment/verify-deployed-contracts.sh — Avalanche/Arbitrum automated; Cronos manual instructions
  • scripts/deployment/check-balances-gas-and-deploy.sh — Balance check includes Cronos
  • docs/deployment/CRONOS_VERIFICATION_RUNBOOK.md — Step-by-step manual verification with addresses and constructor args