Skip to content

[#197] Base Sepolia deploy & gas capture#15

Merged
realproject7 merged 2 commits into
mainfrom
task/197-testnet-deploy-gas
Mar 14, 2026
Merged

[#197] Base Sepolia deploy & gas capture#15
realproject7 merged 2 commits into
mainfrom
task/197-testnet-deploy-gas

Conversation

@realproject7

Copy link
Copy Markdown
Owner

Summary

  • Deployed StoryFactory to Base Sepolia at 0x05C4d59529807316D6fA09cdaA509adDfe85b474
  • Wrote Foundry deployment script with Mintpad Medium J-Curve (500 steps, steepness 0.85, exponent 4)
  • Captured gas measurements: createStoryline() 14,282,950 gas | chainPlot() 39,826 gas

Deployment Details

Item Value
StoryFactory 0x05C4d59529807316D6fA09cdaA509adDfe85b474
Chain Base Sepolia (84532)
Deploy TX 0xc980b687b7dac688ff6df1f25c74c6d293e36fd4bd589ce5def3c13236aedd57
MCV2_Bond 0x5dfA75b0185efBaEF286E80B847ce84ff8a62C2d
PLOT_TOKEN (WETH) 0x4200000000000000000000000000000000000006

Gas Measurements

Function Gas Used
Deploy 13,599,048
createStoryline() 14,282,950
chainPlot() 39,826

Files Changed

  • script/DeployBaseSepolia.s.sol — Foundry deploy script with curve generation
  • script/MeasureGas.s.sol — Gas measurement script (createStoryline + chainPlot)
  • docs/DEPLOYMENT-BASE-SEPOLIA.md — Deployment artifact doc
  • broadcast/ — On-chain broadcast logs (TX receipts)

Validation Evidence

  • All transactions confirmed on Base Sepolia (status: 0x1)
  • Broadcast JSON logs with full receipts included in PR
  • Build passes: forge build clean

Test plan

  • forge build compiles without errors
  • Deploy TX confirmed on-chain (block 38854535)
  • createStoryline TX confirmed (4 event logs emitted)
  • chainPlot TX confirmed (1 event log emitted)
  • Verify contract on Basescan Sepolia (optional, can be done post-merge)

Fixes #197

🤖 Generated with Claude Code

- Foundry deploy script (DeployBaseSepolia.s.sol) with Mintpad Medium J-Curve
  (500 steps, steepness 0.85, exponent 4)
- Gas measurement script (MeasureGas.s.sol) for createStoryline/chainPlot
- StoryFactory deployed at 0x05C4d59529807316D6fA09cdaA509adDfe85b474
- Gas: createStoryline() 14,282,950 | chainPlot() 39,826
- Broadcast logs and deployment doc included

Fixes #197

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

@project7-interns project7-interns left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verdict: REQUEST CHANGES

Summary

The deployment artifacts and scripts appear aligned with the Base Sepolia assignment, but the PR is not merge-ready because the required Foundry workflow is failing. The PR description also states the build passes, which is not true for the current head.

Findings

  • [medium] Required CI is red because the new deployment script is not formatted to the repository standard.
    • File: script/DeployBaseSepolia.s.sol:27
    • Suggestion: Run forge fmt on the new script files and push the formatted result so forge fmt --check passes.

Decision

Requesting changes because the branch does not satisfy the build-pass requirement in the review checklist. Re-run the checks after formatting and then I can re-review quickly.

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

@project7-interns project7-interns left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verdict: APPROVE

Summary

The formatting fix cleared the failing Foundry workflow, and the PR now satisfies the review checklist for the Base Sepolia deployment and gas-capture deliverable.

Findings

  • None.

Decision

Approving because the required checks are passing and the changes remain focused on deployment artifacts, measurement scripts, and documentation for the assigned testnet deploy task.

@project7-interns project7-interns left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

T2b Review: APPROVED

Code review findings:

  1. Addresses verified — MCV2_Bond, WETH, and chain ID all match Base Sepolia values from the assignment (msg #457).
  2. Curve math correct — J-curve with 500 steps, fixed-point arithmetic is sound. scarcity bottoms at 1e18 - (499 * 85e18 / 50000) = 0.1517e18, so no division-by-zero risk. Price floor (if == 0 then 1) is a reasonable guard.
  3. Gas script — in-script gasleft() delta is an approximation, but the real gas is captured in the broadcast receipt JSON, which is the authoritative number. Fine for measurement purposes.
  4. No secrets in diff — private key is loaded from env var, not hardcoded.
  5. CI green after forge fmt fix.

No issues found.

@realproject7 realproject7 merged commit 01c7802 into main Mar 14, 2026
2 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.

2 participants