diff --git a/circuits/cpp/src/aztec3/circuits/kernel/private/native_private_kernel_circuit.test.cpp b/circuits/cpp/src/aztec3/circuits/kernel/private/native_private_kernel_circuit.test.cpp index 45e372bef34..030fe895383 100644 --- a/circuits/cpp/src/aztec3/circuits/kernel/private/native_private_kernel_circuit.test.cpp +++ b/circuits/cpp/src/aztec3/circuits/kernel/private/native_private_kernel_circuit.test.cpp @@ -29,6 +29,8 @@ using aztec3::utils::CircuitErrorCode; namespace aztec3::circuits::kernel::private_kernel { +// amount = 5, asset_id = 1, memo = 999 +static std::vector const& standard_test_args = { NT::fr(5), NT::fr(1), NT::fr(999) }; class native_private_kernel_init_tests : public ::testing::Test { protected: static void SetUpTestSuite() { barretenberg::srs::init_crs_factory("../barretenberg/cpp/srs_db/ignition"); } @@ -50,14 +52,11 @@ class native_private_kernel_inner_tests : public ::testing::Test { */ TEST_F(native_private_kernel_init_tests, deposit) { - NT::fr const& amount = 5; - NT::fr const& asset_id = 1; - NT::fr const& memo = 999; std::array const& encrypted_logs_hash = { NT::fr(16), NT::fr(69) }; NT::fr const& encrypted_log_preimages_length = NT::fr(100); auto const& private_inputs = do_private_call_get_kernel_inputs_init( - false, deposit, { amount, asset_id, memo }, encrypted_logs_hash, encrypted_log_preimages_length); + false, deposit, standard_test_args, encrypted_logs_hash, encrypted_log_preimages_length); DummyComposer composer = DummyComposer("private_kernel_tests__native_deposit"); auto const& public_inputs = native_private_kernel_circuit_initial(composer, private_inputs); @@ -91,11 +90,7 @@ TEST_F(native_private_kernel_init_tests, deposit) */ TEST_F(native_private_kernel_init_tests, basic_contract_deployment) { - NT::fr const arg0 = 5; - NT::fr const arg1 = 1; - NT::fr const arg2 = 999; - - auto const& private_inputs = do_private_call_get_kernel_inputs_init(true, constructor, { arg0, arg1, arg2 }); + auto const& private_inputs = do_private_call_get_kernel_inputs_init(true, constructor, standard_test_args); DummyComposer composer = DummyComposer("private_kernel_tests__native_basic_contract_deployment"); auto const& public_inputs = native_private_kernel_circuit_initial(composer, private_inputs); @@ -120,11 +115,7 @@ TEST_F(native_private_kernel_init_tests, basic_contract_deployment) // TODO(suyash): Disabled until https://github.com/AztecProtocol/aztec-packages/issues/499 is resolved. TEST_F(native_private_kernel_init_tests, DISABLED_contract_deployment_call_stack_item_hash_mismatch_fails) { - NT::fr const arg0 = 5; - NT::fr const arg1 = 1; - NT::fr const arg2 = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_init(true, constructor, { arg0, arg1, arg2 }); + auto private_inputs = do_private_call_get_kernel_inputs_init(true, constructor, standard_test_args); // Randomise the second item in the private call stack (i.e. hash of the private call item). private_inputs.private_call.call_stack_item.public_inputs.private_call_stack[1] = NT::fr::random_element(); @@ -140,11 +131,7 @@ TEST_F(native_private_kernel_init_tests, DISABLED_contract_deployment_call_stack TEST_F(native_private_kernel_init_tests, contract_deployment_incorrect_constructor_vk_hash_fails) { - NT::fr const arg0 = 5; - NT::fr const arg1 = 1; - NT::fr const arg2 = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_init(true, constructor, { arg0, arg1, arg2 }); + auto private_inputs = do_private_call_get_kernel_inputs_init(true, constructor, standard_test_args); // Pollute the constructor vk hash in the tx_request. private_inputs.tx_request.tx_context.contract_deployment_data.constructor_vk_hash = NT::fr::random_element(); @@ -160,11 +147,7 @@ TEST_F(native_private_kernel_init_tests, contract_deployment_incorrect_construct TEST_F(native_private_kernel_init_tests, contract_deployment_incorrect_contract_address_fails) { - NT::fr const arg0 = 5; - NT::fr const arg1 = 1; - NT::fr const arg2 = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_init(true, constructor, { arg0, arg1, arg2 }); + auto private_inputs = do_private_call_get_kernel_inputs_init(true, constructor, standard_test_args); // Modify the contract address in appropriate places. const fr random_address = NT::fr::random_element(); @@ -183,11 +166,7 @@ TEST_F(native_private_kernel_init_tests, contract_deployment_incorrect_contract_ TEST_F(native_private_kernel_init_tests, contract_deployment_contract_address_mismatch_fails) { - NT::fr const arg0 = 5; - NT::fr const arg1 = 1; - NT::fr const arg2 = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_init(true, constructor, { arg0, arg1, arg2 }); + auto private_inputs = do_private_call_get_kernel_inputs_init(true, constructor, standard_test_args); // Modify the storage_contract_address. const auto random_contract_address = NT::fr::random_element(); @@ -210,11 +189,7 @@ TEST_F(native_private_kernel_init_tests, contract_deployment_contract_address_mi TEST_F(native_private_kernel_init_tests, contract_deployment_function_data_mismatch_fails) { - NT::fr const arg0 = 5; - NT::fr const arg1 = 1; - NT::fr const arg2 = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_init(true, constructor, { arg0, arg1, arg2 }); + auto private_inputs = do_private_call_get_kernel_inputs_init(true, constructor, standard_test_args); // Modify the function selector in function data. private_inputs.tx_request.function_data.function_selector = numeric::random::get_engine().get_random_uint32(); @@ -234,11 +209,7 @@ TEST_F(native_private_kernel_init_tests, contract_deployment_function_data_misma TEST_F(native_private_kernel_init_tests, contract_deployment_args_hash_mismatch_fails) { - NT::fr const arg0 = 5; - NT::fr const arg1 = 1; - NT::fr const arg2 = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_init(true, constructor, { arg0, arg1, arg2 }); + auto private_inputs = do_private_call_get_kernel_inputs_init(true, constructor, standard_test_args); // Modify the args hash in tx request. private_inputs.tx_request.args_hash = NT::fr::random_element(); @@ -258,11 +229,7 @@ TEST_F(native_private_kernel_init_tests, contract_deployment_args_hash_mismatch_ TEST_F(native_private_kernel_init_tests, private_function_is_private_false_fails) { - NT::fr const arg0 = 5; - NT::fr const arg1 = 1; - NT::fr const arg2 = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, { arg0, arg1, arg2 }); + auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, standard_test_args); // Set is_private in function data to false. private_inputs.private_call.call_stack_item.function_data.is_private = false; @@ -282,11 +249,7 @@ TEST_F(native_private_kernel_init_tests, private_function_is_private_false_fails TEST_F(native_private_kernel_init_tests, private_function_static_call_fails) { - NT::fr const arg0 = 5; - NT::fr const arg1 = 1; - NT::fr const arg2 = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, { arg0, arg1, arg2 }); + auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, standard_test_args); // Set is_static_call to true. private_inputs.private_call.call_stack_item.public_inputs.call_context.is_static_call = true; @@ -303,11 +266,7 @@ TEST_F(native_private_kernel_init_tests, private_function_static_call_fails) TEST_F(native_private_kernel_init_tests, private_function_delegate_call_fails) { - NT::fr const arg0 = 5; - NT::fr const arg1 = 1; - NT::fr const arg2 = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, { arg0, arg1, arg2 }); + auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, standard_test_args); // Set is_delegate_call to true. private_inputs.private_call.call_stack_item.public_inputs.call_context.is_delegate_call = true; @@ -324,11 +283,7 @@ TEST_F(native_private_kernel_init_tests, private_function_delegate_call_fails) TEST_F(native_private_kernel_init_tests, private_function_incorrect_storage_contract_address_fails) { - NT::fr const arg0 = 5; - NT::fr const arg1 = 1; - NT::fr const arg2 = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, { arg0, arg1, arg2 }); + auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, standard_test_args); // Set the storage_contract_address to a random scalar. private_inputs.private_call.call_stack_item.public_inputs.call_context.storage_contract_address = @@ -347,11 +302,7 @@ TEST_F(native_private_kernel_init_tests, private_function_incorrect_storage_cont TEST_F(native_private_kernel_init_tests, native_read_request_bad_request) { - NT::fr const& amount = 5; - NT::fr const& asset_id = 1; - NT::fr const& memo = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, { amount, asset_id, memo }); + auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, standard_test_args); auto const& contract_address = private_inputs.private_call.call_stack_item.public_inputs.call_context.storage_contract_address; @@ -380,11 +331,7 @@ TEST_F(native_private_kernel_init_tests, native_read_request_bad_request) TEST_F(native_private_kernel_init_tests, native_read_request_bad_leaf_index) { - NT::fr const& amount = 5; - NT::fr const& asset_id = 1; - NT::fr const& memo = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, { amount, asset_id, memo }); + auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, standard_test_args); auto const& contract_address = private_inputs.private_call.call_stack_item.public_inputs.call_context.storage_contract_address; @@ -412,11 +359,7 @@ TEST_F(native_private_kernel_init_tests, native_read_request_bad_leaf_index) TEST_F(native_private_kernel_init_tests, native_read_request_bad_sibling_path) { - NT::fr const& amount = 5; - NT::fr const& asset_id = 1; - NT::fr const& memo = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, { amount, asset_id, memo }); + auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, standard_test_args); auto const& contract_address = private_inputs.private_call.call_stack_item.public_inputs.call_context.storage_contract_address; @@ -444,11 +387,7 @@ TEST_F(native_private_kernel_init_tests, native_read_request_bad_sibling_path) TEST_F(native_private_kernel_init_tests, native_read_request_root_mismatch) { - NT::fr const& amount = 5; - NT::fr const& asset_id = 1; - NT::fr const& memo = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, { amount, asset_id, memo }); + auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, standard_test_args); auto const& contract_address = private_inputs.private_call.call_stack_item.public_inputs.call_context.storage_contract_address; @@ -488,11 +427,7 @@ TEST_F(native_private_kernel_init_tests, native_no_read_requests_works) { // no read requests should work - NT::fr const& amount = 5; - NT::fr const& asset_id = 1; - NT::fr const& memo = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, { amount, asset_id, memo }); + auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, standard_test_args); // empty requests std::array const read_requests = zero_array(); @@ -520,11 +455,7 @@ TEST_F(native_private_kernel_init_tests, native_one_read_requests_works) { // one read request should work - NT::fr const& amount = 5; - NT::fr const& asset_id = 1; - NT::fr const& memo = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, { amount, asset_id, memo }); + auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, standard_test_args); auto const& contract_address = private_inputs.private_call.call_stack_item.public_inputs.call_context.storage_contract_address; @@ -553,11 +484,7 @@ TEST_F(native_private_kernel_init_tests, native_two_read_requests_works) { // two read requests should work - NT::fr const& amount = 5; - NT::fr const& asset_id = 1; - NT::fr const& memo = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, { amount, asset_id, memo }); + auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, standard_test_args); auto const& contract_address = private_inputs.private_call.call_stack_item.public_inputs.call_context.storage_contract_address; @@ -586,11 +513,7 @@ TEST_F(native_private_kernel_init_tests, native_max_read_requests_works) { // max read requests should work - NT::fr const& amount = 5; - NT::fr const& asset_id = 1; - NT::fr const& memo = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, { amount, asset_id, memo }); + auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, standard_test_args); auto const& contract_address = private_inputs.private_call.call_stack_item.public_inputs.call_context.storage_contract_address; @@ -625,11 +548,7 @@ TEST_F(native_private_kernel_init_tests, native_one_transient_read_requests_work { // one transient read request should work - NT::fr const& amount = 5; - NT::fr const& asset_id = 1; - NT::fr const& memo = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, { amount, asset_id, memo }); + auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, standard_test_args); auto const& contract_address = private_inputs.private_call.call_stack_item.public_inputs.call_context.storage_contract_address; @@ -660,11 +579,7 @@ TEST_F(native_private_kernel_init_tests, native_max_read_requests_one_transient_ { // max read requests with one transient should work - NT::fr const& amount = 5; - NT::fr const& asset_id = 1; - NT::fr const& memo = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, { amount, asset_id, memo }); + auto private_inputs = do_private_call_get_kernel_inputs_init(false, deposit, standard_test_args); auto const& contract_address = private_inputs.private_call.call_stack_item.public_inputs.call_context.storage_contract_address; @@ -699,11 +614,7 @@ TEST_F(native_private_kernel_init_tests, native_max_read_requests_one_transient_ */ TEST_F(native_private_kernel_inner_tests, private_function_zero_storage_contract_address_fails) { - NT::fr const arg0 = 5; - NT::fr const arg1 = 1; - NT::fr const arg2 = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, { arg0, arg1, arg2 }); + auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, standard_test_args); // Set storage_contract_address to 0 private_inputs.private_call.call_stack_item.public_inputs.call_context.storage_contract_address = 0; @@ -727,11 +638,7 @@ TEST_F(native_private_kernel_inner_tests, private_function_zero_storage_contract TEST_F(native_private_kernel_inner_tests, private_function_incorrect_contract_tree_root_fails) { - NT::fr const arg0 = 5; - NT::fr const arg1 = 1; - NT::fr const arg2 = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, { arg0, arg1, arg2 }); + auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, standard_test_args); // Set private_historic_tree_roots to a random scalar. private_inputs.previous_kernel.public_inputs.constants.historic_tree_roots.private_historic_tree_roots @@ -752,11 +659,7 @@ TEST_F(native_private_kernel_inner_tests, private_function_incorrect_contract_tr TEST_F(native_private_kernel_inner_tests, private_function_incorrect_contract_leaf_index_fails) { - NT::fr const arg0 = 5; - NT::fr const arg1 = 1; - NT::fr const arg2 = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, { arg0, arg1, arg2 }); + auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, standard_test_args); // Set the leaf index of the contract leaf to 20 (the correct value is 1). NT::fr const wrong_idx = 20; @@ -777,11 +680,7 @@ TEST_F(native_private_kernel_inner_tests, private_function_incorrect_contract_le TEST_F(native_private_kernel_inner_tests, private_function_incorrect_contract_leaf_sibling_path_fails) { - NT::fr const arg0 = 5; - NT::fr const arg1 = 1; - NT::fr const arg2 = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, { arg0, arg1, arg2 }); + auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, standard_test_args); // Change the contract leaf's membership proof. private_inputs.private_call.contract_leaf_membership_witness.sibling_path[0] = fr::random_element(); @@ -801,11 +700,7 @@ TEST_F(native_private_kernel_inner_tests, private_function_incorrect_contract_le TEST_F(native_private_kernel_inner_tests, private_function_incorrect_function_leaf_index_fails) { - NT::fr const arg0 = 5; - NT::fr const arg1 = 1; - NT::fr const arg2 = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, { arg0, arg1, arg2 }); + auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, standard_test_args); // Set the leaf index of the function leaf to 10 (the correct value is 1). NT::fr const wrong_idx = 10; @@ -826,11 +721,7 @@ TEST_F(native_private_kernel_inner_tests, private_function_incorrect_function_le TEST_F(native_private_kernel_inner_tests, private_function_incorrect_function_leaf_sibling_path_fails) { - NT::fr const arg0 = 5; - NT::fr const arg1 = 1; - NT::fr const arg2 = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, { arg0, arg1, arg2 }); + auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, standard_test_args); // Change the function leaf's membership proof. private_inputs.private_call.function_leaf_membership_witness.sibling_path[0] = fr::random_element(); @@ -851,11 +742,7 @@ TEST_F(native_private_kernel_inner_tests, private_function_incorrect_function_le // TODO(suyash): Disabled until https://github.com/AztecProtocol/aztec-packages/issues/499 is resolved. TEST_F(native_private_kernel_inner_tests, DISABLED_private_function_incorrect_call_stack_item_hash_fails) { - NT::fr const arg0 = 5; - NT::fr const arg1 = 1; - NT::fr const arg2 = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, { arg0, arg1, arg2 }); + auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, standard_test_args); // Set the first call stack member corresponding to the `deposit` function to random scalar. private_inputs.private_call.call_stack_item.public_inputs.private_call_stack[0] = NT::fr::random_element(); @@ -878,12 +765,8 @@ TEST_F(native_private_kernel_inner_tests, private_kernel_should_fail_if_aggregat // Negative test to check if push_array_to_array fails if two many commitments are merged together DummyComposer composer = DummyComposer("should_fail_if_aggregating_too_many_commitments"); - NT::fr const& amount = 5; - NT::fr const& asset_id = 1; - NT::fr const& memo = 999; - PrivateKernelInputsInner private_inputs = - do_private_call_get_kernel_inputs_inner(false, deposit, { amount, asset_id, memo }); + do_private_call_get_kernel_inputs_inner(false, deposit, standard_test_args); // Mock the previous new commitments to be full, therefore no need commitments can be added std::array full_new_commitments{}; @@ -914,11 +797,7 @@ TEST_F(native_private_kernel_inner_tests, cbind_private_kernel__dummy_previous_k TEST_F(native_private_kernel_inner_tests, native_read_request_bad_request) { - NT::fr const& amount = 5; - NT::fr const& asset_id = 1; - NT::fr const& memo = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, { amount, asset_id, memo }); + auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, standard_test_args); auto const& contract_address = private_inputs.private_call.call_stack_item.public_inputs.call_context.storage_contract_address; @@ -946,11 +825,7 @@ TEST_F(native_private_kernel_inner_tests, native_read_request_bad_request) TEST_F(native_private_kernel_inner_tests, native_read_request_bad_leaf_index) { - NT::fr const& amount = 5; - NT::fr const& asset_id = 1; - NT::fr const& memo = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, { amount, asset_id, memo }); + auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, standard_test_args); auto const& contract_address = private_inputs.private_call.call_stack_item.public_inputs.call_context.storage_contract_address; @@ -977,11 +852,7 @@ TEST_F(native_private_kernel_inner_tests, native_read_request_bad_leaf_index) TEST_F(native_private_kernel_inner_tests, native_read_request_bad_sibling_path) { - NT::fr const& amount = 5; - NT::fr const& asset_id = 1; - NT::fr const& memo = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, { amount, asset_id, memo }); + auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, standard_test_args); auto const& contract_address = private_inputs.private_call.call_stack_item.public_inputs.call_context.storage_contract_address; @@ -1008,11 +879,7 @@ TEST_F(native_private_kernel_inner_tests, native_read_request_bad_sibling_path) TEST_F(native_private_kernel_inner_tests, native_read_request_root_mismatch) { - NT::fr const& amount = 5; - NT::fr const& asset_id = 1; - NT::fr const& memo = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, { amount, asset_id, memo }); + auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, standard_test_args); auto const& contract_address = private_inputs.private_call.call_stack_item.public_inputs.call_context.storage_contract_address; @@ -1051,11 +918,7 @@ TEST_F(native_private_kernel_inner_tests, native_no_read_requests_works) { // no read requests should work - NT::fr const& amount = 5; - NT::fr const& asset_id = 1; - NT::fr const& memo = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, { amount, asset_id, memo }); + auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, standard_test_args); // empty requests std::array const read_requests = zero_array(); @@ -1080,11 +943,7 @@ TEST_F(native_private_kernel_inner_tests, native_one_read_requests_works) { // one read request should work - NT::fr const& amount = 5; - NT::fr const& asset_id = 1; - NT::fr const& memo = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, { amount, asset_id, memo }); + auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, standard_test_args); auto const& contract_address = private_inputs.private_call.call_stack_item.public_inputs.call_context.storage_contract_address; @@ -1112,11 +971,7 @@ TEST_F(native_private_kernel_inner_tests, native_two_read_requests_works) { // two read requests should work - NT::fr const& amount = 5; - NT::fr const& asset_id = 1; - NT::fr const& memo = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, { amount, asset_id, memo }); + auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, standard_test_args); auto const& contract_address = private_inputs.private_call.call_stack_item.public_inputs.call_context.storage_contract_address; @@ -1144,11 +999,7 @@ TEST_F(native_private_kernel_inner_tests, native_max_read_requests_works) { // max read requests should work - NT::fr const& amount = 5; - NT::fr const& asset_id = 1; - NT::fr const& memo = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, { amount, asset_id, memo }); + auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, standard_test_args); auto const& contract_address = private_inputs.private_call.call_stack_item.public_inputs.call_context.storage_contract_address; @@ -1177,11 +1028,7 @@ TEST_F(native_private_kernel_inner_tests, native_one_transient_read_requests_wor { // one transient read request should work - NT::fr const& amount = 5; - NT::fr const& asset_id = 1; - NT::fr const& memo = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, { amount, asset_id, memo }); + auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, standard_test_args); auto const& contract_address = private_inputs.private_call.call_stack_item.public_inputs.call_context.storage_contract_address; @@ -1212,11 +1059,7 @@ TEST_F(native_private_kernel_inner_tests, native_max_read_requests_one_transient { // max read requests with one transient should work - NT::fr const& amount = 5; - NT::fr const& asset_id = 1; - NT::fr const& memo = 999; - - auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, { amount, asset_id, memo }); + auto private_inputs = do_private_call_get_kernel_inputs_inner(false, deposit, standard_test_args); auto const& contract_address = private_inputs.private_call.call_stack_item.public_inputs.call_context.storage_contract_address;