pinsteel 2025.44.0

Solana smart contract framework. Steel and Pinocchio combined
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use core::panic::Location;
use pinocchio::program_error::ProgramError;
use pinocchio_log::log;

/// Logs the call trace and returns the error.
#[track_caller]
pub fn trace(msg: &str, error: ProgramError) -> ProgramError {
    let here = Location::caller();
    log!("{}:{} {}", here.file(), here.line(), msg);
    error
}

/// Supports logging.
pub trait Loggable {
    fn log(&self);
    fn log_return(&self);
}