Skip to content

[Feature] Add Clone support to Eip1559Estimator #3669

@LeoPatOZ

Description

@LeoPatOZ

Component

provider, pubsub

Describe the feature you would like

Currently, Eip1559Estimator cannot be cloned due to the Custom variant containing a Box trait object. This limits its usability in contexts where cloning is needed (e.g., sharing estimators across multiple providers or storing them in structures that require Clone).

pub enum Eip1559Estimator {
    #[default]
    Default,
    Custom(Box<dyn Eip1559EstimatorFn>),
}

The trait object Box cannot be cloned.

Perhaps something like this approach could work

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions