feat(contract): expose version() view function on PaymentRouter - #807
Merged
Abdulazeem-code merged 4 commits intoOct 3, 2026
Merged
Conversation
Exposes a read-only version() function on the PaymentRouter Soroban
contract so the UI and any integration client can confirm they are
talking to a compatible deployment before submitting transactions.
Implementation:
- CONTRACT_VERSION constant set to "1.0.0" (MAJOR.MINOR.PATCH)
- version(env: Env) -> String returns the constant as a soroban_sdk::String
- No ledger writes; costs only the base invocation fee
- Two unit tests:
test_version_returns_expected_string — asserts the return value
equals String::from_str(&env, CONTRACT_VERSION) so constant and
function can never drift apart
test_version_is_non_empty — guards against an accidental empty string
To bump the version for a future release, change CONTRACT_VERSION in
src/lib.rs and redeploy. No schema or storage migration is needed.
Closes Abdulazeem-code#269
|
@abrak01 is attempting to deploy a commit to the Abdulazeem's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@abrak01 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! 🚀 |
Owner
|
Resolve conflicts and failed checks |
Owner
|
Please resolve conflicts |
Owner
|
Kindly resolve conflicts |
Contributor
Author
|
Conflicts has been resolve
…On Sat, Oct 3, 2026 at 1:04 PM Abdulazeem ***@***.***> wrote:
*Abdulazeem-code* left a comment (Abdulazeem-code/stellar-tags#807)
<#807 (comment)>
Kindly resolve conflicts
—
Reply to this email directly, view it on GitHub
<#807?email_source=notifications&email_token=A6Y6RIV3TEVDFSXDOOXT3ET5SDTMZA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKOJWHA4TONZXGY42M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-5968977769>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A6Y6RIT2VWMSNM2LKK6UYT35SDTMZAVCNFSNUABGKJSXA33TNF2G64TZHMYTEMZQGI3DGMZWGI5US43TOVSTWNJVHA2TQOBVGMYTPILWAI>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/A6Y6RISKYQQMMFRMHLXLE335SDTMZA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKOJWHA4TONZXGY42M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/A6Y6RIWKTVTITN76YQA2NYT5SDTMZA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKOJWHA4TONZXGY42M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
version()read-only function to thePaymentRouterSoroban smart contract. The UI and any integration client can call this before submitting transactions to confirm they are talking to a compatible deployment.Implementation
CONTRACT_VERSIONis a compile-time constant followingMAJOR.MINOR.PATCHsemver:version()is a pure view function — no ledger writes, costs only the base invocation fee.CONTRACT_VERSIONinsrc/lib.rsand redeploy. No storage migration is needed.Acceptance criteria
version()view function"1.0.0")Tests
Two unit tests added in
src/lib.rs:test_version_returns_expected_stringString::from_str(&env, CONTRACT_VERSION)— constant and function can never drift aparttest_version_is_non_emptyRun with:
Closes #260
Closes #269