Skip to content

Commit

Permalink
chore: remove commented code (#7231)
Browse files Browse the repository at this point in the history
Even though noir-lang/noir#4633 is now closed,
we no longer need this function due to how
github.com//pull/7169 (the sole user of the
API) does historical proofs (i.e. it reads a single slot).
  • Loading branch information
nventuro authored Jun 27, 2024
1 parent e934e87 commit 2740d60
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions noir-projects/aztec-nr/aztec/src/public_storage.nr
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,6 @@ pub fn write<T, N>(storage_slot: Field, value: T) where T: Serialize<N> {
storage_write(storage_slot, value.serialize());
}

// Ideally we'd do the following, but we cannot because of https://github.com/noir-lang/noir/issues/4633
// pub fn read_historical<T, N>(
// storage_slot: Field,
// context: PrivateContext
// ) -> T where T: Deserialize<N> {
// let mut fields = [0; N];
// for i in 0..N {
// fields[i] = public_storage_historical_read(
// context,
// storage_slot + i as Field,
// context.this_address()
// );
// }
// T::deserialize(fields)
// }

mod tests {
use std::test::OracleMock;
use dep::protocol_types::traits::{Deserialize, Serialize};
Expand Down

0 comments on commit 2740d60

Please sign in to comment.