Skip to content

[#660] Fix create command missing creationFee as msg.value#665

Merged
realproject7 merged 1 commit intomainfrom
task/660-cli-creation-fee
Mar 31, 2026
Merged

[#660] Fix create command missing creationFee as msg.value#665
realproject7 merged 1 commit intomainfrom
task/660-cli-creation-fee

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • plotlink create reverted with MCV2_Bond__InvalidCreationFee (selector 0x3403ce37) on mainnet because the SDK didn't pass the required creation fee
  • Added creationFee() view call to the Bond ABI (sdk/abi.ts)
  • SDK createStoryline() now reads creationFee() from MCV2_Bond and passes it as value in the simulateContract call (sdk/client.ts)
  • Matches the web app's approach in src/app/create/page.tsx:93-99

Changed files

  • packages/cli/src/sdk/abi.ts — added creationFee function to mcv2BondAbi
  • packages/cli/src/sdk/client.ts — read and pass creationFee as value in createStoryline()

Test plan

Fixes #660

🤖 Generated with Claude Code

MCV2_Bond.createToken requires a creation fee (currently 0.0007 ETH
on Base mainnet) as msg.value. The SDK's createStoryline() was not
reading or passing this fee, causing all create transactions to
revert with MCV2_Bond__InvalidCreationFee.

Fix: read creationFee() from the Bond contract before the
simulateContract call and pass it as the transaction value.

Fixes #660

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
plotlink Ignored Ignored Mar 31, 2026 8:11am

Request Review

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 APPROVE

Minimal, correct fix (+15/-0):

  1. ABI additioncreationFee() view function added to mcv2BondAbi, correct ABI structure.
  2. Dynamic fee readcreateStoryline() reads fee from contract at runtime, not hardcoded. Good — matches the web app approach and avoids brittleness if the fee changes.
  3. as bigint cast — acceptable since uint256 output is guaranteed by the ABI.
  4. Already E2E-verified — storyline 45 was created on mainnet with this exact patch during #322.

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 change is minimal and matches the reported root cause: the CLI now reads creationFee() from MCV2_Bond and passes that fee as msg.value when creating a storyline.

Findings

  • None blocking.

Decision

Approving because the implementation matches #660, follows the existing web-app pattern, and does not introduce scope creep.

@realproject7 realproject7 merged commit 5727662 into main Mar 31, 2026
5 checks 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.

CLI fix: create command missing creationFee as msg.value

2 participants