From 262d42fc6062676e3d9ff79ed2cf1dfc241a0af8 Mon Sep 17 00:00:00 2001 From: benesjan Date: Wed, 8 Jan 2025 18:18:11 +0000 Subject: [PATCH] reverting accidental change --- .../aztec-nr/aztec/src/oracle/get_contract_instance.nr | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/noir-projects/aztec-nr/aztec/src/oracle/get_contract_instance.nr b/noir-projects/aztec-nr/aztec/src/oracle/get_contract_instance.nr index 763856a6e2c..acfac75d203 100644 --- a/noir-projects/aztec-nr/aztec/src/oracle/get_contract_instance.nr +++ b/noir-projects/aztec-nr/aztec/src/oracle/get_contract_instance.nr @@ -18,8 +18,10 @@ unconstrained fn get_contract_instance_internal( // NOTE: this is for use in private only pub fn get_contract_instance(address: AztecAddress) -> ContractInstance { - let instance = - unsafe { ContractInstance::deserialize(get_contract_instance_internal(address)) }; + let instance = unsafe { + //@safety The instance is verified against the contract address below. + ContractInstance::deserialize(get_contract_instance_internal(address)) + }; // The to_address function combines all values in the instance object to produce an address, so by checking that we // get the expected address we validate the entire struct. assert_eq(instance.to_address(), address);