Skip to content

fix(rpc-types-trace): serialize state gas cost as integer - #4117

Merged
mattsse merged 1 commit into
alloy-rs:centaur/eip8037-rpc-types-1785837205from
figtracer:fig/eip8037-signed-cost
Aug 5, 2026
Merged

fix(rpc-types-trace): serialize state gas cost as integer#4117
mattsse merged 1 commit into
alloy-rs:centaur/eip8037-rpc-types-1785837205from
figtracer:fig/eip8037-signed-cost

Conversation

@figtracer

Copy link
Copy Markdown
Contributor

Targets #4113.

stateGasCost is a signed JSON integer in execution-apis#852, and REVM tracks its opcode delta as i64. Using I256 serializes negative values as JSON strings, so this switches the field to i64 and verifies that -5 remains a JSON number.

Tests: cargo test -p alloy-rpc-types-trace; cargo +nightly clippy -p alloy-rpc-types-trace --all-targets -- -D warnings.

@github-project-automation github-project-automation Bot moved this to Reviewed in Alloy Aug 5, 2026
@mattsse
mattsse merged commit 8c1630d into alloy-rs:centaur/eip8037-rpc-types-1785837205 Aug 5, 2026
@github-project-automation github-project-automation Bot moved this from Reviewed to Done in Alloy Aug 5, 2026
@figtracer
figtracer deleted the fig/eip8037-signed-cost branch August 5, 2026 14:50
onbjerg added a commit that referenced this pull request Aug 11, 2026
* feat(rpc-types-trace): add EIP-8037 state-gas fields

* fix(rpc-types-trace): serialize state gas cost as integer (#4117)

* fix(rpc-types-trace): rename regular gas fields

Co-authored-by: Derek Cofausper <256792747+decofe@users.noreply.github.com>

---------

Co-authored-by: figtracer <me@figtracer.com>
Co-authored-by: onbjerg <onbjerg@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants