Closed PatrickAlphaC closed 1 day ago
This transaction has gasLimit
field name, however, it was changed to gas
recently in alloy (as this is correct per JSON-RPC spec). Changing the field name in the JSON file should fix this
@grandizzy @mattsse unsure if we need to take any action here? eg we could add gasLimit
back as an alias to alloy
That did the job! Thank you.
Maybe flag a warning that this was deprecated? Although, IMO it's unlikely a lot of people use this feature... Maybe its OK just as a breaking change.
I'm OK with taking no action here, since the breaking change is already introduced and an workaround exists. Also, in scope of v1.0 we're looking into removing all deprecation (as in https://github.com/foundry-rs/foundry/issues/8931, deprecated cheatcodes, etc.) so not sure we should introduce the warning now to just remove it in couple of weeks. @zerosnacks wdyt?
I tend to agree, this ticket can serve as a reference for anyone that does happen to run into the issue. The new gas
field is JSON-RPC spec compliant whereas the previous gasLimit
is not. For now marking as won't fix
Re-opening, this will be resolved as part of https://github.com/foundry-rs/foundry/pull/9280#discussion_r1844004048
It looks like there have been other breaking changes in Alloy that should be handled gracefully, including this one.
Component
Anvil
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (31c24b0 2024-11-14T00:20:56.222819000Z)
What command(s) is the bug in?
anvil --load-state
Operating System
macOS (Apple Silicon)
Describe the bug
Running:
Gives me:
However, this command worked on a previously working edition of foundry & anvil.
I was able to revert to an older version where I did not get such an error with the following command:
Here is the block that was erroring:
Where
line 1 column 11125
was pointing to the spot I have markedError here
.This
state.json
was created on an older version of anvil using--dump-state
originally.