pub struct SpanBatchTransactions {
pub total_block_tx_count: u64,
pub contract_creation_bits: SpanBatchBits,
pub tx_sigs: Vec<PrimitiveSignature>,
pub tx_nonces: Vec<u64>,
pub tx_gases: Vec<u64>,
pub tx_tos: Vec<Address>,
pub tx_datas: Vec<Vec<u8>>,
pub protected_bits: SpanBatchBits,
pub tx_types: Vec<TxType>,
pub legacy_tx_count: u64,
}
Expand description
This struct contains the decoded information for transactions in a span batch.
Fields§
§total_block_tx_count: u64
The total number of transactions in a span batch. Must be manually set.
contract_creation_bits: SpanBatchBits
The contract creation bits, standard span-batch bitlist.
tx_sigs: Vec<PrimitiveSignature>
The transaction signatures.
tx_nonces: Vec<u64>
The transaction nonces
tx_gases: Vec<u64>
The transaction gas limits.
tx_tos: Vec<Address>
The to
addresses of the transactions.
tx_datas: Vec<Vec<u8>>
The transaction data.
protected_bits: SpanBatchBits
The protected bits, standard span-batch bitlist.
tx_types: Vec<TxType>
The types of the transactions.
legacy_tx_count: u64
Total legacy transaction count in the span batch.
Implementations§
Source§impl SpanBatchTransactions
impl SpanBatchTransactions
Sourcepub fn encode(&self, w: &mut Vec<u8>) -> Result<(), SpanBatchError>
pub fn encode(&self, w: &mut Vec<u8>) -> Result<(), SpanBatchError>
Encodes the SpanBatchTransactions into a writer.
Sourcepub fn decode(&mut self, r: &mut &[u8]) -> Result<(), SpanBatchError>
pub fn decode(&mut self, r: &mut &[u8]) -> Result<(), SpanBatchError>
Decodes the SpanBatchTransactions from a reader.
Sourcepub fn encode_contract_creation_bits(
&self,
w: &mut Vec<u8>,
) -> Result<(), SpanBatchError>
pub fn encode_contract_creation_bits( &self, w: &mut Vec<u8>, ) -> Result<(), SpanBatchError>
Encode the contract creation bits into a writer.
Sourcepub fn encode_protected_bits(
&self,
w: &mut Vec<u8>,
) -> Result<(), SpanBatchError>
pub fn encode_protected_bits( &self, w: &mut Vec<u8>, ) -> Result<(), SpanBatchError>
Encode the protected bits into a writer.
Sourcepub fn encode_tx_sigs(&self, w: &mut Vec<u8>) -> Result<(), SpanBatchError>
pub fn encode_tx_sigs(&self, w: &mut Vec<u8>) -> Result<(), SpanBatchError>
Encode the transaction signatures into a writer (excluding v
field).
Sourcepub fn encode_tx_nonces(&self, w: &mut Vec<u8>) -> Result<(), SpanBatchError>
pub fn encode_tx_nonces(&self, w: &mut Vec<u8>) -> Result<(), SpanBatchError>
Encode the transaction nonces into a writer.
Sourcepub fn encode_tx_gases(&self, w: &mut Vec<u8>) -> Result<(), SpanBatchError>
pub fn encode_tx_gases(&self, w: &mut Vec<u8>) -> Result<(), SpanBatchError>
Encode the transaction gas limits into a writer.
Sourcepub fn encode_tx_tos(&self, w: &mut Vec<u8>) -> Result<(), SpanBatchError>
pub fn encode_tx_tos(&self, w: &mut Vec<u8>) -> Result<(), SpanBatchError>
Encode the to
addresses of the transactions into a writer.
Sourcepub fn encode_tx_datas(&self, w: &mut Vec<u8>) -> Result<(), SpanBatchError>
pub fn encode_tx_datas(&self, w: &mut Vec<u8>) -> Result<(), SpanBatchError>
Encode the transaction data into a writer.
Sourcepub fn decode_contract_creation_bits(
&mut self,
r: &mut &[u8],
) -> Result<(), SpanBatchError>
pub fn decode_contract_creation_bits( &mut self, r: &mut &[u8], ) -> Result<(), SpanBatchError>
Decode the contract creation bits from a reader.
Sourcepub fn decode_protected_bits(
&mut self,
r: &mut &[u8],
) -> Result<(), SpanBatchError>
pub fn decode_protected_bits( &mut self, r: &mut &[u8], ) -> Result<(), SpanBatchError>
Decode the protected bits from a reader.
Sourcepub fn decode_tx_sigs(&mut self, r: &mut &[u8]) -> Result<(), SpanBatchError>
pub fn decode_tx_sigs(&mut self, r: &mut &[u8]) -> Result<(), SpanBatchError>
Decode the transaction signatures from a reader (excluding v
field).
Sourcepub fn decode_tx_nonces(&mut self, r: &mut &[u8]) -> Result<(), SpanBatchError>
pub fn decode_tx_nonces(&mut self, r: &mut &[u8]) -> Result<(), SpanBatchError>
Decode the transaction nonces from a reader.
Sourcepub fn decode_tx_gases(&mut self, r: &mut &[u8]) -> Result<(), SpanBatchError>
pub fn decode_tx_gases(&mut self, r: &mut &[u8]) -> Result<(), SpanBatchError>
Decode the transaction gas limits from a reader.
Sourcepub fn decode_tx_tos(&mut self, r: &mut &[u8]) -> Result<(), SpanBatchError>
pub fn decode_tx_tos(&mut self, r: &mut &[u8]) -> Result<(), SpanBatchError>
Decode the to
addresses of the transactions from a reader.
Sourcepub fn decode_tx_datas(&mut self, r: &mut &[u8]) -> Result<(), SpanBatchError>
pub fn decode_tx_datas(&mut self, r: &mut &[u8]) -> Result<(), SpanBatchError>
Decode the transaction data from a reader.
Sourcepub fn contract_creation_count(&self) -> u64
pub fn contract_creation_count(&self) -> u64
Returns the number of contract creation transactions in the span batch.
Sourcepub fn full_txs(&self, chain_id: u64) -> Result<Vec<Vec<u8>>, SpanBatchError>
pub fn full_txs(&self, chain_id: u64) -> Result<Vec<Vec<u8>>, SpanBatchError>
Retrieve all of the raw transactions from the SpanBatchTransactions.
Sourcepub fn add_txs(
&mut self,
txs: Vec<Bytes>,
chain_id: u64,
) -> Result<(), SpanBatchError>
pub fn add_txs( &mut self, txs: Vec<Bytes>, chain_id: u64, ) -> Result<(), SpanBatchError>
Add raw transactions into the SpanBatchTransactions.
Trait Implementations§
Source§impl Clone for SpanBatchTransactions
impl Clone for SpanBatchTransactions
Source§fn clone(&self) -> SpanBatchTransactions
fn clone(&self) -> SpanBatchTransactions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SpanBatchTransactions
impl Debug for SpanBatchTransactions
Source§impl Default for SpanBatchTransactions
impl Default for SpanBatchTransactions
Source§fn default() -> SpanBatchTransactions
fn default() -> SpanBatchTransactions
Source§impl PartialEq for SpanBatchTransactions
impl PartialEq for SpanBatchTransactions
impl Eq for SpanBatchTransactions
impl StructuralPartialEq for SpanBatchTransactions
Auto Trait Implementations§
impl Freeze for SpanBatchTransactions
impl RefUnwindSafe for SpanBatchTransactions
impl Send for SpanBatchTransactions
impl Sync for SpanBatchTransactions
impl Unpin for SpanBatchTransactions
impl UnwindSafe for SpanBatchTransactions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)