[#339] Update frontend + SDK constants for Base mainnet#342
[#339] Update frontend + SDK constants for Base mainnet#342realproject7 merged 2 commits intomainfrom
Conversation
- Set mainnet StoryFactory address 0x66087c0032c304Eb724544ef8Fc7C7f3E6C8CdF5 - Set mainnet PLOT_TOKEN to PL_TEST (0xF8A2C3...) - Update RESERVE_LABEL mainnet from "$PLOT" to "PL_TEST" - Add STORY_FACTORY_MAINNET_ADDRESS, MCV2_BOND_MAINNET_ADDRESS, DEPLOYMENT_BLOCK_MAINNET to SDK constants - Update .env.example with mainnet addresses Fixes #339 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
The frontend constants look aligned with the deployed mainnet values, but the SDK side is still incomplete. The new mainnet constants are added, yet the PlotLink client continues to use Sepolia defaults even when configured for Base mainnet.
Findings
- [high] The SDK client never switches to the new mainnet contract addresses or mainnet deployment block for
chainId=8453.- File:
packages/sdk/src/client.ts - Suggestion: when
chainId === 8453, defaultstoryFactory,mcv2Bond, andfromBlockto the mainnet constants instead ofSTORY_FACTORY_ADDRESS,MCV2_BOND_ADDRESS, andDEPLOYMENT_BLOCK(which still point to Sepolia / block20_000_000). As written, a mainnet SDK client will query and transact against the wrong defaults.
- File:
- [medium] The PR adds
DEPLOYMENT_BLOCK_MAINNET, but the code paths that fetch logs still useDEPLOYMENT_BLOCKonly.- File:
packages/sdk/src/client.ts - Suggestion: select the deployment block by chain so mainnet log queries start from the actual deploy block
43_559_145.
- File:
Decision
Request changes because the ticket claims to update frontend + SDK constants for Base mainnet, but the SDK runtime still defaults to Sepolia values on mainnet.
project7-interns
left a comment
There was a problem hiding this comment.
T2b APPROVE
- Addresses verified: StoryFactory
0x66087c..., MCV2_Bond0xc5a076..., PL_TEST0xF8A2C3...— all match deployed contracts from PR #24 - Frontend constants: IS_TESTNET ternary correctly selects mainnet addresses; RESERVE_LABEL →
"PL_TEST"for test phase ✓ - SDK constants: Separate
*_MAINNET_*exports with deployment block 43,559,145 ✓ .env.example: Documents both testnet/mainnet addresses ✓- CI green (lint-and-typecheck passes)
LGTM.
SDK constructor now defaults to mainnet StoryFactory, MCV2_Bond, and deployment block when chainId=8453. Fixes incorrect Sepolia defaults on mainnet. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The follow-up commit fixes the SDK regression by selecting contract addresses and deployment block based on chainId. That closes the mainnet-defaulting gap while keeping the frontend constants aligned with the deployed contract.
Findings
- [info]
packages/sdk/src/client.tsnow switches StoryFactory, MCV2_Bond, and logfromBlockto the mainnet constants whenchainId=8453.
Decision
Approve because the PR now updates both frontend and SDK runtime behavior for Base mainnet as required by issue #339.
Summary
0x66087c0032c304Eb724544ef8Fc7C7f3E6C8CdF5inlib/contracts/constants.ts0xF8A2C39111FCEB9C950aAf28A9E34EBaD99b85C1)"$PLOT"to"PL_TEST"for test phaseSTORY_FACTORY_MAINNET_ADDRESS,MCV2_BOND_MAINNET_ADDRESS,DEPLOYMENT_BLOCK_MAINNET(43,559,145) to SDK.env.examplewith mainnet addresses and commentsTest plan
npm run typecheckpassesnpm run buildsucceedsNEXT_PUBLIC_CHAIN_IDFixes #339
🤖 Generated with Claude Code