feat: add invoice compliance attestation system (#879) - #908
Merged
Kingsman-99 merged 2 commits intoSep 30, 2026
Merged
Kingsman-99 merged 2 commits into
Kingsman-99 merged 2 commits into
Conversation
Add compliance_attest_ext.rs with admin-managed compliance officers who can submit structured compliance records (framework, passed/fail, notes) against any invoice. - register_compliance_officer / remove_compliance_officer (admin only) - submit_compliance_record (officer only; 1 record per officer+framework) - get_compliance_records / is_compliance_officer (read-only) - Records capped at 10 per invoice; framework ≤ 32 bytes; notes ≤ 512 - Events: co_add, co_rem, cmp_sub - 7 unit tests covering all guard conditions and happy paths Closes Stellar-split#879
|
@jacobjacobb4242 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! 🚀 |
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.
Issue #879 — Add invoice compliance attestation system
Adds a new
compliance_attest_ext.rsmodule that implements a structured,admin-gated compliance record system for invoices.
Core functionality
Admin management:
register_compliance_officer(admin, officer)— adds an officer to the approved set.remove_compliance_officer(admin, officer)— removes an officer.is_compliance_officer(officer)— read-only membership check.Record submission:
submit_compliance_record(officer, invoice_id, framework, passed, notes)— registered officers submit compliance attestations.frameworkis a short identifier ("KYC","AML","GDPR", …) capped at 32 bytes.notesis an optional free-form string capped at 512 bytes.get_compliance_records(invoice_id)— returns all records (read-only).Events
(split, co_add)officer(split, co_rem)officer(split, cmp_sub, invoice_id)(officer, framework, passed)Storage
Local
ComplianceAttestKeyenum:Records(invoice_id)—Vec<ComplianceRecord>in persistent storage.Officers—Vec<Address>in instance storage.New type
ComplianceRecord { officer, framework, passed, notes, timestamp }Tests
7 unit tests:
Files changed
contracts/split/src/compliance_attest_ext.rscontracts/split/src/lib.rsmod compliance_attest_ext;Closes #879