@@ -285,6 +285,17 @@ def test_receive_contract_with_fallback_function(receive_function_contract, call
285285 assert final_value == "receive"
286286
287287
288+ def test_contract_can_transact_without_fn_parens (w3 , math_contract , call ):
289+ initial_value = call (contract = math_contract , contract_function = "counter" )
290+ txn_hash = math_contract .functions .incrementCounter .transact ()
291+ txn_receipt = w3 .eth .wait_for_transaction_receipt (txn_hash )
292+ assert txn_receipt is not None
293+
294+ final_value = call (contract = math_contract , contract_function = "counter" )
295+
296+ assert final_value - initial_value == 1
297+
298+
288299@pytest .mark .asyncio
289300async def test_async_transacting_with_contract_no_arguments (
290301 async_w3 , async_math_contract , async_transact , async_call
@@ -306,6 +317,25 @@ async def test_async_transacting_with_contract_no_arguments(
306317 assert final_value - initial_value == 1
307318
308319
320+ @pytest .mark .asyncio
321+ async def test_async_transacting_with_contract_no_arguments_no_parens (
322+ async_w3 , async_math_contract , async_transact , async_call
323+ ):
324+ initial_value = await async_call (
325+ contract = async_math_contract , contract_function = "counter"
326+ )
327+
328+ txn_hash = await async_math_contract .functions .incrementCounter .transact ()
329+ txn_receipt = await async_w3 .eth .wait_for_transaction_receipt (txn_hash )
330+ assert txn_receipt is not None
331+
332+ final_value = await async_call (
333+ contract = async_math_contract , contract_function = "counter"
334+ )
335+
336+ assert final_value - initial_value == 1
337+
338+
309339@pytest .mark .asyncio
310340async def test_async_transact_not_sending_ether_to_nonpayable_function (
311341 async_w3 , async_payable_tester_contract , async_transact , async_call
0 commit comments