Skip to content

Commit

Permalink
reverting accidental change
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Jan 8, 2025
1 parent d9308ca commit 262d42f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 262d42f

Please sign in to comment.