Conversation
WalkthroughThe script Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
script/deploy/deployAndStoreCREATE3Factory.sh (1)
59-102: Fallback path for unsupported chains lacks bytecode verification for parity with forge path.The cast-based fallback correctly handles chains not in Foundry's alloy-chains list. However, unlike the forge path which polls for bytecode availability via
extractDeployedAddressFromRawReturnData(with its bytecode verification loop for blockchain sync delays), this path directly uses the contract address from the receipt without verification.For consistency, consider adding a bytecode check after line 100:
♻️ Optional: Add bytecode verification for parity with forge path
FACTORY_ADDRESS=$(echo "$RECEIPT_JSON" | jq -r '.contractAddress // empty' 2>/dev/null) + # Verify bytecode is available (parity with forge path) + if [[ -n "$FACTORY_ADDRESS" && "$FACTORY_ADDRESS" != "null" ]]; then + if [[ "$(doesAddressContainBytecode "$NETWORK" "$FACTORY_ADDRESS")" != "true" ]]; then + warning "Contract deployed but bytecode not yet visible; may need blockchain sync time" + fi + fi fi fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@script/deploy/deployAndStoreCREATE3Factory.sh` around lines 59 - 102, The fallback branch that sets FACTORY_ADDRESS from the cast receipt needs the same post-deploy bytecode verification loop as the forge path: after FACTORY_ADDRESS is set, poll the chain via cast rpc (e.g., cast code or eth_getCode) until the on-chain bytecode for FACTORY_ADDRESS is non-empty / matches the expected runtime bytecode (use the artifact bytecode/runtime bytecode extracted from ARTIFACT) or until a timeout/retries expire; mirror the logic used by extractDeployedAddressFromRawReturnData (retry/backoff and error handling) and error out if verification fails so the cast fallback has parity with the forge deploy path.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@script/deploy/deployAndStoreCREATE3Factory.sh`:
- Around line 59-102: The fallback branch that sets FACTORY_ADDRESS from the
cast receipt needs the same post-deploy bytecode verification loop as the forge
path: after FACTORY_ADDRESS is set, poll the chain via cast rpc (e.g., cast code
or eth_getCode) until the on-chain bytecode for FACTORY_ADDRESS is non-empty /
matches the expected runtime bytecode (use the artifact bytecode/runtime
bytecode extracted from ARTIFACT) or until a timeout/retries expire; mirror the
logic used by extractDeployedAddressFromRawReturnData (retry/backoff and error
handling) and error out if verification fails so the cast fallback has parity
with the forge deploy path.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 77df83d3-5e74-4336-b37a-f8ed6a8c7343
📒 Files selected for processing (1)
script/deploy/deployAndStoreCREATE3Factory.sh
Why did I implement it this way?
fixes
Chain .... not supportederror for chains that are not inalloy-chainsChecklist before requesting a review
Checklist for reviewer (DO NOT DEPLOY and contracts BEFORE CHECKING THIS!!!)