Skip to content
Coltra
My account
Coltra / DevelopersRobinhood Chain · reading…

Build on the plan book.

One small contract, public data sources, and a JSON format anyone can read and check.

ColtraPlanBook
Status
deployed
Address
0x8371581d17abbcac69e48d34b5d60623fefab1ff
Chain
Robinhood Chain (4663)
Constructor
none
Owner / fees / upgrade
none / none / none
Holds funds
never (no payable function)
Save gas (typical)
~290,000

Functions

  • savePlan(string json) → planId: a JSON object, 2 to 4,096 bytes.
  • updatePlan(planId, json) → version: owner only, content must change.
  • retirePlan(planId): owner only; history stays readable.
  • getPlan, plans, plansOf, versionBlocks, matchesCurrent, chainBlock
  • PlanSaved(planId, owner, version, contentHash, json, chainBlock), PlanRetired(planId, owner, version, chainBlock)

Read a plan from chain alone

Call getPlan(id) for the header and versionBlocks(id, 0, 100) for the block of each version. Ask any Robinhood Chain RPC for eth_getLogs at exactly that block with topics [PlanSaved, id]; the event carries the JSON. keccak256(json) must equal contentHash. Block numbers here are the chain's own (read from ArbSys), the same numbers its RPC uses.

Plan JSON

Keys in this order, no whitespace: v (1), name, market (32-byte market id or empty), debt {symbol, amount}, collateral [{symbol, amount, lltv}], alerts {hfBelow, prices: [{symbol, below, above}]}, note. Numbers keep twelve significant digits. Any wallet can write any JSON, so readers validate before trusting it.

Verify a deployment

The repository ships npm run verify-deployment -- --book <address> --book-tx <tx>: it compares the deployed runtime code with the compiled artifact and checks the creation transaction. The public repository link appears here once it is published.

Data sources