Skip to content

Commit deb688a

Browse files
Add tip and auto_estimate_tip params to ContractFunction.invoke_v3 (#1650)
1 parent 75a2988 commit deb688a

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

docs/migration_guide.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ Version 0.28.0 of **starknet.py** comes with full support for RPC 0.9.0.
6262
1. When no ``token_address`` is specified in the :meth:`Account.get_balance` method, the default token address is now the STRK fee contract instead of ETH.
6363
2. Rename ``FEE_CONTRACT_ADDRESS`` to ``ETH_FEE_CONTRACT_ADDRESS``.
6464

65+
``starknet_py.contract`` Changes
66+
-------------------------------------------
67+
68+
.. py:currentmodule:: starknet_py.contract
69+
70+
1. Added missing ``tip`` and ``auto_estimate_tip`` to :meth:`ContractFunction.invoke_v3`.
71+
6572
Transaction Tip Support
6673
-----------------------
6774

starknet_py/contract.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,8 @@ async def invoke_v3(
558558
*args,
559559
resource_bounds: Optional[ResourceBoundsMapping] = None,
560560
auto_estimate: bool = False,
561+
tip: Optional[int] = None,
562+
auto_estimate_tip: bool = False,
561563
nonce: Optional[int] = None,
562564
**kwargs,
563565
) -> InvokeResult:
@@ -567,6 +569,8 @@ async def invoke_v3(
567569
568570
:param resource_bounds: Resource limits (L1 and L2) used when executing this transaction.
569571
:param auto_estimate: Use automatic fee estimation (not recommended, as it may lead to high costs).
572+
:param tip: The tip amount to be added to the transaction fee.
573+
:param auto_estimate_tip: Use automatic tip estimation. Using this option may lead to higher costs.
570574
:param nonce: Nonce of the transaction.
571575
:return: InvokeResult.
572576
"""
@@ -575,6 +579,8 @@ async def invoke_v3(
575579
resource_bounds=resource_bounds,
576580
nonce=nonce,
577581
auto_estimate=auto_estimate,
582+
tip=tip,
583+
auto_estimate_tip=auto_estimate_tip,
578584
)
579585

580586
@staticmethod

0 commit comments

Comments
 (0)