pub trait EthPoolTransaction: PoolTransaction {
// Required methods
fn take_blob(&mut self) -> EthBlobTransactionSidecar;
fn blob_count(&self) -> usize;
fn try_into_pooled_eip4844(
self,
sidecar: Arc<BlobTransactionSidecar>,
) -> Option<RecoveredTx<Self::Pooled>>;
fn try_from_eip4844(
tx: RecoveredTx<Self::Consensus>,
sidecar: BlobTransactionSidecar,
) -> Option<Self>;
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§
Sourcefn take_blob(&mut self) -> EthBlobTransactionSidecar
fn take_blob(&mut self) -> EthBlobTransactionSidecar
Extracts the blob sidecar from the transaction.
Sourcefn blob_count(&self) -> usize
fn blob_count(&self) -> usize
Returns the number of blobs this transaction has.
Sourcefn try_into_pooled_eip4844(
self,
sidecar: Arc<BlobTransactionSidecar>,
) -> Option<RecoveredTx<Self::Pooled>>
fn try_into_pooled_eip4844( self, sidecar: Arc<BlobTransactionSidecar>, ) -> Option<RecoveredTx<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
.
Sourcefn try_from_eip4844(
tx: RecoveredTx<Self::Consensus>,
sidecar: BlobTransactionSidecar,
) -> Option<Self>
fn try_from_eip4844( tx: RecoveredTx<Self::Consensus>, sidecar: BlobTransactionSidecar, ) -> Option<Self>
Tries to convert the Consensus
type with a blob sidecar into the Pooled
type.
Returns None
if passed transaction is not a blob transaction.
Sourcefn 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.
Implementors§
impl EthPoolTransaction for MockTransaction
test-utils
only.