Skip to content

Commit

Permalink
Add deprecation warning to jsonrpc endpoints dropped in EIP 1474
Browse files Browse the repository at this point in the history
  • Loading branch information
njgheorghita committed Mar 11, 2019
1 parent 7a3d44d commit e578dd2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions web3/eth.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ def contract(self,
def setContractFactory(self, contractFactory):
self.defaultContractFactory = contractFactory

@deprecated_for("Dropped in EIP 1474")
def getCompilers(self):
return self.web3.manager.request_blocking("eth_getCompilers", [])

Expand Down
4 changes: 4 additions & 0 deletions web3/net.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from web3.module import (
Module,
)
from web3.utils.decorators import (
deprecated_for,
)


class Net(Module):
Expand All @@ -13,6 +16,7 @@ def peerCount(self):
return self.web3.manager.request_blocking("net_peerCount", [])

@property
@deprecated_for("Dropped in EIP 1474")
def chainId(self):
return None

Expand Down

0 comments on commit e578dd2

Please sign in to comment.