Skip to main content
CC3 Testnetreading head…
Reference

Docs

Reading standing costs a storage read. Writing a fact is where the rules live.

Reading standing

The registry is append-only and the passport is a pure function of it, so standing rises and never falls. That is a property of the data model, not a policy somebody enforces.

// One storage read. No signature, no proof, no fee.
import { createVouchClient } from "@vouch/sdk";

const vouch = createVouchClient({
  registry: "0xc5c70bc6cb61ad5c2370c69c8410d3d988e82d46",
  publicClient,
});

// Three states, never two. An address with no proof is UNKNOWN,
// which is not the same claim as CLEAN.
const standing = await vouch.standing(user, "aave.repay.v1");

Three rules for writing a fact

Each of these is a mistake that produced a real bug in this codebase.

S1The precompile proves inclusion, not success
A transaction that reverted is still included in its block, and the Block Prover will happily prove it. Check receiptStatus == 1 before believing anything the receipt contains. Skipping this lets a reverted repayment count as a repayment.
S2A valid proof of a lookalike event is still valid
Anybody can deploy a contract emitting an event with your topic0 and your field layout, and a proof of that event is cryptographically sound. Pin the emitter address in the source definition, or you are trusting an event signature, which is public.
S3Proofs are public and replayable
Once a proof exists on chain anybody can resubmit it. The replay guard is keyed on the log, meaning the transaction hash plus the receipt-wide log index, never on the transaction alone, because one transaction can carry several claimable events.

chainKey is not chainId

Attestcoin addresses source chains through its own key space. On CC3 Testnet, 1 is Ethereum Sepolia and 3 is Ethereum mainnet. Neither matches the chain id you would reach for. Passing a chain id where a chainKey belongs does not revert. It proves against the wrong chain and fails silently, which is why the SDK brands the two types apart so the compiler catches the swap.

Addresses on cc3-testnet

Registry
0xc5c70bc6cb61ad5c2370c69c8410d3d988e82d46
Passport
0xd9ac99ece77b6bd8c51c00ff4c42af9c212bf3a6
Credit
0x52f0dec9cfa99cd634b3ba87fc3ed5d3c4a96720
Fee tier
0xec66d8e1330dfe2185d2dbf08e642c850bfe4202
Access
0xbc531d6c329fe6f8fabeb72ae0921b38bc0c1719
Block Prover precompile
0x0000000000000000000000000000000000000FD2