Skip to main content

recover_raw_transaction

Function recover_raw_transaction 

Source
pub fn recover_raw_transaction<T: SignedTransaction>(
    data: &[u8],
) -> EthResult<Recovered<T>>
Expand description

Recovers a [SignedTransaction] from an enveloped encoded byte stream.

This is a helper function that returns the appropriate RPC-specific error if the input data is malformed.

This function uses [alloy_eips::eip2718::Decodable2718::decode_2718_exact] to ensure that the entire input buffer is consumed and no trailing bytes are allowed.

See [alloy_eips::eip2718::Decodable2718::decode_2718_exact]