Skip to content

Commit a73c33c

Browse files
committed
add EthLog type
1 parent e0ee544 commit a73c33c

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/eth.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,21 @@ pub enum EthError {
4040
/// Will be serialized and deserialized using `serde_json::to_vec` and `serde_json::from_slice`.
4141
#[derive(Debug, Serialize, Deserialize)]
4242
pub enum EthSubEvent {
43-
Log(Log),
43+
Log(EthLog),
44+
}
45+
46+
#[derive(Debug, Serialize, Deserialize)]
47+
#[serde(rename_all = "camelCase")]
48+
struct EthLog {
49+
address: String,
50+
block_hash: String,
51+
block_number: String,
52+
data: String,
53+
log_index: String,
54+
removed: bool,
55+
topics: Vec<String>,
56+
transaction_hash: String,
57+
transaction_index: String,
4458
}
4559

4660
#[derive(Debug)]

0 commit comments

Comments
 (0)