foundry: Failed to estimate gas for CREATE2 deployment on Arbitrum
Component
Forge
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
What version of Foundry are you on?
forge 0.2.0 (5910e7b 2022-08-25T00:04:03.61597382Z)
What command(s) is the bug in?
forge script
Operating System
Linux
Describe the bug
Running this script using this command:
forge script script/LlamaPayBotDeploy.sol --private-key "${PRIVATE_KEY}" --rpc-url "${ARBITRUM_RPC}" --verify --broadcast --etherscan-api-key "${ARBISCAN_API_KEY}"
results in forge not being able to estimate gas for tx.
I have also tried trying multiple Arbitrum RPCs and it yields the same result.

About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 29 (5 by maintainers)
Bumping for visibility, we cannot deploy to arbitrum mainnet with most recent foundry
`Failed to estimate gas for tx: 0xc0dfd71034b0e538500086df53633683f769e6365db61fc579f6473933053560´
Also, estimated total cost for all transactions is a whopping 6.22 ETH. Something wrong is going on
foundryup: installed - forge 0.2.0 (0e33b3e 2023-07-28T00:23:39.362605000Z) foundryup: installed - cast 0.2.0 (0e33b3e 2023-07-28T00:23:39.362605000Z) foundryup: installed - anvil 0.1.0 (0e33b3e 2023-07-28T00:23:55.455062000Z) foundryup: installed - chisel 0.1.0 (0e33b3e 2023-07-28T00:23:55.584471000Z)
tagging @gakonst @Evalir
Will give that a try, FWIW I was receiving this error while using
forge create. Adding the--legacyflag seemed to alleviate the issue.Yup, I see this regularly while trying to deploy to Arbitrum Goerli (at times there is also the RPC error of
max fee per gas less than block base fee)thanks for the quick turn around. Confirmed to work on arb mainnet w waterfall repo & on arb mainnet & goerli w liquid repo
looks like the ordering of contracts in verification has changed (for the worse), but will open a separate issue for that
thank you!
in https://github.com/0xSplits/splits-liquid you can run
forge script script/LiquidSplitFactory.s.sol:LiquidSplitFactoryScript --rpc-url $ARB_RPC_URL -vvvvforge script script/LiquidSplitFactory.s.sol:LiquidSplitFactoryScript --rpc-url $ARB_GOERLI_RPC_URL -vvvvin https://github.com/0xSplits/splits-waterfall you can run
forge script script/WaterfallModuleFactory.s.sol:WaterfallModuleFactoryScript --rpc-url $ARB_RPC_URL -vvvv(interestingly enough 20 days ago arb-goerli worked in the waterfall repo although on the latest foundryup I don’t think it’s working anymore)