viem 0.0.1-alpha.13 → 0.0.1-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chains.js +5 -5
- package/dist/chains.mjs +1 -1
- package/dist/{chunk-4XV4JRFM.mjs → chunk-2HENAFQN.mjs} +16 -6
- package/dist/{chunk-O3XABJRL.js → chunk-EMQSYKNY.js} +11 -11
- package/dist/{chunk-OHOJCVQD.js → chunk-HTYEJEWI.js} +156 -529
- package/dist/chunk-IMYI7Z6M.js +255 -0
- package/dist/chunk-KGXH5DYI.js +152 -0
- package/dist/chunk-NYXBQHNJ.mjs +255 -0
- package/dist/chunk-PHAG5KUF.mjs +152 -0
- package/dist/{chunk-NJ5NFIT4.mjs → chunk-PPDHFNFM.mjs} +107 -480
- package/dist/{chunk-AGF7GU6G.js → chunk-QMLDI5JU.js} +16 -6
- package/dist/{chunk-KZVBHS2T.mjs → chunk-SX7GPOCZ.mjs} +1 -1
- package/dist/clients/index.d.ts +6 -3
- package/dist/clients/index.js +3 -3
- package/dist/clients/index.mjs +2 -2
- package/dist/createClient-cd948138.d.ts +62 -0
- package/dist/createPublicClient-989a0556.d.ts +19 -0
- package/dist/createTestClient-81507f58.d.ts +34 -0
- package/dist/createWalletClient-43f801b9.d.ts +30 -0
- package/dist/{eip1193-c001fcd5.d.ts → eip1193-4330b722.d.ts} +1 -1
- package/dist/index.d.ts +13 -6
- package/dist/index.js +10 -4
- package/dist/index.mjs +35 -29
- package/dist/{parseGwei-21f98a29.d.ts → parseGwei-f2d23de6.d.ts} +1 -1
- package/dist/public.d.ts +12 -0
- package/dist/public.js +58 -0
- package/dist/public.mjs +58 -0
- package/dist/sendTransaction-7a9d241a.d.ts +13 -0
- package/dist/stopImpersonatingAccount-8113150e.d.ts +156 -0
- package/dist/test.d.ts +7 -0
- package/dist/test.js +59 -0
- package/dist/test.mjs +59 -0
- package/dist/{transactionRequest-1d4e4385.d.ts → transactionReceipt-5d332aab.d.ts} +4 -32
- package/dist/transactionRequest-327eb7c2.d.ts +33 -0
- package/dist/utils/index.d.ts +4 -3
- package/dist/utils/index.js +2 -2
- package/dist/utils/index.mjs +1 -1
- package/dist/wallet.d.ts +9 -0
- package/dist/wallet.js +23 -0
- package/dist/wallet.mjs +23 -0
- package/dist/watchAsset-0088384c.d.ts +39 -0
- package/dist/{stopImpersonatingAccount-70c4a70c.d.ts → watchPendingTransactions-670a7ca3.d.ts} +19 -197
- package/dist/{webSocket-3385e295.d.ts → webSocket-9a3b0b26.d.ts} +1 -1
- package/dist/window.d.ts +1 -1
- package/package.json +16 -6
- package/actions/package.json +0 -4
- package/dist/actions/index.d.ts +0 -8
- package/dist/actions/index.js +0 -127
- package/dist/actions/index.mjs +0 -127
- package/dist/createWalletClient-3f9fa8b6.d.ts +0 -130
@@ -1,5 +1,6 @@
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
2
2
|
|
3
|
+
var _chunkKGXH5DYIjs = require('./chunk-KGXH5DYI.js');
|
3
4
|
|
4
5
|
|
5
6
|
|
@@ -23,9 +24,7 @@
|
|
23
24
|
|
24
25
|
|
25
26
|
|
26
|
-
|
27
|
-
|
28
|
-
var _chunkAGF7GU6Gjs = require('./chunk-AGF7GU6G.js');
|
27
|
+
var _chunkQMLDI5JUjs = require('./chunk-QMLDI5JU.js');
|
29
28
|
|
30
29
|
// src/actions/public/call.ts
|
31
30
|
async function call(client, {
|
@@ -45,10 +44,10 @@ async function call(client, {
|
|
45
44
|
...rest
|
46
45
|
}) {
|
47
46
|
if (maxFeePerGas !== void 0 && maxPriorityFeePerGas !== void 0 && maxFeePerGas < maxPriorityFeePerGas)
|
48
|
-
throw new (0,
|
49
|
-
const blockNumberHex = blockNumber ?
|
47
|
+
throw new (0, _chunkQMLDI5JUjs.InvalidGasArgumentsError)();
|
48
|
+
const blockNumberHex = blockNumber ? _chunkQMLDI5JUjs.numberToHex.call(void 0, blockNumber) : void 0;
|
50
49
|
const formatter = _optionalChain([chain, 'optionalAccess', _ => _.formatters, 'optionalAccess', _2 => _2.transactionRequest]);
|
51
|
-
const request_ =
|
50
|
+
const request_ = _chunkQMLDI5JUjs.format.call(void 0,
|
52
51
|
{
|
53
52
|
from,
|
54
53
|
accessList,
|
@@ -60,10 +59,10 @@ async function call(client, {
|
|
60
59
|
nonce,
|
61
60
|
to,
|
62
61
|
value,
|
63
|
-
...
|
62
|
+
..._chunkQMLDI5JUjs.extract.call(void 0, rest, { formatter })
|
64
63
|
},
|
65
64
|
{
|
66
|
-
formatter: formatter ||
|
65
|
+
formatter: formatter || _chunkQMLDI5JUjs.formatTransactionRequest
|
67
66
|
}
|
68
67
|
);
|
69
68
|
const response = await client.request({
|
@@ -83,7 +82,7 @@ async function callContract(client, {
|
|
83
82
|
functionName,
|
84
83
|
...callRequest
|
85
84
|
}) {
|
86
|
-
const calldata =
|
85
|
+
const calldata = _chunkQMLDI5JUjs.encodeFunctionData.call(void 0, {
|
87
86
|
abi,
|
88
87
|
args,
|
89
88
|
functionName
|
@@ -94,13 +93,13 @@ async function callContract(client, {
|
|
94
93
|
to: address,
|
95
94
|
...callRequest
|
96
95
|
});
|
97
|
-
return
|
96
|
+
return _chunkQMLDI5JUjs.decodeFunctionResult.call(void 0, {
|
98
97
|
abi,
|
99
98
|
functionName,
|
100
99
|
data: data || "0x"
|
101
100
|
});
|
102
101
|
} catch (err) {
|
103
|
-
throw
|
102
|
+
throw _chunkQMLDI5JUjs.getContractError.call(void 0, err, {
|
104
103
|
abi,
|
105
104
|
address,
|
106
105
|
args,
|
@@ -126,143 +125,14 @@ async function createBlockFilter(client) {
|
|
126
125
|
return { id, type: "block" };
|
127
126
|
}
|
128
127
|
|
129
|
-
// src/actions/wallet/addChain.ts
|
130
|
-
async function addChain(client, chain) {
|
131
|
-
const { id, name, nativeCurrency, rpcUrls, blockExplorers } = chain;
|
132
|
-
await client.request({
|
133
|
-
method: "wallet_addEthereumChain",
|
134
|
-
params: [
|
135
|
-
{
|
136
|
-
chainId: _chunkAGF7GU6Gjs.numberToHex.call(void 0, id),
|
137
|
-
chainName: name,
|
138
|
-
nativeCurrency,
|
139
|
-
rpcUrls: rpcUrls.default.http,
|
140
|
-
blockExplorerUrls: blockExplorers ? Object.values(blockExplorers).map(({ url }) => url) : void 0
|
141
|
-
}
|
142
|
-
]
|
143
|
-
});
|
144
|
-
}
|
145
|
-
|
146
|
-
// src/actions/wallet/getAccounts.ts
|
147
|
-
async function getAccounts(client) {
|
148
|
-
const addresses = await client.request({ method: "eth_accounts" });
|
149
|
-
return addresses.map((address) => _chunkAGF7GU6Gjs.checksumAddress.call(void 0, address));
|
150
|
-
}
|
151
|
-
|
152
|
-
// src/actions/wallet/getPermissions.ts
|
153
|
-
async function getPermissions(client) {
|
154
|
-
const permissions = await client.request({ method: "wallet_getPermissions" });
|
155
|
-
return permissions;
|
156
|
-
}
|
157
|
-
|
158
|
-
// src/actions/wallet/requestAccounts.ts
|
159
|
-
async function requestAccounts(client) {
|
160
|
-
const addresses = await client.request({ method: "eth_requestAccounts" });
|
161
|
-
return addresses.map((address) => _chunkAGF7GU6Gjs.getAddress.call(void 0, address));
|
162
|
-
}
|
163
|
-
|
164
|
-
// src/actions/wallet/requestPermissions.ts
|
165
|
-
async function requestPermissions(client, permissions) {
|
166
|
-
return client.request({
|
167
|
-
method: "wallet_requestPermissions",
|
168
|
-
params: [permissions]
|
169
|
-
});
|
170
|
-
}
|
171
|
-
|
172
|
-
// src/actions/wallet/sendTransaction.ts
|
173
|
-
async function sendTransaction(client, {
|
174
|
-
chain,
|
175
|
-
from,
|
176
|
-
accessList,
|
177
|
-
data,
|
178
|
-
gas,
|
179
|
-
gasPrice,
|
180
|
-
maxFeePerGas,
|
181
|
-
maxPriorityFeePerGas,
|
182
|
-
nonce,
|
183
|
-
to,
|
184
|
-
value,
|
185
|
-
...rest
|
186
|
-
}) {
|
187
|
-
if (maxFeePerGas !== void 0 && maxPriorityFeePerGas !== void 0 && maxFeePerGas < maxPriorityFeePerGas)
|
188
|
-
throw new (0, _chunkAGF7GU6Gjs.InvalidGasArgumentsError)();
|
189
|
-
const formatter = _optionalChain([chain, 'optionalAccess', _3 => _3.formatters, 'optionalAccess', _4 => _4.transactionRequest]);
|
190
|
-
const request_ = _chunkAGF7GU6Gjs.format.call(void 0,
|
191
|
-
{
|
192
|
-
from,
|
193
|
-
accessList,
|
194
|
-
data,
|
195
|
-
gas,
|
196
|
-
gasPrice,
|
197
|
-
maxFeePerGas,
|
198
|
-
maxPriorityFeePerGas,
|
199
|
-
nonce,
|
200
|
-
to,
|
201
|
-
value,
|
202
|
-
..._chunkAGF7GU6Gjs.extract.call(void 0, rest, { formatter })
|
203
|
-
},
|
204
|
-
{
|
205
|
-
formatter: formatter || _chunkAGF7GU6Gjs.formatTransactionRequest
|
206
|
-
}
|
207
|
-
);
|
208
|
-
const hash = await client.request({
|
209
|
-
method: "eth_sendTransaction",
|
210
|
-
params: [request_]
|
211
|
-
});
|
212
|
-
return hash;
|
213
|
-
}
|
214
|
-
|
215
|
-
// src/actions/wallet/signMessage.ts
|
216
|
-
async function signMessage(client, { from, data: data_ }) {
|
217
|
-
let data;
|
218
|
-
if (typeof data_ === "string") {
|
219
|
-
if (!data_.startsWith("0x"))
|
220
|
-
throw new (0, _chunkAGF7GU6Gjs.BaseError)(
|
221
|
-
`data ("${data_}") must be a hex value. Encode it first to a hex with the \`encodeHex\` util.`,
|
222
|
-
{
|
223
|
-
docsPath: "/TODO"
|
224
|
-
}
|
225
|
-
);
|
226
|
-
data = data_;
|
227
|
-
} else {
|
228
|
-
data = _chunkAGF7GU6Gjs.encodeHex.call(void 0, data_);
|
229
|
-
}
|
230
|
-
const signed = await client.request({
|
231
|
-
method: "personal_sign",
|
232
|
-
params: [data, from]
|
233
|
-
});
|
234
|
-
return signed;
|
235
|
-
}
|
236
|
-
|
237
|
-
// src/actions/wallet/switchChain.ts
|
238
|
-
async function switchChain(client, { id }) {
|
239
|
-
await client.request({
|
240
|
-
method: "wallet_switchEthereumChain",
|
241
|
-
params: [
|
242
|
-
{
|
243
|
-
chainId: _chunkAGF7GU6Gjs.numberToHex.call(void 0, id)
|
244
|
-
}
|
245
|
-
]
|
246
|
-
});
|
247
|
-
}
|
248
|
-
|
249
|
-
// src/actions/wallet/watchAsset.ts
|
250
|
-
async function watchAsset(client, params) {
|
251
|
-
const added = await client.request({
|
252
|
-
method: "wallet_watchAsset",
|
253
|
-
params: [params]
|
254
|
-
});
|
255
|
-
return added;
|
256
|
-
}
|
257
|
-
|
258
128
|
// src/actions/public/deployContract.ts
|
259
129
|
function deployContract(walletClient, { abi, args, bytecode, ...request }) {
|
260
|
-
const calldata =
|
130
|
+
const calldata = _chunkQMLDI5JUjs.encodeDeployData.call(void 0, {
|
261
131
|
abi,
|
262
132
|
args,
|
263
133
|
bytecode
|
264
134
|
});
|
265
|
-
return sendTransaction(walletClient, {
|
135
|
+
return _chunkKGXH5DYIjs.sendTransaction.call(void 0, walletClient, {
|
266
136
|
...request,
|
267
137
|
data: calldata
|
268
138
|
});
|
@@ -281,16 +151,16 @@ async function estimateGas(client, {
|
|
281
151
|
to,
|
282
152
|
value
|
283
153
|
}) {
|
284
|
-
const blockNumberHex = blockNumber ?
|
154
|
+
const blockNumberHex = blockNumber ? _chunkQMLDI5JUjs.numberToHex.call(void 0, blockNumber) : void 0;
|
285
155
|
const parameters = {
|
286
156
|
data,
|
287
157
|
from,
|
288
|
-
gas: gas ?
|
289
|
-
gasPrice: gasPrice ?
|
290
|
-
maxFeePerGas: maxFeePerGas ?
|
291
|
-
maxPriorityFeePerGas: maxPriorityFeePerGas ?
|
158
|
+
gas: gas ? _chunkQMLDI5JUjs.numberToHex.call(void 0, gas) : void 0,
|
159
|
+
gasPrice: gasPrice ? _chunkQMLDI5JUjs.numberToHex.call(void 0, gasPrice) : void 0,
|
160
|
+
maxFeePerGas: maxFeePerGas ? _chunkQMLDI5JUjs.numberToHex.call(void 0, maxFeePerGas) : void 0,
|
161
|
+
maxPriorityFeePerGas: maxPriorityFeePerGas ? _chunkQMLDI5JUjs.numberToHex.call(void 0, maxPriorityFeePerGas) : void 0,
|
292
162
|
to,
|
293
|
-
value: value ?
|
163
|
+
value: value ? _chunkQMLDI5JUjs.numberToHex.call(void 0, value) : void 0
|
294
164
|
};
|
295
165
|
const balance = await client.request({
|
296
166
|
method: "eth_estimateGas",
|
@@ -301,7 +171,7 @@ async function estimateGas(client, {
|
|
301
171
|
|
302
172
|
// src/actions/public/getBalance.ts
|
303
173
|
async function getBalance(client, { address, blockNumber, blockTag = "latest" }) {
|
304
|
-
const blockNumberHex = blockNumber ?
|
174
|
+
const blockNumberHex = blockNumber ? _chunkQMLDI5JUjs.numberToHex.call(void 0, blockNumber) : void 0;
|
305
175
|
const balance = await client.request({
|
306
176
|
method: "eth_getBalance",
|
307
177
|
params: [address, blockNumberHex || blockTag]
|
@@ -316,7 +186,7 @@ async function getBlock(client, {
|
|
316
186
|
blockTag = "latest",
|
317
187
|
includeTransactions = false
|
318
188
|
} = {}) {
|
319
|
-
const blockNumberHex = blockNumber !== void 0 ?
|
189
|
+
const blockNumberHex = blockNumber !== void 0 ? _chunkQMLDI5JUjs.numberToHex.call(void 0, blockNumber) : void 0;
|
320
190
|
let block = null;
|
321
191
|
if (blockHash) {
|
322
192
|
block = await client.request({
|
@@ -330,19 +200,19 @@ async function getBlock(client, {
|
|
330
200
|
});
|
331
201
|
}
|
332
202
|
if (!block)
|
333
|
-
throw new (0,
|
334
|
-
return
|
335
|
-
formatter: _optionalChain([client, 'access',
|
203
|
+
throw new (0, _chunkQMLDI5JUjs.BlockNotFoundError)({ blockHash, blockNumber });
|
204
|
+
return _chunkQMLDI5JUjs.format.call(void 0, block, {
|
205
|
+
formatter: _optionalChain([client, 'access', _3 => _3.chain, 'optionalAccess', _4 => _4.formatters, 'optionalAccess', _5 => _5.block]) || _chunkQMLDI5JUjs.formatBlock
|
336
206
|
});
|
337
207
|
}
|
338
208
|
|
339
209
|
// src/actions/public/getBlockNumber.ts
|
340
210
|
var cacheKey = (id) => `blockNumber.${id}`;
|
341
211
|
function getBlockNumberCache(id) {
|
342
|
-
return
|
212
|
+
return _chunkQMLDI5JUjs.getCache.call(void 0, cacheKey(id));
|
343
213
|
}
|
344
214
|
async function getBlockNumber(client, { maxAge = client.pollingInterval } = {}) {
|
345
|
-
const blockNumberHex = await
|
215
|
+
const blockNumberHex = await _chunkQMLDI5JUjs.withCache.call(void 0,
|
346
216
|
() => client.request({
|
347
217
|
method: "eth_blockNumber"
|
348
218
|
}),
|
@@ -357,7 +227,7 @@ async function getBlockTransactionCount(client, {
|
|
357
227
|
blockNumber,
|
358
228
|
blockTag = "latest"
|
359
229
|
} = {}) {
|
360
|
-
const blockNumberHex = blockNumber !== void 0 ?
|
230
|
+
const blockNumberHex = blockNumber !== void 0 ? _chunkQMLDI5JUjs.numberToHex.call(void 0, blockNumber) : void 0;
|
361
231
|
let count = null;
|
362
232
|
if (blockHash) {
|
363
233
|
count = await client.request({
|
@@ -370,13 +240,25 @@ async function getBlockTransactionCount(client, {
|
|
370
240
|
params: [blockNumberHex || blockTag]
|
371
241
|
});
|
372
242
|
}
|
373
|
-
return
|
243
|
+
return _chunkQMLDI5JUjs.hexToNumber.call(void 0, count);
|
244
|
+
}
|
245
|
+
|
246
|
+
// src/actions/public/getBytecode.ts
|
247
|
+
async function getBytecode(client, { address, blockNumber, blockTag = "latest" }) {
|
248
|
+
const blockNumberHex = blockNumber !== void 0 ? _chunkQMLDI5JUjs.numberToHex.call(void 0, blockNumber) : void 0;
|
249
|
+
const hex = await client.request({
|
250
|
+
method: "eth_getCode",
|
251
|
+
params: [address, blockNumberHex || blockTag]
|
252
|
+
});
|
253
|
+
if (hex === "0x")
|
254
|
+
return void 0;
|
255
|
+
return hex;
|
374
256
|
}
|
375
257
|
|
376
258
|
// src/actions/public/getChainId.ts
|
377
259
|
async function getChainId(client) {
|
378
260
|
const chainIdHex = await client.request({ method: "eth_chainId" });
|
379
|
-
return
|
261
|
+
return _chunkQMLDI5JUjs.hexToNumber.call(void 0, chainIdHex);
|
380
262
|
}
|
381
263
|
|
382
264
|
// src/actions/public/getFeeHistory.ts
|
@@ -386,16 +268,16 @@ async function getFeeHistory(client, {
|
|
386
268
|
blockTag = "latest",
|
387
269
|
rewardPercentiles
|
388
270
|
}) {
|
389
|
-
const blockNumberHex = blockNumber ?
|
271
|
+
const blockNumberHex = blockNumber ? _chunkQMLDI5JUjs.numberToHex.call(void 0, blockNumber) : void 0;
|
390
272
|
const feeHistory = await client.request({
|
391
273
|
method: "eth_feeHistory",
|
392
274
|
params: [
|
393
|
-
|
275
|
+
_chunkQMLDI5JUjs.numberToHex.call(void 0, blockCount),
|
394
276
|
blockNumberHex || blockTag,
|
395
277
|
rewardPercentiles
|
396
278
|
]
|
397
279
|
});
|
398
|
-
return
|
280
|
+
return _chunkQMLDI5JUjs.formatFeeHistory.call(void 0, feeHistory);
|
399
281
|
}
|
400
282
|
|
401
283
|
// src/actions/public/getFilterChanges.ts
|
@@ -405,7 +287,7 @@ async function getFilterChanges(client, { filter }) {
|
|
405
287
|
params: [filter.id]
|
406
288
|
});
|
407
289
|
return logs.map(
|
408
|
-
(log) => typeof log === "string" ? log :
|
290
|
+
(log) => typeof log === "string" ? log : _chunkQMLDI5JUjs.formatLog.call(void 0, log)
|
409
291
|
);
|
410
292
|
}
|
411
293
|
|
@@ -415,7 +297,7 @@ async function getFilterLogs(client, { filter }) {
|
|
415
297
|
method: "eth_getFilterLogs",
|
416
298
|
params: [filter.id]
|
417
299
|
});
|
418
|
-
return logs.map(
|
300
|
+
return logs.map(_chunkQMLDI5JUjs.formatLog);
|
419
301
|
}
|
420
302
|
|
421
303
|
// src/actions/public/getGasPrice.ts
|
@@ -434,7 +316,7 @@ async function getTransaction(client, {
|
|
434
316
|
hash,
|
435
317
|
index
|
436
318
|
}) {
|
437
|
-
const blockNumberHex = blockNumber !== void 0 ?
|
319
|
+
const blockNumberHex = blockNumber !== void 0 ? _chunkQMLDI5JUjs.numberToHex.call(void 0, blockNumber) : void 0;
|
438
320
|
let transaction = null;
|
439
321
|
if (hash) {
|
440
322
|
transaction = await client.request({
|
@@ -444,24 +326,24 @@ async function getTransaction(client, {
|
|
444
326
|
} else if (blockHash) {
|
445
327
|
transaction = await client.request({
|
446
328
|
method: "eth_getTransactionByBlockHashAndIndex",
|
447
|
-
params: [blockHash,
|
329
|
+
params: [blockHash, _chunkQMLDI5JUjs.numberToHex.call(void 0, index)]
|
448
330
|
});
|
449
331
|
} else if (blockNumberHex || blockTag) {
|
450
332
|
transaction = await client.request({
|
451
333
|
method: "eth_getTransactionByBlockNumberAndIndex",
|
452
|
-
params: [blockNumberHex || blockTag,
|
334
|
+
params: [blockNumberHex || blockTag, _chunkQMLDI5JUjs.numberToHex.call(void 0, index)]
|
453
335
|
});
|
454
336
|
}
|
455
337
|
if (!transaction)
|
456
|
-
throw new (0,
|
338
|
+
throw new (0, _chunkQMLDI5JUjs.TransactionNotFoundError)({
|
457
339
|
blockHash,
|
458
340
|
blockNumber,
|
459
341
|
blockTag,
|
460
342
|
hash,
|
461
343
|
index
|
462
344
|
});
|
463
|
-
return
|
464
|
-
formatter: _optionalChain([client, 'access',
|
345
|
+
return _chunkQMLDI5JUjs.format.call(void 0, transaction, {
|
346
|
+
formatter: _optionalChain([client, 'access', _6 => _6.chain, 'optionalAccess', _7 => _7.formatters, 'optionalAccess', _8 => _8.transaction]) || _chunkQMLDI5JUjs.formatTransaction
|
465
347
|
});
|
466
348
|
}
|
467
349
|
|
@@ -471,7 +353,7 @@ async function getTransactionConfirmations(client, { hash, transactionReceipt })
|
|
471
353
|
getBlockNumber(client),
|
472
354
|
hash ? getTransaction(client, { hash }) : void 0
|
473
355
|
]);
|
474
|
-
const transactionBlockNumber = _optionalChain([transactionReceipt, 'optionalAccess',
|
356
|
+
const transactionBlockNumber = _optionalChain([transactionReceipt, 'optionalAccess', _9 => _9.blockNumber]) || _optionalChain([transaction, 'optionalAccess', _10 => _10.blockNumber]);
|
475
357
|
if (!transactionBlockNumber)
|
476
358
|
return 0n;
|
477
359
|
return blockNumber - transactionBlockNumber + 1n;
|
@@ -481,9 +363,9 @@ async function getTransactionConfirmations(client, { hash, transactionReceipt })
|
|
481
363
|
async function getTransactionCount(client, { address, blockTag = "latest", blockNumber }) {
|
482
364
|
const count = await client.request({
|
483
365
|
method: "eth_getTransactionCount",
|
484
|
-
params: [address, blockNumber ?
|
366
|
+
params: [address, blockNumber ? _chunkQMLDI5JUjs.numberToHex.call(void 0, blockNumber) : blockTag]
|
485
367
|
});
|
486
|
-
return
|
368
|
+
return _chunkQMLDI5JUjs.hexToNumber.call(void 0, count);
|
487
369
|
}
|
488
370
|
|
489
371
|
// src/actions/public/getTransactionReceipt.ts
|
@@ -493,9 +375,9 @@ async function getTransactionReceipt(client, { hash }) {
|
|
493
375
|
params: [hash]
|
494
376
|
});
|
495
377
|
if (!receipt)
|
496
|
-
throw new (0,
|
497
|
-
return
|
498
|
-
formatter: _optionalChain([client, 'access',
|
378
|
+
throw new (0, _chunkQMLDI5JUjs.TransactionReceiptNotFoundError)({ hash });
|
379
|
+
return _chunkQMLDI5JUjs.format.call(void 0, receipt, {
|
380
|
+
formatter: _optionalChain([client, 'access', _11 => _11.chain, 'optionalAccess', _12 => _12.formatters, 'optionalAccess', _13 => _13.transactionReceipt]) || _chunkQMLDI5JUjs.formatTransactionReceipt
|
499
381
|
});
|
500
382
|
}
|
501
383
|
|
@@ -540,7 +422,7 @@ function observe(observerId, callbacks, fn) {
|
|
540
422
|
const listeners2 = getListeners();
|
541
423
|
if (listeners2.length === 0)
|
542
424
|
return;
|
543
|
-
listeners2.forEach((listener) => _optionalChain([listener, 'access',
|
425
|
+
listeners2.forEach((listener) => _optionalChain([listener, 'access', _14 => _14.fns, 'access', _15 => _15[key], 'optionalCall', _16 => _16(...args)]));
|
544
426
|
};
|
545
427
|
}
|
546
428
|
const cleanup = fn(emit);
|
@@ -549,98 +431,6 @@ function observe(observerId, callbacks, fn) {
|
|
549
431
|
return unwatch;
|
550
432
|
}
|
551
433
|
|
552
|
-
// src/actions/public/waitForTransactionReceipt.ts
|
553
|
-
async function waitForTransactionReceipt(client, {
|
554
|
-
confirmations = 1,
|
555
|
-
hash,
|
556
|
-
onReplaced,
|
557
|
-
pollingInterval = client.pollingInterval,
|
558
|
-
timeout
|
559
|
-
}) {
|
560
|
-
const observerId = JSON.stringify([
|
561
|
-
"waitForTransactionReceipt",
|
562
|
-
client.uid,
|
563
|
-
hash
|
564
|
-
]);
|
565
|
-
let transaction;
|
566
|
-
let replacedTransaction;
|
567
|
-
let receipt;
|
568
|
-
return new Promise((resolve, reject) => {
|
569
|
-
if (timeout)
|
570
|
-
setTimeout(
|
571
|
-
() => reject(new (0, _chunkAGF7GU6Gjs.WaitForTransactionReceiptTimeoutError)({ hash })),
|
572
|
-
timeout
|
573
|
-
);
|
574
|
-
const unobserve = observe(
|
575
|
-
observerId,
|
576
|
-
{ onReplaced, resolve, reject },
|
577
|
-
(emit) => {
|
578
|
-
const unwatch = watchBlockNumber(client, {
|
579
|
-
emitMissed: true,
|
580
|
-
emitOnBegin: true,
|
581
|
-
pollingInterval,
|
582
|
-
async onBlockNumber(blockNumber) {
|
583
|
-
const done = async (fn) => {
|
584
|
-
unwatch();
|
585
|
-
fn();
|
586
|
-
unobserve();
|
587
|
-
};
|
588
|
-
try {
|
589
|
-
if (receipt) {
|
590
|
-
if (blockNumber - receipt.blockNumber + 1n < confirmations)
|
591
|
-
return;
|
592
|
-
done(() => emit.resolve(receipt));
|
593
|
-
return;
|
594
|
-
}
|
595
|
-
transaction = await getTransaction(client, { hash });
|
596
|
-
receipt = await getTransactionReceipt(client, { hash });
|
597
|
-
if (blockNumber - receipt.blockNumber + 1n < confirmations)
|
598
|
-
return;
|
599
|
-
done(() => emit.resolve(receipt));
|
600
|
-
} catch (err) {
|
601
|
-
if (transaction && (err instanceof _chunkAGF7GU6Gjs.TransactionNotFoundError || err instanceof _chunkAGF7GU6Gjs.TransactionReceiptNotFoundError)) {
|
602
|
-
replacedTransaction = transaction;
|
603
|
-
const block = await getBlock(client, {
|
604
|
-
blockNumber,
|
605
|
-
includeTransactions: true
|
606
|
-
});
|
607
|
-
const replacementTransaction = block.transactions.find(
|
608
|
-
({ from, nonce }) => from === replacedTransaction.from && nonce === replacedTransaction.nonce
|
609
|
-
);
|
610
|
-
if (!replacementTransaction)
|
611
|
-
return;
|
612
|
-
receipt = await getTransactionReceipt(client, {
|
613
|
-
hash: replacementTransaction.hash
|
614
|
-
});
|
615
|
-
if (blockNumber - receipt.blockNumber + 1n < confirmations)
|
616
|
-
return;
|
617
|
-
let reason = "replaced";
|
618
|
-
if (replacementTransaction.to === replacedTransaction.to && replacementTransaction.value === replacedTransaction.value) {
|
619
|
-
reason = "repriced";
|
620
|
-
} else if (replacementTransaction.from === replacementTransaction.to && replacementTransaction.value === 0n) {
|
621
|
-
reason = "cancelled";
|
622
|
-
}
|
623
|
-
done(() => {
|
624
|
-
_optionalChain([emit, 'access', _19 => _19.onReplaced, 'optionalCall', _20 => _20({
|
625
|
-
reason,
|
626
|
-
replacedTransaction,
|
627
|
-
transaction: replacementTransaction,
|
628
|
-
transactionReceipt: receipt
|
629
|
-
})]);
|
630
|
-
emit.resolve(receipt);
|
631
|
-
});
|
632
|
-
} else {
|
633
|
-
done(() => emit.reject(err));
|
634
|
-
}
|
635
|
-
}
|
636
|
-
}
|
637
|
-
});
|
638
|
-
return unwatch;
|
639
|
-
}
|
640
|
-
);
|
641
|
-
});
|
642
|
-
}
|
643
|
-
|
644
434
|
// src/utils/poll.ts
|
645
435
|
function poll(fn, { emitOnBegin, initialWaitTime, interval }) {
|
646
436
|
let active = true;
|
@@ -649,13 +439,13 @@ function poll(fn, { emitOnBegin, initialWaitTime, interval }) {
|
|
649
439
|
let data;
|
650
440
|
if (emitOnBegin)
|
651
441
|
data = await fn({ unpoll: unwatch });
|
652
|
-
const initialWait = await _asyncNullishCoalesce(await _optionalChain([initialWaitTime, 'optionalCall',
|
653
|
-
await
|
442
|
+
const initialWait = await _asyncNullishCoalesce(await _optionalChain([initialWaitTime, 'optionalCall', _17 => _17(data)]), async () => ( interval));
|
443
|
+
await _chunkQMLDI5JUjs.wait.call(void 0, initialWait);
|
654
444
|
const poll2 = async () => {
|
655
445
|
if (!active)
|
656
446
|
return;
|
657
447
|
await fn({ unpoll: unwatch });
|
658
|
-
await
|
448
|
+
await _chunkQMLDI5JUjs.wait.call(void 0, interval);
|
659
449
|
poll2();
|
660
450
|
};
|
661
451
|
poll2();
|
@@ -700,7 +490,7 @@ function watchBlockNumber(client, {
|
|
700
490
|
prevBlockNumber = blockNumber;
|
701
491
|
emit.onBlockNumber(blockNumber, prevBlockNumber);
|
702
492
|
} catch (err) {
|
703
|
-
_optionalChain([emit, 'access',
|
493
|
+
_optionalChain([emit, 'access', _18 => _18.onError, 'optionalCall', _19 => _19(err)]);
|
704
494
|
}
|
705
495
|
},
|
706
496
|
{
|
@@ -740,11 +530,11 @@ function watchBlocks(client, {
|
|
740
530
|
blockTag,
|
741
531
|
includeTransactions
|
742
532
|
});
|
743
|
-
if (block.number && _optionalChain([prevBlock, 'optionalAccess',
|
533
|
+
if (block.number && _optionalChain([prevBlock, 'optionalAccess', _20 => _20.number])) {
|
744
534
|
if (block.number === prevBlock.number)
|
745
535
|
return;
|
746
536
|
if (block.number - prevBlock.number > 1 && emitMissed) {
|
747
|
-
for (let i = _optionalChain([prevBlock, 'optionalAccess',
|
537
|
+
for (let i = _optionalChain([prevBlock, 'optionalAccess', _21 => _21.number]) + 1n; i < block.number; i++) {
|
748
538
|
const block2 = await getBlock(client, {
|
749
539
|
blockNumber: i,
|
750
540
|
includeTransactions
|
@@ -757,7 +547,7 @@ function watchBlocks(client, {
|
|
757
547
|
emit.onBlock(block, prevBlock);
|
758
548
|
prevBlock = block;
|
759
549
|
} catch (err) {
|
760
|
-
_optionalChain([emit, 'access',
|
550
|
+
_optionalChain([emit, 'access', _22 => _22.onError, 'optionalCall', _23 => _23(err)]);
|
761
551
|
}
|
762
552
|
},
|
763
553
|
{
|
@@ -801,7 +591,7 @@ function watchPendingTransactions(client, {
|
|
801
591
|
else
|
802
592
|
hashes.forEach((hash) => emit.onTransactions([hash]));
|
803
593
|
} catch (err) {
|
804
|
-
_optionalChain([emit, 'access',
|
594
|
+
_optionalChain([emit, 'access', _24 => _24.onError, 'optionalCall', _25 => _25(err)]);
|
805
595
|
}
|
806
596
|
},
|
807
597
|
{
|
@@ -817,223 +607,95 @@ function watchPendingTransactions(client, {
|
|
817
607
|
});
|
818
608
|
}
|
819
609
|
|
820
|
-
// src/actions/
|
821
|
-
async function
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
}
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
}
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
}
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
}
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
const request_ = _chunkAGF7GU6Gjs.formatTransactionRequest.call(void 0, request);
|
910
|
-
const hash = await client.request({
|
911
|
-
method: "eth_sendUnsignedTransaction",
|
912
|
-
params: [request_]
|
913
|
-
});
|
914
|
-
return hash;
|
915
|
-
}
|
916
|
-
|
917
|
-
// src/actions/test/setAutomine.ts
|
918
|
-
async function setAutomine(client, enabled) {
|
919
|
-
return await client.request({
|
920
|
-
method: "evm_setAutomine",
|
921
|
-
params: [enabled]
|
922
|
-
});
|
923
|
-
}
|
924
|
-
|
925
|
-
// src/actions/test/setBalance.ts
|
926
|
-
async function setBalance(client, { address, value }) {
|
927
|
-
return await client.request({
|
928
|
-
method: `${client.mode}_setBalance`,
|
929
|
-
params: [address, _chunkAGF7GU6Gjs.numberToHex.call(void 0, value)]
|
930
|
-
});
|
931
|
-
}
|
932
|
-
|
933
|
-
// src/actions/test/setBlockGasLimit.ts
|
934
|
-
async function setBlockGasLimit(client, { gasLimit }) {
|
935
|
-
return await client.request({
|
936
|
-
method: "evm_setBlockGasLimit",
|
937
|
-
params: [_chunkAGF7GU6Gjs.numberToHex.call(void 0, gasLimit)]
|
938
|
-
});
|
939
|
-
}
|
940
|
-
|
941
|
-
// src/actions/test/setBlockTimestampInterval.ts
|
942
|
-
async function setBlockTimestampInterval(client, { interval }) {
|
943
|
-
return await client.request({
|
944
|
-
method: `${client.mode}_setBlockTimestampInterval`,
|
945
|
-
params: [interval]
|
946
|
-
});
|
947
|
-
}
|
948
|
-
|
949
|
-
// src/actions/test/setCode.ts
|
950
|
-
async function setCode(client, { address, bytecode }) {
|
951
|
-
return await client.request({
|
952
|
-
method: `${client.mode}_setCode`,
|
953
|
-
params: [address, bytecode]
|
954
|
-
});
|
955
|
-
}
|
956
|
-
|
957
|
-
// src/actions/test/setCoinbase.ts
|
958
|
-
async function setCoinbase(client, { address }) {
|
959
|
-
return await client.request({
|
960
|
-
method: `${client.mode}_setCoinbase`,
|
961
|
-
params: [address]
|
962
|
-
});
|
963
|
-
}
|
964
|
-
|
965
|
-
// src/actions/test/setIntervalMining.ts
|
966
|
-
async function setIntervalMining(client, { interval }) {
|
967
|
-
return await client.request({
|
968
|
-
method: "evm_setIntervalMining",
|
969
|
-
params: [interval]
|
970
|
-
});
|
971
|
-
}
|
972
|
-
|
973
|
-
// src/actions/test/setLoggingEnabled.ts
|
974
|
-
async function setLoggingEnabled(client, enabled) {
|
975
|
-
return await client.request({
|
976
|
-
method: `${client.mode}_setLoggingEnabled`,
|
977
|
-
params: [enabled]
|
978
|
-
});
|
979
|
-
}
|
980
|
-
|
981
|
-
// src/actions/test/setMinGasPrice.ts
|
982
|
-
async function setMinGasPrice(client, { gasPrice }) {
|
983
|
-
return await client.request({
|
984
|
-
method: `${client.mode}_setMinGasPrice`,
|
985
|
-
params: [_chunkAGF7GU6Gjs.numberToHex.call(void 0, gasPrice)]
|
986
|
-
});
|
987
|
-
}
|
988
|
-
|
989
|
-
// src/actions/test/setNextBlockBaseFeePerGas.ts
|
990
|
-
async function setNextBlockBaseFeePerGas(client, { baseFeePerGas }) {
|
991
|
-
return await client.request({
|
992
|
-
method: `${client.mode}_setNextBlockBaseFeePerGas`,
|
993
|
-
params: [_chunkAGF7GU6Gjs.numberToHex.call(void 0, baseFeePerGas)]
|
994
|
-
});
|
995
|
-
}
|
996
|
-
|
997
|
-
// src/actions/test/setNextBlockTimestamp.ts
|
998
|
-
async function setNextBlockTimestamp(client, { timestamp }) {
|
999
|
-
return await client.request({
|
1000
|
-
method: "evm_setNextBlockTimestamp",
|
1001
|
-
params: [_chunkAGF7GU6Gjs.numberToHex.call(void 0, timestamp)]
|
1002
|
-
});
|
1003
|
-
}
|
1004
|
-
|
1005
|
-
// src/actions/test/setNonce.ts
|
1006
|
-
async function setNonce(client, { address, nonce }) {
|
1007
|
-
return await client.request({
|
1008
|
-
method: `${client.mode}_setNonce`,
|
1009
|
-
params: [address, _chunkAGF7GU6Gjs.numberToHex.call(void 0, nonce)]
|
1010
|
-
});
|
1011
|
-
}
|
1012
|
-
|
1013
|
-
// src/actions/test/setStorageAt.ts
|
1014
|
-
async function setStorageAt(client, { address, index, value }) {
|
1015
|
-
return await client.request({
|
1016
|
-
method: `${client.mode}_setStorageAt`,
|
1017
|
-
params: [
|
1018
|
-
address,
|
1019
|
-
typeof index === "number" ? _chunkAGF7GU6Gjs.numberToHex.call(void 0, index) : index,
|
1020
|
-
value
|
1021
|
-
]
|
1022
|
-
});
|
1023
|
-
}
|
1024
|
-
|
1025
|
-
// src/actions/test/snapshot.ts
|
1026
|
-
async function snapshot(client) {
|
1027
|
-
return await client.request({
|
1028
|
-
method: "evm_snapshot"
|
1029
|
-
});
|
1030
|
-
}
|
1031
|
-
|
1032
|
-
// src/actions/test/stopImpersonatingAccount.ts
|
1033
|
-
async function stopImpersonatingAccount(client, { address }) {
|
1034
|
-
return await client.request({
|
1035
|
-
method: `${client.mode}_stopImpersonatingAccount`,
|
1036
|
-
params: [address]
|
610
|
+
// src/actions/public/waitForTransactionReceipt.ts
|
611
|
+
async function waitForTransactionReceipt(client, {
|
612
|
+
confirmations = 1,
|
613
|
+
hash,
|
614
|
+
onReplaced,
|
615
|
+
pollingInterval = client.pollingInterval,
|
616
|
+
timeout
|
617
|
+
}) {
|
618
|
+
const observerId = JSON.stringify([
|
619
|
+
"waitForTransactionReceipt",
|
620
|
+
client.uid,
|
621
|
+
hash
|
622
|
+
]);
|
623
|
+
let transaction;
|
624
|
+
let replacedTransaction;
|
625
|
+
let receipt;
|
626
|
+
return new Promise((resolve, reject) => {
|
627
|
+
if (timeout)
|
628
|
+
setTimeout(
|
629
|
+
() => reject(new (0, _chunkQMLDI5JUjs.WaitForTransactionReceiptTimeoutError)({ hash })),
|
630
|
+
timeout
|
631
|
+
);
|
632
|
+
const unobserve = observe(
|
633
|
+
observerId,
|
634
|
+
{ onReplaced, resolve, reject },
|
635
|
+
(emit) => {
|
636
|
+
const unwatch = watchBlockNumber(client, {
|
637
|
+
emitMissed: true,
|
638
|
+
emitOnBegin: true,
|
639
|
+
pollingInterval,
|
640
|
+
async onBlockNumber(blockNumber) {
|
641
|
+
const done = async (fn) => {
|
642
|
+
unwatch();
|
643
|
+
fn();
|
644
|
+
unobserve();
|
645
|
+
};
|
646
|
+
try {
|
647
|
+
if (receipt) {
|
648
|
+
if (blockNumber - receipt.blockNumber + 1n < confirmations)
|
649
|
+
return;
|
650
|
+
done(() => emit.resolve(receipt));
|
651
|
+
return;
|
652
|
+
}
|
653
|
+
transaction = await getTransaction(client, { hash });
|
654
|
+
receipt = await getTransactionReceipt(client, { hash });
|
655
|
+
if (blockNumber - receipt.blockNumber + 1n < confirmations)
|
656
|
+
return;
|
657
|
+
done(() => emit.resolve(receipt));
|
658
|
+
} catch (err) {
|
659
|
+
if (transaction && (err instanceof _chunkQMLDI5JUjs.TransactionNotFoundError || err instanceof _chunkQMLDI5JUjs.TransactionReceiptNotFoundError)) {
|
660
|
+
replacedTransaction = transaction;
|
661
|
+
const block = await getBlock(client, {
|
662
|
+
blockNumber,
|
663
|
+
includeTransactions: true
|
664
|
+
});
|
665
|
+
const replacementTransaction = block.transactions.find(
|
666
|
+
({ from, nonce }) => from === replacedTransaction.from && nonce === replacedTransaction.nonce
|
667
|
+
);
|
668
|
+
if (!replacementTransaction)
|
669
|
+
return;
|
670
|
+
receipt = await getTransactionReceipt(client, {
|
671
|
+
hash: replacementTransaction.hash
|
672
|
+
});
|
673
|
+
if (blockNumber - receipt.blockNumber + 1n < confirmations)
|
674
|
+
return;
|
675
|
+
let reason = "replaced";
|
676
|
+
if (replacementTransaction.to === replacedTransaction.to && replacementTransaction.value === replacedTransaction.value) {
|
677
|
+
reason = "repriced";
|
678
|
+
} else if (replacementTransaction.from === replacementTransaction.to && replacementTransaction.value === 0n) {
|
679
|
+
reason = "cancelled";
|
680
|
+
}
|
681
|
+
done(() => {
|
682
|
+
_optionalChain([emit, 'access', _26 => _26.onReplaced, 'optionalCall', _27 => _27({
|
683
|
+
reason,
|
684
|
+
replacedTransaction,
|
685
|
+
transaction: replacementTransaction,
|
686
|
+
transactionReceipt: receipt
|
687
|
+
})]);
|
688
|
+
emit.resolve(receipt);
|
689
|
+
});
|
690
|
+
} else {
|
691
|
+
done(() => emit.reject(err));
|
692
|
+
}
|
693
|
+
}
|
694
|
+
}
|
695
|
+
});
|
696
|
+
return unwatch;
|
697
|
+
}
|
698
|
+
);
|
1037
699
|
});
|
1038
700
|
}
|
1039
701
|
|
@@ -1064,39 +726,4 @@ async function stopImpersonatingAccount(client, { address }) {
|
|
1064
726
|
|
1065
727
|
|
1066
728
|
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
exports.call = call; exports.callContract = callContract; exports.createPendingTransactionFilter = createPendingTransactionFilter; exports.createBlockFilter = createBlockFilter; exports.addChain = addChain; exports.getAccounts = getAccounts; exports.getPermissions = getPermissions; exports.requestAccounts = requestAccounts; exports.requestPermissions = requestPermissions; exports.sendTransaction = sendTransaction; exports.signMessage = signMessage; exports.switchChain = switchChain; exports.watchAsset = watchAsset; exports.deployContract = deployContract; exports.estimateGas = estimateGas; exports.getBalance = getBalance; exports.getBlock = getBlock; exports.getBlockNumberCache = getBlockNumberCache; exports.getBlockNumber = getBlockNumber; exports.getBlockTransactionCount = getBlockTransactionCount; exports.getChainId = getChainId; exports.getFeeHistory = getFeeHistory; exports.getFilterChanges = getFilterChanges; exports.getFilterLogs = getFilterLogs; exports.getGasPrice = getGasPrice; exports.getTransaction = getTransaction; exports.getTransactionConfirmations = getTransactionConfirmations; exports.getTransactionCount = getTransactionCount; exports.getTransactionReceipt = getTransactionReceipt; exports.uninstallFilter = uninstallFilter; exports.waitForTransactionReceipt = waitForTransactionReceipt; exports.watchBlockNumber = watchBlockNumber; exports.watchBlocks = watchBlocks; exports.watchPendingTransactions = watchPendingTransactions; exports.dropTransaction = dropTransaction; exports.getAutomine = getAutomine; exports.getTxpoolContent = getTxpoolContent; exports.getTxpoolStatus = getTxpoolStatus; exports.impersonateAccount = impersonateAccount; exports.increaseTime = increaseTime; exports.inspectTxpool = inspectTxpool; exports.mine = mine; exports.removeBlockTimestampInterval = removeBlockTimestampInterval; exports.reset = reset; exports.revert = revert; exports.sendUnsignedTransaction = sendUnsignedTransaction; exports.setAutomine = setAutomine; exports.setBalance = setBalance; exports.setBlockGasLimit = setBlockGasLimit; exports.setBlockTimestampInterval = setBlockTimestampInterval; exports.setCode = setCode; exports.setCoinbase = setCoinbase; exports.setIntervalMining = setIntervalMining; exports.setLoggingEnabled = setLoggingEnabled; exports.setMinGasPrice = setMinGasPrice; exports.setNextBlockBaseFeePerGas = setNextBlockBaseFeePerGas; exports.setNextBlockTimestamp = setNextBlockTimestamp; exports.setNonce = setNonce; exports.setStorageAt = setStorageAt; exports.snapshot = snapshot; exports.stopImpersonatingAccount = stopImpersonatingAccount;
|
729
|
+
exports.call = call; exports.callContract = callContract; exports.createPendingTransactionFilter = createPendingTransactionFilter; exports.createBlockFilter = createBlockFilter; exports.deployContract = deployContract; exports.estimateGas = estimateGas; exports.getBalance = getBalance; exports.getBlock = getBlock; exports.getBlockNumberCache = getBlockNumberCache; exports.getBlockNumber = getBlockNumber; exports.getBlockTransactionCount = getBlockTransactionCount; exports.getBytecode = getBytecode; exports.getChainId = getChainId; exports.getFeeHistory = getFeeHistory; exports.getFilterChanges = getFilterChanges; exports.getFilterLogs = getFilterLogs; exports.getGasPrice = getGasPrice; exports.getTransaction = getTransaction; exports.getTransactionConfirmations = getTransactionConfirmations; exports.getTransactionCount = getTransactionCount; exports.getTransactionReceipt = getTransactionReceipt; exports.uninstallFilter = uninstallFilter; exports.waitForTransactionReceipt = waitForTransactionReceipt; exports.watchBlockNumber = watchBlockNumber; exports.watchBlocks = watchBlocks; exports.watchPendingTransactions = watchPendingTransactions;
|