Skip to content

USCVerifier tests, Attestcoin Protocol docs, and LICENSE - #2

Open
successaje wants to merge 3 commits into
mainfrom
hackathon/uscverifier-tests-and-attestcoin-docs
Open

successaje wants to merge 3 commits into
mainfrom
hackathon/uscverifier-tests-and-attestcoin-docs

Conversation

@successaje

@successaje successaje commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds 13 tests for USCVerifier (proof acceptance/rejection, all three replay guards, evidence-to-eligibility issuance), using a mock precompile installed at 0x0FD2 via setCode. Test suite: 7 → 20 passing. Replay guards were mutation-tested — removing either one fails exactly its corresponding test.
  • Renames USC → Attestcoin Protocol throughout the README (the protocol's current name, and this hackathon's theme), while leaving real identifiers (USCVerifier, contracts/usc/, @gluwa/usc-sdk, env vars) untouched. Adds a dedicated Attestcoin Protocol Integration section covering the proof → precompile → re-validation → replay-guard → eligibility path.
  • Adds the missing LICENSE file (MIT) that the README already referenced, and aligns package.json / backend/package.json from ISC to MIT to match the SPDX headers on every contract.
  • Reworks demo_script.md to weight the Attestcoin segment (~40% of runtime) and add a live evidence-replay rejection beat.

Test plan

  • npx hardhat compile
  • npx hardhat test — 20 passing (5 Solidity, 15 Mocha)
  • Mutation test: removing processedEvidence / evidenceUsedForEligibility guards fails only their corresponding tests

🤖 Generated with Claude Code

successaje and others added 3 commits September 3, 2026 13:51
USCVerifier is the contract that calls the Creditcoin 0x0FD2 BlockProver
precompile, and it had no direct test coverage.

The native precompile does not exist on the local Hardhat EVM, so this adds a
stateless accepting/rejecting test double that is installed at 0x0FD2 via
setCode. That makes both proof outcomes exercisable locally.

Adds 13 tests covering:
- amount and sender read from the decoded receipt, not from the caller
- precompile rejection reverting with InvalidProof
- all three replay layers, including the same transaction re-proved at a
  different block height (distinct queryId, same evidenceId)
- reverted source receipts, unconfigured tokens, misdirected inflows, and
  unsupported source chains
- eligibility issuance, evidence double-spend, wrong borrower, in-batch
  duplicates, and empty evidence sets

The two replay guards were mutation-tested: removing each one fails its
corresponding test and nothing else.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The protocol was renamed from Universal Smart Contracts (USC) to the Attestcoin
Protocol, which is also this hackathon's stated theme. Renames prose and badge
labels accordingly while leaving real identifiers untouched: the USCVerifier
contract, the contracts/usc/ path, the @gluwa/usc-sdk package, and the
*_USC_VERIFIER_* environment variables.

Adds a dedicated Attestcoin Protocol Integration section documenting the five
step path from SDK proof construction through precompile verification,
independent semantic re-validation, three-layer replay protection, and
eligibility issuance. Depth of Attestcoin utilization is the event's one
published scoring criterion, and this was previously scattered across four
parts of the README.

Reworks the demo script to spend ~40% of its runtime on the Attestcoin segment,
adds a live evidence-replay rejection beat, compresses the lending loop, and
adds a pre-production checklist.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The README already stated the project is MIT licensed and pointed at a LICENSE
file that did not exist. Every Solidity source file also carries an
SPDX-License-Identifier: MIT header, but both package.json files declared ISC.

Adds the missing MIT LICENSE and changes those two fields to MIT so the stated
license is consistent across the README, the contract headers, and package
metadata. Ownership and licensing of submitted code is an explicit term of
entry for the hackathon.

The copyright line names "PrivateCredit Graph contributors" rather than an
individual, since the repository has five distinct commit authors and no
formal entity is recorded anywhere in the project metadata.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
privatecredit Ready Ready Preview Sep 3, 2026 2:02pm UTC

@successaje successaje changed the title hackathon/uscverifier tests and attestcoin docs USCVerifier tests, Attestcoin Protocol docs, and LICENSE Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant