Skip to content

[#8] Contract ABI & Constants#46

Merged
realproject7 merged 1 commit intomainfrom
task/8-contract-abi-constants
Mar 13, 2026
Merged

[#8] Contract ABI & Constants#46
realproject7 merged 1 commit intomainfrom
task/8-contract-abi-constants

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • P1-3a: lib/contracts/abi.ts — event ABIs (PlotChained, StorylineCreated, Donation) and function ABIs (createStoryline, chainPlot, donate) in viem-compatible as const format
  • P1-3b: lib/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 deployment

Fixes #8

Test plan

  • tsc --noEmit passes
  • eslint passes
  • Verify ABI signatures match proposal §4.1 and §4.3
  • Verify addresses match proposal §12

🤖 Generated with Claude Code

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>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@realproject7 realproject7 merged commit 4b99c9c into main Mar 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P1-3] Contract ABI & Constants

2 participants