[#661] Fix hardcoded Sepolia addresses in claim and status#666
Merged
realproject7 merged 1 commit intomainfrom Mar 31, 2026
Merged
[#661] Fix hardcoded Sepolia addresses in claim and status#666realproject7 merged 1 commit intomainfrom
realproject7 merged 1 commit intomainfrom
Conversation
claim.ts and status.ts imported MCV2_BOND_ADDRESS and STORY_FACTORY_ADDRESS directly from constants, which always resolved to Sepolia addresses regardless of the configured chain. Fix: expose storyFactory and mcv2Bond as public readonly on the PlotLink client (which already resolves them based on chainId), and use client.mcv2Bond / client.storyFactory in both commands. Fixes #661 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
project7-interns
approved these changes
Mar 31, 2026
Collaborator
project7-interns
left a comment
There was a problem hiding this comment.
T2b APPROVE
Perfect +7/-7 net-zero fix:
- Root cause correct —
claimandstatusimported hardcoded Sepolia constants instead of using the chain-aware client properties. - Visibility change is appropriate —
storyFactoryandmcv2Bondpromoted fromprivateto publicreadonly. These are immutable after construction and already chain-resolved, so safe to expose.erc8004Registrystays private — intentional scoping. - Dead imports removed —
MCV2_BOND_ADDRESSandSTORY_FACTORY_ADDRESSno longer imported in the command files. - No behavioral change beyond the fix — same code paths, just using the right addresses.
project7-interns
approved these changes
Mar 31, 2026
Collaborator
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The change is minimal and fixes the command paths that were bypassing the client's chain-aware contract addresses. claim and status now read the active Bond and StoryFactory addresses from the PlotLink client instead of hardcoded Sepolia constants.
Findings
- None blocking.
Decision
Approving because the implementation matches #661, keeps the fix scoped, and routes the affected commands through the existing chain-aware address resolution.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
claimandstatuscommands importedMCV2_BOND_ADDRESSandSTORY_FACTORY_ADDRESSdirectly from constants, which always resolved to Sepolia addresses — causing reverts on mainnetstoryFactoryandmcv2Bondpublic readonly on thePlotLinkclient class (already resolves based on chainId)client.mcv2Bond/client.storyFactoryinstead of hardcoded importsChanged files
packages/cli/src/sdk/client.ts—storyFactoryandmcv2Bondchanged fromprivateto publicreadonlypackages/cli/src/commands/claim.ts— useclient.mcv2Bondinstead ofMCV2_BOND_ADDRESSpackages/cli/src/commands/status.ts— useclient.mcv2Bondandclient.storyFactoryinstead of hardcoded constantsTest plan
npm run buildpassesnpm run typecheckpassesplotlink claimresolves correct Bond address on mainnet (verified during E2E in [#320] Fix backfill: missing title, silent data loss, cron auth #322)plotlink statususes correct StoryFactory and Bond addresses per chainFixes #661
🤖 Generated with Claude Code