Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forge script fails to estimate gas for contract deployment #6542

Closed
2 tasks done
jeffywu opened this issue Dec 7, 2023 · 3 comments
Closed
2 tasks done

Forge script fails to estimate gas for contract deployment #6542

jeffywu opened this issue Dec 7, 2023 · 3 comments
Labels
T-bug Type: bug

Comments

@jeffywu
Copy link

jeffywu commented Dec 7, 2023

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 (fdad9fb 2023-12-06T00:17:31.361933000Z)

What command(s) is the bug in?

forge script

Operating System

macOS (Apple Silicon)

Describe the bug

Tried a number of things but forge refuses to work when trying to send the first transaction in the broadcast JSON file below. It works when I send it manually using cast send --create. My hunch is that forge does not realize that the gas limit on arbitrum is much higher and does not want to send the transaction.

run-latest.json

Command:

forge script tests/SingleSidedLP/pools/FRAX_USDC_e.t.sol:Test_FRAX \
    -f $RPC_URL --sender 0x8F5ea3CDe898B208280c0e93F3aDaaf1F5c35a7e \
    --gas-limit 1125899906842624 --chain 42161 --account ARBITRUM-ONE_DEPLOYER --broadcast --verify


## Setting up 1 EVM.

==========================

Chain 42161

Estimated gas price: 3.2 gwei

Estimated total gas used for script: 107628326

Estimated amount required: 0.3444106432 ETH

==========================

###
Finding wallets for all the necessary addresses...
Enter keystore password:
##
Sending transactions [0 - 0].

Transactions saved to: /Users/jwu/code/leveraged-vaults/broadcast/FRAX_USDC_e.t.sol/42161/run-latest.json

Sensitive values saved to: /Users/jwu/code/leveraged-vaults/cache/FRAX_USDC_e.t.sol/42161/run-latest.json

Error: 
Failed to estimate gas for tx: 0x1e1ff94ff66b2b1ab38f849a0852de45c858af63727921596f398343aa77ac30

Context:
- (code: -32000, message: gas required exceeds allowance (77683450), data: None)
@jeffywu jeffywu added the T-bug Type: bug label Dec 7, 2023
@Evalir
Copy link
Member

Evalir commented Dec 7, 2023

Hey 👋 ack this is a bug—but we've gotten multiple issues regarding this type of gas estimation failures on L2s, so i'll close this as we consolidate. We're currently working out how we can improve this.

@Evalir Evalir closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2023
@radeksvarz
Copy link

still valid, using --legacy option for workaround

also see: #2941

@bd21
Copy link

bd21 commented Dec 28, 2023

still valid, using --legacy option for workaround

also see: #2941

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug
Projects
No open projects
Archived in project
Development

No branches or pull requests

4 participants