Skip to content

feat(onchain): add standardized ContractVersion struct and version() introspection to core contracts - #1121

Closed
harryjupiter148 wants to merge 10 commits into
Pulsefy:mainfrom
harryjupiter148:main
Closed

harryjupiter148 wants to merge 10 commits into
Pulsefy:mainfrom
harryjupiter148:main

Conversation

@harryjupiter148

Copy link
Copy Markdown

Summary

This PR adds standardized on-chain version introspection to all core Lumenpulse Soroban contracts:

  • Shared version crate: Created contracts/version introducing the canonical ContractVersion struct (contract, major, minor, patch, min_interface) carrying #[contracttype].
  • Core contract methods: Implemented pub fn version(env: Env) -> ContractVersion on 7 core contracts (lumen_token, project_registry, yield_vault, matching_pool, crowdfund_vault, contributor_registry, treasury).
  • Zero rent/storage cost: The version query is pure and returns compile-time constants without consuming ledger storage or requiring caller authentication.
  • Documentation & Validation: Added apps/onchain/VERSION_INTROSPECTION.md explaining schema, compatibility checking logic (min_interface), and release validation patterns. Verified with dedicated unit tests across all 7 contracts.

Linked Issue

Closes #1046

Type of Change

  • feat
  • fix
  • docs
  • refactor
  • test
  • chore

Validation

  • Lint passed for affected area(s)
  • Tests passed for affected area(s)
  • Manual verification completed (if applicable)

Documentation

  • Documentation updated (or N/A with explanation)
  • Screenshots/videos attached for UI changes

Checklist

  • Branch name uses feat/, fix/, or docs/
  • Commit messages follow Conventional Commits
  • PR scope matches linked issue acceptance criteria

@drips-wave

drips-wave Bot commented Jul 25, 2026

Copy link
Copy Markdown

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

@Cedarich Cedarich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Kindly fix failing CI

@Cedarich

Copy link
Copy Markdown
Contributor

Kindly resolve conflicts

@Cedarich

Copy link
Copy Markdown
Contributor

@harryjupiter148

@Cedarich Cedarich closed this Aug 22, 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.

Contracts: Contract semantic version introspection interface

2 participants