Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add get_work, deprecate getWork #1934

Merged
merged 1 commit into from
Apr 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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')