Problem
The new StoryFactory (0x6B8d...605d) starts at storylineCount = 0, so the first createStoryline tries to create a token with symbol PLOT-1. But the old StoryFactory (0x05C4...b474) already created PLOT-1, PLOT-2, PLOT-3 on MCV2_Bond. MCV2_Bond rejects duplicate symbols, causing the tx to revert.
Fix
Change the token symbol prefix from PLOT- to PLT- in StoryFactory.sol line 113:
// OLD:
symbol: string(abi.encodePacked("PLOT-", _uint2str(storylineId)))
// NEW:
symbol: string(abi.encodePacked("PLT-", _uint2str(storylineId)))
This is a testnet-only workaround. On mainnet (#41), the symbol should be PLOT- (no collision since it's a fresh deploy).
Steps
- Update
plotlink-contracts/src/StoryFactory.sol line 113 — change "PLOT-" to "PLT-"
- Update tests if any assert on the symbol format
forge test
- Deploy to Base Sepolia:
forge script script/DeployBaseSepolia.s.sol --rpc-url base_sepolia --broadcast
- Update
plotlink/lib/contracts/constants.ts — new STORY_FACTORY address
- Update
plotlink/packages/sdk/src/constants.ts — new STORY_FACTORY_ADDRESS
- Verify on Basescan
Deployment info
- Contract repo:
/Users/cho/Projects/plotlink-contracts/
- Deploy script:
script/DeployBaseSepolia.s.sol
- Deployer key:
plotlink-contracts/.env (DEPLOYER_PRIVATE_KEY)
- Current contract:
0x6B8d38af1773dd162Ebc6f4A8eb923F3c669605d
- Chain: Base Sepolia (84532)
Important
- Do NOT change the ABI — only the symbol prefix changes, no ABI impact
- After deploy, operator will update env and run migration to re-tag data
Acceptance Criteria
Problem
The new StoryFactory (
0x6B8d...605d) starts atstorylineCount = 0, so the firstcreateStorylinetries to create a token with symbolPLOT-1. But the old StoryFactory (0x05C4...b474) already createdPLOT-1,PLOT-2,PLOT-3on MCV2_Bond. MCV2_Bond rejects duplicate symbols, causing the tx to revert.Fix
Change the token symbol prefix from
PLOT-toPLT-in StoryFactory.sol line 113:This is a testnet-only workaround. On mainnet (#41), the symbol should be
PLOT-(no collision since it's a fresh deploy).Steps
plotlink-contracts/src/StoryFactory.solline 113 — change"PLOT-"to"PLT-"forge testforge script script/DeployBaseSepolia.s.sol --rpc-url base_sepolia --broadcastplotlink/lib/contracts/constants.ts— new STORY_FACTORY addressplotlink/packages/sdk/src/constants.ts— new STORY_FACTORY_ADDRESSDeployment info
/Users/cho/Projects/plotlink-contracts/script/DeployBaseSepolia.s.solplotlink-contracts/.env(DEPLOYER_PRIVATE_KEY)0x6B8d38af1773dd162Ebc6f4A8eb923F3c669605dImportant
Acceptance Criteria
PLT-createStorylineno longer reverts