Skip to content

Commit e26efe2

Browse files
authored
Remove wait_for_accept parameter (#1276)
* Remove `wait_for_accept` parameter * Update migration guide
1 parent a604664 commit e26efe2

File tree

3 files changed

+1
-18
lines changed

3 files changed

+1
-18
lines changed

docs/migration_guide.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Changes in the :class:`~starknet_py.net.full_node_client.FullNodeClient`:
5959
10. :class:`ResourcePrice` field ``price_in_strk`` has been renamed to ``price_in_fri`` and has now become required.
6060
11. :class:`ResourceLimits` class has been renamed to :class:`ResourceBounds`.
6161
12. :class:`~starknet_py.net.account.base_account.BaseAccount` and :class:`~starknet_py.net.account.account.Account` property ``supported_transaction_version`` has been removed.
62+
13. ``wait_for_accept`` parameter in :meth:`Client.wait_for_tx` and :meth:`SentTransaction.wait_for_acceptance` has been removed.
6263

6364
0.19.0 Minor changes
6465
--------------------

starknet_py/contract.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import dataclasses
44
import json
5-
import warnings
65
from abc import ABC, abstractmethod
76
from dataclasses import dataclass
87
from functools import cached_property
@@ -117,19 +116,13 @@ class SentTransaction:
117116

118117
async def wait_for_acceptance(
119118
self: TypeSentTransaction,
120-
wait_for_accept: Optional[bool] = None,
121119
check_interval: float = 2,
122120
retries: int = 500,
123121
) -> TypeSentTransaction:
124122
"""
125123
Waits for transaction to be accepted on chain till ``ACCEPTED`` status.
126124
Returns a new SentTransaction instance, **does not mutate original instance**.
127125
"""
128-
if wait_for_accept is not None:
129-
warnings.warn(
130-
"Parameter `wait_for_accept` has been deprecated - since Starknet 0.12.0, transactions in a PENDING"
131-
" block have status ACCEPTED_ON_L2."
132-
)
133126

134127
tx_receipt = await self._client.wait_for_tx(
135128
self.hash,

starknet_py/net/client.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import annotations
22

33
import asyncio
4-
import warnings
54
from abc import ABC, abstractmethod
65
from typing import List, Optional, Union
76

@@ -137,7 +136,6 @@ async def get_transaction_status(self, tx_hash: Hash) -> TransactionStatusRespon
137136
async def wait_for_tx(
138137
self,
139138
tx_hash: Hash,
140-
wait_for_accept: Optional[bool] = None, # pylint: disable=unused-argument
141139
check_interval: float = 2,
142140
retries: int = 500,
143141
) -> TransactionReceipt:
@@ -146,10 +144,6 @@ async def wait_for_tx(
146144
Awaits for transaction to get accepted or at least pending by polling its status.
147145
148146
:param tx_hash: Transaction's hash.
149-
:param wait_for_accept:
150-
.. deprecated:: 0.17.0
151-
Parameter `wait_for_accept` has been deprecated - since Starknet 0.12.0, transactions in a PENDING
152-
block have status ACCEPTED_ON_L2.
153147
:param check_interval: Defines interval between checks.
154148
:param retries: Defines how many times the transaction is checked until an error is thrown.
155149
:return: Transaction receipt.
@@ -158,11 +152,6 @@ async def wait_for_tx(
158152
raise ValueError("Argument check_interval has to be greater than 0.")
159153
if retries <= 0:
160154
raise ValueError("Argument retries has to be greater than 0.")
161-
if wait_for_accept is not None:
162-
warnings.warn(
163-
"Parameter `wait_for_accept` has been deprecated - since Starknet 0.12.0, transactions in a PENDING"
164-
" block have status ACCEPTED_ON_L2."
165-
)
166155

167156
transaction_received = False
168157
while True:

0 commit comments

Comments
 (0)