File tree Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ import (
32
32
"github.com/ethereum/go-ethereum/common"
33
33
"github.com/ethereum/go-ethereum/common/registrar"
34
34
"github.com/ethereum/go-ethereum/eth"
35
+ "github.com/ethereum/go-ethereum/internal/web3ext"
35
36
re "github.com/ethereum/go-ethereum/jsre"
36
37
"github.com/ethereum/go-ethereum/node"
37
38
"github.com/ethereum/go-ethereum/rpc"
@@ -202,7 +203,7 @@ func (js *jsre) apiBindings() error {
202
203
continue // manually mapped or ignore
203
204
}
204
205
205
- if jsFile , ok := rpc . WEB3Extensions [apiName ]; ok {
206
+ if jsFile , ok := web3ext . Modules [apiName ]; ok {
206
207
if err = js .re .Compile (fmt .Sprintf ("%s.js" , apiName ), jsFile ); err == nil {
207
208
shortcuts += fmt .Sprintf ("var %s = web3.%s; " , apiName , apiName )
208
209
} else {
Original file line number Diff line number Diff line change 14
14
// You should have received a copy of the GNU Lesser General Public License
15
15
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
16
16
17
- package rpc
17
+ // package web3ext contains geth specific web3.js extensions.
18
+ package web3ext
18
19
19
- var (
20
- // Holds geth specific RPC extends which can be used to extend web3
21
- WEB3Extensions = map [string ]string {
22
- "txpool" : TxPool_JS ,
23
- "admin" : Admin_JS ,
24
- "eth" : Eth_JS ,
25
- "miner" : Miner_JS ,
26
- "debug" : Debug_JS ,
27
- "net" : Net_JS ,
28
- }
29
- )
20
+ var Modules = map [string ]string {
21
+ "txpool" : TxPool_JS ,
22
+ "admin" : Admin_JS ,
23
+ "eth" : Eth_JS ,
24
+ "miner" : Miner_JS ,
25
+ "debug" : Debug_JS ,
26
+ "net" : Net_JS ,
27
+ }
30
28
31
29
const TxPool_JS = `
32
30
web3._extend({
You can’t perform that action at this time.
0 commit comments