implements PLN-0031

This commit is contained in:
2026-04-19 08:40:22 +01:00
parent aaf4dff69d
commit 52785b5a8c
9 changed files with 80 additions and 27 deletions
@@ -567,19 +567,8 @@ impl NativeInterface for VirtualMachineRuntime {
used_slots: 0,
total_slots: 0,
});
let json = serde_json::to_string(&telemetry).unwrap_or_default();
ret.push_string(json);
Ok(())
}
Syscall::BankSlotInfo => {
let asset_type = match expect_int(args, 0)? as u32 {
0 => BankType::GLYPH,
1 => BankType::SOUNDS,
_ => return Err(VmFault::Trap(TRAP_TYPE, "Invalid asset type".to_string())),
};
let slot = SlotRef { asset_type, index: expect_int(args, 1)? as usize };
let json = serde_json::to_string(&hw.assets().slot_info(slot)).unwrap_or_default();
ret.push_string(json);
ret.push_int(telemetry.used_slots as i64);
ret.push_int(telemetry.total_slots as i64);
Ok(())
}
}