Skip to content

[Feature] Add AnyNetwork #272

@onbjerg

Description

@onbjerg

Component

network, json-rpc

Describe the feature you would like

Some applications might not know their network ahead of type (e.g. Foundry), so a catch-all network should be added (AnyNetwork) that essentially just returns the regular Ethereum types + a catch all field.

An idea would be to add a wrapper type like:

#[derive(Serialize, Deserialize)]
struct Extra<T> {
  #[serde(flatten)]
  object: T,
  #[serde(other)]
  other: BTreeMap<String, serde_json::Value>
}

with Deref/DerefMut implemented as well to make the wrapper transparent-ish

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions