fix(#838,#837,#836,#835): wire commit_ip RPC, document registry.rs, a… - #941
Open
ahmadrabiumustapha wants to merge 1 commit into
Open
fix(#838,#837,#836,#835): wire commit_ip RPC, document registry.rs, a…#941ahmadrabiumustapha wants to merge 1 commit into
ahmadrabiumustapha wants to merge 1 commit into
Conversation
…_ip RPC, document registry.rs, add rollback+fee-asset tests AtomicIP#838 - Wire commit_ip handler to Soroban RPC - Add api-server/src/soroban_rpc.rs with commit_ip client, SorobanError enum, and error classifier (maps contract error codes to typed variants) - Replace TODO stub in handlers::commit_ip with full soroban_rpc::commit_ip call; map every SorobanError variant to the correct HTTP status code (400 ZeroHash, 409 Conflict duplicate, 403 Forbidden, 410 Gone, etc.) - Register soroban_rpc module in lib.rs and main.rs - Add commit_ip integration tests: payload validation, zero-hash guard, hash-length check, error→HTTP mapping table, success type check AtomicIP#837 - Document registry.rs role and relationship to ip_registry - Add module-level doc comment to registry.rs clarifying it is a cross-contract adapter, not an independent registry - Add '🗂️ registry.rs' section to docs/architecture.md with a function table and ASCII call-graph showing the adapter→ip_registry relationship AtomicIP#836 - Multi-currency and cross-contract rollback tests - Add multi-currency rollback tests (XLM, USDC, EURC) in rollback_tests.rs confirming the 90% buyer refund works for every settlement token - Add contract-balance check: no residual buyer funds after rollback - Add cross-contract rollback tests: IP ownership stays with seller, ActiveSwap index is cleared (re-listing allowed), RolledBack ≠ Cancelled AtomicIP#835 - Fee-asset consistency for multi-currency swaps - Document fee-asset policy in multi_currency.rs module header with rationale, policy rules, and a scenario table - Add fee_asset field to MultiCurrencyConfig (defaults to XLM) - Add validate_fee_asset() (panics with InvalidFeeAsset on mismatch) - Add is_valid_fee_asset() boolean predicate for off-chain callers - Add InvalidFeeAsset = 66 to ContractError in lib.rs and errors.rs - Add 11 fee-asset tests covering XLM/USDC/EURC accepted and rejected combinations, reconfiguration, and the settlement-vs-fee independence invariant .gitignore - expand to exclude wasm outputs, .stellar/, node_modules/, coverage/, criterion/, fuzz corpus subdirs
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.
…dd rollback+fee-asset tests
#838 - Wire commit_ip handler to Soroban RPC
#837 - Document registry.rs role and relationship to ip_registry
#836 - Multi-currency and cross-contract rollback tests
#835 - Fee-asset consistency for multi-currency swaps
.gitignore - expand to exclude wasm outputs, .stellar/, node_modules/, coverage/, criterion/, fuzz corpus subdirs
closes #835
closes #836
closes #837
closes #838