Skip to main content
The SuperNode precompile exposes the x/supernode module to the EVM at a single fixed address. Contracts can look up registered SuperNodes, list them with pagination, rank them for a block, and read their reported hardware metrics and module parameters. The EVM is live on testnet (lumera-testnet-2) only. Mainnet runs v1.12.0 and gains the EVM with its upgrade.

Address

Lumera custom precompiles start at 0x0900. See the precompiles overview for the full address map.

SuperNode states

The currentState field in query results uses these values.

Design notes

  • Validator addresses stay strings. A lumeravaloper... address has no meaningful 20-byte EVM representation, so the ABI uses string for validator and account addresses instead of a lossy address mapping.
  • Metrics are integers. The module stores hardware metrics as floats. Solidity has no floating-point type, so the precompile rounds them to uint32 and uint64 values. Percentages are whole numbers, so 45 means 45 percent.
  • Latest state wins. The module stores state history. Queries return the latest state entry and the block height where it changed.

Solidity interface

The interface below comes from ISupernode.sol in the lumera repo.
ISupernode.sol
The precompile also implements six transaction handlers (registerSupernode, deregisterSupernode, startSupernode, stopSupernode, updateSupernode, reportMetrics) and emits SupernodeRegistered, SupernodeDeregistered, and SupernodeStateChanged events. The shipped interface exposes queries only, because operators manage SuperNodes with Cosmos SDK transactions through lumerad and sn-manager, not through the EVM. See the registration guide.

Read SuperNode state from a contract

SupernodeDashboard.sol
getParams returns the minimum stake, metric reporting thresholds, and minimum hardware requirements. Governance can change these parameters, so query them on chain instead of hardcoding values.

Call it from JavaScript

query-supernodes.ts

Behavior notes

  • Pagination. listSuperNodes caps at 100 results per call. A larger limit is silently capped, so page with offset.
  • Gas. Calls meter gas from the underlying Cosmos gas usage converted to EVM gas units. Reads through eth_call are free.
The Go implementation lives in precompiles/supernode, with a full reference in the supernode precompile doc.

Next steps

SuperNodes overview

What SuperNodes do and how they earn fees.

Action precompile

Request the actions that SuperNodes process.

CosmWasm bridge

Call CosmWasm contracts from Solidity.