reading clockPractice board
Build Developers

Build on Tenhertz

Everything here reads the Practice Field, the HertzMiner contract running on Elysium (chain id 99901). The $HZ miner will use the same contract and the same calls at a new address.

Quickstart

1. Read a roundThe current round, its seed, its target and the previous round's best, as JSON.
2. Mine one roundThe command-line miner finds a solution and checks it with eth_call. No key, nothing sent.
3. SubmitRun it again with a key that holds a little HYPE, or send submit from your own code.
1. Read a round
curl -s https://10hz.xyz/api/round
2. Mine one round (Node.js 22 or later)
mkdir tenhertz && cd tenhertz
curl -sO https://10hz.xyz/miner/core.js -sO https://10hz.xyz/miner/tenhertz-miner.mjs
echo '{"type":"module"}' > package.json && npm i viem
node tenhertz-miner.mjs --dry-run --once

Contracts and ABIs

ContractAddress on ElysiumABI
HertzMiner (Practice Field)0x1CC87a4D72500EF0E30957e75f7fd5837B361a01HertzMiner.json
PracticeHZ (points)0x09A4322b9857FC53a6035D35C009d752E4F575D9PracticeHZ.json
InterfaceSolidity, the calls a miner, relayer or reader needsIHertzMiner.sol
HertzMiner ($HZ)Next. Deployed after the token, same ABIHertzMiner.json

Both contracts are verified on the Elysium explorer. RPC https://rpc.elysium.kinetiq.xyz, gas in HYPE. The contracts are unaudited.

The hash

A solution for round r is a nonce such that:

uint256(keccak256(abi.encode(seed, miner, r, nonce))) < target
InputTypeBytesWhere it comes from
seedbytes320 to 31challengeFor(r), fixed for an epoch of 600 rounds
mineraddress32 to 63the address credited, left-padded to 32 bytes
ruint25664 to 95the round: an Elysium block number
nonceuint25696 to 127anything you choose

The 128 bytes are hashed with keccak256 (Ethereum's, not SHA3-256) and compared as a big-endian integer. target also comes from challengeFor(r). It moves every 600 rounds toward two solutions a round, by at most ×4 or ÷4.

The round number is ArbSys(100).arbBlockNumber(), the same number eth_blockNumberreturns on the Elysium RPC. Round r accepts a submission while r <= block <= r + 32. The lowest hash wins. challengeFor answers for future rounds too, including the next epoch, so a miner can work ahead and submit when the round opens.

Command-line miner

Two files, plain JavaScript, worker threads. It mines a round about 120 blocks ahead, waits for it to open, checks the best hash so far and submits inside the window.

Install and check one round
mkdir tenhertz && cd tenhertz
curl -sO https://10hz.xyz/miner/core.js -sO https://10hz.xyz/miner/tenhertz-miner.mjs
echo '{"type":"module"}' > package.json && npm i viem
node tenhertz-miner.mjs --dry-run --once
Mine for real (the key pays gas)
MINER_PRIVATE_KEY=0x... node tenhertz-miner.mjs --threads 8
# --miner 0x...   credit another address (the work is bound to it)
# --once          stop after the first submission
# --dry-run       check each solution with eth_call and send nothing

Source: tenhertz-miner.mjs and core.js, the same keccak core the browser miner runs.

Solidity

Read the round and test a nonce on chain
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import {IHertzMiner} from "./IHertzMiner.sol"; // https://10hz.xyz/abi/IHertzMiner.sol

contract RoundReader {
    IHertzMiner constant MINER = IHertzMiner(0x1CC87a4D72500EF0E30957e75f7fd5837B361a01);

    /// The open round, its challenge, and whether a nonce solves it for `miner`.
    function check(address miner, uint256 nonce) external view returns (uint256 round, bool solves) {
        round = MINER.currentRound();
        (bytes32 seed, uint256 target) = MINER.challengeFor(round);
        solves = uint256(keccak256(abi.encode(seed, miner, round, nonce))) < target;
    }
}

viem

Read rounds, compute the hash, check a submission
import { createPublicClient, http, defineChain, encodeAbiParameters, keccak256 } from "viem";

const elysium = defineChain({
  id: 99901,
  name: "Elysium",
  nativeCurrency: { name: "HYPE", symbol: "HYPE", decimals: 18 },
  rpcUrls: { default: { http: ["https://rpc.elysium.kinetiq.xyz"] } },
});
const MINER = "0x1CC87a4D72500EF0E30957e75f7fd5837B361a01"; // HertzMiner, Practice Field
const abi = await (await fetch("https://10hz.xyz/abi/HertzMiner.json")).json();
const client = createPublicClient({ chain: elysium, transport: http() });

// 1. read the open round, its challenge and the best hash of the round before
const round = await client.readContract({ address: MINER, abi, functionName: "currentRound" });
const [seed, target] = await client.readContract({ address: MINER, abi, functionName: "challengeFor", args: [round] });
const [winner, best] = await client.readContract({ address: MINER, abi, functionName: "bestOf", args: [round - 1n] });
console.log({ round, seed, target, previous: { winner, best } });

// 2. the rule the contract checks: keccak256(abi.encode(seed, miner, round, nonce)) < target
const hashOf = (seed, miner, round, nonce) =>
  BigInt(keccak256(encodeAbiParameters(
    [{ type: "bytes32" }, { type: "address" }, { type: "uint256" }, { type: "uint256" }],
    [seed, miner, round, nonce],
  )));

// 3. a nonce from your miner: check it with eth_call, then send the same call from any funded key
async function check(miner, round, nonce) {
  const [s, t] = await client.readContract({ address: MINER, abi, functionName: "challengeFor", args: [round] });
  if (hashOf(s, miner, round, nonce) >= t) return "above target";
  const { result } = await client.simulateContract({
    account: miner, address: MINER, abi, functionName: "submit", args: [miner, round, nonce],
  });
  return "accepted, hash 0x" + result.toString(16).padStart(64, "0");
  // walletClient.writeContract({ address: MINER, abi, functionName: "submit", args: [miner, round, nonce] })
}

Read API

Plain JSON, no key, CORS open to every origin. Each response is cached at the edge for the time shown, then read again from the contract.

EndpointReturnsCache
GET /api/headthe Elysium block number, which is the open round1 s
GET /api/roundround, seed, target, reward, window, previous round's best1 s
GET /api/epochepoch, target, settled rounds, solutions-a-round estimate, points mined5 s
GET /api/boardrounds won per miner, and the last 50 winning hashes20 s
GET /api/miner/{address}settled rounds won and points credited5 s

A read that finds the RPC busy answers {"status":"busy","retryAfter":1} with status 200. Retry after a second.

MCP server

A Model Context Protocol server over Streamable HTTP at https://10hz.xyz/api/mcp. Tools: current_challenge, best_of, submit_calldata, miner_stats. It never signs: an agent sends the calldata from its own funded account.

Client config (Claude Desktop, Cursor and others)
{
  "mcpServers": {
    "tenhertz": { "type": "http", "url": "https://10hz.xyz/api/mcp" }
  }
}
Claude Code
claude mcp add --transport http tenhertz https://10hz.xyz/api/mcp
Plain HTTP
curl -s -X POST https://10hz.xyz/api/mcp \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"current_challenge","arguments":{}}}'

llms.txt

/llms.txt sums up the protocol, the addresses and every endpoint in one plain-text file for AI agents. The chapters behind it start at the docs overview.