Skip to content

feat(contracts): add batch credential operations for institutions - #231

Merged
jobbykings merged 3 commits into
Epondia:mainfrom
jonathanayubausara-a11y:feat/issue-8-batch-credential-operations
Jul 29, 2026
Merged

feat(contracts): add batch credential operations for institutions#231
jobbykings merged 3 commits into
Epondia:mainfrom
jonathanayubausara-a11y:feat/issue-8-batch-credential-operations

Conversation

@jonathanayubausara-a11y

Copy link
Copy Markdown
Contributor
  • Fix CredentialRegistry struct: PackedTimestamps to issued_at/expires_at

  • Add batch_issue, batch_revoke, batch_renew with partial failure handling

  • Add configurable max batch size (default 100)

  • Create credential_registry_test.rs with 27 tests covering all acceptance criteria

Closes #8

Description

Related Issue

Closes #

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that changes existing behavior)
  • 📚 Documentation update
  • ♻️ Refactor (no functional change)
  • 🧪 Tests
  • 🔧 Chore / tooling

Packages Affected

  • contracts/ (Soroban / Rust)
  • backend/ (Node / Express)
  • frontend/ (Next.js)
  • docs/

How Has This Been Tested?

Checklist

  • My code follows the project's coding standards (see CONTRIBUTING.md)
  • I have run the relevant linters and type checks
  • I have added or updated tests that prove my change works
  • All new and existing tests pass locally
  • I have updated documentation where needed
  • My commits follow the Conventional Commits format
  • I have noted any breaking changes below (or there are none)

Breaking Changes

None

Additional Notes / Screenshots

closes#8

- Fix CredentialRegistry struct: PackedTimestamps to issued_at/expires_at

- Add batch_issue, batch_revoke, batch_renew with partial failure handling

- Add configurable max batch size (default 100)

- Create credential_registry_test.rs with 27 tests covering all acceptance criteria

Closes Epondia#8
- Fix *credential_id dereference errors in batch_revoke_credentials
  and batch_update_expiration_status (Soroban Vec returns values)
- Replace format! calls with build_indexed_string for no_std compat
- Replace std::panic::catch_unwind with #[should_panic] attribute
- Fix *id dereference in test batch renew loop
- Update set_timestamp to ledger().get()/set() for Soroban SDK 20.x
- Add Copy + PartialEq to CredentialStatus, remove conflicting Eq
- Split test_set_max_batch_size into config + panic-assertion tests
- Rewrite PR_BODY.md to accurately describe batch credential ops
@jobbykings
jobbykings merged commit 7b2d4a0 into Epondia:main Jul 29, 2026
15 checks passed
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.

[Contracts] Batch credential operations for institutions

2 participants