From 0d415ce36058fc577e72449326f553d7a4300775 Mon Sep 17 00:00:00 2001 From: sc0Vu Date: Wed, 12 Dec 2018 16:46:58 +0800 Subject: [PATCH] Remove eth_getCompilers Remove deprecated api: eth_getCompilers See: https://github.com/ethereum/EIPs/issues/209 --- src/Eth.php | 2 +- src/Methods/Eth/GetCompilers.php | 58 -------------------------------- test/unit/EthApiTest.php | 18 ---------- 3 files changed, 1 insertion(+), 77 deletions(-) delete mode 100644 src/Methods/Eth/GetCompilers.php diff --git a/src/Eth.php b/src/Eth.php index 42817b21..78d97989 100644 --- a/src/Eth.php +++ b/src/Eth.php @@ -38,7 +38,7 @@ class Eth * @var array */ private $allowedMethods = [ - 'eth_protocolVersion', 'eth_syncing', 'eth_coinbase', 'eth_mining', 'eth_hashrate', 'eth_gasPrice', 'eth_accounts', 'eth_blockNumber', 'eth_getBalance', 'eth_getStorageAt', 'eth_getTransactionCount', 'eth_getBlockTransactionCountByHash', 'eth_getBlockTransactionCountByNumber', 'eth_getUncleCountByBlockHash', 'eth_getUncleCountByBlockNumber', 'eth_getUncleByBlockHashAndIndex', 'eth_getUncleByBlockNumberAndIndex', 'eth_getCode', 'eth_sign', 'eth_sendTransaction', 'eth_sendRawTransaction', 'eth_call', 'eth_estimateGas', 'eth_getBlockByHash', 'eth_getBlockByNumber', 'eth_getTransactionByHash', 'eth_getTransactionByBlockHashAndIndex', 'eth_getTransactionByBlockNumberAndIndex', 'eth_getTransactionReceipt', 'eth_getCompilers', 'eth_compileSolidity', 'eth_compileLLL', 'eth_compileSerpent', 'eth_getWork', 'eth_newFilter', 'eth_newBlockFilter', 'eth_newPendingTransactionFilter', 'eth_uninstallFilter', 'eth_getFilterChanges', 'eth_getFilterLogs', 'eth_getLogs', 'eth_submitWork', 'eth_submitHashrate' + 'eth_protocolVersion', 'eth_syncing', 'eth_coinbase', 'eth_mining', 'eth_hashrate', 'eth_gasPrice', 'eth_accounts', 'eth_blockNumber', 'eth_getBalance', 'eth_getStorageAt', 'eth_getTransactionCount', 'eth_getBlockTransactionCountByHash', 'eth_getBlockTransactionCountByNumber', 'eth_getUncleCountByBlockHash', 'eth_getUncleCountByBlockNumber', 'eth_getUncleByBlockHashAndIndex', 'eth_getUncleByBlockNumberAndIndex', 'eth_getCode', 'eth_sign', 'eth_sendTransaction', 'eth_sendRawTransaction', 'eth_call', 'eth_estimateGas', 'eth_getBlockByHash', 'eth_getBlockByNumber', 'eth_getTransactionByHash', 'eth_getTransactionByBlockHashAndIndex', 'eth_getTransactionByBlockNumberAndIndex', 'eth_getTransactionReceipt', 'eth_compileSolidity', 'eth_compileLLL', 'eth_compileSerpent', 'eth_getWork', 'eth_newFilter', 'eth_newBlockFilter', 'eth_newPendingTransactionFilter', 'eth_uninstallFilter', 'eth_getFilterChanges', 'eth_getFilterLogs', 'eth_getLogs', 'eth_submitWork', 'eth_submitHashrate' ]; /** diff --git a/src/Methods/Eth/GetCompilers.php b/src/Methods/Eth/GetCompilers.php deleted file mode 100644 index 0f6cfb46..00000000 --- a/src/Methods/Eth/GetCompilers.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * @author Peter Lai - * @license MIT - */ - -namespace Web3\Methods\Eth; - -use InvalidArgumentException; -use Web3\Methods\EthMethod; - -class GetCompilers extends EthMethod -{ - /** - * validators - * - * @var array - */ - protected $validators = []; - - /** - * inputFormatters - * - * @var array - */ - protected $inputFormatters = []; - - /** - * outputFormatters - * - * @var array - */ - protected $outputFormatters = []; - - /** - * defaultValues - * - * @var array - */ - protected $defaultValues = []; - - /** - * construct - * - * @param string $method - * @param array $arguments - * @return void - */ - // public function __construct($method='', $arguments=[]) - // { - // parent::__construct($method, $arguments); - // } -} \ No newline at end of file diff --git a/test/unit/EthApiTest.php b/test/unit/EthApiTest.php index 5a267fb3..2ce65f98 100644 --- a/test/unit/EthApiTest.php +++ b/test/unit/EthApiTest.php @@ -546,24 +546,6 @@ public function testGetUncleByBlockNumberAndIndex() }); } - /** - * testGetCompilers - * - * @return void - */ - public function testGetCompilers() - { - $eth = $this->eth; - - $eth->getCompilers(function ($err, $compilers) { - if ($err !== null) { - return $this->assertTrue($err !== null); - } - $this->assertTrue(is_array($compilers)); - $this->assertEquals($compilers[0], 'solidity'); - }); - } - /** * testCompileSolidity *