Skip to content

[Mainnet] Update StoryFactory address and ABI for v2 deployment #380

@realproject7

Description

@realproject7

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

  • Constants updated with new address and deployment block
  • ABI updated with hasSunset, updateCurve, owner, CurveUpdated
  • SDK ABI and constants updated
  • No stale sunset references
  • npm run typecheck passes
  • npm run lint passes

Branch

task/{issue-number}-v2-address-abi

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/T3Assigned to T3 builder agentenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions