Summary
Cleanup after Batch 19 E2E test. T3 redeployed StoryFactory during testing (symbol collision fix), creating a new contract that needs to be reflected in the codebase.
1. Update constants.ts with new StoryFactory v4b address
- Old (in code):
0x92c3bd44fda84e632c3c3cb31387d0c0c1de618d
- New (live on Vercel):
0x9D2AE1E99D0A6300bfcCF41A82260374e38744Cf
- Update
lib/contracts/constants.ts — STORY_FACTORY mainnet fallback
- Update
DEPLOYMENT_BLOCK to new contract's deployment block
- Update
packages/sdk/src/constants.ts if applicable
2. Clean orphan storylines (IDs 25-33)
- IDs 25-33 were created with wrong content hashes (
keccak256(CID) instead of keccak256(content))
- Their plots failed to index, but the storyline records exist in Supabase
- Create migration
00025_cleanup_orphan_storylines.sql:
-- Clean up orphan storylines from first E2E attempt (wrong content hashes)
DELETE FROM plots WHERE storyline_id BETWEEN 25 AND 33
AND lower(contract_address) = lower('0x9D2AE1E99D0A6300bfcCF41A82260374e38744Cf');
DELETE FROM trade_history WHERE storyline_id BETWEEN 25 AND 33;
DELETE FROM ratings WHERE storyline_id BETWEEN 25 AND 33
AND lower(contract_address) = lower('0x9D2AE1E99D0A6300bfcCF41A82260374e38744Cf');
DELETE FROM comments WHERE storyline_id BETWEEN 25 AND 33
AND lower(contract_address) = lower('0x9D2AE1E99D0A6300bfcCF41A82260374e38744Cf');
DELETE FROM storylines WHERE storyline_id BETWEEN 25 AND 33
AND lower(contract_address) = lower('0x9D2AE1E99D0A6300bfcCF41A82260374e38744Cf');
3. Reset backfill_cursor for new contract
- Check current cursor — may need resetting to new contract's deployment block
- Update migration 00023 or create new migration if needed
4. Update plotlink-contracts references
- Update
script/E2ETest.s.sol and script/E2ETestReverts.s.sol with new factory address
- Update
README.md deployed address
Acceptance Criteria
Summary
Cleanup after Batch 19 E2E test. T3 redeployed StoryFactory during testing (symbol collision fix), creating a new contract that needs to be reflected in the codebase.
1. Update constants.ts with new StoryFactory v4b address
0x92c3bd44fda84e632c3c3cb31387d0c0c1de618d0x9D2AE1E99D0A6300bfcCF41A82260374e38744Cflib/contracts/constants.ts—STORY_FACTORYmainnet fallbackDEPLOYMENT_BLOCKto new contract's deployment blockpackages/sdk/src/constants.tsif applicable2. Clean orphan storylines (IDs 25-33)
keccak256(CID)instead ofkeccak256(content))00025_cleanup_orphan_storylines.sql:3. Reset backfill_cursor for new contract
4. Update plotlink-contracts references
script/E2ETest.s.solandscript/E2ETestReverts.s.solwith new factory addressREADME.mddeployed addressAcceptance Criteria
0x9D2A...44Cf)