Skip to content

feat(attest+pqc-wallet): add EIP-712 attest helpers with golden vectors and PQC wallet transfer test#9

Merged
hooftly merged 3 commits intomainfrom
develop
Oct 5, 2025
Merged

feat(attest+pqc-wallet): add EIP-712 attest helpers with golden vectors and PQC wallet transfer test#9
hooftly merged 3 commits intomainfrom
develop

Conversation

@hooftly
Copy link
Member

@hooftly hooftly commented Sep 25, 2025

Summary

This PR introduces a deterministic EIP-712 Attest model with golden vector tests, an aggregator flag for future network submission, and a Forge-based integration test for the PQC wallet. Together these changes harden the attestation layer and demonstrate ERC20 transfers routed through the PQC wallet and dummy EntryPoint.

Changes

  • Attest
    • Implemented deterministic EIP-712 Attest model with fixed domain/type strings.
    • Added hashing helpers for type hash, domain separator, struct hash, and final digest aligned with Solidity layout.
    • Introduced golden vector tests verifying stability across chain IDs and pinning intermediate/final digests.
    • Added EIP-712 Attest helper with locked domain metadata {name:"EqualFiPQCProver", version:"1"}.
    • Guarded aggregator path behind feature flag; logs "Aggregator path disabled" and skips submission when off.
    • Added file-based fallback for token registry loading to support test environments.
    • Expanded .gitignore to exclude Flutter build artifacts.
  • PQC Wallet
    • Added Forge integration test deploying dummy EntryPoint, PQC wallet, and mock ERC20.
    • Minted 1,000 tokens to PQC wallet and executed transfer to first default Anvil account.
    • Logged balances before and after transaction to confirm wallet transfer flow.

Motivation

These updates lock in canonical EIP-712 attestation semantics with reproducible vectors, ensuring cross-platform parity, while also demonstrating PQC wallet usability with ERC20 flows through EntryPoint. Both are critical building blocks for EqualFi’s Phase-0 rollout.

Testing

  • Golden vector tests for Attest digests
  • Forge integration test for PQC wallet ERC20 transfer
  • Config flag disables aggregator path with expected log message

Checklist

  • Tests added or updated
  • Docs updated
  • Lint checks pass
  • Ready for review

…rs and golden tests

- Implemented deterministic EIP-712 Attest model with fixed domain/type
  strings and full hashing helpers (type hash, domain separator, struct
  hash, final digest) mirroring locked Solidity layout.
- Guarded aggregator submission with config check, logging computed
  digest and skipping network calls when disabled.
- Added file-based fallback for token registry loading to ensure tests
  run without bundled assets.
- Introduced golden-vector tests pinning intermediate/final Attest digests
  and verifying chainId variance for cross-platform compatibility.
- Added new EIP-712 Attest helper with required fields, locked domain
  metadata, and hashing utilities for future aggregator support.
- Guarded aggregator path behind feature flag; app now logs
  “Aggregator path disabled” and skips network calls when disabled.
- Introduced golden vector tests verifying attest type hash, domain
  separator, and final digest for stability across chain IDs.
- Documented mobile Attest struct and domain
  {name: "EqualFiPQCProver", version: "1"}, noting Phase-0 ignores
  aggregator path.
- Expanded .gitignore to exclude Flutter build artifacts across repo
  to prevent future bloat.
- Deployed dummy `EntryPoint`, PQC wallet, and mock ERC20 in test.
- Minted 1,000 tokens to PQC wallet and executed transfer to first default Anvil account.
- Logged balances before and after transaction to confirm flow.
@hooftly hooftly merged commit 13c947f into main Oct 5, 2025
2 checks passed
@hooftly hooftly deleted the develop branch October 5, 2025 15:10
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