Skip to content

docs: reconcile CONTRACT_INTERFACE.md with lib.rs public API#429

Merged
Naomi-Gift merged 1 commit into
HubDApp:mainfrom
young-wallace:docs/376-reconcile-contract-interface
Jul 27, 2026
Merged

docs: reconcile CONTRACT_INTERFACE.md with lib.rs public API#429
Naomi-Gift merged 1 commit into
HubDApp:mainfrom
young-wallace:docs/376-reconcile-contract-interface

Conversation

@young-wallace

Copy link
Copy Markdown
Contributor

Summary

This PR reconciles CONTRACT_INTERFACE.md against the actual lib.rs public API. 120+ functions were missing or the documentation was out of date. All 168 public functions exposed by #[contractimpl] impl DongleContract are now documented.

Changes Made

Added Missing Admin Functions

  • get_admin_approval_threshold, set_admin_approval_threshold
  • create_proposal, approve_proposal, execute_proposal, get_proposal

Added Missing Project Registry Functions

  • Security contact: update_security_contact, submit_security_contact_proof, get_security_contact_status
  • Extended properties: set_project_region, get_project_region, get_project_integrity_hash
  • list_projects_sorted for sort-mode project listing
  • Contract claiming: claim_contract_address, approve_contract_claim, reject_contract_claim, get_verified_contracts
  • Maintainers: add_maintainer, remove_maintainer, get_maintainers
  • Reserved names: add_reserved_name, remove_reserved_name, get_reserved_names, is_name_reserved

Added Missing Review Registry Functions

  • get_weighted_rating, get_review_revision_count, get_review_history
  • get_review_tombstone, list_reviews_sorted

Added Missing Verification Functions

  • update_verification_evidence, get_verification_record
  • clear_verification_history, clear_renewal_history
  • assign_verification, get_assigned_admin

Added Missing Fee Manager Functions

  • is_fee_paid, pay_registration_fee
  • get_fee_payment_details, get_reg_fee_payment_details

Added Entirely New Sections

  • Subscription / Followfollow_project, unfollow_project, get_follower_count, is_following, get_project_followers, get_user_subscriptions
  • Bookmarksbookmark_project, unbookmark_project, is_bookmarked, get_user_bookmarks
  • Endorsementsendorse_project, unendorse_project, get_endorsement_count, has_endorsed
  • Admin Timelockschedule_set_fee, schedule_add_admin, schedule_remove_admin, cancel_scheduled_action, execute_scheduled_set_fee, execute_scheduled_add_admin, execute_scheduled_remove_admin, get_scheduled_action, list_scheduled_actions, get_scheduled_action_count

Error Codes Table

  • Replaced the entirely fictional error code numbering with the correct codes from the ContractError enum in errors.rs

Other Updates

  • Updated the Table of Contents to list all 20 sections
  • Updated the last-updated date to July 2026

closes #376

- Added missing admin proposal/threshold functions: get_admin_approval_threshold,
  set_admin_approval_threshold, create_proposal, approve_proposal, execute_proposal,
  get_proposal
- Added project registry functions: update_security_contact, submit_security_contact_proof,
  get_security_contact_status, set_project_region, get_project_region,
  get_project_integrity_hash, list_projects_sorted, claim_contract_address,
  approve_contract_claim, reject_contract_claim, get_verified_contracts,
  add_maintainer, remove_maintainer, get_maintainers
- Added reserved name functions: add_reserved_name, remove_reserved_name,
  get_reserved_names, is_name_reserved
- Added review registry functions: get_weighted_rating, get_review_revision_count,
  get_review_history, get_review_tombstone, list_reviews_sorted
- Added verification functions: update_verification_evidence, get_verification_record,
  clear_verification_history, clear_renewal_history, assign_verification,
  get_assigned_admin
- Added fee manager functions: is_fee_paid, pay_registration_fee,
  get_fee_payment_details, get_reg_fee_payment_details
- Added new sections: Subscription/Follow, Bookmarks, Endorsements, Admin Timelock
- Updated error codes table to match actual ContractError enum in errors.rs
- Updated Table of Contents and last-updated date

closes HubDApp#376
@drips-wave

drips-wave Bot commented Jul 26, 2026

Copy link
Copy Markdown

@young-wallace 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.

Reconcile CONTRACT_INTERFACE.md against the actual lib.rs public API

2 participants