Skip to content

Issue Fix - #1140

Merged
ogazboiz merged 3 commits into
LabsCrypt:mainfrom
JSE19:main
Jul 29, 2026
Merged

Issue Fix#1140
ogazboiz merged 3 commits into
LabsCrypt:mainfrom
JSE19:main

Conversation

@JSE19

@JSE19 JSE19 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Description
Improves the streaming contract by: (1) clarifying Stream struct field documentation with explicit units and semantics, (2) emitting the computed new_end_time in the top-up event so off-chain consumers know when the stream will drain, and (3) hardening the Rust toolchain by declaring a minimum supported Rust version (1.81.0) with workspace Cargo.toml and README documentation.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🔧 Refactoring (no functional changes)
  • 📚 Documentation update

Changes Made

  • contracts/stream_contract/src/types.rs — Rewrote all Stream struct field docs to specify units (stroops, Unix epoch seconds) and clarify when each field is meaningful (e.g. paused_at vs paused)
  • contracts/stream_contract/src/events.rs — Added new_end_time: u64 field to StreamToppedUpEvent
  • contracts/stream_contract/src/lib.rs — Compute new_end_time during top-up: now + remaining / rate_per_second
  • contracts/stream_contract/src/test.rs — Assert new_end_time == 150 in test_top_up_emits_event
  • contracts/Cargo.toml — Added rust-version = "1.81.0", documented all profile settings with inline comments
  • contracts/stream_contract/Cargo.toml — Added rust-version = "1.81.0"
  • contracts/README.md — Added "Rust Toolchain" section explaining CI uses stable + wasm32-unknown-unknown

Testing

  • Unit tests added/updated
  • Manual testing performed

Test Steps

  1. Run cargo test in contracts/ — all tests pass, including new assertion on new_end_time
  2. Run cargo build --release — WASM size stays within 200 KB budget

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Closes #1009
Closes #1010
Closes #1011

@ogazboiz
ogazboiz merged commit 39d8143 into LabsCrypt:main Jul 29, 2026
6 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants