Join the discussion on Telegram
Why this matters
update_fee_config (contracts/stream_contract/src/lib.rs) changes protocol-critical state — the treasury address and the fee rate that is applied to every create_stream and top_up_stream. Unlike every other mutating function in the contract, it emits no event. The off-chain indexer therefore has no way to observe or audit a fee/treasury change, and an admin dashboard cannot show fee-config history. For a protocol that collects fees from user funds, silent, unauditable fee changes are a transparency and trust problem.
Acceptance criteria
Files to touch
contracts/stream_contract/src/events.rs
contracts/stream_contract/src/lib.rs
contracts/stream_contract/src/test.rs
Out of scope
- Indexing the new event in the backend worker (follow-up).
Join the discussion on Telegram
Why this matters
update_fee_config(contracts/stream_contract/src/lib.rs) changes protocol-critical state — the treasury address and the fee rate that is applied to everycreate_streamandtop_up_stream. Unlike every other mutating function in the contract, it emits no event. The off-chain indexer therefore has no way to observe or audit a fee/treasury change, and an admin dashboard cannot show fee-config history. For a protocol that collects fees from user funds, silent, unauditable fee changes are a transparency and trust problem.Acceptance criteria
FeeConfigUpdatedEventtocontracts/stream_contract/src/events.rscarrying at least{ admin, old_treasury, new_treasury, old_fee_rate_bps, new_fee_rate_bps }.update_fee_configincontracts/stream_contract/src/lib.rs(and consider emitting anInitializedevent frominitializefor symmetry).contracts/stream_contract/src/test.rsasserting the event is published with correct fields.Files to touch
contracts/stream_contract/src/events.rscontracts/stream_contract/src/lib.rscontracts/stream_contract/src/test.rsOut of scope