Skip to content

Commit

Permalink
Merge pull request #74 from Blobscan/feat/index-tx-index
Browse files Browse the repository at this point in the history
feat: index transaction's index
  • Loading branch information
PJColombo authored Jul 6, 2024
2 parents 2646828 + 40e9d1b commit b255ac7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/clients/blobscan/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pub struct Transaction {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub to: Option<Address>,
pub block_number: U64,
pub index: U64,
pub gas_price: U256,
pub max_fee_per_blob_gas: U256,
}
Expand Down Expand Up @@ -180,6 +181,9 @@ impl<'a> TryFrom<(&'a EthersTransaction, &'a EthersBlock<EthersTransaction>)> fo
block_number: ethers_block
.number
.with_context(|| "Missing block number field in execution block".to_string())?,
index: ethers_tx
.transaction_index
.with_context(|| "Missing transaction index field".to_string())?,
hash,
from: ethers_tx.from,
to: ethers_tx.to,
Expand Down

0 comments on commit b255ac7

Please sign in to comment.