feat: resolve issues #714, #715, #716, and #717 - #729
Merged
Jaydbrown merged 1 commit intoSep 27, 2026
Merged
Conversation
…uit-protocol#716, and conduit-protocol#717 - Issue conduit-protocol#714: tests/factory_deploy.rs: add test for stream deployment failure on duplicate salt * Return Error::SaltAlreadyUsed when deployment salt was previously used. * Added regression test `test_deploy_stream_duplicate_salt_fails`. - Issue conduit-protocol#715: contracts/stream: add get_stream_summary query returning all state in a single call * Implemented `get_summary` (and alias `get_stream_summary`) returning `StreamSummary`. * Returns sender, recipient, token, total_amount, streamed_amount, status, start_time, stop_time. * Added unit test `test_get_summary_returns_consolidated_state`. - Issue conduit-protocol#716: contracts/oracle: add support for inverted price calculation * Added `get_price_inverted` and `get_price_inverted_symbol` calculating `PRICE_PRECISION^2 / price` when direct feed is not found. * Added `Error::PriceNotFound` for missing pair queries. * Added unit tests for direct and inverted price lookups. - Issue conduit-protocol#717: contracts/batch-processor: implement reentrancy protection on all batch execution paths * Set `DataKey::ReentrancyLock` in temporary storage during `process_batch` execution. * Return `Error::ReentrancyForbidden` when reentrancy is detected. * Added unit test `test_reentrancy_lock_blocks_concurrent_execution`. Closes conduit-protocol#714, Closes conduit-protocol#715, Closes conduit-protocol#716, Closes conduit-protocol#717
|
@mhikel66 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.
Summary
This PR addresses and resolves issues #714, #715, #716, and #717 across the contracts:
1. #714:
tests/factory_deploy.rs: add test for stream deployment failure on duplicate saltdrip_factory::deploy::deploy_streamto record and verify that salt has not already been used (DataKey::SaltUsed(salt)).Error::SaltAlreadyUsed(code 32) when duplicate deployment salt is attempted.test_deploy_stream_duplicate_salt_failsintests/factory_deploy.rs.2. #715:
contracts/stream: add get_stream_summary query returning all state in a single callStreamStatusenum (Pending = 0,Active = 1,Paused = 2,Cancelled = 3,Completed = 4) andStreamSummarystruct incontracts/stream/src/storage.rs.get_summary(env: Env) -> StreamSummaryand aliasget_stream_summary(env: Env) -> StreamSummaryreturning{ sender, recipient, token, total_amount, streamed_amount, status, start_time, stop_time }.test_get_summary_returns_consolidated_stateincontracts/stream/src/tests.rs.3. #716:
contracts/oracle: add support for inverted price calculation (e.g. XLM/USDC to USDC/XLM)PRICE_PRECISION = 100_000_000(8 decimals).PairPrice(Address, Address)andPairPriceSymbol(Symbol, Symbol)toDataKey.set_price,get_price,get_price_inverted(and symbol variantsset_price_symbol,get_price_symbol,get_price_inverted_symbol).(base, quote)is not present,get_price_invertedcomputes(PRICE_PRECISION^2 / price)from the reciprocal pair(quote, base). ReturnsError::PriceNotFoundif neither feed exists.contracts/oracle/src/lib.rs.4. #717:
contracts/batch-processor: implement reentrancy protection on all batch execution pathsReentrancyForbidden = 10error variant andDataKey::ReentrancyLockincontracts/batch-processor/src/lib.rs.process_batchwith a temporary storage reentrancy lock, clearing it upon completion.test_reentrancy_lock_blocks_concurrent_executionincontracts/batch-processor/src/tests.rs.Verification
cargo test --workspace: all unit and integration tests passed.cargo clippy --all-targets --all-features -- -D warnings: passed cleanly with zero warnings.cargo fmt --all -- --check: passed cleanly.python3 scripts/validate-error-codes.py: validated with zero errors.Closes #714
Closes #715
Closes #716
Closes #717