-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathweb3Config.js
311 lines (309 loc) · 12.1 KB
/
web3Config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
import * as calls from './libs';
const Web3RpcCalls = {
web3_clientVersion: {
description: 'Returns the current client version.',
web3: calls.web3.default.web3_clientVersion,
ethers: calls.ethers.default.web3_clientVersion,
},
web3_sha3: {
description:
'Returns Keccak-256 (not the standardized SHA3-256) of the given data.',
web3: calls.web3.default.web3_sha3,
ethers: calls.ethers.default.web3_sha3,
},
net_version: {
description: 'Returns the current network id.',
web3: calls.web3.default.net_version,
ethers: calls.ethers.default.net_version,
},
net_listening: {
description:
'Returns `true` if client is actively listening for network connections.',
web3: calls.web3.default.net_listening,
ethers: calls.ethers.default.net_listening,
},
net_peerCount: {
description: 'Returns number of peers currently connected to the client.',
web3: calls.web3.default.net_peerCount,
ethers: calls.ethers.default.net_peerCount,
},
eth_protocolVersion: {
description: 'Returns the current ethereum protocol version.',
web3: calls.web3.default.eth_protocolVersion,
ethers: calls.ethers.default.eth_protocolVersion,
},
eth_syncing: {
description: 'Returns an object with data about the sync status or false.',
web3: calls.web3.default.eth_syncing,
ethers: calls.ethers.default.eth_syncing,
},
eth_coinbase: {
description: 'Returns the client coinbase address.',
web3: calls.web3.default.eth_coinbase,
ethers: calls.ethers.default.eth_coinbase,
},
eth_mining: {
description: 'Returns `true` if client is actively mining new blocks.',
web3: calls.web3.default.eth_mining,
ethers: calls.ethers.default.eth_mining,
},
eth_hashrate: {
description:
'Returns the number of hashes per second that the node is mining with.',
web3: calls.web3.default.eth_hashrate,
ethers: calls.ethers.default.eth_hashrate,
},
eth_gasPrice: {
description: 'Returns the current price per gas in wei.',
web3: calls.web3.default.eth_gasPrice,
ethers: calls.ethers.default.eth_gasPrice,
},
eth_accounts: {
description: 'Returns a list of addresses owned by client.',
web3: calls.web3.default.eth_accounts,
ethers: calls.ethers.default.eth_accounts,
},
eth_blockNumber: {
description: 'Returns the number of most recent block.',
web3: calls.web3.default.eth_blockNumber,
ethers: calls.ethers.default.eth_blockNumber,
},
eth_getBalance: {
description: 'Returns the balance of the account of given address.',
web3: calls.web3.default.eth_getBalance,
ethers: calls.ethers.default.eth_getBalance,
},
eth_getStorageAt: {
description:
'Returns the value from a storage position at a given address.',
web3: calls.web3.default.eth_getStorageAt,
ethers: calls.ethers.default.eth_getStorageAt,
},
eth_getTransactionCount: {
description: 'Returns the number of transactions sent from an address.',
web3: calls.web3.default.eth_getTransactionCount,
ethers: calls.ethers.default.eth_getTransactionCount,
},
eth_getBlockTransactionCountByHash: {
description:
'Returns the number of transactions in a block from a block matching the given block hash.',
web3: calls.web3.default.eth_getBlockTransactionCountByHash,
ethers: calls.ethers.default.eth_getBlockTransactionCountByHash,
},
eth_getBlockTransactionCountByNumber: {
description:
'Returns the number of transactions in a block matching the given block number.',
web3: calls.web3.default.eth_getBlockTransactionCountByNumber,
ethers: calls.ethers.default.eth_getBlockTransactionCountByNumber,
},
eth_getUncleCountByBlockHash: {
description:
'Returns the number of uncles in a block from a block matching the given block hash.',
web3: calls.web3.default.eth_getUncleCountByBlockHash,
ethers: calls.ethers.default.eth_getUncleCountByBlockHash,
},
eth_getUncleCountByBlockNumber: {
description:
'Returns the number of uncles in a block from a block matching the given block number.',
web3: calls.web3.default.eth_getUncleCountByBlockNumber,
ethers: calls.ethers.default.eth_getUncleCountByBlockNumber,
},
eth_getCode: {
description: 'Returns code at a given address.',
web3: calls.web3.default.eth_getCode,
ethers: calls.ethers.default.eth_getCode,
},
eth_sign: {
disabled: true,
description: '🚫 This method is not supported in EtherFlow!',
web3: calls.web3.default.eth_sign,
ethers: calls.ethers.default.eth_sign,
},
eth_signTransaction: {
disabled: true,
description: '🚫 This method is not supported in EtherFlow!',
web3: calls.web3.default.eth_signTransaction,
ethers: calls.ethers.default.eth_signTransaction,
},
eth_sendTransaction: {
disabled: true,
description: '🚫 This method is not supported in EtherFlow!',
web3: calls.web3.default.eth_sendTransaction,
ethers: calls.ethers.default.eth_sendTransaction,
},
eth_sendRawTransaction: {
description:
'Creates new message call transaction or a contract creation for signed transactions.',
web3: calls.web3.default.eth_sendRawTransaction,
ethers: calls.ethers.default.eth_sendRawTransaction,
},
eth_call: {
description: 'Call any read-only function on a deployed contract',
web3: calls.web3.default.eth_call,
ethers: calls.ethers.default.eth_call,
},
eth_estimateGas: {
disabled: true,
description: '🚫 This method is not YET supported in EtherFlow!',
web3: calls.web3.default.eth_estimateGas,
ethers: calls.ethers.default.eth_estimateGas,
},
eth_getBlockByHash: {
description: 'Returns information about a block by hash.',
web3: calls.web3.default.eth_getBlockByHash,
ethers: calls.ethers.default.eth_getBlockByHash,
},
eth_getBlockByNumber: {
description: 'Returns information about a block by block number.',
web3: calls.web3.default.eth_getBlockByNumber,
ethers: calls.ethers.default.eth_getBlockByNumber,
},
eth_getTransactionByHash: {
description:
'Returns the information about a transaction requested by transaction hash.',
web3: calls.web3.default.eth_getTransactionByHash,
ethers: calls.ethers.default.eth_getTransactionByHash,
},
eth_getTransactionByBlockHashAndIndex: {
description:
'Returns information about a transaction by block hash and transaction index position.',
web3: calls.web3.default.eth_getTransactionByBlockHashAndIndex,
ethers: calls.ethers.default.eth_getTransactionByBlockHashAndIndex,
},
eth_getTransactionByBlockNumberAndIndex: {
description:
'Returns information about a transaction by block number and transaction index position.',
web3: calls.web3.default.eth_getTransactionByBlockNumberAndIndex,
ethers: calls.ethers.default.eth_getTransactionByBlockNumberAndIndex,
},
eth_getTransactionReceipt: {
description: 'Returns the receipt of a transaction by transaction hash.',
web3: calls.web3.default.eth_getTransactionReceipt,
ethers: calls.ethers.default.eth_getTransactionReceipt,
},
eth_getUncleByBlockHashAndIndex: {
description:
'Returns information about a uncle of a block by hash and uncle index position.',
web3: calls.web3.default.eth_getUncleByBlockHashAndIndex,
ethers: calls.ethers.default.eth_getUncleByBlockHashAndIndex,
},
eth_getUncleByBlockNumberAndIndex: {
description:
'Returns information about a uncle of a block by number and uncle index position.',
web3: calls.web3.default.eth_getUncleByBlockNumberAndIndex,
ethers: calls.ethers.default.eth_getUncleByBlockNumberAndIndex,
},
eth_getCompilers: {
description: 'Returns a list of available compilers in the client.',
web3: calls.web3.default.eth_getCompilers,
ethers: calls.ethers.default.eth_getCompilers,
},
eth_compileSolidity: {
description: 'Returns compiled solidity code + ABI.',
web3: calls.web3.default.eth_compileSolidity,
ethers: calls.ethers.default.eth_compileSolidity,
},
eth_compileSerpent: {
description: 'Returns compiled serpent code.',
web3: calls.web3.default.eth_compileSerpent,
ethers: calls.ethers.default.eth_compileSerpent,
},
eth_newFilter: {
description:
'Creates a filter object, based on filter options, to notify when the state changes (logs). The resulting value from the filter is immediately returned using `eth_getFilterChanges`.',
web3: calls.web3.default.eth_newFilter,
ethers: calls.ethers.default.eth_newFilter,
},
eth_newBlockFilter: {
description:
'Creates a filter in the node, to notify when a new block arrives. The resulting value from the filter is immediately returned using `eth_getFilterChanges`.',
web3: calls.web3.default.eth_newBlockFilter,
ethers: calls.ethers.default.eth_newBlockFilter,
},
eth_newPendingTransactionFilter: {
description:
'Creates a filter in the node, to notify when new pending transactions arrive. The resulting value from the filter is immediately returned using `eth_getFilterChanges`.',
web3: calls.web3.default.eth_newPendingTransactionFilter,
ethers: calls.ethers.default.eth_newPendingTransactionFilter,
},
eth_uninstallFilter: {
disabled: true,
description: '🚫 This method is not YET supported in EtherFlow!',
web3: calls.web3.default.eth_uninstallFilter,
ethers: calls.ethers.default.eth_uninstallFilter,
},
eth_getFilterChanges: {
disabled: true,
description:
'This method is covered by eth_newFilter, eth_newBlockFilter and eth_newPendingTransactionFilter.',
web3: calls.web3.default.eth_getFilterChanges,
ethers: calls.ethers.default.eth_getFilterChanges,
},
eth_getFilterLogs: {
disabled: true,
description:
'This method is covered by eth_newFilter, eth_newBlockFilter and eth_newPendingTransactionFilter.',
web3: calls.web3.default.eth_getFilterLogs,
ethers: calls.ethers.default.eth_getFilterLogs,
},
eth_getLogs: {
disabled: true,
description:
'This method is covered by eth_newFilter, eth_newBlockFilter and eth_newPendingTransactionFilter.',
web3: calls.web3.default.eth_getLogs,
ethers: calls.ethers.default.eth_getLogs,
},
eth_getWork: {
description:
'Returns the hash of the current block, the seedHash, and the boundary condition to be met (“target”).',
web3: calls.web3.default.eth_getWork,
ethers: calls.ethers.default.eth_getWork,
},
trace_block: {
description:
'Returns traces created at given block (OpenEthereum or Parity only).',
web3: calls.web3.default.trace_block,
ethers: calls.ethers.default.trace_block,
},
trace_transaction: {
description:
'Returns all traces of given transaction (OpenEthereum or Parity only).',
web3: calls.web3.default.trace_transaction,
ethers: calls.ethers.default.trace_transaction,
},
trace_get: {
description:
'Returns trace at given position (OpenEthereum or Parity only).',
web3: calls.web3.default.trace_get,
ethers: calls.ethers.default.trace_get,
},
trace_rawTransaction: {
description:
'Traces a call to `eth_sendRawTransaction` without making the call, returning the traces.',
web3: calls.web3.default.trace_rawTransaction,
ethers: calls.ethers.default.trace_rawTransaction,
},
trace_replayBlockTransactions: {
description:
'Replays all transactions in a block returning the requested traces for each transaction.',
web3: calls.web3.default.trace_replayBlockTransactions,
ethers: calls.ethers.default.trace_replayBlockTransactions,
},
trace_replayTransaction: {
description: 'Replays a transaction, returning the traces.',
web3: calls.web3.default.trace_replayTransaction,
ethers: calls.ethers.default.trace_replayTransaction,
},
trace_filter: {
description: 'Returns traces matching given filter.',
web3: calls.web3.default.trace_filter,
ethers: calls.ethers.default.trace_filter,
},
trace_call: {
description:
'Executes the given call and returns a number of possible traces for it.',
web3: calls.web3.default.trace_call,
ethers: calls.ethers.default.trace_call,
},
};
export default Web3RpcCalls;