1use std::collections::HashMap;
2
3use serde::{Deserialize, Serialize};
4
5#[allow(non_snake_case)]
7#[derive(Debug, Deserialize, Serialize, Clone, Default)]
8pub struct TokenRecord {
9 pub _id: String,
11 pub address: String,
12 pub chain_id: String,
13 pub name: String,
14 pub symbol: String,
15 pub decimals: u64,
16}
17
18#[allow(non_snake_case)]
19#[derive(Debug, Deserialize, Serialize, Clone, Default)]
20pub struct ChainInfoRecord {
21 pub _id: String,
23 pub chain_id: String,
24 pub token_manager: String,
25 pub token_messenger: String,
26 pub chain_domain_id: u32,
27 pub chain_type: String,
28 pub validators: Vec<String>,
29 pub version: u64,
30 pub is_active: bool,
31}
32
33#[allow(non_snake_case)]
34#[derive(Debug, Deserialize, Serialize, Clone, Default)]
35pub struct TokenMessengerRecord {
36 pub _id: String,
38 pub address: String,
39 pub validator: String,
40 pub chain_id: String,
41 pub last_observed_nonce: u64,
42 pub last_observed_block: String,
43 pub last_confirmed_nonce: u64,
44 pub last_confirmed_block: String,
45 pub rpc: String,
46 pub query_range: String,
47 pub blocks_confirmation: String,
48 pub is_active: bool,
49}
50
51#[allow(non_snake_case)]
52#[derive(Debug, Deserialize, Serialize, Clone, Default)]
53pub struct DepositRecord {
54 pub _id: u64,
56
57 pub src_chain_id: String,
58 pub src_chain_domain_id: u32,
59 pub dest_chain_id: String,
60 pub dest_chain_domain_id: u32,
61 pub src_txn_hash: String,
62 pub block_number: String,
63
64 pub src_contract: String,
65 pub dest_contract: String,
66
67 pub depositor: String,
68 pub recipient: String,
69 pub event_nonce: u64,
70 pub src_amount: String,
71 pub dest_amount: String,
72 pub partner_id: String,
73
74 pub version: u64,
75 pub is_executed: bool,
76 pub dest_txn_hash: String,
77 pub relay_record_id: u64,
78 pub attestation_expiry: u64,
79
80 pub message_hash: String,
81 pub attestations: HashMap<String, String>,
82
83 pub created_at: u64,
84 pub updated_at: u64,
85}
86
87#[allow(non_snake_case)]
88#[derive(Debug, Deserialize, Serialize, Clone, Default)]
89pub struct RelayRecord {
90 pub _id: u64,
92
93 pub chain_id: String,
94 pub chain_domain_id: u32,
95 pub relay_nonce: u64,
96 pub deposit_record_id: u64,
97 pub txn_hash: String,
98 pub block_number: String,
99 pub dest_contract: String,
100 pub executor: String,
101 pub recipient: String,
102 pub amount: String,
103 pub created_at: u64,
104 pub updated_at: u64,
105}
106
107#[allow(non_snake_case)]
108#[derive(Debug, Deserialize, Serialize, Clone, Default)]
109pub struct ReattestRecord {
110 pub _id: u64,
112 pub src_chain_domain_id: u32,
113 pub event_nonce: u64,
114 pub created_at: u64,
115}
116
117#[allow(non_snake_case)]
118#[derive(Debug, Deserialize, Serialize, Clone, Default)]
119pub struct AMLRecords {
120 pub _id: String,
122
123 pub wallet_address: String,
124 pub is_blacklisted: bool,
125 pub blacklist_reason: String,
126 pub source: String,
127 pub remarks: String,
128 pub created_at: u64,
129 pub updated_at: u64,
130}