Skip to content

Commit b255ac7

Browse files
authored
Merge pull request #74 from Blobscan/feat/index-tx-index
feat: index transaction's index
2 parents 2646828 + 40e9d1b commit b255ac7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: src/clients/blobscan/types.rs

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ pub struct Transaction {
2727
#[serde(default, skip_serializing_if = "Option::is_none")]
2828
pub to: Option<Address>,
2929
pub block_number: U64,
30+
pub index: U64,
3031
pub gas_price: U256,
3132
pub max_fee_per_blob_gas: U256,
3233
}
@@ -180,6 +181,9 @@ impl<'a> TryFrom<(&'a EthersTransaction, &'a EthersBlock<EthersTransaction>)> fo
180181
block_number: ethers_block
181182
.number
182183
.with_context(|| "Missing block number field in execution block".to_string())?,
184+
index: ethers_tx
185+
.transaction_index
186+
.with_context(|| "Missing transaction index field".to_string())?,
183187
hash,
184188
from: ethers_tx.from,
185189
to: ethers_tx.to,

0 commit comments

Comments
 (0)