← Back to systems
Provenance Registry ↗

On-Chain Attestation Registry

SolidityHardhatHardhat IgnitionReactTypeScriptViteethers.jsTailwind CSSFramer MotionEthereum Sepolia

An owner-gated Solidity registry that appends immutable, timestamped keccak256 attestation records on Ethereum, with client-side document verification and no backend infrastructure.

GitHub ↗
01 / SYSTEM MODELSYSTEM TOPOLOGY

The registry is a single Solidity contract with no imports and no external contract dependencies — no backend, no database, no indexer, no server-side blockchain service. The frontend communicates with the contract directly through the user's wallet.

OWNER
REGISTER
APPEND
VERIFY
EXPLORE
Owner-gated registrationAppend-only provenance recordsTimestamped metadataAudit-document hashingCommit-hash metadataPublic historical readsClient-side verification
02 / ARCHITECTUREDIRECT CLIENT → CHAIN PATH

The client talks directly to the contract through the user's wallet — there is no backend, database, or indexing layer between them.

CLIENTReact + TypeScript + Vite

Wallet interaction, registration UI, PDF hashing, verification, and history exploration.

WEB3ethers.js v6

Provider, signer, contract abstraction, transaction submission, contract reads, and Keccak hashing.

CONTRACTProtocolProvenanceRegistry.sol

Authorization, record validation, append-only storage, ownership, public reads, and event emission.

BLOCKCHAINEthereum Sepolia

Canonical storage for registered provenance records.

03 / CONTRACT MODELPROTOCOL RECORD

Every registration appends one ProtocolRecord to the calling protocol's history. The contract stores and preserves these submitted claims — it does not independently verify the PDF contents, the auditor's identity, the Git commit, or the relationship between contractAddress and the audited code.

protocolName

Free-form protocol identifier.

contractAddress

Mapping key for the protocol's history.

version

Free-form version string.

auditHash

bytes32 document fingerprint.

commitHash

bytes32 caller-supplied code-revision metadata.

auditor

Free-form attribution.

timestamp

Assigned by block.timestamp.

04 / REGISTRATION FLOWAUTHORIZED WRITE PATH

Registration is restricted to the current contract owner through onlyOwner.

OWNERWALLET
REGISTERUI
METAMASK
REGISTER-PROTOCOL-RECORD()
APPEND TOSTORAGE
PROTOCOL-REGISTERED
05 / VERIFICATION FLOWCLIENT-SIDE INTEGRITY PATH

Verification is read-only and requires no transaction. PDF bytes are hashed entirely client-side — the PDF itself never leaves the browser — and only the resulting bytes32 hash is compared with on-chain state, checked against historical records, not just the latest one. The interface distinguishes four outcomes:

PDF
BROWSERKECCAK256
GETPROTOCOL-HISTORY()
HASHCOMPARISON
RESULT
No records
Match on latest record
Match on historical record
No matching record
06 / PROVENANCE HISTORYAPPEND-ONLY STORAGE

Records are stored in a per-address dynamic array; registration only appends, and existing records cannot be modified or deleted through the contract ABI. Historical records remain publicly readable.

PROTOCOL ADDRESS
GETPROTOCOL-HISTORY()
HISTORICAL RECORDS
TIMELINE
07 / SECURITY & INVARIANTSENFORCED PROPERTIES

The registry provides integrity of the registered record, not proof that the registered claims are truthful.

Access ControlregisterProtocolRecord() is restricted by onlyOwner.
Append-Only HistoryThere is no update or delete path for existing records.
Record IntegrityOnce appended, the stored audit hash, commit hash, metadata, and timestamp cannot be modified through the contract.
Historical AvailabilityRecords remain publicly readable through the view functions.
Ownership ControlOwnership can only change through the owner-authorized transferOwnership() path.
No External Call SurfaceThe contract makes no external contract calls and has no payable, receive, or fallback path.
Cryptographic VerificationAudit-document fingerprints use keccak256 over the raw PDF bytes in the browser.
08 / REMEDIATIONAUTHORIZATION BOUNDARY

The current deployment exists because of an authorization-boundary remediation, not a design change: the previous contract allowed any caller to invoke registerProtocolRecord(); the current one restricts it to the owner. Deployed Solidity bytecode is immutable, so the fix required a new deployment rather than a patch.

Superseded Deployment

0x8166431404B7f8e5e9d351333e08548a23Bbdae0 — allowed arbitrary callers to register records. No longer in use.

Current Deployment

0xd8FC6C229d7666865EDE56f56C68Af01cC5021BA — adds onlyOwner, confirmed by a live non-owner simulation that reverts with NotOwner.

09 / VERIFICATION EVIDENCEVALIDATION
TEST SUITE

16/16 Solidity tests passing

TEST COVERAGE

Tests cover deployment/ownership, registration, unauthorized registration, field validation, ownership transfer, multi-record history, latest-record retrieval, and public read access

DEPLOY PIPELINE

Deployment pipeline (manually triggered) compiles, tests, and deploys via Hardhat Ignition

DEPLOY / SANITY CHECK

Deployment pipeline verifies deployed bytecode, owner, and a record-read sanity check

DEPLOY / SIMULATION

Deployment pipeline runs a non-owner registration simulation

SOURCE VERIFICATION

Current contract has verified source on Etherscan and Sourcify, per the project's deployment record

10 / DEPLOYMENTSEPOLIA / 11155111

Ethereum Sepolia — a testnet, not Ethereum Mainnet. The core system is complete and end-to-end validated: register, verify, and explore all work against this deployment.

NetworkEthereum Sepolia (testnet), chain ID 11155111
Current Contract0xd8FC6C229d7666865EDE56f56C68Af01cC5021BA — verified on Etherscan and Sourcify
Pitch DeckVercel-hosted PDF
11 / CURRENT LIMITATIONSKNOWN BOUNDARIES
OWNERSHIP MODELA single EOA owner controls future registrations — no multisig or timelock
AUDIT HASHAudit hashes are not independently validated against documents by the contract
COMMIT HASHCommit hashes are caller-supplied metadata and are not verified against Git
CONTRACT ADDRESSRegistered contract addresses are not verified against deployed code
HISTORY QUERYgetProtocolHistory() returns an unbounded array
FRONTEND TESTINGThe frontend has no automated test suite and no coverage measurement
NETWORK ENFORCEMENTA network-enforcement helper exists but is currently unused
SUPERSEDED CONTRACTThe superseded deployment remains permanently deployed on Sepolia
12 / TRUST MODELWHAT THE REGISTRY PROVES

The registry makes provenance records tamper-evident, not inherently truthful.

Trustless After Registration

Once written, a record cannot be silently modified or deleted through the contract, anyone can read it, and anyone can independently hash a document and compare it with the stored hash.

Owner-Curated Registration

Before registration, only the owner can create records — the owner determines what claims are recorded and is trusted for the truthfulness of the submitted metadata.

Tamper-Evident ≠ Inherently Truthful