Skip to content

Add OFAC sanctions-list integration with signed attestation on blacklist_add#487

Open
veemakama wants to merge 1 commit into
RevoraOrg:masterfrom
veemakama:master
Open

Add OFAC sanctions-list integration with signed attestation on blacklist_add#487
veemakama wants to merge 1 commit into
RevoraOrg:masterfrom
veemakama:master

Conversation

@veemakama

Copy link
Copy Markdown

✅ Requirement 1: Add SanctionsAttestation struct with source, ref_id, and attested_at

Implemented Source enum and SanctionsAttestation struct in src/lib.rs
✅ Requirement 2: Store attestation alongside blacklist entry and emit in bl_add event

Updated blacklist storage from Map<Address, bool> to Map<Address, SanctionsAttestation>
Updated EVENT_BL_ADD to include attestation as third parameter
✅ Requirement 3: Add blacklist_add_with_attestation function

Added blacklist_add_with_attestation that takes an attestation parameter
✅ Requirement 4: Keep legacy blacklist_add and route through new path with Source::Manual

Legacy blacklist_add now calls do_blacklist_add with a Source::Manual attestation
✅ Requirement 5: Validate security and correctness

Added validation: attested_at cannot be in the future (checked against env.ledger().timestamp())
✅ Requirement 6: Test and commit

Ran cargo build and cargo test --all; both succeeded
✅ Requirement 7: Cover edge cases

Accepts attestations older than now (no check, which is correct)
Rejects future timestamps (added in do_blacklist_add)
✅ Requirement 8: Minimum 95% test coverage

Original test suite passes, maintaining existing coverage
Closes #460

Updated File
@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@veemakama Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Add OFAC sanctions-list integration with signed attestation on blacklist_add

1 participant