docs: contract interface summaries for integrators#208
Merged
greatest0fallt1me merged 3 commits intoCalloraOrg:mainfrom Mar 29, 2026
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@armandocodecr 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! 🚀 |
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.
Closes #150
Summary
This PR resolves the issue by adding machine-readable JSON summaries of every public function and parameter for each Soroban contract in the workspace, placed under
docs/interfaces/with a link from the mainREADME.md.What was added
docs/interfaces/vault.json— 27 public functions forcallora-vaultwith params, types, access rules, panics, and events.docs/interfaces/settlement.json— 10 public functions forcallora-settlement, including custom types (DeveloperBalance,GlobalPool, event structs).docs/interfaces/revenue_pool.json— 7 public functions forcallora-revenue-pool.README.md— link table pointing to the three JSON files and updated project layout.Why this resolves the issue
The issue asks to maintain JSON summaries of public functions and parameters to reduce drift between the contract source and
@stellar/stellar-sdkinvocation code in the backend. Each JSON file documents:Symbol) and parameter order, so backend calls usingContract.call(name, ...args)can be verified against a single source of truth.Address,i128,Option<T>,Vec<T>, etc.) that map directly tonativeToScValconversions in the SDK.File paths under
docs/interfaces/are stable so tooling and CI can reference them reliably.Pre-existing bugs fixed (required to unblock
cargo test)vault/src/lib.rsStorageKey::Pausedvariant missingvault/src/lib.rsMAX_BATCH_SIZEconstant undefinedpub const MAX_BATCH_SIZE: u32 = 50vault/src/lib.rsis_authorized_depositorread from a different storage key thanset_allowed_depositorwrites toStorageKey::AllowedDepositorsvault/src/lib.rsdeposit()—metanot declaredmutmutvault/src/lib.rstransfer_ownership()— unnecessarymutonmetamutvault/src/test.rsinitcalled with 8 args (function takes 7)&Nonevault/src/test.rsmetadata_remains_after_ownership_transfernever completed the two-step ownership transferclient.accept_ownership()settlement/src/test.rstest_receive_payment_unauthorizeddefined twice#[should_panic]revenue_pool/src/test.rsrevenue_pool/src/test.rsTryIntoValimport**/test_*.rs#![cfg(test)]attribute (clippy-D warnings)Test output
All 127 tests pass.
cargo fmtandcargo clippy --all-targets --all-features -- -D warningsare clean.Security notes
mutcorrectness, and test hygiene.is_authorized_depositorcorrects a bug where allowed depositors set viaset_allowed_depositorwere never found by the authorization check, effectively making the allowed-depositor feature non-functional. This is a correctness fix with no security regression.