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] Rpc type cast to Consensus type #394

Closed
rkdud007 opened this issue Mar 26, 2024 · 1 comment
Closed

[Feature] Rpc type cast to Consensus type #394

rkdud007 opened this issue Mar 26, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@rkdud007
Copy link

rkdud007 commented Mar 26, 2024

Component

rpc-type

Describe the feature you would like

The type return from RPC and the type return from consensus type are different. And as the rlp encode/decode is bound with consensus type, even though fetch data in rpc type, faced lots of cases that required type cast from rpc -> consensus type.

Ideal solution

For example in transaction, would like to have :

impl TryFrom<alloy_rpc_types::Transaction> for alloy_consensus::TxEnvelope { 
...
}

so that can use like this

let tx_for_consensus: TxEnvelope = tx_from_rpc.try_into();

Additional context

No response

@rkdud007 rkdud007 added the enhancement New feature or request label Mar 26, 2024
@rkdud007
Copy link
Author

sorry just noticed it was added in late commit #343

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

No branches or pull requests

1 participant