Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/foundry-deploy-skip-simulation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-eth": patch
---

Add `--skip-simulation` to non-localhost Foundry deploys so gas limits come from the node's `eth_estimateGas`. Forge simulates Ethereum chains with the `evm_version` from `foundry.toml` rather than the target chain's active fork, so deploys to Amsterdam chains (EIP-8037, e.g. Sepolia) ran out of gas. Note: skipping simulation makes the broadcast sequential and drops the pre-broadcast cost summary.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ fork: setup-anvil-wallet
anvil --fork-url \${FORK_URL} --chain-id 31337

# Deploy the contracts
# Non-localhost deploys use --skip-simulation: forge simulates with evm_version from
# foundry.toml, not the target chain's fork, so it under-estimates gas on Amsterdam
# chains (EIP-8037). Remove once forge resolves the Ethereum hardfork from the RPC
# or once Amsterdam is active on every network in foundry.toml.
deploy:
@if [ ! -f "$(DEPLOY_SCRIPT)" ]; then \
echo "Error: Deploy script '$(DEPLOY_SCRIPT)' not found"; \
Expand All @@ -34,7 +38,7 @@ deploy:
forge script $(DEPLOY_SCRIPT) --rpc-url localhost --broadcast --ffi; \
fi \
else \
forge script $(DEPLOY_SCRIPT) --rpc-url $(RPC_URL) --broadcast --ffi; \
forge script $(DEPLOY_SCRIPT) --rpc-url $(RPC_URL) --broadcast --ffi --skip-simulation; \
fi

# Deploy and generate ABIs
Expand Down
Loading