fix: deploy via_ir=true bytecode and add --prebuilt workflow#33
Merged
mikhaildobs merged 1 commit intodevfrom Feb 23, 2026
Merged
fix: deploy via_ir=true bytecode and add --prebuilt workflow#33mikhaildobs merged 1 commit intodevfrom
mikhaildobs merged 1 commit intodevfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FORGE_PROFILEbug:deploy.shstep 1 compiled withvia_ir=truebut steps 2–5 usedFOUNDRY_PROFILE=ci(via_ir=false), soforge scriptrecompiled and deployed non-optimized bytecode. ChangedFORGE_PROFILEfrom"ci"to"default".--prebuiltflag: Build optimized artifacts on a VPS withmake build-deploy-artifacts, commit the 682K tarball, then deploy locally with./script/deploy.sh sepolia --prebuilt(skips compilation, uses--skip-compilation).make build-deploy-artifacts: Builds scripts with ci profile (fast), then contracts with default profile (via_ir=true), and packagesout/intodeploy-artifacts.tar.gz.Test plan
make build-deploy-artifactson VPS — verify tarball is created withviaIR=truein contract artifact metadata./script/deploy.sh sepolia --prebuilt --dry-runlocally after extracting tarball — verify no recompilation and correct bytecode./script/deploy.sh sepolia --dry-run(without--prebuilt) — verify normal flow still compiles withvia_ir=true🤖 Generated with Claude Code