AI-Native Opinion Protocol — powered by GenLayer Intelligent Contracts
Submit any opinion or proposal. AI validators evaluate it through multi-validator consensus, and the result is stored permanently on-chain. You choose whether GenLayer evaluates it or you bring your own AI.
Submit opinion → Choose AI validator → Consensus → Verdict stored on-chain
- Submit — rich text editor, up to 2000 characters, signed on-chain
- Choose validation — GenLayer LLM consensus or your own AI analysis
- Evaluate — AI produces structured analysis (summary, sentiment, key points, recommendation)
- Finalize — verdict stored permanently with a unique on-chain ID
- Lookup — anyone can query any opinion by ID, result shown directly in the page
Zero dependencies. Just Node.js ≥ 14.
git clone https://github.com/Said1235/Engagechain.git
cd Engagechain
node server.js
# Open http://localhost:3001server.js serves the frontend and proxies /api/rpc to studionet — all features work locally including submit, evaluate, and finalize.
# Option A — Vercel CLI
vercel deploy
# Option B — GitHub import
# Push to GitHub → vercel.com → New Project → import repo → DeployNo environment variables needed. Vercel auto-detects api/rpc.js as a serverless function.
| Feature | Detail |
|---|---|
| 🖊️ Rich text editor | Bold, italic, underline, lists — contenteditable with toolbar |
| 🤖 Dual AI validation | GenLayer LLM consensus or paste your own AI analysis |
| 📊 Consensus card | Emoji result card: Consensus / Decision / Confidence |
| 🔍 In-page lookup | Opinion data displayed directly in the page, not just terminal |
| 💾 Session persistence | Wallet stays connected after page refresh (localStorage) |
| ⚡ Silent stats | Total submissions loads quietly without terminal noise |
| 📺 Resizable terminal | Drag the bottom handle to resize; toggle to collapse |
Address: 0x7D361211C5C2cB0A6066D583527F45EaE544e468
Network: GenLayer Studionet
View in Studio: studio.genlayer.com
| Method | Type | Args | Returns |
|---|---|---|---|
submit_opinion |
write | text: str |
opinion ID |
evaluate_opinion |
write | opinion_id: str |
AI analysis object |
submit_with_external_ai |
write | opinion_id: str, analysis: str |
normalized AI object |
finalize_opinion |
write | opinion_id: str, verdict: str |
{id, status} |
get_total_submissions |
read | — | total count string |
get_resolution_data |
read | opinion_id: str |
full opinion object |
get_status |
read | opinion_id: str |
status string |
get_all_opinions |
read | — | all opinions dict |
def get_analysis() -> str:
raw = gl.nondet.exec_prompt(task) # LLM call — non-deterministic block
parsed = json.loads(raw)
return json.dumps(parsed, sort_keys=True) # deterministic for strict_eq
result_str = gl.eq_principle.strict_eq(get_analysis) # validators agree byte-for-byte
result_json = json.loads(result_str) # deserialize OUTSIDE nondetMultiple validators independently run the same prompt. strict_eq confirms they all produced equivalent results. No single party controls the output.
api/
rpc.js Vercel serverless proxy → studionet (dual-port 443/8443)
contract/
engagechain.py GenLayer Intelligent Contract (Python)
app.js Frontend logic
index.html UI
styles.css Styles
server.js Local dev server (no npm install)
favicon.svg EngageChain hexagon icon
vercel.json maxDuration: 60s for AI consensus calls
package.json Node 24.x engine pin
| Smart Contract | Python · py-genlayer:test |
| Network | GenLayer Studionet |
| Frontend | Vanilla JS · HTML · CSS · Orbitron + Inter + Space Mono |
| Proxy | Node.js https module · dual-port retry (443 → 8443) |
| Deploy | Vercel Serverless Functions |