Skip to content

feat(reputation): transfer blockers, profile checkpoint, delete rebate, bulk lookups#604

Merged
soomtochukwu merged 5 commits into
DXmakers:mainfrom
oomokaro1:feat/reputation-enhancements
May 30, 2026
Merged

feat(reputation): transfer blockers, profile checkpoint, delete rebate, bulk lookups#604
soomtochukwu merged 5 commits into
DXmakers:mainfrom
oomokaro1:feat/reputation-enhancements

Conversation

@oomokaro1
Copy link
Copy Markdown
Contributor

@oomokaro1 oomokaro1 commented May 27, 2026

What changed

  • Added transfer blocker flag to Profile — reputation is non-transferable by default, admin can toggle per-profile
  • Added profile_exists function for job registry to verify profile existence before operations
  • Added delete_profile with storage cleanup (rent rebate on deletion)
  • Added get_scores_bulk and query_reputations_bulk for gas-efficient frontend lookups
  • Added 10 new tests covering all new functionality (22 total, all passing)

Why

Implements the four reputation contract enhancements requested in issues #408, #411, #412, #413.

How to test

cd contracts/reputation && cargo test

Closes #408
Closes #411
Closes #412
Closes #413

@oomokaro1 oomokaro1 requested a review from soomtochukwu as a code owner May 27, 2026 18:16
@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

@oomokaro1 is attempting to deploy a commit to the mAzI's projects Team on Vercel.

A member of the Team first needs to authorize it.

…lete with rebate, and bulk lookups

Implements four reputation contract enhancements:

- Transfer blockers (DXmakers#408): reputation is non-transferable by default; admin can toggle per-profile
- Profile existence checkpoint (DXmakers#411): `profile_exists` function for job registry integration
- Storage rent rebate on delete (DXmakers#412): `delete_profile` removes storage and frees rent
- Gas-efficient bulk lookups (DXmakers#413): `get_scores_bulk` and `query_reputations_bulk` for frontend

All 30 tests pass including 10 new tests covering the added functionality.

Fixes DXmakers#408
Fixes DXmakers#411
Fixes DXmakers#412
Fixes DXmakers#413
@oomokaro1 oomokaro1 force-pushed the feat/reputation-enhancements branch from 5defee2 to d6507ca Compare May 27, 2026 18:57
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 27, 2026

@oomokaro1 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

Resolve conflicts in lib.rs and profile.rs:
- Keep upstream's improved authorization test patterns (rogue contract tests)
- Preserve HEAD's new features: transfer blockers, profile existence checks,
  delete with rebate, bulk lookups, and badge metadata
- Use BadgeLevel::from_score() approach (not numeric compute_badge)
- Keep transfer_blocked field defaulting to true in Profile::new
- Retain HEAD's test snapshots with computed badge levels
Copy link
Copy Markdown
Contributor

@soomtochukwu soomtochukwu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you could just fix the merge conflicts ASAP

Resolve merge conflicts keeping both branches' features:
- Upstream: BadgeLevel enum on Profile, badge_level/refresh_badge methods,
  job-count-based badge thresholds, authorize_contract/deauthorize_contract API
- Our branch: transfer_blocked, badge metadata, profile_exists, delete_profile,
  bulk lookups
@oomokaro1
Copy link
Copy Markdown
Contributor Author

Fixed

oomokaro1 and others added 2 commits May 30, 2026 00:35
Resolved conflicts by keeping our restructured multi-file version
which includes all upstream features plus: typed error handling,
blacklisting, transfer blocking, profile existence/deletion,
bulk lookups, badge metadata, TTL management, and dual-role profiles.
@soomtochukwu soomtochukwu merged commit cc5d6d0 into DXmakers:main May 30, 2026
1 of 8 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

2 participants