USCVerifier tests, Attestcoin Protocol docs, and LICENSE - #2
Open
successaje wants to merge 3 commits into
Open
successaje wants to merge 3 commits into
successaje wants to merge 3 commits into
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
USCVerifier(proof acceptance/rejection, all three replay guards, evidence-to-eligibility issuance), using a mock precompile installed at0x0FD2viasetCode. Test suite: 7 → 20 passing. Replay guards were mutation-tested — removing either one fails exactly its corresponding test.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.LICENSEfile (MIT) that the README already referenced, and alignspackage.json/backend/package.jsonfromISCtoMITto match the SPDX headers on every contract.demo_script.mdto weight the Attestcoin segment (~40% of runtime) and add a live evidence-replay rejection beat.Test plan
npx hardhat compilenpx hardhat test— 20 passing (5 Solidity, 15 Mocha)processedEvidence/evidenceUsedForEligibilityguards fails only their corresponding tests🤖 Generated with Claude Code