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

Using a script to send transactions deploying contracts and sending ether Not Working on goerli arbitrum #4566

Closed
2 tasks done
mesozoic-technology opened this issue Mar 15, 2023 · 13 comments
Labels
C-forge Command: forge Cmd-forge-script Command: forge script T-bug Type: bug T-to-reproduce Type: requires reproduction

Comments

@mesozoic-technology
Copy link

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 (df8ab09 2023-03-14T09:58:14.632506Z)

What command(s) is the bug in?

forge script

Operating System

macOS (Intel)

Describe the bug

When I use a script that deploys a contract that uses an external library, forge should be deploying this library ahead of my contract and linking it to my contract before deploying my contract.

This can work. It occasionally does.

But 95% of the time or more, I receive an error about gas estimation or an error about mismatched nonces from the provider.

When it is an error about gas estimation, it can be before it sends any transactions. Or, it can deploy the library first, continuing onto the transactions defined in my script, and error about gas estimation when it reaches the transaction that will deploy my contract - the second out of three script defined transactions.

Right now, I am deploying to Arbitrum Goerli and it is constantly failing although it has occasionally succeeded in the past.

@mesozoic-technology mesozoic-technology added the T-bug Type: bug label Mar 15, 2023
@gakonst gakonst added this to Foundry Mar 15, 2023
@github-project-automation github-project-automation bot moved this to Todo in Foundry Mar 15, 2023
@mesozoic-technology
Copy link
Author

This could just be due to Arbitrum Goerli, once I finally got my contracts deployed, I encountered similar errors with non deployment transactions. I thought it may be a problem since there was no one else complaining about that in the Arbitrum discord, but maybe it is just them after all.

@github-project-automation github-project-automation bot moved this from Todo to Done in Foundry Mar 16, 2023
@valle-xyz
Copy link

+1

@mesozoic-technology
Copy link
Author

I'm having an impossible time deploying onto Arbitrum Goerli again.

(code: -32000, message: err: max fee per gas less than block base fee: address 0xA600AdFzCB8C750482a828q128495e026446cA96, maxFeePerGas: 101070000 baseFee: 101340000 (supplied gas 309316493),

@mesozoic-technology mesozoic-technology changed the title Using a script to deploy contract with external library is very very buggy. Using a script to transactions deploying contracts and sending ether Not Working on goerli arbitrum Mar 22, 2023
@mesozoic-technology mesozoic-technology changed the title Using a script to transactions deploying contracts and sending ether Not Working on goerli arbitrum Using a script to send transactions deploying contracts and sending ether Not Working on goerli arbitrum Mar 22, 2023
@mds1 mds1 added C-forge Command: forge Cmd-forge-script Command: forge script labels Mar 24, 2023
@mesozoic-technology
Copy link
Author

Still having this awful experience with Arbitrum Goerli. Seems like it is on their side as it works sometimes and does not work at all other times.

@gzeoneth
Copy link

@realisation Do you have a deployment repo and script that we can try to reproduce?

@mattsse
Copy link
Member

mattsse commented Mar 24, 2023

I'd appreciate a minimal example that I can use to debug this.

@mesozoic-technology
Copy link
Author

All my stuff is private. It happens when I try to do multiple interactions with Arbitrum Goerli. Potentially even one interaction. It can be for deploying a contract or just calling a contract. The flow that it messes up on mostly for me is interacting with a contract, deploying a contract, then sending ether to that contract with .call(). The contract has an external library so this generates four transactions, with the deployment of the external library prepending before the other three.

@mesozoic-technology
Copy link
Author

When I try to do this flow, a great deal of the time it does not send any transactions, complaining about the gas fee. Maybe about as often it gets the first transaction through, deploying the external library. Very occasionally it gets the second transaction through. Never does it get to the third or fourth transactions.

@mesozoic-technology
Copy link
Author

Make a simple script. Use an arbitrum RPC. Interact with a few contracts in the script with vm.broadcast(). You will see the problem.

@mattsse
Copy link
Member

mattsse commented Mar 24, 2023

It would save me time if I had a minimal repro that I could debug directly

@mesozoic-technology
Copy link
Author

It would save me time if I had a minimal repro that I could debug directly

It's that simple, you can make one. There are no complications. Interact multiple times in a standard foundry script and you will see. I am experiencing the problem again.

@gakonst
Copy link
Member

gakonst commented Mar 30, 2023

Hey @realisation :)

While we could try to make a repro, we are juggling a few different projects and it's hard to manage all of our resources.

If you want to get the fastest and most reliable (free!) service out of us, you can help us by making the EXACT problem you're encountering as simple as "clone this repo, run forge test, the problem is there".

Otherwise, Matt or I might spend a bunch of time trying to reproduce it, then come back to you with a fix, and you may say "oh this didn't fix my issue". So it is important that you have exact steps for reproducing, or we won't be able to prioritize it.

Appreciate the understanding, it is part of our culture to have repros and would like everyone to respect that :)

@zerosnacks
Copy link
Member

Marking as requires reproduction

Please re-open with a minimal reproduction if you are still facing this issue @mesozoic-technology

@zerosnacks zerosnacks closed this as not planned Won't fix, can't repro, duplicate, stale Jul 1, 2024
@jenpaff jenpaff moved this from Done to Completed in Foundry Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-forge Command: forge Cmd-forge-script Command: forge script T-bug Type: bug T-to-reproduce Type: requires reproduction
Projects
Archived in project
Development

No branches or pull requests

7 participants