diff --git a/docs/web3-eth.rst b/docs/web3-eth.rst index 6acff512672..774b923b6bd 100644 --- a/docs/web3-eth.rst +++ b/docs/web3-eth.rst @@ -1372,198 +1372,6 @@ Example },{...}] ------------------------------------------------------------------------------- - - -getCompilers -===================== - -.. code-block:: javascript - - web3.eth.getCompilers([callback]) - -Gets a list of available compilers. - ----------- -Parameters ----------- - -1. ``Function`` - (optional) Optional callback, returns an error object as first parameter and the result as second. - -------- -Returns -------- - -``Promise`` returns ``Array`` - An array of strings of available compilers. - -------- -Example -------- - - -.. code-block:: javascript - - web3.eth.getCompilers() - .then(console.log); - > ["lll", "solidity", "serpent"] - - ------------------------------------------------------------------------------- - -compile.solidity -===================== - -.. code-block:: javascript - - web3.eth.compile.solidity(sourceCode [, callback]) - -Compiles solidity source code. - ----------- -Parameters ----------- - -1. ``String`` - The solidity source code. -2. ``Function`` - (optional) Optional callback, returns an error object as first parameter and the result as second. - -------- -Returns -------- - -``Promise`` returns ``Object`` - Contract and compiler info. - -------- -Example -------- - - -.. code-block:: javascript - - var source = "" + - "contract test {\n" + - " function multiply(uint a) returns(uint d) {\n" + - " return a * 7;\n" + - " }\n" + - "}\n"; - - web3.eth.compile.solidity(source) - .then(console.log); - - > { - "test": { - "code": "0x605280600c6000396000f3006000357c010000000000000000000000000000000000000000000000000000000090048063c6888fa114602e57005b60376004356041565b8060005260206000f35b6000600782029050604d565b91905056", - "info": { - "source": "contract test {\n\tfunction multiply(uint a) returns(uint d) {\n\t\treturn a * 7;\n\t}\n}\n", - "language": "Solidity", - "languageVersion": "0", - "compilerVersion": "0.8.2", - "abiDefinition": [ - { - "constant": false, - "inputs": [ - { - "name": "a", - "type": "uint256" - } - ], - "name": "multiply", - "outputs": [ - { - "name": "d", - "type": "uint256" - } - ], - "type": "function" - } - ], - "userDoc": { - "methods": {} - }, - "developerDoc": { - "methods": {} - } - } - } - } - - ------------------------------------------------------------------------------- - - -compile.lll -===================== - -.. code-block:: javascript - - web3. eth.compile.lll(sourceCode [, callback]) - -Compiles LLL source code. - ----------- -Parameters ----------- - -1. ``String`` - The LLL source code. -2. ``Function`` - (optional) Optional callback, returns an error object as first parameter and the result as second. - -------- -Returns -------- - - -``Promise`` returns ``String`` - The compiled LLL code as HEX string. - - -------- -Example -------- - - -.. code-block:: javascript - - var source = "..."; - - web3.eth.compile.lll(source) - .then(console.log); - > "0x603880600c6000396000f3006001600060e060020a600035048063c6888fa114601857005b6021600435602b565b8060005260206000f35b600081600702905091905056" - - ------------------------------------------------------------------------------- - -compile.serpent -===================== - -.. code-block:: javascript - - web3.eth.compile.serpent(sourceCode [, callback]) - -Compiles serpent source code. - ----------- -Parameters ----------- - -1. ``String`` - The serpent source code. -2. ``Function`` - (optional) Optional callback, returns an error object as first parameter and the result as second. - -------- -Returns -------- - - -``Promise`` returns ``String`` - The compiled serpent code as HEX string. - - -.. code-block:: javascript - - var source = "..."; - - var code = web3.eth.compile.serpent(source) - .then(console.log); - > "0x603880600c6000396000f3006001600060e060020a600035048063c6888fa114601857005b6021600435602b565b8060005260206000f35b600081600702905091905056" - - - ------------------------------------------------------------------------------ getWork diff --git a/packages/web3-eth/src/index.js b/packages/web3-eth/src/index.js index 75435b7aada..f3c2b733fe8 100644 --- a/packages/web3-eth/src/index.js +++ b/packages/web3-eth/src/index.js @@ -351,26 +351,6 @@ var Eth = function Eth() { inputFormatter: [formatter.inputCallFormatter], outputFormatter: utils.hexToNumber }), - new Method({ - name: 'getCompilers', - call: 'eth_getCompilers', - params: 0 - }), - new Method({ - name: 'compile.solidity', - call: 'eth_compileSolidity', - params: 1 - }), - new Method({ - name: 'compile.lll', - call: 'eth_compileLLL', - params: 1 - }), - new Method({ - name: 'compile.serpent', - call: 'eth_compileSerpent', - params: 1 - }), new Method({ name: 'submitWork', call: 'eth_submitWork', diff --git a/packages/web3-providers-http/src/index.js b/packages/web3-providers-http/src/index.js index bb68f232a53..3eec4e27a14 100644 --- a/packages/web3-providers-http/src/index.js +++ b/packages/web3-providers-http/src/index.js @@ -105,5 +105,9 @@ HttpProvider.prototype.send = function (payload, callback) { } }; +HttpProvider.prototype.disconnect = function () { + //NO OP +} + module.exports = HttpProvider; diff --git a/packages/web3-providers-ws/package-lock.json b/packages/web3-providers-ws/package-lock.json index 5c783aa4c91..806722b8c47 100644 --- a/packages/web3-providers-ws/package-lock.json +++ b/packages/web3-providers-ws/package-lock.json @@ -5,7 +5,7 @@ "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { "ms": "2.0.0" } @@ -39,7 +39,7 @@ "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" }, "websocket": { - "version": "git://github.com/frozeman/WebSocket-Node.git#7004c39c42ac98875ab61126e5b4a925430f592c", + "version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2", "from": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible", "requires": { "debug": "^2.2.0", diff --git a/packages/web3-providers-ws/src/index.js b/packages/web3-providers-ws/src/index.js index 6569d8e1511..c09ce64c37c 100644 --- a/packages/web3-providers-ws/src/index.js +++ b/packages/web3-providers-ws/src/index.js @@ -392,4 +392,10 @@ WebsocketProvider.prototype.reset = function () { this.addDefaultEvents(); }; +WebsocketProvider.prototype.disconnect = function () { + if (this.connection) { + this.connection.close(); + } +} + module.exports = WebsocketProvider; diff --git a/test/eth.getCompilers.js b/test/eth.getCompilers.js deleted file mode 100644 index 6e9c0813b10..00000000000 --- a/test/eth.getCompilers.js +++ /dev/null @@ -1,21 +0,0 @@ -var testMethod = require('./helpers/test.method.js'); - -var method = 'getCompilers'; - - -var tests = [{ - args: [], - formattedArgs: [], - result: ['solidity'], - formattedResult: ['solidity'], - call: 'eth_'+ method -},{ - args: [], - formattedArgs: [], - result: ['solidity'], - formattedResult: ['solidity'], - call: 'eth_'+ method -}]; - -testMethod.runTests('eth', method, tests); - diff --git a/test/eth_methods.js b/test/eth_methods.js index 87a5abd5609..6b53705d86c 100644 --- a/test/eth_methods.js +++ b/test/eth_methods.js @@ -17,10 +17,6 @@ describe('eth', function() { u.methodExists(eth, 'getBlock'); u.methodExists(eth, 'getTransaction'); u.methodExists(eth, 'getUncle'); - u.methodExists(eth, 'getCompilers'); - u.methodExists(eth.compile, 'lll'); - u.methodExists(eth.compile, 'solidity'); - u.methodExists(eth.compile, 'serpent'); u.methodExists(eth, 'getBlockTransactionCount'); u.methodExists(eth, 'getBlockUncleCount'); u.methodExists(eth, 'subscribe');