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

gas used returned by cast run doesn't match on-chain gas used amount #7412

Closed
2 tasks done
eshaben opened this issue Mar 15, 2024 · 1 comment
Closed
2 tasks done
Labels
T-bug Type: bug

Comments

@eshaben
Copy link

eshaben commented Mar 15, 2024

Component

Cast

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (3fa0270 2024-03-15T00:16:21.040039000Z)

What command(s) is the bug in?

cast run

Operating System

macOS (Intel)

Describe the bug

When running the following command, the gas used value printed at the end of the output does not match the gas used on-chain:

cast run 0x4e42d4c4cc45a560b45cc9d299117498678b49bb5d5997e4d355d302acfaec55 --rpc-url https://rpc.api.moonbeam.network

Running the above command outputs: Gas used: 4883401. But on the transaction details on Moonscan, you'll see that the actual gas used was 6962784.

I believe this may be related to MBIP-5 on Moonbeam, where the gas required increases with the increase in chain state.

Ultimately, when using Cast, this issue makes it seem that the transaction was successful, but it actually failed.

@eshaben eshaben added the T-bug Type: bug label Mar 15, 2024
@DaniPopes DaniPopes closed this as not planned Won't fix, can't repro, duplicate, stale May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug
Projects
None yet
Development

No branches or pull requests

3 participants