pink_web3/types/transaction_id.rs
1use crate::types::{BlockId, Index, H256};
2
3/// Transaction Identifier
4#[derive(Clone, Debug, PartialEq)]
5pub enum TransactionId {
6 /// By hash
7 Hash(H256),
8 /// By block and index
9 Block(BlockId, Index),
10}
11
12impl From<H256> for TransactionId {
13 fn from(hash: H256) -> Self {
14 TransactionId::Hash(hash)
15 }
16}