What
The set_max_supply function in learn-token does not emit an event when the supply cap is changed.
Why
Supply cap changes significantly affect tokenomics. Indexers, monitoring systems, and block explorers need events to detect when the cap changes. The related set_progress_tracker function already emits a progress_tracker_updated event — set_max_supply should follow the same pattern for consistency.
Scope
- Define a
max_supply_updated event (or reuse existing patterns)
- Emit the event in
set_max_supply with the old and new values
- Add a test verifying the event is emitted
Technical Context
- File:
contracts/learn-token/src/lib.rs (lines ~453-464)
set_progress_tracker already emits progress_tracker_updated — follow this pattern
- Events in Soroban are emitted via
env.events().publish()
Acceptance Criteria
What
The
set_max_supplyfunction inlearn-tokendoes not emit an event when the supply cap is changed.Why
Supply cap changes significantly affect tokenomics. Indexers, monitoring systems, and block explorers need events to detect when the cap changes. The related
set_progress_trackerfunction already emits aprogress_tracker_updatedevent —set_max_supplyshould follow the same pattern for consistency.Scope
max_supply_updatedevent (or reuse existing patterns)set_max_supplywith the old and new valuesTechnical Context
contracts/learn-token/src/lib.rs(lines ~453-464)set_progress_trackeralready emitsprogress_tracker_updated— follow this patternenv.events().publish()Acceptance Criteria
set_max_supplyemits an event with old and new values