Function read_current_value_of_delayed_public_mutable_with_hash
pub fn read_current_value_of_delayed_public_mutable_with_hash<T, let INITIAL_DELAY: u64>(
historical_header: BlockHeader,
storage_slot: Field,
contract_address: AztecAddress,
delayed_public_mutable: DelayedPublicMutableValues<T, INITIAL_DELAY>,
witness: MembershipWitness<40>,
leaf_preimage: PublicDataTreeLeafPreimage,
) -> T
Read the current value of a delayed public mutable state variable, which was written to public storage with the hash of the packed values. See
aztec-nr/aztec/src/state_vars/delayed_public_mutable.nr > writefor more details on how the variable and hash are written.Parameters:
historical_header: The header of the block whose state we are reading from.storage_slot: The starting storage slot of the delayed public mutable state variable.contract_address: The address of the contract where the delayed public mutable was written to.delayed_public_mutable: The hinted delayed public mutable to read (its correctness is validated within this function).witness: A hint to prove that theleaf_preimageexists in the tree.leaf_preimage: The preimage of the leaf containing the hash of the packed values. Or a low leaf if the variable has not been initialized.Returns:
T::unpack(std::mem::zeroed())(the bitwise-zero packing ofT, i.e. the storage-default) if the variable has not been initialized.