diff --git a/authwit/src/cheatcodes.nr b/authwit/src/cheatcodes.nr index 21347c5..f13582a 100644 --- a/authwit/src/cheatcodes.nr +++ b/authwit/src/cheatcodes.nr @@ -17,7 +17,7 @@ where C: CallInterface, { let target = call_interface.get_contract_address(); - let inputs = cheatcodes::get_private_context_inputs(get_block_number()); + let inputs = unsafe { cheatcodes::get_private_context_inputs(get_block_number()) }; let chain_id = inputs.tx_context.chain_id; let version = inputs.tx_context.version; let args_hash = hash_args(call_interface.get_args()); @@ -25,7 +25,7 @@ where let inner_hash = compute_inner_authwit_hash([caller.to_field(), selector.to_field(), args_hash]); let message_hash = compute_authwit_message_hash(target, chain_id, version, inner_hash); - cheatcodes::add_authwit(on_behalf_of, message_hash); + unsafe { cheatcodes::add_authwit(on_behalf_of, message_hash) }; } pub unconstrained fn add_public_authwit_from_call_interface( diff --git a/aztec/src/context/private_context.nr b/aztec/src/context/private_context.nr index 061ba0d..e0ea249 100644 --- a/aztec/src/context/private_context.nr +++ b/aztec/src/context/private_context.nr @@ -494,13 +494,15 @@ impl PrivateContext { // new_args = [selector, ...old_args], so as to make it suitable to call the public dispatch function. // We don't validate or compute it in the circuit because a) it's harder to do with slices, and // b) this is only temporary. - let args_hash = enqueue_public_function_call_internal( - contract_address, - function_selector, - args_hash, - counter, - is_static_call, - ); + let args_hash = unsafe { + enqueue_public_function_call_internal( + contract_address, + function_selector, + args_hash, + counter, + is_static_call, + ) + }; // Public calls are rerouted through the dispatch function. let function_selector = comptime { FunctionSelector::from_field(PUBLIC_DISPATCH_SELECTOR) }; @@ -548,13 +550,15 @@ impl PrivateContext { // new_args = [selector, ...old_args], so as to make it suitable to call the public dispatch function. // We don't validate or compute it in the circuit because a) it's harder to do with slices, and // b) this is only temporary. - let args_hash = set_public_teardown_function_call_internal( - contract_address, - function_selector, - args_hash, - counter, - is_static_call, - ); + let args_hash = unsafe { + set_public_teardown_function_call_internal( + contract_address, + function_selector, + args_hash, + counter, + is_static_call, + ) + }; let function_selector = comptime { FunctionSelector::from_field(PUBLIC_DISPATCH_SELECTOR) }; diff --git a/aztec/src/oracle/get_contract_instance.nr b/aztec/src/oracle/get_contract_instance.nr index 0b42739..14066ab 100644 --- a/aztec/src/oracle/get_contract_instance.nr +++ b/aztec/src/oracle/get_contract_instance.nr @@ -59,7 +59,7 @@ pub unconstrained fn get_contract_instance_initialization_hash_internal_avm( } pub fn get_contract_instance_deployer_avm(address: AztecAddress) -> Option { - let (member, exists) = get_contract_instance_deployer_internal_avm(address); + let (member, exists) = unsafe { get_contract_instance_deployer_internal_avm(address) }; if exists { Option::some(AztecAddress::from_field(member)) } else { @@ -67,7 +67,7 @@ pub fn get_contract_instance_deployer_avm(address: AztecAddress) -> Option Option { - let (member, exists) = get_contract_instance_class_id_internal_avm(address); + let (member, exists) = unsafe { get_contract_instance_class_id_internal_avm(address) }; if exists { Option::some(ContractClassId::from_field(member)) } else { @@ -75,7 +75,8 @@ pub fn get_contract_instance_class_id_avm(address: AztecAddress) -> Option Option { - let (member, exists) = get_contract_instance_initialization_hash_internal_avm(address); + let (member, exists) = + unsafe { get_contract_instance_initialization_hash_internal_avm(address) }; if exists { Option::some(member) } else {