Skip to content

Commit

Permalink
Add get_work, deprecate getWork
Browse files Browse the repository at this point in the history
  • Loading branch information
kclowes committed Apr 6, 2021
1 parent fe61b38 commit fefd74c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions newsfragments/1934.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add ``w3.eth.get_work``, deprecate ``w3.eth.getWork``
3 changes: 2 additions & 1 deletion web3/eth.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ def set_contract_factory(
def getCompilers(self) -> NoReturn:
raise DeprecationWarning("This method has been deprecated as of EIP 1474.")

getWork: Method[Callable[[], List[HexBytes]]] = Method(
get_work: Method[Callable[[], List[HexBytes]]] = Method(
RPC.eth_getWork,
mungers=None,
)
Expand Down Expand Up @@ -719,3 +719,4 @@ def set_gas_price_strategy(self, gas_price_strategy: GasPriceStrategy) -> None:
getFilterChanges = DeprecatedMethod(get_filter_changes,
'getFilterChanges',
'get_filter_changes')
getWork = DeprecatedMethod(get_work, 'getWork', 'get_work')

0 comments on commit fefd74c

Please sign in to comment.