Skip to content

Commit

Permalink
feat!: rename sharedimmutable methods (#10164)
Browse files Browse the repository at this point in the history
We used to have to do this because we only knew the context at runtime,
but since AztecProtocol/aztec-packages#6442 we
no longer need this. I'm also doing this for some other state vars, but
chose do to so in separate PRs as some of those changes are a bit
messier.
  • Loading branch information
nventuro authored and AztecBot committed Nov 26, 2024
1 parent 3272805 commit 616389e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aztec/src/state_vars/shared_immutable.nr
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ where
self.context.storage_write(self.storage_slot, value);
}

pub fn read_public(self) -> T {
pub fn read(self) -> T {
self.context.storage_read(self.storage_slot)
}
}
Expand All @@ -54,7 +54,7 @@ impl<T, let T_SERIALIZED_LEN: u32> SharedImmutable<T, UnconstrainedContext>
where
T: Serialize<T_SERIALIZED_LEN> + Deserialize<T_SERIALIZED_LEN>,
{
pub unconstrained fn read_public(self) -> T {
pub unconstrained fn read(self) -> T {
self.context.storage_read(self.storage_slot)
}
}
Expand All @@ -63,7 +63,7 @@ impl<T, let T_SERIALIZED_LEN: u32> SharedImmutable<T, &mut PrivateContext>
where
T: Serialize<T_SERIALIZED_LEN> + Deserialize<T_SERIALIZED_LEN>,
{
pub fn read_private(self) -> T {
pub fn read(self) -> T {
let header = self.context.get_header();
let mut fields = [0; T_SERIALIZED_LEN];

Expand Down

0 comments on commit 616389e

Please sign in to comment.