Skip to content

Commit

Permalink
fix: misleading error message in PublicState::read (#4149)
Browse files Browse the repository at this point in the history
Co-authored-by: Ayush Shukla <shuklaayush247@gmail.com>
  • Loading branch information
Maddiaa0 and shuklaayush authored Jan 19, 2024
1 parent 7438db3 commit fa4d919
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yarn-project/aztec-nr/aztec/src/state_vars/public_state.nr
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl<T, T_SERIALIZED_LEN> PublicState<T, T_SERIALIZED_LEN> {

// docs:start:public_state_struct_read
pub fn read(self) -> T {
assert(self.context.private.is_none(), "Public state writes only supported in public functions");
assert(self.context.private.is_none(), "Public state reads only supported in public functions");
storage_read(self.storage_slot, self.serialization_methods.deserialize)
}
// docs:end:public_state_struct_read
Expand Down

0 comments on commit fa4d919

Please sign in to comment.