Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add helpers for PrivateTransactionRequest #1954

Open
mattsse opened this issue Jan 27, 2025 · 1 comment
Open

[Feature] Add helpers for PrivateTransactionRequest #1954

mattsse opened this issue Jan 27, 2025 · 1 comment
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@mattsse
Copy link
Member

mattsse commented Jan 27, 2025

Component

rpc

Describe the feature you would like

/// Request for `eth_sendPrivateTransaction`
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct PrivateTransactionRequest {
/// raw signed transaction
pub tx: Bytes,
/// Hex-encoded number string, optional. Highest block number in which the transaction should
/// be included.
#[serde(default, with = "alloy_serde::quantity::opt", skip_serializing_if = "Option::is_none")]
pub max_block_number: Option<u64>,
/// Preferences for private transaction.
#[serde(default, skip_serializing_if = "PrivateTransactionPreferences::is_empty")]
pub preferences: PrivateTransactionPreferences,
}

for this type we could use some helper functions, like

fn from_tx<T:Encodable2718>

and builder style fns for setting the additional fields

Additional context

No response

@mattsse mattsse added enhancement New feature or request good first issue Good for newcomers labels Jan 27, 2025
@nadtech-hub
Copy link
Contributor

nadtech-hub commented Jan 27, 2025

I would like to work on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants