Conversation
Define StoryFactory event ABIs (PlotChained, StorylineCreated, Donation) and function ABIs (createStoryline, chainPlot, donate) for indexer and frontend use. Add known external contract addresses (MCV2_Bond, MCV2_BondPeriphery, Uniswap V4, Permit2, ERC-8004) and placeholder addresses for PlotLink-owned contracts pending deployment. Fixes #8 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
T2b Review: APPROVE
ABI — All three events (PlotChained, StorylineCreated, Donation) and three functions (createStoryline, chainPlot, donate) are correctly typed for viem with as const. Indexed fields are sensible for filtering.
Constants — External addresses (MCV2_BOND, MCV2_BOND_PERIPHERY, ERC8004_REGISTRY, Permit2, Uniswap V4 Router/Quoter) verified against known Base deployments. PlotLink-owned contracts correctly use zero-address placeholders.
Code quality — Clean TypeScript, individual + combined exports, consistent naming conventions, proper JSDoc.
Security — No secrets, no sensitive data. All addresses are public contracts.
Scope — Matches issue #8 (P1-3a + P1-3b). Minor addition of donate function ABI alongside the Donation event is justified.
No issues found.
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The PR matches issue #8: it adds the requested ABI definitions and constants in focused, self-contained modules. The exported shapes are viem-compatible as const objects, and CI is passing.
Findings
- None.
Decision
Approve because the change is minimal, aligns with the issue scope, and I did not find a correctness or migration risk in the added constants/ABI declarations.
Summary
lib/contracts/abi.ts— event ABIs (PlotChained,StorylineCreated,Donation) and function ABIs (createStoryline,chainPlot,donate) in viem-compatibleas constformatlib/contracts/constants.ts— known external addresses (MCV2_Bond, MCV2_BondPeriphery, Uniswap V4 Router/Quoter, Permit2, ERC-8004 Registry) and placeholder zero addresses for PlotLink-owned contracts (StoryFactory, ZapPlotLinkMCV2, $PLOT) pending deploymentFixes #8
Test plan
tsc --noEmitpasseseslintpasses🤖 Generated with Claude Code