Skip to content

[Feature] Add helper function to force either data or input or both for TransactionRequest.input #2381

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

Open
mattsse opened this issue May 2, 2025 · 7 comments · May be fixed by #2393
Open
Labels
c-rpc-types enhancement New feature or request good first issue Good for newcomers

Comments

@mattsse
Copy link
Member

mattsse commented May 2, 2025

Component

rpc

Describe the feature you would like

Transactionrequest has:

/// Transaction data.
#[cfg_attr(feature = "serde", serde(default, flatten))]
pub input: TransactionInput,

pub fn input(mut self, input: TransactionInput) -> Self {
self.input = input;
self
}

we are missing a few helper functions on both TransactionInput and TransactionRequest that make it easier to force both input and data field or swap data for input

TODO

  • add helpers for this

maybe @ratankaliani you want to take this

ref #2378

Additional context

No response

@mattsse mattsse added the enhancement New feature or request label May 2, 2025
@github-project-automation github-project-automation bot moved this to Todo in Alloy May 2, 2025
@mattsse mattsse added good first issue Good for newcomers c-rpc-types labels May 2, 2025
@EDOHWARES
Copy link

Hi, I'm EDOHWAREZ , a software developer with years of experience in building scalable softwares. May I work on this issue ?

@martinvibes
Copy link

hello @mattsse can i work on this issue

@caxtonacollins
Copy link

@mattsse i will love to work on this

@Akshola00
Copy link

hi, can i work on this task

@Pvsaint
Copy link

Pvsaint commented May 2, 2025

May I take this?

@ayomideadeniran
Copy link

Gm dev, i will like to attack this issues using my current knowledge so i can make solid my Rust learning capacity Massive 🚀 .

@anonfedora
Copy link

Hi @mattsse and @ratankaliani,

I'd like to take on this feature request to add helper functions for TransactionInput and TransactionRequest. Based on the description, I understand we need to:

  1. Create helper functions for TransactionInput to easily set both data and input fields
  2. Add functions to TransactionRequest that expose this functionality
  3. Provide a way to convert/swap between data and input fields

I've worked with Ethereum transaction encoding before and understand the importance of having ergonomic API methods for handling transaction data. I can create a PR implementing these helpers within the next few days if that works for you.

Would you have any specific requirements or patterns you'd like these helper functions to follow? Happy to align with the project's coding style and existing patterns.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-rpc-types enhancement New feature or request good first issue Good for newcomers
Projects
Status: Todo
8 participants