Skip to content

feat(contracts): implement upsert profile#1

Closed
chidii wants to merge 89 commits into
mainfrom
contracts/upsert-profile-clean
Closed

feat(contracts): implement upsert profile#1
chidii wants to merge 89 commits into
mainfrom
contracts/upsert-profile-clean

Conversation

@chidii

@chidii chidii commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Closes Quid-proquo#193

Implements the admin-only upsert_profile entrypoint for the Quid reputation contract.

  • upsert_profile (admin-only, rejects negative earnings, stores with updated_at, emits event)
  • bootstrap_admin / get_admin
  • get_profile / increment_success
  • issue_attestation / get_attestation / revoke_attestation

Replaces Quid-proquo#210 and Quid-proquo#221.

Levi-Ojukwu and others added 30 commits May 29, 2026 15:56
fix: resolved all issues in one: Quid-proquo#176 Milestone escrow events, Quid-proquo#175 M…
- Scaffold quid-reputation crate with soroban-sdk dependency
- Add Profile struct and DataKey enum (Admin, Profile(Address))
- Add ReputationError (AdminNotSet, NotAdmin, ProfileNotFound)
- Implement set_admin / get_admin for admin bootstrap and getter
- Implement public get_profile returning ProfileNotFound when missing
- Add internal require_admin helper for mutation path auth checks
- Add internal store_profile helper with TTL extension
- Add internal load_or_default helper returning zeroed profile
- Add unit tests covering all public and internal paths
…gram-program-read-helpers

Contracts: implement create program and add program read helpers
- Add quid-reputation contract package (Cargo.toml, error.rs, types.rs, lib.rs)
- Add src/test.rs with 18 tests covering:
  - Admin bootstrap: set_admin and get_admin flows
  - Profile upsert: create, overwrite, owner assertion, auth guard
  - increment_success: single, multiple, missing profile, auth guard
  - record_rejection: single, multiple, missing profile, auth guard
  - Combined: full lifecycle and independent profile isolation

Closes Quid-proquo#199
- Add record_rejection entrypoint to QuidReputationContract
- Require admin auth before profile mutation
- Load or default ContributorProfile for subject
- Increment rejected_submissions and stamp updated_at
- Persist profile with extended TTL
- Publish ProfileUpdatedEvent on success
- Add tests: increment, accumulation, updated_at, event emission

Closes Quid-proquo#195
milestone escrow authorization and refund tests
…estone-read-helper-add-milestone

Implement milestone creation and read path for escrow contract
Kaylahray and others added 25 commits June 3, 2026 23:40
…tion-error-enum

feat(contracts): add reputation errors
…-read-and-count

feat(contracts): add attestation read helpers
…attestation

feat(contracts): implement issue attestation
…jection

feat(contracts): implement record rejection
fix: resolved all issues in one: Quid-proquo#176 Milestone escrow events, Quid-proquo#175 Milestone escrow error enum
…tion-events

feat(contracts): add reputation events
…s/reputation-profile-tests

test(contracts): add reputation profile tests
feat(contracts): implement increment success
Revoke attestation authorization flow
@chidii

chidii commented Jun 6, 2026

Copy link
Copy Markdown
Owner Author

@Kaylahray Clean PR — 4 files only, rebased on main, no conflicts. upsert_profile fully implemented per issue Quid-proquo#193. Ready for review!

@chidii chidii force-pushed the contracts/upsert-profile-clean branch from 508768c to 4723c1d Compare June 6, 2026 14:06
@chidii chidii closed this Jun 6, 2026
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.

Upsert profile entrypoint