implements PLN-0031
This commit is contained in:
@@ -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(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user