From 6416813cbee3c548a3fe110bb779cd9f9fa47b04 Mon Sep 17 00:00:00 2001 From: Sina M <1591639+s1na@users.noreply.github.com> Date: Tue, 1 Oct 2024 18:27:25 +0200 Subject: [PATCH] internal/web3ext: rm unused modules (#30532) Remove console extensions for already deleted API namespaces (les, vflux and ethash). --- internal/web3ext/web3ext.go | 116 ------------------------------------ 1 file changed, 116 deletions(-) diff --git a/internal/web3ext/web3ext.go b/internal/web3ext/web3ext.go index 4a53e2c829..927ebc2ef0 100644 --- a/internal/web3ext/web3ext.go +++ b/internal/web3ext/web3ext.go @@ -20,7 +20,6 @@ package web3ext var Modules = map[string]string{ "admin": AdminJs, "clique": CliqueJs, - "ethash": EthashJs, "debug": DebugJs, "eth": EthJs, "miner": MinerJs, @@ -28,8 +27,6 @@ var Modules = map[string]string{ "personal": PersonalJs, "rpc": RpcJs, "txpool": TxpoolJs, - "les": LESJs, - "vflux": VfluxJs, "dev": DevJs, } @@ -90,34 +87,6 @@ web3._extend({ }); ` -const EthashJs = ` -web3._extend({ - property: 'ethash', - methods: [ - new web3._extend.Method({ - name: 'getWork', - call: 'ethash_getWork', - params: 0 - }), - new web3._extend.Method({ - name: 'getHashrate', - call: 'ethash_getHashrate', - params: 0 - }), - new web3._extend.Method({ - name: 'submitWork', - call: 'ethash_submitWork', - params: 3, - }), - new web3._extend.Method({ - name: 'submitHashrate', - call: 'ethash_submitHashrate', - params: 2, - }), - ] -}); -` - const AdminJs = ` web3._extend({ property: 'admin', @@ -790,91 +759,6 @@ web3._extend({ }); ` -const LESJs = ` -web3._extend({ - property: 'les', - methods: - [ - new web3._extend.Method({ - name: 'getCheckpoint', - call: 'les_getCheckpoint', - params: 1 - }), - new web3._extend.Method({ - name: 'clientInfo', - call: 'les_clientInfo', - params: 1 - }), - new web3._extend.Method({ - name: 'priorityClientInfo', - call: 'les_priorityClientInfo', - params: 3 - }), - new web3._extend.Method({ - name: 'setClientParams', - call: 'les_setClientParams', - params: 2 - }), - new web3._extend.Method({ - name: 'setDefaultParams', - call: 'les_setDefaultParams', - params: 1 - }), - new web3._extend.Method({ - name: 'addBalance', - call: 'les_addBalance', - params: 2 - }), - ], - properties: - [ - new web3._extend.Property({ - name: 'latestCheckpoint', - getter: 'les_latestCheckpoint' - }), - new web3._extend.Property({ - name: 'checkpointContractAddress', - getter: 'les_getCheckpointContractAddress' - }), - new web3._extend.Property({ - name: 'serverInfo', - getter: 'les_serverInfo' - }), - ] -}); -` - -const VfluxJs = ` -web3._extend({ - property: 'vflux', - methods: - [ - new web3._extend.Method({ - name: 'distribution', - call: 'vflux_distribution', - params: 2 - }), - new web3._extend.Method({ - name: 'timeout', - call: 'vflux_timeout', - params: 2 - }), - new web3._extend.Method({ - name: 'value', - call: 'vflux_value', - params: 2 - }), - ], - properties: - [ - new web3._extend.Property({ - name: 'requestStats', - getter: 'vflux_requestStats' - }), - ] -}); -` - const DevJs = ` web3._extend({ property: 'dev',