revm_transaction::eip4844

Trait Eip4844Tx

Source
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§

Source

fn destination(&self) -> Address

Call destination

Source

fn blob_versioned_hashes(&self) -> &[B256]

Returns vector of fixed size hash(32 bytes)

Source

fn max_fee_per_blob_gas(&self) -> u128

Max fee per data gas

Provided Methods§

Source

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.

Source

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

Implementors§