Log Structure
The Something Cool platform emits structured logs during various operations, which can be useful for tracking events, auditing, and debugging. This page documents the log structures used by both SC Bonding Curve and CoolDEX components.
SC Bonding Curve Logs
SC Bonding Curve emits logs for token creation, buying, and selling operations.
Log Types
/// LogType enum
#[derive(Debug)]
pub enum LogType {
Buy,
Sell,
Create,
}
impl LogType {
pub fn into_u8(&self) -> u8 {
match self {
LogType::Buy => 0u8,
LogType::Sell => 1u8,
LogType::Create => 2u8,
}
}
}Buy Log Structure
Sell Log Structure
Create Token Log Structure
CoolDEX Logs
CoolDEX emits logs for initialization, deposits, withdrawals, and swap operations.
Log Types
Init Log Structure
Deposit Log Structure
Withdraw Log Structure
SwapBaseIn Log Structure
SwapBaseOut Log Structure
Last updated