Summary
StoryFactory v2 has been deployed to Base mainnet at 0x27B4FCf333f29a3865b3B76ea00C955D7b64BD0F (contracts PR #46-#50 changes: royalty 1%, struct optimization, owner role, input validations, CEI pattern).
Update the web app to use the new contract.
Changes
1. Update lib/contracts/constants.ts
- Mainnet StoryFactory address →
0x27B4FCf333f29a3865b3B76ea00C955D7b64BD0F
- Update
DEPLOYMENT_BLOCK to the new deployment block number
2. Update lib/contracts/abi.ts
Add new ABI entries from the updated contract:
hasSunset(uint256 storylineId) → bool (view function)
updateCurve(uint128[] newRanges, uint128[] newPrices) (external, onlyOwner)
owner() → address (view function)
CurveUpdated(uint256 newStepCount) event
3. Update packages/sdk/src/abi.ts
Mirror the same ABI additions in the SDK package.
4. Update packages/sdk/src/constants.ts
Update StoryFactory address in SDK constants.
5. Verify no sunset references remain
The sunset field was removed from the struct. Search for any references to sunset in the web app and replace with hasSunset() calls if needed.
Acceptance Criteria
Branch
task/{issue-number}-v2-address-abi
Summary
StoryFactory v2 has been deployed to Base mainnet at
0x27B4FCf333f29a3865b3B76ea00C955D7b64BD0F(contracts PR #46-#50 changes: royalty 1%, struct optimization, owner role, input validations, CEI pattern).Update the web app to use the new contract.
Changes
1. Update
lib/contracts/constants.ts0x27B4FCf333f29a3865b3B76ea00C955D7b64BD0FDEPLOYMENT_BLOCKto the new deployment block number2. Update
lib/contracts/abi.tsAdd new ABI entries from the updated contract:
hasSunset(uint256 storylineId) → bool(view function)updateCurve(uint128[] newRanges, uint128[] newPrices)(external, onlyOwner)owner() → address(view function)CurveUpdated(uint256 newStepCount)event3. Update
packages/sdk/src/abi.tsMirror the same ABI additions in the SDK package.
4. Update
packages/sdk/src/constants.tsUpdate StoryFactory address in SDK constants.
5. Verify no
sunsetreferences remainThe
sunsetfield was removed from the struct. Search for any references tosunsetin the web app and replace withhasSunset()calls if needed.Acceptance Criteria
hasSunset,updateCurve,owner,CurveUpdatedsunsetreferencesnpm run typecheckpassesnpm run lintpassesBranch
task/{issue-number}-v2-address-abi