contracts/stream_contract: update stream storage tests only#117
contracts/stream_contract: update stream storage tests only#117ogazboiz merged 17 commits intoLabsCrypt:mainfrom
Conversation
ogazboiz
left a comment
There was a problem hiding this comment.
Thanks for the PR. This has conflicts with main. Also, the Stream struct diverges from the one on main. Please rebase and align with the existing architecture.
|
@ogazboiz i have fix it |
ogazboiz
left a comment
There was a problem hiding this comment.
Thanks for the PR. The title says 'Stream storage' but the only change in the PR is adding 'extern crate std;' to the test file. If you intended to introduce storage changes, they seem to be missing from this branch. Please check and re-push! 🙏
ogazboiz
left a comment
There was a problem hiding this comment.
Following up on my earlier review: the latest main has significant backend and contract changes merged. The only diff in this PR is 2 lines in test.rs. Please clarify: is this PR about actual stream storage (persistent state in the Soroban contract using ledger storage), or just the test changes? If there's real storage logic, please rebase on latest main and add the implementation — the title and description don't match the diff as it stands.
ogazboiz
left a comment
There was a problem hiding this comment.
Following up on my earlier review: the latest main has significant backend and contract changes merged. The current diff only shows 2 lines in test.rs. Please clarify if this PR is meant to include actual stream storage logic as the title suggests. If so, please rebase and add the implementation. If not, please update the title/description.
|
Thanks for the follow-up. You're right: after rebasing against the latest main, the stream-storage implementation is already present from the earlier branch, and this PR now only contains small test.rs updates. I'll update the title/description to reflect the test-only scope (or close this PR if preferred). |
ogazboiz
left a comment
There was a problem hiding this comment.
hey @Obiajulu-gif, glad to hear you fixed it! the PR is still showing as conflicting though — could you just resolve the merge conflict and push? run git fetch origin && git rebase origin/main then force push. once that's done we can take another look and get it merged!
ogazboiz
left a comment
There was a problem hiding this comment.
hey Obiajulu — thanks for rebasing!
i noticed the CI checks are now failing on this branch: the "Dependency Vulnerability Scan" is failing.
could you take a look at the workflow logs and see what's throwing the error? you can check the details under the "Checks" tab on GitHub. let me know if you need any help deciphering the CI logs!
|
@ogazboiz I have fix the issues |
still failing |
|
@Obiajulu-gif just one check for it to pass |
|
@ogazboiz I have fix the issues |
ogazboiz
left a comment
There was a problem hiding this comment.
looks great, merging this in! thanks for the contribution
ogazboiz
left a comment
There was a problem hiding this comment.
hey! unfortunately, another PR was just merged that caused merge conflicts with this one. could you run git fetch origin && git rebase origin/main to resolve them? once they are fixed and CI passes again, i'll merge this right in!
ogazboiz
left a comment
There was a problem hiding this comment.
hey! great news — the CI is passing on this branch now!
however, it looks like some new changes on main have caused a merge conflict. could you please rebase one last time to resolve those?
once the conflict is cleared and CI passes again, i'll merge this right in. almost there!
|
i have resolve it for you @Obiajulu-gif |

This pull request introduces new types for stream data modeling and adds comprehensive tests for serialization and authorization logic in the stream contract. The main focus is on ensuring deterministic serialization of contract types and verifying proper authorization for withdrawals.
Stream Data Modeling Enhancements:
DataKeyenum andStreamstruct with the#[contracttype]attribute for deterministic serialization and contract storage. (contracts/stream_contract/src/lib.rs)Authorization and Serialization Tests:
Added tests to verify:
contracts/stream_contract/src/test.rs)Streamstruct serializes and deserializes as expected, matching the expected XDR layout. (contracts/stream_contract/src/test.rs)DataKey::Streamvariant serializes deterministically, deserializes correctly, and works as a storage key in contract state. (contracts/stream_contract/src/test.rs)Closes Contract: Stream Storage Structure #77