pub trait Eip4844Tx: Eip1559CommonTxFields {
// Required methods
fn destination(&self) -> Address;
fn blob_versioned_hashes(&self) -> &[B256];
fn max_fee_per_blob_gas(&self) -> u128;
// Provided methods
fn total_blob_gas(&self) -> u64 { ... }
fn calc_max_data_fee(&self) -> U256 { ... }
}
Required Methods§
Sourcefn destination(&self) -> Address
fn destination(&self) -> Address
Call destination
Sourcefn blob_versioned_hashes(&self) -> &[B256]
fn blob_versioned_hashes(&self) -> &[B256]
Returns vector of fixed size hash(32 bytes)
Sourcefn max_fee_per_blob_gas(&self) -> u128
fn max_fee_per_blob_gas(&self) -> u128
Max fee per data gas
Provided Methods§
Sourcefn total_blob_gas(&self) -> u64
fn total_blob_gas(&self) -> u64
Total gas for all blobs. Max number of blocks is already checked so we dont need to check for overflow.
Sourcefn calc_max_data_fee(&self) -> U256
fn calc_max_data_fee(&self) -> U256
Calculates the maximum [EIP-4844] data_fee
of the transaction.
This is used for ensuring that the user has at least enough funds to pay the
max_fee_per_blob_gas * total_blob_gas
, on top of regular gas costs.
See EIP-4844: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-4844.md#execution-layer-validation