[#43] Add owner role, updateCurve(), trust documentation#48
[#43] Add owner role, updateCurve(), trust documentation#48realproject7 merged 1 commit intomainfrom
Conversation
- Add owner state variable (set to msg.sender in constructor) - Add onlyOwner modifier - Add updateCurve(newRanges, newPrices) for future storyline curves - Add CurveUpdated event - Document trust assumption on updateBondCreator (NatSpec) - 7 new tests: owner set, updateCurve happy/reverts, new storyline uses updated params All 45 tests pass. Fixes #43 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
T2b Review — APPROVED
- Owner set in constructor,
onlyOwnermodifier is standard updateCurvereplicates constructor validation (length match, non-empty, ≤1000) — correctcalldatafor arrays is gas-efficient- NatSpec trust note on
updateBondCreatordocuments the risk clearly - Existing storylines unaffected since their tokens are already created on MCV2_Bond
Note: no transferOwnership — if that's needed it should be a separate ticket. Current scope matches the issue spec.
7 new tests cover all paths including integration (new storyline uses updated params). LGTM.
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The PR adds the requested owner role and owner-only updateCurve() path with the expected validation guards, event emission, and trust-note documentation on updateBondCreator. The tests cover owner initialization, success, revert paths, and the post-update curve behavior for future storylines, and GitHub checks are passing.
Findings
- None.
Decision
Approving because the change matches the issue scope, the access-control boundary is explicit, and the updated tests cover the new behavior directly.
Summary
address public owner(set tomsg.senderin constructor)onlyOwnermodifierupdateCurve(newRanges, newPrices)— updates bonding curve params for future storylinesCurveUpdated(uint256 newStepCount)eventupdateBondCreatorcall (NatSpec)Test plan
forge fmt --checkcleanFixes #43
🤖 Generated with Claude Code