numbat_wasm_debug/
tx_log.rs1use alloc::vec::Vec;
2use numbat_wasm::types::Address;
3
4#[derive(Clone, Debug)]
5pub struct TxLog {
6 pub address: Address,
7 pub endpoint: Vec<u8>,
8 pub topics: Vec<Vec<u8>>,
9 pub data: Vec<u8>,
10}
11
12impl TxLog {
13 pub fn equals(&self, check_log: &denali::CheckLog) -> bool {
14 if self.address.to_vec() == check_log.address.value
15 && self.endpoint == check_log.endpoint.value
16 && self.data == check_log.data.value
17 {
18 for (topic, other_topic) in self.topics.iter().zip(check_log.topics.iter()) {
19 if topic != &other_topic.value {
20 return false;
21 }
22 }
23
24 true
25 } else {
26 false
27 }
28 }
29}