phoenix-rise-events 0.6.12
“Phoenix Rise market event parsing helpers”
Release published within seven daysThree releases published within 24 hours
SHA-256d13bde5ace0a2a0162e622a09f486f308af8bdb4968105814dc9147b8e1958cf
MaleculeH(F)Md(Pa₂)
Evidence
1use phoenix_rise_events::market_events::SlotContextEvent;
2use phoenix_rise_events::{
3 LOG_EVENT_LENGTHS_INSTRUCTION_TAG, LOG_HEADER_LEN, LOG_INSTRUCTION_TAG, LogParseError,
4 MarketEvent, MarketEventType, PhoenixLogInstruction, PhoenixLogInstructionKind, parse,
5 parse_with_errors,
6};
7
8const LOG: PhoenixLogInstructionKind = PhoenixLogInstructionKind::Log;
9const LENGTHS: PhoenixLogInstructionKind …
34:5… out.extend_from_slice(&len.to_le_bytes());
35 }
36 out
37}
38
39#[test]
40fn discriminants_match_eternal_instruction_tags() {
41 assert_eq!(LOG_INSTRUCTION_TAG, 0xaacfd109f2d6e68d);
42 assert_eq!(LOG_EVENT_LENGTHS_INSTRUCTION_TAG, 0x4 …
1use std::path::Path;
2
3use phoenix_rise_events::market_events as rise;
4
5#[test]
6fn representative_event_serialization_matches_phoenix_exchange() {
7 assert_eq!(
8 borsh::to_vec(&rise::MarketEvent::SlotContext(rise::SlotContextEvent {
9 tim …
260:11… iles(root: &Path, f: &mut impl FnMut(&Path)) {
261 for entry in std::fs::read_dir(root).expect("read directory") {
262 let entry = entry.expect("read directory entry");
263 let path = entry.path();
⋯7 lines
⋯4 lines
115}
116
117#[cfg(test)]
118mod tests {
119 use super::*;
120
121 #[test]
122 fn reason_str_trims_null_padding() {
123 let mut reason = [0u8; 32];
124 let text = b"TiFInvalid";
125 reason[. …
No evidence locations were recorded for this file. Raw result