Skip to content

fix: deploy via_ir=true bytecode and add --prebuilt workflow#33

Merged
mikhaildobs merged 1 commit intodevfrom
fix/deploy-via-ir-prebuilt
Feb 23, 2026
Merged

fix: deploy via_ir=true bytecode and add --prebuilt workflow#33
mikhaildobs merged 1 commit intodevfrom
fix/deploy-via-ir-prebuilt

Conversation

@mikhaildobs
Copy link
Member

Summary

  • Fix FORGE_PROFILE bug: deploy.sh step 1 compiled with via_ir=true but steps 2–5 used FOUNDRY_PROFILE=ci (via_ir=false), so forge script recompiled and deployed non-optimized bytecode. Changed FORGE_PROFILE from "ci" to "default".
  • Add --prebuilt flag: Build optimized artifacts on a VPS with make build-deploy-artifacts, commit the 682K tarball, then deploy locally with ./script/deploy.sh sepolia --prebuilt (skips compilation, uses --skip-compilation).
  • Add make build-deploy-artifacts: Builds scripts with ci profile (fast), then contracts with default profile (via_ir=true), and packages out/ into deploy-artifacts.tar.gz.

Test plan

  • Run make build-deploy-artifacts on VPS — verify tarball is created with viaIR=true in contract artifact metadata
  • Run ./script/deploy.sh sepolia --prebuilt --dry-run locally after extracting tarball — verify no recompilation and correct bytecode
  • Run ./script/deploy.sh sepolia --dry-run (without --prebuilt) — verify normal flow still compiles with via_ir=true

🤖 Generated with Claude Code

deploy.sh had a bug where step 1 compiled with via_ir=true but steps 2-5
ran forge script with FOUNDRY_PROFILE=ci, which recompiled with via_ir=false
and overwrote the optimized artifacts. Fix FORGE_PROFILE to "default".

Also add a --prebuilt flag for building optimized artifacts on a VPS and
deploying them locally without recompilation:
- `make build-deploy-artifacts` builds via_ir contracts + ci scripts, tarballs out/
- `./script/deploy.sh sepolia --prebuilt` extracts and deploys with --skip-compilation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mikhaildobs mikhaildobs merged commit 0fefa82 into dev Feb 23, 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