Skip to content

Commit

Permalink
Clean up rpc endpoints according to updated spec
Browse files Browse the repository at this point in the history
  • Loading branch information
njgheorghita committed Mar 11, 2019
1 parent 652650d commit b2fb008
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 48 deletions.
26 changes: 0 additions & 26 deletions web3/_utils/module_testing/eth_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,16 +531,6 @@ def test_eth_getTransactionByHash_contract_creation(self,
assert is_dict(transaction)
assert transaction['to'] is None, "to field is %r" % transaction['to']

def test_eth_getTransactionFromBlockHashAndIndex(self, web3, block_with_txn, mined_txn_hash):
transaction = web3.eth.getTransactionFromBlock(block_with_txn['hash'], 0)
assert is_dict(transaction)
assert transaction['hash'] == HexBytes(mined_txn_hash)

def test_eth_getTransactionFromBlockNumberAndIndex(self, web3, block_with_txn, mined_txn_hash):
transaction = web3.eth.getTransactionFromBlock(block_with_txn['number'], 0)
assert is_dict(transaction)
assert transaction['hash'] == HexBytes(mined_txn_hash)

def test_eth_getTransactionByBlockHashAndIndex(self, web3, block_with_txn, mined_txn_hash):
transaction = web3.eth.getTransactionByBlock(block_with_txn['hash'], 0)
assert is_dict(transaction)
Expand Down Expand Up @@ -600,22 +590,6 @@ def test_eth_getUncleByBlockNumberAndIndex(self, web3):
# TODO: how do we make uncles....
pass

def test_eth_getCompilers(self, web3):
# TODO: do we want to test this?
pass

def test_eth_compileSolidity(self, web3):
# TODO: do we want to test this?
pass

def test_eth_compileLLL(self, web3):
# TODO: do we want to test this?
pass

def test_eth_compileSerpent(self, web3):
# TODO: do we want to test this?
pass

def test_eth_newFilter(self, web3):
filter = web3.eth.filter({})

Expand Down
18 changes: 0 additions & 18 deletions web3/eth.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
from web3._utils.blocks import (
select_method_for_block_identifier,
)
from web3._utils.decorators import (
deprecated_for,
)
from web3._utils.empty import (
empty,
)
Expand Down Expand Up @@ -66,10 +63,6 @@ class Eth(Module):
iban = Iban
gasPriceStrategy = None

@deprecated_for("doing nothing at all")
def enable_unaudited_features(self):
pass

def namereg(self):
raise NotImplementedError()

Expand Down Expand Up @@ -220,14 +213,6 @@ def getTransaction(self, transaction_hash):
raise TransactionNotFound(f"Transaction with hash: {transaction_hash} not found.")
return result

@deprecated_for("w3.eth.getTransactionByBlock")
def getTransactionFromBlock(self, block_identifier, transaction_index):
"""
Alias for the method getTransactionByBlock
Depreceated to maintain naming consistency with the json-rpc API
"""
return self.getTransactionByBlock(block_identifier, transaction_index)

def getTransactionByBlock(self, block_identifier, transaction_index):
"""
`eth_getTransactionByBlockHashAndIndex`
Expand Down Expand Up @@ -418,9 +403,6 @@ def contract(self,
def setContractFactory(self, contractFactory):
self.defaultContractFactory = contractFactory

def getCompilers(self):
return self.web3.manager.request_blocking("eth_getCompilers", [])

def getWork(self):
return self.web3.manager.request_blocking("eth_getWork", [])

Expand Down
4 changes: 0 additions & 4 deletions web3/net.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ def listening(self):
def peerCount(self):
return self.web3.manager.request_blocking("net_peerCount", [])

@property
def chainId(self):
return None

@property
def version(self):
return self.web3.manager.request_blocking("net_version", [])

0 comments on commit b2fb008

Please sign in to comment.