Trait EthPoolTransaction
pub trait EthPoolTransaction: PoolTransactionwhere
Self::Consensus: From<TransactionSignedEcRecovered> + Into<TransactionSignedEcRecovered> + Into<TransactionSigned>,
Self::Pooled: From<PooledTransactionsElementEcRecovered> + Into<PooledTransactionsElementEcRecovered> + Into<PooledTransactionsElement>,{
// Required methods
fn take_blob(&mut self) -> EthBlobTransactionSidecar;
fn blob_count(&self) -> usize;
fn try_into_pooled_eip4844(
self,
sidecar: Arc<BlobTransactionSidecar>,
) -> Option<Self::Pooled>;
fn validate_blob(
&self,
blob: &BlobTransactionSidecar,
settings: &KZGSettings,
) -> Result<(), BlobTransactionValidationError>;
fn authorization_count(&self) -> usize;
}
Expand description
Super trait for transactions that can be converted to and from Eth transactions intended for the ethereum style pool.
This extends the PoolTransaction
trait with additional methods that are specific to the
Ethereum pool.
Required Methods§
fn take_blob(&mut self) -> EthBlobTransactionSidecar
fn take_blob(&mut self) -> EthBlobTransactionSidecar
Extracts the blob sidecar from the transaction.
fn blob_count(&self) -> usize
fn blob_count(&self) -> usize
Returns the number of blobs this transaction has.
fn try_into_pooled_eip4844(
self,
sidecar: Arc<BlobTransactionSidecar>,
) -> Option<Self::Pooled>
fn try_into_pooled_eip4844( self, sidecar: Arc<BlobTransactionSidecar>, ) -> Option<Self::Pooled>
A specialization for the EIP-4844 transaction type. Tries to reattach the blob sidecar to the transaction.
This returns an option, but callers should ensure that the transaction is an EIP-4844
transaction: PoolTransaction::is_eip4844
.
fn validate_blob(
&self,
blob: &BlobTransactionSidecar,
settings: &KZGSettings,
) -> Result<(), BlobTransactionValidationError>
fn validate_blob( &self, blob: &BlobTransactionSidecar, settings: &KZGSettings, ) -> Result<(), BlobTransactionValidationError>
Validates the blob sidecar of the transaction with the given settings.
Returns the number of authorizations this transaction has.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.