Skip to content

Commit a38f1d3

Browse files
committed
memory manager: add get_array method
1 parent 6c897f3 commit a38f1d3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

crates/leanVm/src/memory/manager.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,17 @@ impl MemoryManager {
104104
{
105105
self.memory.get(address)
106106
}
107+
108+
/// Retrieves an array of values stored from a given memory address.
109+
pub fn get_array<F, const DIM: usize>(
110+
&self,
111+
start_address: MemoryAddress,
112+
) -> Result<[MemoryValue<F>; DIM], MemoryError<F>>
113+
where
114+
F: PrimeField64,
115+
{
116+
self.memory.get_array(start_address)
117+
}
107118
}
108119

109120
#[cfg(test)]

0 commit comments

Comments
 (0)