Problem
createStoryline() reverts with OutOfGas. The 500-step bonding curve creation on MCV2_Bond requires ~14.4M gas, but the explicit gas limit is set to 5_000_000 (from PR #245).
Trace evidence:
- TX
0x5fecc8... used 4,946,987 / 5,000,000 → OutOfGas
- TX
0x8ef626... used 6,915,737 / 7,000,000 → OutOfGas
cast estimate on both old and new contracts: ~14.4M gas
Root cause: PR #245 added gas: BigInt(5_000_000) to fix a MetaMask gas estimation UX issue, but 5M is only ~1/3 of the actual gas needed. The old contract worked because it had no explicit gas cap — the wallet auto-estimated correctly at ~14.4M.
Fix
In src/app/create/page.tsx, change the gas parameter in the buildWriteCall:
// Before (line 120)
gas: BigInt(5_000_000),
// After
gas: BigInt(16_000_000),
16M provides safe headroom over the ~14.4M estimate. chainPlot gas at 500_000 in src/hooks/useChainPlot.ts is fine — it doesn't create a bonding curve.
Files
src/app/create/page.tsx — line 120: change BigInt(5_000_000) to BigInt(16_000_000)
Acceptance criteria
Problem
createStoryline()reverts with OutOfGas. The 500-step bonding curve creation on MCV2_Bond requires ~14.4M gas, but the explicit gas limit is set to5_000_000(from PR #245).Trace evidence:
0x5fecc8...used 4,946,987 / 5,000,000 → OutOfGas0x8ef626...used 6,915,737 / 7,000,000 → OutOfGascast estimateon both old and new contracts: ~14.4M gasRoot cause: PR #245 added
gas: BigInt(5_000_000)to fix a MetaMask gas estimation UX issue, but 5M is only ~1/3 of the actual gas needed. The old contract worked because it had no explicit gas cap — the wallet auto-estimated correctly at ~14.4M.Fix
In
src/app/create/page.tsx, change thegasparameter in thebuildWriteCall:16M provides safe headroom over the ~14.4M estimate.
chainPlotgas at500_000insrc/hooks/useChainPlot.tsis fine — it doesn't create a bonding curve.Files
src/app/create/page.tsx— line 120: changeBigInt(5_000_000)toBigInt(16_000_000)Acceptance criteria
gas: BigInt(16_000_000)in createStoryline buildWriteCallnpm run typecheckpasses