From b2fb008f0ebbc7029d8f22b50d82f0cb8a33df2a Mon Sep 17 00:00:00 2001 From: Nick Gheorghita Date: Mon, 11 Mar 2019 14:52:17 +0100 Subject: [PATCH] Clean up rpc endpoints according to updated spec --- web3/_utils/module_testing/eth_module.py | 26 ------------------------ web3/eth.py | 18 ---------------- web3/net.py | 4 ---- 3 files changed, 48 deletions(-) diff --git a/web3/_utils/module_testing/eth_module.py b/web3/_utils/module_testing/eth_module.py index 2d0edc0663..cff96e0af2 100644 --- a/web3/_utils/module_testing/eth_module.py +++ b/web3/_utils/module_testing/eth_module.py @@ -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) @@ -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({}) diff --git a/web3/eth.py b/web3/eth.py index c6d41d33e7..cb4180c5ec 100644 --- a/web3/eth.py +++ b/web3/eth.py @@ -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, ) @@ -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() @@ -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` @@ -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", []) diff --git a/web3/net.py b/web3/net.py index dddca64179..830799f6c7 100644 --- a/web3/net.py +++ b/web3/net.py @@ -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", [])