Integrate
Everything goes through immutable contracts and one view function. No API key, no trust between projects.
From a contract
interface IOathRegistry {
struct Oath {
uint256 score; // 0-100
uint256 supplyPts; uint256 durationPts; uint256 lpPts;
uint256 tithePts; uint256 executedPts; // hundredths
uint256 circulating; uint256 lockedSupply; uint256 lockPositions;
uint256 avgRemaining; // seconds
address pair; uint256 lpBurnedBps; uint256 lpLockedBps;
address router; uint256 shareBps;
uint256 executed30d; uint256 pendingBuyback; // HYPE wei
}
function getOath(address token) external view returns (Oath memory);
function getOaths(address[] calldata tokens) external view returns (Oath[] memory);
function score(address token) external view returns (uint256);
}From a front end
import { createPublicClient, http } from "viem";
const score = await client.readContract({
address: "0x7f9e73a0254805bb0e224923C323966C08e55722",
abi: [{ type: "function", name: "score", stateMutability: "view",
inputs: [{ name: "token", type: "address" }],
outputs: [{ type: "uint256" }] }],
functionName: "score",
args: [token],
});Or over HTTP: GET /api/oath/<token> returns the same struct as JSON (CORS open, cached 30 s).
Badge
GET /api/badge/<token> returns a 220×36 SVG with the live score. Every oath page has a copy-paste embed snippet.
Launchpads: “lock with Horkos” at graduation
- Offer a checkbox at graduation. If checked, call
HorkosLocker.lockMany(token, grants)with the creator’s chosen schedule (the creator must have approved the locker). - Offer “route X% of my fees to buybacks”: call
TitheFactory.createRouter(token, creator, shareBps, mode, duration)and set the returned router as the token’s creator-fee recipient. - Show the badge on the token page and link to its oath page.
Terminals
Batch scores with getOaths(tokens) and show them next to each token; offer a filter “oath score ≥ X”. For perps, the unlock calendar (positionsOf(token) + getPosition(id)) tells traders when a large unlock is coming.
Events
Listen to Locked, Released, Extended, ToppedUp on HorkosLocker, RouterCreated / PrimaryRouterChanged on TitheFactory, and FeesAccounted, Executed, ShareRaised on each router. Any of them can change a score.