Skip to content

Commit

Permalink
logs
Browse files Browse the repository at this point in the history
  • Loading branch information
malik672 committed Dec 11, 2024
1 parent f2f95ab commit 6720a9a
Showing 1 changed file with 8 additions and 32 deletions.
40 changes: 8 additions & 32 deletions examples/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,7 @@ mod tests {
.unwrap();
assert!(!info.logs.is_empty());
assert_eq!(info.logs[0].topics()[1].to_vec(), value1.bytes32().to_vec());
assert_eq!(
info.logs[0].topics()[0].to_vec(),
value2.bytes32().to_vec()
);
assert_eq!(info.logs[0].topics()[0].to_vec(), value2.bytes32().to_vec());

let info = contract
.execute(&[
Expand All @@ -146,18 +143,9 @@ mod tests {
])
.unwrap();
assert!(!info.logs.is_empty());
assert_eq!(
info.logs[0].topics()[2].to_vec(),
value1.bytes32().to_vec()
);
assert_eq!(
info.logs[0].topics()[1].to_vec(),
value2.bytes32().to_vec()
);
assert_eq!(
info.logs[0].topics()[0].to_vec(),
value3.bytes32().to_vec()
);
assert_eq!(info.logs[0].topics()[2].to_vec(), value1.bytes32().to_vec());
assert_eq!(info.logs[0].topics()[1].to_vec(), value2.bytes32().to_vec());
assert_eq!(info.logs[0].topics()[0].to_vec(), value3.bytes32().to_vec());

let info = contract
.execute(&[
Expand All @@ -169,22 +157,10 @@ mod tests {
])
.unwrap();
assert!(!info.logs.is_empty());
assert_eq!(
info.logs[0].topics()[3].to_vec(),
value1.bytes32().to_vec()
);
assert_eq!(
info.logs[0].topics()[2].to_vec(),
value2.bytes32().to_vec()
);
assert_eq!(
info.logs[0].topics()[1].to_vec(),
value3.bytes32().to_vec()
);
assert_eq!(
info.logs[0].topics()[0].to_vec(),
value4.bytes32().to_vec()
);
assert_eq!(info.logs[0].topics()[3].to_vec(), value1.bytes32().to_vec());
assert_eq!(info.logs[0].topics()[2].to_vec(), value2.bytes32().to_vec());
assert_eq!(info.logs[0].topics()[1].to_vec(), value3.bytes32().to_vec());
assert_eq!(info.logs[0].topics()[0].to_vec(), value4.bytes32().to_vec());

let info = contract
.execute(&[
Expand Down

0 comments on commit 6720a9a

Please sign in to comment.