Skip to content

Commit

Permalink
Create events.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Dec 7, 2024
1 parent 1b2f6cb commit 77c3edc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/stablecoin/src/events.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// src/events.rs
pub struct EventLogger {
events: Vec<String>,
}

impl EventLogger {
pub fn new() -> Self {
EventLogger {
events: Vec::new(),
}
}

pub fn log_event(&mut self, event: String) {
self.events.push(event);
println!("Event logged: {}", event);
}
}

0 comments on commit 77c3edc

Please sign in to comment.