Skip to content

Comments

feat(rpc-types-eth): derive Default for SimCallResult#3708

Merged
mattsse merged 1 commit intomainfrom
mattsse/sim-call-result-default
Feb 17, 2026
Merged

feat(rpc-types-eth): derive Default for SimCallResult#3708
mattsse merged 1 commit intomainfrom
mattsse/sim-call-result-default

Conversation

@gakonst
Copy link
Member

@gakonst gakonst commented Feb 17, 2026

Summary

Derives Default for SimCallResult.

Motivation

Allows downstream consumers (e.g. reth) to construct SimCallResult with ..Default::default(), so new field additions (like max_used_gas) don't require updating every construction site. This also removes the need for #[allow(clippy::needless_update)] annotations in reth.

Changes

  • Added Default to the derive macro for SimCallResult in crates/rpc-types-eth/src/simulate.rs

All fields already have sensible defaults (Bytes → empty, Vec → empty, u64 → 0, bool → false, Option → None).

Prompted by: mattsse

Allows downstream consumers (e.g. reth) to use `..Default::default()`
when constructing SimCallResult, making new field additions
non-breaking for existing construction sites.

Amp-Thread-ID: https://ampcode.com/threads/T-019c6b14-bfd0-71df-bce9-533057940778
Co-authored-by: Amp <[email protected]>
@github-project-automation github-project-automation bot moved this to Reviewed in Alloy Feb 17, 2026
@mattsse mattsse enabled auto-merge (squash) February 17, 2026 10:50
@mattsse mattsse merged commit 54b1f66 into main Feb 17, 2026
30 checks passed
@mattsse mattsse deleted the mattsse/sim-call-result-default branch February 17, 2026 10:56
@github-project-automation github-project-automation bot moved this from Reviewed to Done in Alloy Feb 17, 2026
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