Skip to content

feat(stream): expose current operator in StreamInfo and on-chain getter (#396) - #432

Open
DonaldXoftDev wants to merge 2 commits into
conduit-protocol:mainfrom
DonaldXoftDev:feat/396-dripstream-operator-getter
Open

feat(stream): expose current operator in StreamInfo and on-chain getter (#396)#432
DonaldXoftDev wants to merge 2 commits into
conduit-protocol:mainfrom
DonaldXoftDev:feat/396-dripstream-operator-getter

Conversation

@DonaldXoftDev

Copy link
Copy Markdown

What

Adds pub operator: Option

to StreamInfo and synchronizes the operator address on delegation, revocation, and stream state reads.

Why

Closes #396

Stream recipients previously had no way to inspect on-chain which delegated operator (if any) could cancel, pause, or modify their stream without indexing past operator_set and operator_revoked events from genesis.

How

  • contracts/stream/src/storage.rs: Added pub operator: Option to StreamInfo struct and cleaned up syntax annotations.
  • contracts/stream/src/lib.rs: Initialized StreamInfo.operator to None in initialize(), updated set_operator() and
    evoke_operator() to persist operator state to StreamInfo, and verified operator(env: Env) -> Option public getter.
  • contracts/stream/src/state.rs: Updated legacy fallback state loading to populate operator from DataKey::Operator.
  • contracts/stream/src/tests.rs: Added unit tests verifying StreamInfo.operator matches operator() across initialization, delegation, revocation, and stream lifecycle mutations.
  • contracts/governor/src/storage.rs & contracts/oracle/src/lib.rs: Added missing Clone derives on DataKey for shared RBAC storage traits.

Testing

  • cargo fmt --all --check (Passed)
  • cargo clippy --workspace --exclude conduit-integration-tests --target wasm32-unknown-unknown -- -D warnings (Passed)
  • cargo build -p drip-stream --target wasm32-unknown-unknown --release (Passed)
  • cargo build -p drip-factory --target wasm32-unknown-unknown --release (Passed)
  • cargo build -p drip-governor --target wasm32-unknown-unknown --release (Passed)

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@DonaldXoftDev 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! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement: DripStream exposes no getter for the current operator — the recipient can't tell on-chain who else can cancel their stream

1 participant