Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 1291e52

Browse files
committed
Update imports for web3_eth.ts
1 parent 833744d commit 1291e52

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

packages/web3-eth/src/web3_eth.ts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,15 @@ import {
3131
Transaction,
3232
TransactionCall,
3333
TransactionWithLocalWalletIndex,
34+
Web3EthExecutionAPI,
3435
} from 'web3-types';
3536
import { isSupportedProvider, Web3Context, Web3ContextInitOptions } from 'web3-core';
3637
import { TransactionNotFound } from 'web3-errors';
3738
import { DataFormat, DEFAULT_RETURN_FORMAT } from 'web3-utils';
38-
import * as rpcMethods from './rpc_methods';
39+
import { ethRpcMethods } from 'web3-rpc-methods';
40+
3941
import * as rpcMethodsWrappers from './rpc_method_wrappers';
4042
import { SendTransactionOptions } from './types';
41-
import { Web3EthExecutionAPI } from './web3_eth_execution_api';
4243
import {
4344
LogsSubscription,
4445
NewPendingTransactionsSubscription,
@@ -100,7 +101,7 @@ export class Web3Eth extends Web3Context<Web3EthExecutionAPI, RegisteredSubscrip
100101
* ```
101102
*/
102103
public async getProtocolVersion() {
103-
return rpcMethods.getProtocolVersion(this.requestManager);
104+
return ethRpcMethods.getProtocolVersion(this.requestManager);
104105
}
105106

106107
// TODO Add returnFormat parameter
@@ -121,7 +122,7 @@ export class Web3Eth extends Web3Context<Web3EthExecutionAPI, RegisteredSubscrip
121122
* ```
122123
*/
123124
public async isSyncing() {
124-
return rpcMethods.getSyncing(this.requestManager);
125+
return ethRpcMethods.getSyncing(this.requestManager);
125126
}
126127

127128
// TODO consider adding returnFormat parameter (to format address as bytes)
@@ -134,7 +135,7 @@ export class Web3Eth extends Web3Context<Web3EthExecutionAPI, RegisteredSubscrip
134135
* ```
135136
*/
136137
public async getCoinbase() {
137-
return rpcMethods.getCoinbase(this.requestManager);
138+
return ethRpcMethods.getCoinbase(this.requestManager);
138139
}
139140

140141
/**
@@ -148,7 +149,7 @@ export class Web3Eth extends Web3Context<Web3EthExecutionAPI, RegisteredSubscrip
148149
* ```
149150
*/
150151
public async isMining() {
151-
return rpcMethods.getMining(this.requestManager);
152+
return ethRpcMethods.getMining(this.requestManager);
152153
}
153154

154155
/**
@@ -1232,7 +1233,7 @@ export class Web3Eth extends Web3Context<Web3EthExecutionAPI, RegisteredSubscrip
12321233
* ```
12331234
*/
12341235
public async getWork() {
1235-
return rpcMethods.getWork(this.requestManager);
1236+
return ethRpcMethods.getWork(this.requestManager);
12361237
}
12371238

12381239
/**
@@ -1257,7 +1258,7 @@ export class Web3Eth extends Web3Context<Web3EthExecutionAPI, RegisteredSubscrip
12571258
hash: HexString32Bytes,
12581259
digest: HexString32Bytes,
12591260
) {
1260-
return rpcMethods.submitWork(this.requestManager, nonce, hash, digest);
1261+
return ethRpcMethods.submitWork(this.requestManager, nonce, hash, digest);
12611262
}
12621263

12631264
// TODO - Format addresses
@@ -1275,7 +1276,7 @@ export class Web3Eth extends Web3Context<Web3EthExecutionAPI, RegisteredSubscrip
12751276
* ```
12761277
*/
12771278
public async requestAccounts() {
1278-
return rpcMethods.requestAccounts(this.requestManager);
1279+
return ethRpcMethods.requestAccounts(this.requestManager);
12791280
}
12801281

12811282
/**
@@ -1305,7 +1306,7 @@ export class Web3Eth extends Web3Context<Web3EthExecutionAPI, RegisteredSubscrip
13051306
* ```
13061307
*/
13071308
public async getNodeInfo() {
1308-
return rpcMethods.getNodeInfo(this.requestManager);
1309+
return ethRpcMethods.getNodeInfo(this.requestManager);
13091310
}
13101311

13111312
/**

0 commit comments

Comments
 (0)