Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attestation validator #257

Merged
merged 4 commits into from
Feb 3, 2025
Merged

Attestation validator #257

merged 4 commits into from
Feb 3, 2025

Conversation

bitbeckers
Copy link
Contributor

Updates the attesation validation flow to use the AttestationValidator from the SDK. This class validates a decoded attestaion on the chainID, contractAddress and tokenID. The chainID and contractAddress must be from a know deployment and the tokenID must be a hypercert claim ID.

Additionally the token ID utils are replaced with the ones from the SDK, which basically where the original one from the Indexer.

Jipperism and others added 4 commits January 30, 2025 13:01
Update SDK and contract package for latest deployments and features
Replaces the local token utils with the token utils from the SDK.
They're basically the same but the SDK will be the leading version.
Validate decoded attestation data using the AttestationValidator of the
SDK. This ensure the provided attestation represents a known chain and
contract address. Additionally the tokenID must the the ID of a
claim/base type
@bitbeckers bitbeckers added bug Something isn't working enhancement New feature or request labels Feb 3, 2025
@bitbeckers bitbeckers self-assigned this Feb 3, 2025
@bitbeckers bitbeckers linked an issue Feb 3, 2025 that may be closed by this pull request
Copy link

github-actions bot commented Feb 3, 2025

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 26.21% (🎯 26%) 1598 / 6095
🟢 Statements 26.21% (🎯 26%) 1598 / 6095
🟢 Functions 69.23% (🎯 69%) 36 / 52
🟢 Branches 73.85% (🎯 73%) 113 / 153
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/parsing/parseAttestationData.ts 90.47% 80% 100% 90.47% 101-106, 120-125
src/parsing/parseAttestedEvent.ts 100% 71.42% 100% 100%
src/parsing/parseTakerBidEvent.ts 100% 95.83% 100% 100%
src/storage/storeTransferSingle.ts 96.96% 50% 100% 96.96% 55-57
Generated in workflow #212 for commit 1231ec9 by the Vitest Coverage Report Action

@bitbeckers bitbeckers merged commit f8a4e17 into develop Feb 3, 2025
2 checks passed
@bitbeckers bitbeckers deleted the feat/attestation_validator branch February 3, 2025 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Validate content of attestations on deeper structure
2 participants