feat(deploy): deploy-network skill for staged new-network bring-up#2066
feat(deploy): deploy-network skill for staged new-network bring-up#20660xDEnYO wants to merge 4 commits into
Conversation
Enables an agent to drive a full new-network deployment (deployAllContracts / scriptMaster use case 3) without an interactive terminal and under per-command time limits, by running one stage per fresh shell. - deployAllContracts.sh: optional START_STAGE/END_STAGE env bounds the stage range and skips the interactive gum stage menu; NON_INTERACTIVE=true accepts computed defaults at the stage-9 funding prompts. Defaults preserve the original interactive behavior (run chosen stage -> 12). - verifyERC20ProxyAuthorization.sh: NON_INTERACTIVE=true auto-confirms owner funding with the default amount (stage 10). - .agents/commands/deploy-network.md (+ .cursor / .claude symlinks): the skill. New-network bootstrap only (direct-to-diamond); stops after stage 11 and never runs ownership transfer. Relies on CREATE3/diamondCut idempotency for safe per-stage re-runs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Ordered preflight (submodules, typechain, GLOBAL_FILE_PATH, verifier subdomain, premium RPC, corePeriphery<->target-state reconciliation, version currency), bash-not-zsh + which env overrides survive the .env re-source, idempotent per-stage re-run, deploy-with-verification-off + parallel rate-limit-aware verify sweep, and the MongoDB master-log / mongo-logs:sync reality. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
WalkthroughThe PR adds a ChangesNetwork deployment workflow
Estimated code review effort: 4 (Complex) | ~45 minutes Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… sourcing - helperFunctions.sh: add verifyNetworkContractsParallel(network, environment) — a network-scoped parallel verification sweep for the deploy-network "verify after deploy" phase. Verifies unverified contracts concurrently (capped low, staggered dispatch), then updates the deployment log SEQUENTIALLY (parallel log writes would corrupt it). Extend verifyContract's retry triggers to include 429/rate-limit/too many requests so parallel verification backs off instead of failing. - deployAllContracts.sh: source deploySingleContract.sh (was relying on scriptMaster to source it; direct invocation hit "deploySingleContract: command not found" at stage 3). Now self-contained. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
deploySingleContract now skips the forge script when the version-specific CREATE3 address already has code (NEW_DEPLOYMENT=="true"): running it would only fork the RPC (~dozens of ~1s calls on a public RPC) to no-op. Reuses the deployed address; existing log-matching supplies constructor args. A version bump changes bytecode -> different salt/address -> deploys normally. Opt out with SKIP_IF_ALREADY_DEPLOYED=false. Validated on injective: a stage-6 re-run dropped from ~8min to ~114s. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (1)
script/deploy/deploySingleContract.sh (1)
282-282: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse the required Bash conditional form.
- while [ $attempts -le "$MAX_ATTEMPTS_PER_CONTRACT_DEPLOYMENT" ] && [[ -z "$ADDRESS" ]]; do + while [[ "$attempts" -le "$MAX_ATTEMPTS_PER_CONTRACT_DEPLOYMENT" && -z "$ADDRESS" ]]; doAs per coding guidelines, “Use
[[ ]]for conditional expressions instead of[ ]” and always quote variable references.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@script/deploy/deploySingleContract.sh` at line 282, Update the while condition around the deployment retry loop to use Bash’s [[ ]] conditional syntax consistently, including the attempts comparison and ADDRESS emptiness check. Quote variable references within the condition while preserving the existing retry behavior.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.agents/commands/deploy-network.md:
- Around line 108-121: The Phase 1 deployment instructions do not reliably
disable verification because deployAllContracts sources .env after the inline
environment assignment. Update the command guidance around deployAllContracts so
VERIFY_CONTRACTS=false remains effective, either by explicitly instructing users
to edit and restore .env for the run or by preserving the caller-provided
override in the deployment script; ensure the documented command truly avoids
inline verification.
In `@script/deploy/deploySingleContract.sh`:
- Around line 266-280: Before the short-circuit in deploySingleContract, clear
stale RAW_RETURN_DATA and load the constructor arguments from the deployment-log
entry matching CONTRACT and CONTRACT_ADDRESS. Ensure the reuse path uses these
loaded arguments for CONSTRUCTOR_ARGS, while preserving normal forge execution
and output handling for newly deployed contracts.
In `@script/helperFunctions.sh`:
- Around line 2634-2635: Check the return status of logContractDeploymentInfo
before incrementing OK in the deployment-processing flow. On failure, add the
contract to FAILED and skip the success increment; only increment OK when the
deployment-log update succeeds, preserving the existing summary and verification
behavior.
- Around line 2567-2572: Update the concurrency setup near
VERIFICATION_MAX_CONCURRENT_JOBS to read MAX_CONCURRENT_JOBS with
${MAX_CONCURRENT_JOBS:-}, then validate that any provided value is a positive
integer before dispatch. Reject zero, negative, and non-numeric values so the
throttle cannot wait indefinitely, while preserving the configured verification
concurrency behavior for valid inputs.
In `@script/tasks/verifyERC20ProxyAuthorization.sh`:
- Around line 110-119: Update the funding decision in
verifyERC20ProxyAuthorization around DEFAULT_FUND_AMOUNT and DO_FUND_OWNER so
NON_INTERACTIVE mode automatically funds only when OWNER_BALANCE is below the
required amount. Preserve the existing interactive confirmation behavior, and
avoid sending funds on reruns when the owner already has sufficient balance.
---
Nitpick comments:
In `@script/deploy/deploySingleContract.sh`:
- Line 282: Update the while condition around the deployment retry loop to use
Bash’s [[ ]] conditional syntax consistently, including the attempts comparison
and ADDRESS emptiness check. Quote variable references within the condition
while preserving the existing retry behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: ed3423b0-d433-44c2-839a-035449b56546
📒 Files selected for processing (7)
.agents/commands/deploy-network.md.claude/skills/deploy-network/SKILL.md.cursor/commands/deploy-network.mdscript/deploy/deployAllContracts.shscript/deploy/deploySingleContract.shscript/helperFunctions.shscript/tasks/verifyERC20ProxyAuthorization.sh
| Deploy with **verification OFF** for speed (verify in Phase 2 instead). One stage per shell: | ||
|
|
||
| ```bash | ||
| export PATH="$HOME/.foundry/bin:$HOME/.bun/bin:$PATH" | ||
| cd <network-worktree> | ||
| START_STAGE=<N> END_STAGE=<N> NON_INTERACTIVE=true VERIFY_CONTRACTS=false \ | ||
| bash -c 'source script/deploy/deployAllContracts.sh; deployAllContracts <network> production' \ | ||
| 2>&1 | sed 's/\x1b\[[0-9;]*m//g' > /tmp/stage<N>.log | ||
| grep -c "STAGE <N> completed" /tmp/stage<N>.log # 1 = advance; 0 = inspect/re-run | ||
| ``` | ||
|
|
||
| (`VERIFY_CONTRACTS=false` is in `.env`, so to truly disable inline verification either edit `.env` | ||
| for the run or rely on the Phase-2 sweep; deploying verification-off avoids inline `--watch` | ||
| blocking and Blockscout indexing-lag failures.) |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Make the verification-off command actually disable verification.
Line 113 sets VERIFY_CONTRACTS=false, but deployAllContracts subsequently sources .env, overwriting it. If .env contains VERIFY_CONTRACTS=true, stages still run blocking inline verification despite Lines 108-109 promising otherwise. Either require editing/restoring .env before Phase 1 or preserve the caller override in the script.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.agents/commands/deploy-network.md around lines 108 - 121, The Phase 1
deployment instructions do not reliably disable verification because
deployAllContracts sources .env after the inline environment assignment. Update
the command guidance around deployAllContracts so VERIFY_CONTRACTS=false remains
effective, either by explicitly instructing users to edit and restore .env for
the run or by preserving the caller-provided override in the deployment script;
ensure the documented command truly avoids inline verification.
| # Reset before the loop so a value leaked from a previous contract can never wrongly trigger the | ||
| # short-circuit below (deploySingleContract is called in a loop by deployFacetAndAddToDiamond). | ||
| ADDRESS="" | ||
|
|
||
| # Short-circuit already-deployed contracts (opt out with SKIP_IF_ALREADY_DEPLOYED=false). | ||
| # DEPLOYSALT includes the compiled bytecode, so the predicted CREATE3 address is version-specific: | ||
| # if it already has code (NEW_DEPLOYMENT=="true"), this exact contract+version is already deployed | ||
| # and running the forge script would only fork the RPC (~dozens of calls) to no-op. Reuse the | ||
| # deployed address and skip the loop; the log-matching further below supplies the constructor args. | ||
| # A version bump changes the bytecode -> a different salt/address with no code -> deploys normally. | ||
| # (Only the non-zkEVM CREATE3 path sets NEW_DEPLOYMENT, so this naturally never fires on zkEVM.) | ||
| if [[ "${SKIP_IF_ALREADY_DEPLOYED:-true}" == "true" && "$NEW_DEPLOYMENT" == "true" ]]; then | ||
| echo "[info] $CONTRACT already deployed at $CONTRACT_ADDRESS (version-specific CREATE3 salt) - skipping forge deployment" | ||
| ADDRESS="$CONTRACT_ADDRESS" | ||
| fi |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Load deployment metadata before short-circuiting the forge execution.
The skip path sets only ADDRESS; it leaves RAW_RETURN_DATA from a previous deploySingleContract call intact. Lines 434-450 then derive CONSTRUCTOR_ARGS from that stale output, which can verify this contract with another contract’s arguments or persist incorrect metadata when its log entry is missing. On reuse, load constructor arguments from the matching deployment-log entry and clear stale execution output.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@script/deploy/deploySingleContract.sh` around lines 266 - 280, Before the
short-circuit in deploySingleContract, clear stale RAW_RETURN_DATA and load the
constructor arguments from the deployment-log entry matching CONTRACT and
CONTRACT_ADDRESS. Ensure the reuse path uses these loaded arguments for
CONSTRUCTOR_ARGS, while preserving normal forge execution and output handling
for newly deployed contracts.
| # Verification concurrency is intentionally lower than MAX_CONCURRENT_JOBS: block explorers | ||
| # rate-limit aggressively. Each verifyContract already retries with backoff on 429/gateway. | ||
| local CONCURRENCY=${VERIFICATION_MAX_CONCURRENT_JOBS:-4} | ||
| if [[ -n "$MAX_CONCURRENT_JOBS" && "$MAX_CONCURRENT_JOBS" -lt "$CONCURRENCY" ]]; then | ||
| CONCURRENCY=$MAX_CONCURRENT_JOBS | ||
| fi |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Validate concurrency and tolerate an unset global.
Under the required strict-mode source test, "$MAX_CONCURRENT_JOBS" fails when unset. A zero concurrency value also makes the throttle loop wait forever. Read it with ${MAX_CONCURRENT_JOBS:-} and reject anything except positive integers before dispatch.
Proposed validation
- local CONCURRENCY=${VERIFICATION_MAX_CONCURRENT_JOBS:-4}
- if [[ -n "$MAX_CONCURRENT_JOBS" && "$MAX_CONCURRENT_JOBS" -lt "$CONCURRENCY" ]]; then
- CONCURRENCY=$MAX_CONCURRENT_JOBS
+ local CONCURRENCY="${VERIFICATION_MAX_CONCURRENT_JOBS:-4}"
+ local MAX_JOBS="${MAX_CONCURRENT_JOBS:-}"
+ if ! [[ "$CONCURRENCY" =~ ^[1-9][0-9]*$ ]]; then
+ error "VERIFICATION_MAX_CONCURRENT_JOBS must be a positive integer"
+ return 1
+ fi
+ if [[ -n "$MAX_JOBS" ]]; then
+ if ! [[ "$MAX_JOBS" =~ ^[1-9][0-9]*$ ]]; then
+ error "MAX_CONCURRENT_JOBS must be a positive integer"
+ return 1
+ fi
+ (( MAX_JOBS < CONCURRENCY )) && CONCURRENCY="$MAX_JOBS"
fiAs per path instructions, validate Bash changes using strict-mode sourcing.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Verification concurrency is intentionally lower than MAX_CONCURRENT_JOBS: block explorers | |
| # rate-limit aggressively. Each verifyContract already retries with backoff on 429/gateway. | |
| local CONCURRENCY=${VERIFICATION_MAX_CONCURRENT_JOBS:-4} | |
| if [[ -n "$MAX_CONCURRENT_JOBS" && "$MAX_CONCURRENT_JOBS" -lt "$CONCURRENCY" ]]; then | |
| CONCURRENCY=$MAX_CONCURRENT_JOBS | |
| fi | |
| # Verification concurrency is intentionally lower than MAX_CONCURRENT_JOBS: block explorers | |
| # rate-limit aggressively. Each verifyContract already retries with backoff on 429/gateway. | |
| local CONCURRENCY="${VERIFICATION_MAX_CONCURRENT_JOBS:-4}" | |
| local MAX_JOBS="${MAX_CONCURRENT_JOBS:-}" | |
| if ! [[ "$CONCURRENCY" =~ ^[1-9][0-9]*$ ]]; then | |
| error "VERIFICATION_MAX_CONCURRENT_JOBS must be a positive integer" | |
| return 1 | |
| fi | |
| if [[ -n "$MAX_JOBS" ]]; then | |
| if ! [[ "$MAX_JOBS" =~ ^[1-9][0-9]*$ ]]; then | |
| error "MAX_CONCURRENT_JOBS must be a positive integer" | |
| return 1 | |
| fi | |
| (( MAX_JOBS < CONCURRENCY )) && CONCURRENCY="$MAX_JOBS" | |
| fi |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@script/helperFunctions.sh` around lines 2567 - 2572, Update the concurrency
setup near VERIFICATION_MAX_CONCURRENT_JOBS to read MAX_CONCURRENT_JOBS with
${MAX_CONCURRENT_JOBS:-}, then validate that any provided value is a positive
integer before dispatch. Reject zero, negative, and non-numeric values so the
throttle cannot wait indefinitely, while preserving the configured verification
concurrency behavior for valid inputs.
Source: Path instructions
| logContractDeploymentInfo "$CONTRACT" "$NETWORK" "$TIMESTAMP" "$VERSION" "$OPTIMIZER_RUNS" "$ARGS" "$ENVIRONMENT" "$ADDRESS" "true" "$SALT" "$SOLC_VERSION" "$EVM_VERSION" "$ZK_SOLC_VERSION" | ||
| OK=$((OK + 1)) |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Do not report success when the deployment-log update fails.
logContractDeploymentInfo can return failure when MongoDB is unavailable, but the function still increments OK and may return success. Check its result and add the contract to FAILED; otherwise verification state remains stale despite a successful summary.
Proposed result handling
- logContractDeploymentInfo "$CONTRACT" "$NETWORK" "$TIMESTAMP" "$VERSION" "$OPTIMIZER_RUNS" "$ARGS" "$ENVIRONMENT" "$ADDRESS" "true" "$SALT" "$SOLC_VERSION" "$EVM_VERSION" "$ZK_SOLC_VERSION"
- OK=$((OK + 1))
+ if logContractDeploymentInfo "$CONTRACT" "$NETWORK" "$TIMESTAMP" "$VERSION" "$OPTIMIZER_RUNS" "$ARGS" "$ENVIRONMENT" "$ADDRESS" "true" "$SALT" "$SOLC_VERSION" "$EVM_VERSION" "$ZK_SOLC_VERSION"; then
+ OK=$((OK + 1))
+ else
+ FAILED+=("$CONTRACT ($ADDRESS): verified but log update failed")
+ fi📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| logContractDeploymentInfo "$CONTRACT" "$NETWORK" "$TIMESTAMP" "$VERSION" "$OPTIMIZER_RUNS" "$ARGS" "$ENVIRONMENT" "$ADDRESS" "true" "$SALT" "$SOLC_VERSION" "$EVM_VERSION" "$ZK_SOLC_VERSION" | |
| OK=$((OK + 1)) | |
| if logContractDeploymentInfo "$CONTRACT" "$NETWORK" "$TIMESTAMP" "$VERSION" "$OPTIMIZER_RUNS" "$ARGS" "$ENVIRONMENT" "$ADDRESS" "true" "$SALT" "$SOLC_VERSION" "$EVM_VERSION" "$ZK_SOLC_VERSION"; then | |
| OK=$((OK + 1)) | |
| else | |
| FAILED+=("$CONTRACT ($ADDRESS): verified but log update failed") | |
| fi |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@script/helperFunctions.sh` around lines 2634 - 2635, Check the return status
of logContractDeploymentInfo before incrementing OK in the deployment-processing
flow. On failure, add the contract to FAILED and skip the success increment;
only increment OK when the deployment-log update succeeds, preserving the
existing summary and verification behavior.
| local DEFAULT_FUND_AMOUNT=1000000000000000 # 0.001 native; one cheap state-setting tx | ||
| local DO_FUND_OWNER=false | ||
| if [[ "${NON_INTERACTIVE:-}" == "true" ]]; then | ||
| echo "[info] NON_INTERACTIVE: auto-funding owner with default $DEFAULT_FUND_AMOUNT wei for the setAuthorizedCaller tx" | ||
| DO_FUND_OWNER=true | ||
| elif gum confirm "Fund owner with gas for the setAuthorizedCaller tx now?"; then | ||
| DO_FUND_OWNER=true | ||
| fi | ||
|
|
||
| if [[ "$DO_FUND_OWNER" == "true" ]]; then |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Do not fund the owner on every non-interactive rerun.
NON_INTERACTIVE=true sets DO_FUND_OWNER=true regardless of OWNER_BALANCE. Until the manual authorization lands, every stage-10 rerun sends another 0.001 native token. Gate automatic funding on insufficient balance, or require an explicit funding opt-in.
Proposed balance gate
- if [[ "${NON_INTERACTIVE:-}" == "true" ]]; then
+ if [[ "${NON_INTERACTIVE:-}" == "true" && "$OWNER_BALANCE" == "0" ]]; then
echo "[info] NON_INTERACTIVE: auto-funding owner with default $DEFAULT_FUND_AMOUNT wei for the setAuthorizedCaller tx"
DO_FUND_OWNER=true
+ elif [[ "${NON_INTERACTIVE:-}" == "true" ]]; then
+ echo "[info] NON_INTERACTIVE: owner already has native balance; skipping automatic funding"
elif gum confirm "Fund owner with gas for the setAuthorizedCaller tx now?"; then📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| local DEFAULT_FUND_AMOUNT=1000000000000000 # 0.001 native; one cheap state-setting tx | |
| local DO_FUND_OWNER=false | |
| if [[ "${NON_INTERACTIVE:-}" == "true" ]]; then | |
| echo "[info] NON_INTERACTIVE: auto-funding owner with default $DEFAULT_FUND_AMOUNT wei for the setAuthorizedCaller tx" | |
| DO_FUND_OWNER=true | |
| elif gum confirm "Fund owner with gas for the setAuthorizedCaller tx now?"; then | |
| DO_FUND_OWNER=true | |
| fi | |
| if [[ "$DO_FUND_OWNER" == "true" ]]; then | |
| local DEFAULT_FUND_AMOUNT=1000000000000000 # 0.001 native; one cheap state-setting tx | |
| local DO_FUND_OWNER=false | |
| if [[ "${NON_INTERACTIVE:-}" == "true" && "$OWNER_BALANCE" == "0" ]]; then | |
| echo "[info] NON_INTERACTIVE: auto-funding owner with default $DEFAULT_FUND_AMOUNT wei for the setAuthorizedCaller tx" | |
| DO_FUND_OWNER=true | |
| elif [[ "${NON_INTERACTIVE:-}" == "true" ]]; then | |
| echo "[info] NON_INTERACTIVE: owner already has native balance; skipping automatic funding" | |
| elif gum confirm "Fund owner with gas for the setAuthorizedCaller tx now?"; then | |
| DO_FUND_OWNER=true | |
| fi | |
| if [[ "$DO_FUND_OWNER" == "true" ]]; then |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@script/tasks/verifyERC20ProxyAuthorization.sh` around lines 110 - 119, Update
the funding decision in verifyERC20ProxyAuthorization around DEFAULT_FUND_AMOUNT
and DO_FUND_OWNER so NON_INTERACTIVE mode automatically funds only when
OWNER_BALANCE is below the required amount. Preserve the existing interactive
confirmation behavior, and avoid sending funds on reruns when the owner already
has sufficient balance.
Which Linear task belongs to this PR?
EXSC-631 — https://linear.app/lifi-linear/issue/EXSC-631/deploy-network-skill-agent-driven-staged-new-network-bring-up
Why did I implement it this way?
Adds a
deploy-networkskill so an agent can drive a full new-network production bring-up(
deployAllContracts.sh/ scriptMaster use case 3) end to end — the gap betweenadd-network(config) and
multisig-rollout(upgrades to existing chains). Built and hardened during the liveInjective (chainId 1776) production deploy, which is its shakedown.
Two things blocked agent-driven use of
deployAllContracts: the agent Bash tool hard-kills anycommand at ~10 min, and the script is interactive (
gum/read). This PR makes it drivableone stage per fresh shell, non-interactively, relying on the deploy's existing CREATE3 +
diamondCutidempotency for safe per-stage re-runs.Script changes (additive, backward-compatible — default interactive behavior unchanged)
script/deploy/deployAllContracts.shSTART_STAGE/END_STAGEenv bounds the stage range and skips the interactivegumstage menu when preset. Each stage guard is bounded to
[START_STAGE, END_STAGE]; a boundedrun ending at 11 stops cleanly without the stage-12 ownership-transfer prompt.
NON_INTERACTIVE=trueaccepts the computed defaults at the stage-9 funding prompts.deploySingleContract.shitself (was relying on scriptMaster to source it → stage 3failed
deploySingleContract: command not foundunder direct invocation). Now self-contained.script/tasks/verifyERC20ProxyAuthorization.sh:NON_INTERACTIVE=trueauto-confirms ownerfunding with the default (stage 10).
The skill (
.agents/commands/deploy-network.md+.cursor/.claudesymlinks)New-network bootstrap only (direct-to-diamond, pre-ownership-transfer); stops after stage 11. The
body encodes every rough edge the Injective deploy surfaced so the next one is turnkey:
without it) →
forge clean && forge build→GLOBAL_FILE_PATHsanity (a stale./../config/global.jsonsilently broke stage 2) → verifier-subdomain probe (blockscoutverify API is often a separate
*-apihost; wrong URL → 404s misread as gateway timeouts →retry-throttling) → premium RPC (public Injective RPC ≈1.4s/call → 30-60s forking per
contract; Alchemy ≈2× faster) → corePeriphery ↔ target-state reconciliation (caught
OutputValidator missing from the sheet and deprecated FeeCollector still expected) → version
currency (ERC20Proxy must be ≥1.2.0 or the Executor isn't pre-authorized).
bash -c(agent shell is zsh; scripts useread -a), whichenv overrides survive the script's
.envre-source vs. which need a file edit, idempotentper-stage re-run with a cap, huge-output handling.
(Blockscout indexes lag inline verification; a post-deploy sweep is faster and more reliable).
Master log is in MongoDB —
bun mongo-logs:syncrefreshes the local cache.Still to land on this branch before marking ready
verifyNetworkContractsParallelhelper (parallel, network-scoped, Blockscoutrate-limit backoff) — referenced by the skill's Phase 2.
forge scriptfork viagetDeployedcast code+ version check) — biggest win on re-runs.Checklist before requesting a review
Checklist for reviewer (DO NOT DEPLOY and contracts BEFORE CHECKING THIS!!!)