news_curator.py is a GenLayer Intelligent Contract: a
Python contract whose validators can browse the web and run LLM inference, reaching
consensus on the result (the "equivalence principle"). Rota uses it as an on-chain,
AI-curated news desk:
arccategory — best news for the Arc ecosystem (Arc L1, Circle, USDC, stablecoin payments).rotacategory — news for Rota's domain: ROSCAs / chit funds / group savings, financial inclusion, stablecoin remittances.
Each refresh_news() transaction makes validators fetch live sources — two
Google News queries plus the news sections of CoinMarketCap, CoinGecko,
and TradingView — ask an LLM to pick and summarize the most relevant
stories, agree on the result (non-comparative equivalence principle, so slightly
different fetches per validator are fine), and store it on-chain as JSON. The app's /news page reads it with
genlayer-js — no backend, no API keys
in the frontend.
| Contract | Network | Address |
|---|---|---|
RotaNewsCurator |
GenLayer studionet | 0xDFEE06117b8d91b5b3e17Bfb09C6C0592ea71690 |
This is the address in .env.example; the app reads it via
VITE_GENLAYER_NEWS_CONTRACT. Studionet resets occasionally — if reads start
failing, redeploy per below and update the variable.
-
Open GenLayer Studio and connect/create an account (studionet is free — no gas token needed).
-
Create a new contract, paste the contents of
news_curator.py, and Deploy (the constructor takes no arguments). -
Copy the deployed contract address (
0x…). -
In the repo root
.env.local, add:VITE_GENLAYER_NEWS_CONTRACT=0xYourDeployedAddress
-
Restart
pnpm dev. The News page now reads from your contract. -
Seed it: either call
refresh_newsfrom the Studio UI, or use the Refresh on-chain button on the /news page (it signs with a free local burner account — fine on studionet).
Alternative: the GenLayer CLI
(npm i -g genlayer, genlayer init, genlayer deploy) deploys the same file.
- Curation quality and feed availability depend on the validators' LLM and web
access;
refresh_newscan take ~30–60 s to finalize while consensus runs. - Anyone may call
refresh_news— acceptable for a testnet news feed; gate it behind an owner address before any production use. - Studionet resets occasionally; redeploy and update
VITE_GENLAYER_NEWS_CONTRACTif reads start failing.