1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct AddressTokensTransactionUnconfirmedDataItem {
#[serde(rename = "blockchain")]
pub blockchain: String,
#[serde(rename = "network")]
pub network: String,
#[serde(rename = "address")]
pub address: String,
#[serde(rename = "transactionId")]
pub transaction_id: String,
#[serde(rename = "tokenType")]
pub token_type: TokenType,
#[serde(rename = "token")]
pub token: Box<crate::models::AddressTokensTransactionUnconfirmedToken>,
#[serde(rename = "direction")]
pub direction: Direction,
#[serde(rename = "firstSeenInMempoolTimestamp")]
pub first_seen_in_mempool_timestamp: i32,
}
impl AddressTokensTransactionUnconfirmedDataItem {
pub fn new(blockchain: String, network: String, address: String, transaction_id: String, token_type: TokenType, token: crate::models::AddressTokensTransactionUnconfirmedToken, direction: Direction, first_seen_in_mempool_timestamp: i32) -> AddressTokensTransactionUnconfirmedDataItem {
AddressTokensTransactionUnconfirmedDataItem {
blockchain,
network,
address,
transaction_id,
token_type,
token: Box::new(token),
direction,
first_seen_in_mempool_timestamp,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TokenType {
#[serde(rename = "ethereumERC20Token")]
EthereumERC20Token,
#[serde(rename = "ethereumERC721Token")]
EthereumERC721Token,
#[serde(rename = "omniLayerToken")]
OmniLayerToken,
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Direction {
#[serde(rename = "incoming")]
Incoming,
#[serde(rename = "outgoing")]
Outgoing,
}