viem 0.0.1-sushi.26 → 0.0.1-sushi.27
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/{call-ac509982.d.ts → call-14050d5c.d.ts} +3 -3
- package/dist/{chain-c4ccb458.d.ts → chain-83ece55b.d.ts} +1 -1
- package/dist/{chain-f16512e8.d.ts → chain-9a8c6614.d.ts} +1 -1
- package/dist/chains.d.ts +5 -5
- package/dist/chains.js +46 -46
- package/dist/chains.mjs +1 -1
- package/dist/{chunk-NXCI5KQC.js → chunk-3MFDRMZW.js} +4 -2
- package/dist/chunk-3MFDRMZW.js.map +1 -0
- package/dist/{chunk-2PFNLP3F.js → chunk-4MP6LO5V.js} +14 -14
- package/dist/{chunk-2PFNLP3F.js.map → chunk-4MP6LO5V.js.map} +0 -0
- package/dist/{chunk-5ND4P6QL.mjs → chunk-MV7PYF3D.mjs} +2 -2
- package/dist/{chunk-5ND4P6QL.mjs.map → chunk-MV7PYF3D.mjs.map} +0 -0
- package/dist/{chunk-O7T5NQLB.mjs → chunk-PSLMBGQ4.mjs} +2 -2
- package/dist/{chunk-O7T5NQLB.mjs.map → chunk-PSLMBGQ4.mjs.map} +0 -0
- package/dist/{chunk-SD5X7F4U.mjs → chunk-RPR4ZSAP.mjs} +4 -2
- package/dist/chunk-RPR4ZSAP.mjs.map +1 -0
- package/dist/{chunk-UTL6F7UN.js → chunk-XB55RCBE.js} +70 -70
- package/dist/{chunk-UTL6F7UN.js.map → chunk-XB55RCBE.js.map} +0 -0
- package/dist/{contract-9e76e561.d.ts → contract-3b4a1df6.d.ts} +1 -1
- package/dist/contract.d.ts +13 -13
- package/dist/contract.js +4 -4
- package/dist/contract.mjs +3 -3
- package/dist/{createClient-68ee4bb4.d.ts → createClient-cc01b906.d.ts} +2 -2
- package/dist/{createPublicClient-b732194e.d.ts → createPublicClient-9823f081.d.ts} +3 -3
- package/dist/{createTestClient-dedf321e.d.ts → createTestClient-63b16109.d.ts} +3 -3
- package/dist/{createWalletClient-75813d83.d.ts → createWalletClient-6dbbe0ee.d.ts} +3 -3
- package/dist/{decodeErrorResult-0b934d23.d.ts → decodeErrorResult-b0d3ce71.d.ts} +2 -2
- package/dist/{eip1193-6f9ba163.d.ts → eip1193-bbebfb3d.d.ts} +1 -1
- package/dist/ens.d.ts +8 -8
- package/dist/ens.js +21 -21
- package/dist/ens.mjs +2 -2
- package/dist/{getAbiItem-c8e6e7d4.d.ts → getAbiItem-540089dd.d.ts} +2 -2
- package/dist/index.d.ts +12 -12
- package/dist/index.js +13 -13
- package/dist/index.mjs +1 -1
- package/dist/public.d.ts +10 -10
- package/dist/public.js +3 -3
- package/dist/public.mjs +2 -2
- package/dist/{readContract-4f6e2692.d.ts → readContract-5c96b3bc.d.ts} +3 -3
- package/dist/{rpc-a5a7f376.d.ts → rpc-c367eceb.d.ts} +2 -2
- package/dist/{sendTransaction-e713f90c.d.ts → sendTransaction-50d22f3e.d.ts} +3 -3
- package/dist/test.d.ts +4 -4
- package/dist/test.js +13 -13
- package/dist/test.mjs +1 -1
- package/dist/{transactionReceipt-2a86c7c7.d.ts → transactionReceipt-504958d3.d.ts} +1 -1
- package/dist/{transactionRequest-c7794f5e.d.ts → transactionRequest-37f60d32.d.ts} +2 -2
- package/dist/utils/index.d.ts +10 -10
- package/dist/utils/index.js +2 -2
- package/dist/utils/index.mjs +1 -1
- package/dist/wallet.d.ts +6 -6
- package/dist/wallet.js +3 -3
- package/dist/wallet.mjs +2 -2
- package/dist/{watchEvent-c346c12d.d.ts → watchEvent-ca77f9e9.d.ts} +3 -3
- package/dist/window.d.ts +2 -2
- package/package.json +3 -1
- package/public/package.json +4 -0
- package/test/package.json +4 -0
- package/dist/chunk-NXCI5KQC.js.map +0 -1
- package/dist/chunk-SD5X7F4U.mjs.map +0 -1
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
|
28
28
|
|
29
|
-
var
|
29
|
+
var _chunk3MFDRMZWjs = require('./chunk-3MFDRMZW.js');
|
30
30
|
|
31
31
|
// src/actions/public/call.ts
|
32
32
|
async function call(client, {
|
@@ -46,10 +46,10 @@ async function call(client, {
|
|
46
46
|
...rest
|
47
47
|
}) {
|
48
48
|
if (maxFeePerGas !== void 0 && maxPriorityFeePerGas !== void 0 && maxFeePerGas < maxPriorityFeePerGas)
|
49
|
-
throw new (0,
|
50
|
-
const blockNumberHex = blockNumber ?
|
49
|
+
throw new (0, _chunk3MFDRMZWjs.InvalidGasArgumentsError)();
|
50
|
+
const blockNumberHex = blockNumber ? _chunk3MFDRMZWjs.numberToHex.call(void 0, blockNumber) : void 0;
|
51
51
|
const formatter = _optionalChain([chain, 'optionalAccess', _ => _.formatters, 'optionalAccess', _2 => _2.transactionRequest]);
|
52
|
-
const request_ =
|
52
|
+
const request_ = _chunk3MFDRMZWjs.format.call(void 0,
|
53
53
|
{
|
54
54
|
from,
|
55
55
|
accessList,
|
@@ -62,10 +62,10 @@ async function call(client, {
|
|
62
62
|
to,
|
63
63
|
value,
|
64
64
|
// Pick out extra data that might exist on the chain's transaction request type.
|
65
|
-
...
|
65
|
+
..._chunk3MFDRMZWjs.extract.call(void 0, rest, { formatter })
|
66
66
|
},
|
67
67
|
{
|
68
|
-
formatter: formatter ||
|
68
|
+
formatter: formatter || _chunk3MFDRMZWjs.formatTransactionRequest
|
69
69
|
}
|
70
70
|
);
|
71
71
|
const response = await client.request({
|
@@ -85,7 +85,7 @@ async function simulateContract(client, {
|
|
85
85
|
functionName,
|
86
86
|
...callRequest
|
87
87
|
}) {
|
88
|
-
const calldata =
|
88
|
+
const calldata = _chunk3MFDRMZWjs.encodeFunctionData.call(void 0, {
|
89
89
|
abi,
|
90
90
|
args,
|
91
91
|
functionName
|
@@ -96,7 +96,7 @@ async function simulateContract(client, {
|
|
96
96
|
to: address,
|
97
97
|
...callRequest
|
98
98
|
});
|
99
|
-
const result =
|
99
|
+
const result = _chunk3MFDRMZWjs.decodeFunctionResult.call(void 0, {
|
100
100
|
abi,
|
101
101
|
args,
|
102
102
|
functionName,
|
@@ -113,7 +113,7 @@ async function simulateContract(client, {
|
|
113
113
|
}
|
114
114
|
};
|
115
115
|
} catch (err) {
|
116
|
-
throw
|
116
|
+
throw _chunk3MFDRMZWjs.getContractError.call(void 0, err, {
|
117
117
|
abi,
|
118
118
|
address,
|
119
119
|
args,
|
@@ -153,16 +153,16 @@ async function estimateGas(client, {
|
|
153
153
|
to,
|
154
154
|
value
|
155
155
|
}) {
|
156
|
-
const blockNumberHex = blockNumber ?
|
156
|
+
const blockNumberHex = blockNumber ? _chunk3MFDRMZWjs.numberToHex.call(void 0, blockNumber) : void 0;
|
157
157
|
const parameters = {
|
158
158
|
data,
|
159
159
|
from,
|
160
|
-
gas: gas ?
|
161
|
-
gasPrice: gasPrice ?
|
162
|
-
maxFeePerGas: maxFeePerGas ?
|
163
|
-
maxPriorityFeePerGas: maxPriorityFeePerGas ?
|
160
|
+
gas: gas ? _chunk3MFDRMZWjs.numberToHex.call(void 0, gas) : void 0,
|
161
|
+
gasPrice: gasPrice ? _chunk3MFDRMZWjs.numberToHex.call(void 0, gasPrice) : void 0,
|
162
|
+
maxFeePerGas: maxFeePerGas ? _chunk3MFDRMZWjs.numberToHex.call(void 0, maxFeePerGas) : void 0,
|
163
|
+
maxPriorityFeePerGas: maxPriorityFeePerGas ? _chunk3MFDRMZWjs.numberToHex.call(void 0, maxPriorityFeePerGas) : void 0,
|
164
164
|
to,
|
165
|
-
value: value ?
|
165
|
+
value: value ? _chunk3MFDRMZWjs.numberToHex.call(void 0, value) : void 0
|
166
166
|
};
|
167
167
|
const balance = await client.request({
|
168
168
|
method: "eth_estimateGas",
|
@@ -173,7 +173,7 @@ async function estimateGas(client, {
|
|
173
173
|
|
174
174
|
// src/actions/public/getBalance.ts
|
175
175
|
async function getBalance(client, { address, blockNumber, blockTag = "latest" }) {
|
176
|
-
const blockNumberHex = blockNumber ?
|
176
|
+
const blockNumberHex = blockNumber ? _chunk3MFDRMZWjs.numberToHex.call(void 0, blockNumber) : void 0;
|
177
177
|
const balance = await client.request({
|
178
178
|
method: "eth_getBalance",
|
179
179
|
params: [address, blockNumberHex || blockTag]
|
@@ -188,7 +188,7 @@ async function getBlock(client, {
|
|
188
188
|
blockTag = "latest",
|
189
189
|
includeTransactions = false
|
190
190
|
} = {}) {
|
191
|
-
const blockNumberHex = blockNumber !== void 0 ?
|
191
|
+
const blockNumberHex = blockNumber !== void 0 ? _chunk3MFDRMZWjs.numberToHex.call(void 0, blockNumber) : void 0;
|
192
192
|
let block = null;
|
193
193
|
if (blockHash) {
|
194
194
|
block = await client.request({
|
@@ -202,19 +202,19 @@ async function getBlock(client, {
|
|
202
202
|
});
|
203
203
|
}
|
204
204
|
if (!block)
|
205
|
-
throw new (0,
|
206
|
-
return
|
207
|
-
formatter: _optionalChain([client, 'access', _3 => _3.chain, 'optionalAccess', _4 => _4.formatters, 'optionalAccess', _5 => _5.block]) ||
|
205
|
+
throw new (0, _chunk3MFDRMZWjs.BlockNotFoundError)({ blockHash, blockNumber });
|
206
|
+
return _chunk3MFDRMZWjs.format.call(void 0, block, {
|
207
|
+
formatter: _optionalChain([client, 'access', _3 => _3.chain, 'optionalAccess', _4 => _4.formatters, 'optionalAccess', _5 => _5.block]) || _chunk3MFDRMZWjs.formatBlock
|
208
208
|
});
|
209
209
|
}
|
210
210
|
|
211
211
|
// src/actions/public/getBlockNumber.ts
|
212
212
|
var cacheKey = (id) => `blockNumber.${id}`;
|
213
213
|
function getBlockNumberCache(id) {
|
214
|
-
return
|
214
|
+
return _chunk3MFDRMZWjs.getCache.call(void 0, cacheKey(id));
|
215
215
|
}
|
216
216
|
async function getBlockNumber(client, { maxAge = client.pollingInterval } = {}) {
|
217
|
-
const blockNumberHex = await
|
217
|
+
const blockNumberHex = await _chunk3MFDRMZWjs.withCache.call(void 0,
|
218
218
|
() => client.request({
|
219
219
|
method: "eth_blockNumber"
|
220
220
|
}),
|
@@ -229,7 +229,7 @@ async function getBlockTransactionCount(client, {
|
|
229
229
|
blockNumber,
|
230
230
|
blockTag = "latest"
|
231
231
|
} = {}) {
|
232
|
-
const blockNumberHex = blockNumber !== void 0 ?
|
232
|
+
const blockNumberHex = blockNumber !== void 0 ? _chunk3MFDRMZWjs.numberToHex.call(void 0, blockNumber) : void 0;
|
233
233
|
let count = null;
|
234
234
|
if (blockHash) {
|
235
235
|
count = await client.request({
|
@@ -242,12 +242,12 @@ async function getBlockTransactionCount(client, {
|
|
242
242
|
params: [blockNumberHex || blockTag]
|
243
243
|
});
|
244
244
|
}
|
245
|
-
return
|
245
|
+
return _chunk3MFDRMZWjs.hexToNumber.call(void 0, count);
|
246
246
|
}
|
247
247
|
|
248
248
|
// src/actions/public/getBytecode.ts
|
249
249
|
async function getBytecode(client, { address, blockNumber, blockTag = "latest" }) {
|
250
|
-
const blockNumberHex = blockNumber !== void 0 ?
|
250
|
+
const blockNumberHex = blockNumber !== void 0 ? _chunk3MFDRMZWjs.numberToHex.call(void 0, blockNumber) : void 0;
|
251
251
|
const hex = await client.request({
|
252
252
|
method: "eth_getCode",
|
253
253
|
params: [address, blockNumberHex || blockTag]
|
@@ -260,7 +260,7 @@ async function getBytecode(client, { address, blockNumber, blockTag = "latest" }
|
|
260
260
|
// src/actions/public/getChainId.ts
|
261
261
|
async function getChainId(client) {
|
262
262
|
const chainIdHex = await client.request({ method: "eth_chainId" });
|
263
|
-
return
|
263
|
+
return _chunk3MFDRMZWjs.hexToNumber.call(void 0, chainIdHex);
|
264
264
|
}
|
265
265
|
|
266
266
|
// src/actions/public/getFeeHistory.ts
|
@@ -270,16 +270,16 @@ async function getFeeHistory(client, {
|
|
270
270
|
blockTag = "latest",
|
271
271
|
rewardPercentiles
|
272
272
|
}) {
|
273
|
-
const blockNumberHex = blockNumber ?
|
273
|
+
const blockNumberHex = blockNumber ? _chunk3MFDRMZWjs.numberToHex.call(void 0, blockNumber) : void 0;
|
274
274
|
const feeHistory = await client.request({
|
275
275
|
method: "eth_feeHistory",
|
276
276
|
params: [
|
277
|
-
|
277
|
+
_chunk3MFDRMZWjs.numberToHex.call(void 0, blockCount),
|
278
278
|
blockNumberHex || blockTag,
|
279
279
|
rewardPercentiles
|
280
280
|
]
|
281
281
|
});
|
282
|
-
return
|
282
|
+
return _chunk3MFDRMZWjs.formatFeeHistory.call(void 0, feeHistory);
|
283
283
|
}
|
284
284
|
|
285
285
|
// src/actions/public/getFilterChanges.ts
|
@@ -289,7 +289,7 @@ async function getFilterChanges(client, { filter }) {
|
|
289
289
|
params: [filter.id]
|
290
290
|
});
|
291
291
|
return logs.map(
|
292
|
-
(log) => typeof log === "string" ? log :
|
292
|
+
(log) => typeof log === "string" ? log : _chunk3MFDRMZWjs.formatLog.call(void 0, log)
|
293
293
|
);
|
294
294
|
}
|
295
295
|
|
@@ -299,7 +299,7 @@ async function getFilterLogs(client, { filter }) {
|
|
299
299
|
method: "eth_getFilterLogs",
|
300
300
|
params: [filter.id]
|
301
301
|
});
|
302
|
-
return logs.map(
|
302
|
+
return logs.map(_chunk3MFDRMZWjs.formatLog);
|
303
303
|
}
|
304
304
|
|
305
305
|
// src/actions/public/getGasPrice.ts
|
@@ -326,8 +326,8 @@ async function createEventFilter(client, {
|
|
326
326
|
params: [
|
327
327
|
{
|
328
328
|
address,
|
329
|
-
fromBlock: typeof fromBlock === "bigint" ?
|
330
|
-
toBlock: typeof toBlock === "bigint" ?
|
329
|
+
fromBlock: typeof fromBlock === "bigint" ? _chunk3MFDRMZWjs.numberToHex.call(void 0, fromBlock) : fromBlock,
|
330
|
+
toBlock: typeof toBlock === "bigint" ? _chunk3MFDRMZWjs.numberToHex.call(void 0, toBlock) : toBlock,
|
331
331
|
...topics.length ? { topics } : {}
|
332
332
|
}
|
333
333
|
]
|
@@ -338,13 +338,13 @@ function buildFilterTopics({
|
|
338
338
|
event,
|
339
339
|
args
|
340
340
|
}) {
|
341
|
-
const eventName =
|
341
|
+
const eventName = _chunk3MFDRMZWjs.extractFunctionName.call(void 0, event);
|
342
342
|
const abi = unstable_parseAbi(event);
|
343
|
-
return
|
343
|
+
return _chunk3MFDRMZWjs.encodeEventTopics.call(void 0, { abi, eventName, args });
|
344
344
|
}
|
345
345
|
function unstable_parseAbi(definition) {
|
346
|
-
const name =
|
347
|
-
const params =
|
346
|
+
const name = _chunk3MFDRMZWjs.extractFunctionName.call(void 0, definition);
|
347
|
+
const params = _chunk3MFDRMZWjs.extractFunctionParams.call(void 0, definition);
|
348
348
|
return [
|
349
349
|
{
|
350
350
|
type: "event",
|
@@ -380,18 +380,18 @@ async function getLogs(client, {
|
|
380
380
|
{
|
381
381
|
address,
|
382
382
|
topics,
|
383
|
-
fromBlock: typeof fromBlock === "bigint" ?
|
384
|
-
toBlock: typeof toBlock === "bigint" ?
|
383
|
+
fromBlock: typeof fromBlock === "bigint" ? _chunk3MFDRMZWjs.numberToHex.call(void 0, fromBlock) : fromBlock,
|
384
|
+
toBlock: typeof toBlock === "bigint" ? _chunk3MFDRMZWjs.numberToHex.call(void 0, toBlock) : toBlock
|
385
385
|
}
|
386
386
|
]
|
387
387
|
});
|
388
388
|
}
|
389
|
-
return logs.map(
|
389
|
+
return logs.map(_chunk3MFDRMZWjs.formatLog);
|
390
390
|
}
|
391
391
|
|
392
392
|
// src/actions/public/getStorageAt.ts
|
393
393
|
async function getStorageAt(client, { address, blockNumber, blockTag = "latest", slot }) {
|
394
|
-
const blockNumberHex = blockNumber !== void 0 ?
|
394
|
+
const blockNumberHex = blockNumber !== void 0 ? _chunk3MFDRMZWjs.numberToHex.call(void 0, blockNumber) : void 0;
|
395
395
|
const data = await client.request({
|
396
396
|
method: "eth_getStorageAt",
|
397
397
|
params: [address, slot, blockNumberHex || blockTag]
|
@@ -407,7 +407,7 @@ async function getTransaction(client, {
|
|
407
407
|
hash,
|
408
408
|
index
|
409
409
|
}) {
|
410
|
-
const blockNumberHex = blockNumber !== void 0 ?
|
410
|
+
const blockNumberHex = blockNumber !== void 0 ? _chunk3MFDRMZWjs.numberToHex.call(void 0, blockNumber) : void 0;
|
411
411
|
let transaction = null;
|
412
412
|
if (hash) {
|
413
413
|
transaction = await client.request({
|
@@ -417,24 +417,24 @@ async function getTransaction(client, {
|
|
417
417
|
} else if (blockHash) {
|
418
418
|
transaction = await client.request({
|
419
419
|
method: "eth_getTransactionByBlockHashAndIndex",
|
420
|
-
params: [blockHash,
|
420
|
+
params: [blockHash, _chunk3MFDRMZWjs.numberToHex.call(void 0, index)]
|
421
421
|
});
|
422
422
|
} else if (blockNumberHex || blockTag) {
|
423
423
|
transaction = await client.request({
|
424
424
|
method: "eth_getTransactionByBlockNumberAndIndex",
|
425
|
-
params: [blockNumberHex || blockTag,
|
425
|
+
params: [blockNumberHex || blockTag, _chunk3MFDRMZWjs.numberToHex.call(void 0, index)]
|
426
426
|
});
|
427
427
|
}
|
428
428
|
if (!transaction)
|
429
|
-
throw new (0,
|
429
|
+
throw new (0, _chunk3MFDRMZWjs.TransactionNotFoundError)({
|
430
430
|
blockHash,
|
431
431
|
blockNumber,
|
432
432
|
blockTag,
|
433
433
|
hash,
|
434
434
|
index
|
435
435
|
});
|
436
|
-
return
|
437
|
-
formatter: _optionalChain([client, 'access', _6 => _6.chain, 'optionalAccess', _7 => _7.formatters, 'optionalAccess', _8 => _8.transaction]) ||
|
436
|
+
return _chunk3MFDRMZWjs.format.call(void 0, transaction, {
|
437
|
+
formatter: _optionalChain([client, 'access', _6 => _6.chain, 'optionalAccess', _7 => _7.formatters, 'optionalAccess', _8 => _8.transaction]) || _chunk3MFDRMZWjs.formatTransaction
|
438
438
|
});
|
439
439
|
}
|
440
440
|
|
@@ -454,9 +454,9 @@ async function getTransactionConfirmations(client, { hash, transactionReceipt })
|
|
454
454
|
async function getTransactionCount(client, { address, blockTag = "latest", blockNumber }) {
|
455
455
|
const count = await client.request({
|
456
456
|
method: "eth_getTransactionCount",
|
457
|
-
params: [address, blockNumber ?
|
457
|
+
params: [address, blockNumber ? _chunk3MFDRMZWjs.numberToHex.call(void 0, blockNumber) : blockTag]
|
458
458
|
});
|
459
|
-
return
|
459
|
+
return _chunk3MFDRMZWjs.hexToNumber.call(void 0, count);
|
460
460
|
}
|
461
461
|
|
462
462
|
// src/actions/public/getTransactionReceipt.ts
|
@@ -466,9 +466,9 @@ async function getTransactionReceipt(client, { hash }) {
|
|
466
466
|
params: [hash]
|
467
467
|
});
|
468
468
|
if (!receipt)
|
469
|
-
throw new (0,
|
470
|
-
return
|
471
|
-
formatter: _optionalChain([client, 'access', _11 => _11.chain, 'optionalAccess', _12 => _12.formatters, 'optionalAccess', _13 => _13.transactionReceipt]) ||
|
469
|
+
throw new (0, _chunk3MFDRMZWjs.TransactionReceiptNotFoundError)({ hash });
|
470
|
+
return _chunk3MFDRMZWjs.format.call(void 0, receipt, {
|
471
|
+
formatter: _optionalChain([client, 'access', _11 => _11.chain, 'optionalAccess', _12 => _12.formatters, 'optionalAccess', _13 => _13.transactionReceipt]) || _chunk3MFDRMZWjs.formatTransactionReceipt
|
472
472
|
});
|
473
473
|
}
|
474
474
|
|
@@ -480,7 +480,7 @@ async function readContract(client, {
|
|
480
480
|
functionName,
|
481
481
|
...callRequest
|
482
482
|
}) {
|
483
|
-
const calldata =
|
483
|
+
const calldata = _chunk3MFDRMZWjs.encodeFunctionData.call(void 0, {
|
484
484
|
abi,
|
485
485
|
args,
|
486
486
|
functionName
|
@@ -491,14 +491,14 @@ async function readContract(client, {
|
|
491
491
|
to: address,
|
492
492
|
...callRequest
|
493
493
|
});
|
494
|
-
return
|
494
|
+
return _chunk3MFDRMZWjs.decodeFunctionResult.call(void 0, {
|
495
495
|
abi,
|
496
496
|
args,
|
497
497
|
functionName,
|
498
498
|
data: data || "0x"
|
499
499
|
});
|
500
500
|
} catch (err) {
|
501
|
-
throw
|
501
|
+
throw _chunk3MFDRMZWjs.getContractError.call(void 0, err, {
|
502
502
|
abi,
|
503
503
|
address,
|
504
504
|
args,
|
@@ -519,7 +519,7 @@ async function multicall(client, args) {
|
|
519
519
|
} = args;
|
520
520
|
const calls = contracts.map(({ abi, address, args: args2, functionName }) => {
|
521
521
|
try {
|
522
|
-
const callData =
|
522
|
+
const callData = _chunk3MFDRMZWjs.encodeFunctionData.call(void 0, {
|
523
523
|
abi,
|
524
524
|
args: args2,
|
525
525
|
functionName
|
@@ -530,7 +530,7 @@ async function multicall(client, args) {
|
|
530
530
|
target: address
|
531
531
|
};
|
532
532
|
} catch (err) {
|
533
|
-
const error =
|
533
|
+
const error = _chunk3MFDRMZWjs.getContractError.call(void 0, err, {
|
534
534
|
abi,
|
535
535
|
address,
|
536
536
|
args: args2,
|
@@ -547,7 +547,7 @@ async function multicall(client, args) {
|
|
547
547
|
}
|
548
548
|
});
|
549
549
|
const results = await readContract(client, {
|
550
|
-
abi:
|
550
|
+
abi: _chunk3MFDRMZWjs.multicall3Abi,
|
551
551
|
address: multicallAddress,
|
552
552
|
args: [calls],
|
553
553
|
blockNumber,
|
@@ -559,17 +559,17 @@ async function multicall(client, args) {
|
|
559
559
|
const { abi, address, functionName, args: args2 } = contracts[i];
|
560
560
|
try {
|
561
561
|
if (callData === "0x")
|
562
|
-
throw new (0,
|
562
|
+
throw new (0, _chunk3MFDRMZWjs.AbiDecodingZeroDataError)();
|
563
563
|
if (!success)
|
564
|
-
throw new (0,
|
565
|
-
const result =
|
564
|
+
throw new (0, _chunk3MFDRMZWjs.RawContractError)({ data: returnData });
|
565
|
+
const result = _chunk3MFDRMZWjs.decodeFunctionResult.call(void 0, {
|
566
566
|
abi,
|
567
567
|
data: returnData,
|
568
568
|
functionName
|
569
569
|
});
|
570
570
|
return { result, status: "success" };
|
571
571
|
} catch (err) {
|
572
|
-
const error =
|
572
|
+
const error = _chunk3MFDRMZWjs.getContractError.call(void 0, err, {
|
573
573
|
abi,
|
574
574
|
address,
|
575
575
|
args: args2,
|
@@ -642,7 +642,7 @@ async function createContractEventFilter(client, {
|
|
642
642
|
fromBlock,
|
643
643
|
toBlock
|
644
644
|
}) {
|
645
|
-
const topics = eventName ?
|
645
|
+
const topics = eventName ? _chunk3MFDRMZWjs.encodeEventTopics.call(void 0, {
|
646
646
|
abi,
|
647
647
|
args,
|
648
648
|
eventName
|
@@ -652,8 +652,8 @@ async function createContractEventFilter(client, {
|
|
652
652
|
params: [
|
653
653
|
{
|
654
654
|
address,
|
655
|
-
fromBlock: typeof fromBlock === "bigint" ?
|
656
|
-
toBlock: typeof toBlock === "bigint" ?
|
655
|
+
fromBlock: typeof fromBlock === "bigint" ? _chunk3MFDRMZWjs.numberToHex.call(void 0, fromBlock) : fromBlock,
|
656
|
+
toBlock: typeof toBlock === "bigint" ? _chunk3MFDRMZWjs.numberToHex.call(void 0, toBlock) : toBlock,
|
657
657
|
topics
|
658
658
|
}
|
659
659
|
]
|
@@ -670,12 +670,12 @@ function poll(fn, { emitOnBegin, initialWaitTime, interval }) {
|
|
670
670
|
if (emitOnBegin)
|
671
671
|
data = await fn({ unpoll: unwatch });
|
672
672
|
const initialWait = await _asyncNullishCoalesce(await _optionalChain([initialWaitTime, 'optionalCall', _17 => _17(data)]), async () => ( interval));
|
673
|
-
await
|
673
|
+
await _chunk3MFDRMZWjs.wait.call(void 0, initialWait);
|
674
674
|
const poll2 = async () => {
|
675
675
|
if (!active)
|
676
676
|
return;
|
677
677
|
await fn({ unpoll: unwatch });
|
678
|
-
await
|
678
|
+
await _chunk3MFDRMZWjs.wait.call(void 0, interval);
|
679
679
|
poll2();
|
680
680
|
};
|
681
681
|
poll2();
|
@@ -982,7 +982,7 @@ async function waitForTransactionReceipt(client, {
|
|
982
982
|
return new Promise((resolve, reject) => {
|
983
983
|
if (timeout)
|
984
984
|
setTimeout(
|
985
|
-
() => reject(new (0,
|
985
|
+
() => reject(new (0, _chunk3MFDRMZWjs.WaitForTransactionReceiptTimeoutError)({ hash })),
|
986
986
|
timeout
|
987
987
|
);
|
988
988
|
const unobserve = observe(
|
@@ -1012,7 +1012,7 @@ async function waitForTransactionReceipt(client, {
|
|
1012
1012
|
return;
|
1013
1013
|
done(() => emit.resolve(receipt));
|
1014
1014
|
} catch (err) {
|
1015
|
-
if (transaction && (err instanceof
|
1015
|
+
if (transaction && (err instanceof _chunk3MFDRMZWjs.TransactionNotFoundError || err instanceof _chunk3MFDRMZWjs.TransactionReceiptNotFoundError)) {
|
1016
1016
|
replacedTransaction = transaction;
|
1017
1017
|
const block = await getBlock(client, {
|
1018
1018
|
blockNumber,
|
@@ -1088,4 +1088,4 @@ async function waitForTransactionReceipt(client, {
|
|
1088
1088
|
|
1089
1089
|
|
1090
1090
|
exports.call = call; exports.simulateContract = simulateContract; exports.createPendingTransactionFilter = createPendingTransactionFilter; exports.createBlockFilter = createBlockFilter; 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.getLogs = getLogs; exports.getStorageAt = getStorageAt; exports.getTransaction = getTransaction; exports.getTransactionConfirmations = getTransactionConfirmations; exports.getTransactionCount = getTransactionCount; exports.getTransactionReceipt = getTransactionReceipt; exports.readContract = readContract; exports.multicall = multicall; exports.uninstallFilter = uninstallFilter; exports.waitForTransactionReceipt = waitForTransactionReceipt; exports.watchBlockNumber = watchBlockNumber; exports.watchBlocks = watchBlocks; exports.watchContractEvent = watchContractEvent; exports.watchEvent = watchEvent; exports.watchPendingTransactions = watchPendingTransactions;
|
1091
|
-
//# sourceMappingURL=chunk-
|
1091
|
+
//# sourceMappingURL=chunk-XB55RCBE.js.map
|
File without changes
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Abi, AbiFunction, ExtractAbiFunction, AbiParametersToPrimitiveTypes, AbiError, ExtractAbiError, AbiEvent, ExtractAbiEvent, ExtractAbiErrorNames, ExtractAbiEventNames, AbiStateMutability, ExtractAbiFunctionNames, Narrow, AbiParameter, AbiParameterToPrimitiveType, AbiType, AbiTypeToPrimitiveType } from 'abitype';
|
2
|
-
import { G as LogTopic, H as Hex, A as Address, P as Prettify, s as TransactionRequest, N as NoUndefined, I as Trim } from './chain-
|
2
|
+
import { G as LogTopic, H as Hex, A as Address, P as Prettify, s as TransactionRequest, N as NoUndefined, I as Trim } from './chain-9a8c6614.js';
|
3
3
|
|
4
4
|
type AbiItem = Abi[number];
|
5
5
|
type HashedEventTypes = 'string' | 'bytes' | 'tuple' | `${string}[${string}]`;
|
package/dist/contract.d.ts
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
export { D as DecodeAbiArgs, a as DecodeEventLogArgs, b as DecodeEventLogResponse, c as DecodeFunctionDataArgs, d as DecodeFunctionResultArgs, e as DecodeFunctionResultResponse, E as EncodeAbiArgs, f as EncodeDeployDataArgs, g as EncodeErrorResultArgs, h as EncodeEventTopicsArgs, i as EncodeFunctionDataArgs, j as EncodeFunctionResultArgs, G as GetAbiItemArgs, k as decodeAbi, l as decodeEventLog, m as decodeFunctionData, n as decodeFunctionResult, o as encodeAbi, p as encodeDeployData, q as encodeErrorResult, r as encodeEventTopics, s as encodeFunctionData, t as encodeFunctionResult, v as formatAbiItem, u as formatAbiItemWithArgs, w as getAbiItem } from './getAbiItem-
|
2
|
-
export { a as DecodeErrorResultArgs, D as DecodeErrorResultResponse, d as decodeErrorResult } from './decodeErrorResult-
|
1
|
+
export { D as DecodeAbiArgs, a as DecodeEventLogArgs, b as DecodeEventLogResponse, c as DecodeFunctionDataArgs, d as DecodeFunctionResultArgs, e as DecodeFunctionResultResponse, E as EncodeAbiArgs, f as EncodeDeployDataArgs, g as EncodeErrorResultArgs, h as EncodeEventTopicsArgs, i as EncodeFunctionDataArgs, j as EncodeFunctionResultArgs, G as GetAbiItemArgs, k as decodeAbi, l as decodeEventLog, m as decodeFunctionData, n as decodeFunctionResult, o as encodeAbi, p as encodeDeployData, q as encodeErrorResult, r as encodeEventTopics, s as encodeFunctionData, t as encodeFunctionResult, v as formatAbiItem, u as formatAbiItemWithArgs, w as getAbiItem } from './getAbiItem-540089dd.js';
|
2
|
+
export { a as DecodeErrorResultArgs, D as DecodeErrorResultResponse, d as decodeErrorResult } from './decodeErrorResult-b0d3ce71.js';
|
3
3
|
import { Abi, Narrow } from 'abitype';
|
4
|
-
import { C as Chain, H as Hex, A as Address, b as BlockTag, L as Log } from './chain-
|
5
|
-
import { C as ContractConfig, E as ExtractResultFromAbi, a as ExtractConstructorArgsFromAbi, G as GetValue, b as ExtractEventNameFromAbi, c as ExtractEventArgsFromAbi } from './contract-
|
6
|
-
import { P as PublicClient } from './createPublicClient-
|
7
|
-
import { W as WalletClient } from './createWalletClient-
|
8
|
-
import { S as SendTransactionArgs, a as SendTransactionResponse } from './sendTransaction-
|
9
|
-
import { C as CallArgs } from './call-
|
10
|
-
export { G as GetBytecodeArgs, a as GetBytecodeResponse, O as OnLogs, b as OnLogsResponse, g as getBytecode } from './watchEvent-
|
11
|
-
export { R as ReadContractArgs, a as ReadContractResponse, r as readContract } from './readContract-
|
4
|
+
import { C as Chain, H as Hex, A as Address, b as BlockTag, L as Log } from './chain-9a8c6614.js';
|
5
|
+
import { C as ContractConfig, E as ExtractResultFromAbi, a as ExtractConstructorArgsFromAbi, G as GetValue, b as ExtractEventNameFromAbi, c as ExtractEventArgsFromAbi } from './contract-3b4a1df6.js';
|
6
|
+
import { P as PublicClient } from './createPublicClient-9823f081.js';
|
7
|
+
import { W as WalletClient } from './createWalletClient-6dbbe0ee.js';
|
8
|
+
import { S as SendTransactionArgs, a as SendTransactionResponse } from './sendTransaction-50d22f3e.js';
|
9
|
+
import { C as CallArgs } from './call-14050d5c.js';
|
10
|
+
export { G as GetBytecodeArgs, a as GetBytecodeResponse, O as OnLogs, b as OnLogsResponse, g as getBytecode } from './watchEvent-ca77f9e9.js';
|
11
|
+
export { R as ReadContractArgs, a as ReadContractResponse, r as readContract } from './readContract-5c96b3bc.js';
|
12
12
|
import 'abitype/dist/abi-78346466';
|
13
13
|
import '@wagmi/chains';
|
14
|
-
import './eip1193-
|
15
|
-
import './createClient-
|
16
|
-
import './transactionRequest-
|
14
|
+
import './eip1193-bbebfb3d.js';
|
15
|
+
import './createClient-cc01b906.js';
|
16
|
+
import './transactionRequest-37f60d32.js';
|
17
17
|
|
18
18
|
type MAXIMUM_DEPTH = 20;
|
19
19
|
type Contract<TAbi extends Abi | readonly unknown[] = Abi | readonly unknown[], TFunctionName extends string = string> = {
|
package/dist/contract.js
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
|
7
7
|
|
8
|
-
var
|
8
|
+
var _chunkXB55RCBEjs = require('./chunk-XB55RCBE.js');
|
9
9
|
|
10
10
|
|
11
11
|
|
12
|
-
var
|
12
|
+
var _chunk4MP6LO5Vjs = require('./chunk-4MP6LO5V.js');
|
13
13
|
|
14
14
|
|
15
15
|
|
@@ -25,7 +25,7 @@ var _chunk2PFNLP3Fjs = require('./chunk-2PFNLP3F.js');
|
|
25
25
|
|
26
26
|
|
27
27
|
|
28
|
-
var
|
28
|
+
var _chunk3MFDRMZWjs = require('./chunk-3MFDRMZW.js');
|
29
29
|
|
30
30
|
|
31
31
|
|
@@ -49,5 +49,5 @@ var _chunkNXCI5KQCjs = require('./chunk-NXCI5KQC.js');
|
|
49
49
|
|
50
50
|
|
51
51
|
|
52
|
-
exports.decodeAbi =
|
52
|
+
exports.decodeAbi = _chunk3MFDRMZWjs.decodeAbi; exports.decodeErrorResult = _chunk3MFDRMZWjs.decodeErrorResult; exports.decodeEventLog = _chunk3MFDRMZWjs.decodeEventLog; exports.decodeFunctionData = _chunk3MFDRMZWjs.decodeFunctionData; exports.decodeFunctionResult = _chunk3MFDRMZWjs.decodeFunctionResult; exports.deployContract = _chunk4MP6LO5Vjs.deployContract; exports.encodeAbi = _chunk3MFDRMZWjs.encodeAbi; exports.encodeDeployData = _chunk3MFDRMZWjs.encodeDeployData; exports.encodeErrorResult = _chunk3MFDRMZWjs.encodeErrorResult; exports.encodeEventTopics = _chunk3MFDRMZWjs.encodeEventTopics; exports.encodeFunctionData = _chunk3MFDRMZWjs.encodeFunctionData; exports.encodeFunctionResult = _chunk3MFDRMZWjs.encodeFunctionResult; exports.formatAbiItem = _chunk3MFDRMZWjs.formatAbiItem; exports.formatAbiItemWithArgs = _chunk3MFDRMZWjs.formatAbiItemWithArgs; exports.getAbiItem = _chunk3MFDRMZWjs.getAbiItem; exports.getBytecode = _chunkXB55RCBEjs.getBytecode; exports.getStorageAt = _chunkXB55RCBEjs.getStorageAt; exports.multicall = _chunkXB55RCBEjs.multicall; exports.readContract = _chunkXB55RCBEjs.readContract; exports.simulateContract = _chunkXB55RCBEjs.simulateContract; exports.watchContractEvent = _chunkXB55RCBEjs.watchContractEvent; exports.writeContract = _chunk4MP6LO5Vjs.writeContract;
|
53
53
|
//# sourceMappingURL=contract.js.map
|
package/dist/contract.mjs
CHANGED
@@ -5,11 +5,11 @@ import {
|
|
5
5
|
readContract,
|
6
6
|
simulateContract,
|
7
7
|
watchContractEvent
|
8
|
-
} from "./chunk-
|
8
|
+
} from "./chunk-PSLMBGQ4.mjs";
|
9
9
|
import {
|
10
10
|
deployContract,
|
11
11
|
writeContract
|
12
|
-
} from "./chunk-
|
12
|
+
} from "./chunk-MV7PYF3D.mjs";
|
13
13
|
import {
|
14
14
|
decodeAbi,
|
15
15
|
decodeErrorResult,
|
@@ -25,7 +25,7 @@ import {
|
|
25
25
|
formatAbiItem,
|
26
26
|
formatAbiItemWithArgs,
|
27
27
|
getAbiItem
|
28
|
-
} from "./chunk-
|
28
|
+
} from "./chunk-RPR4ZSAP.mjs";
|
29
29
|
export {
|
30
30
|
decodeAbi,
|
31
31
|
decodeErrorResult,
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { C as Chain } from './chain-
|
2
|
-
import { R as Requests } from './eip1193-
|
1
|
+
import { C as Chain } from './chain-9a8c6614.js';
|
2
|
+
import { R as Requests } from './eip1193-bbebfb3d.js';
|
3
3
|
|
4
4
|
type BaseRpcRequests = {
|
5
5
|
request(...args: any): Promise<any>;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { P as PublicRequests } from './eip1193-
|
2
|
-
import { a as Transport, b as ClientConfig, C as Client } from './createClient-
|
3
|
-
import { C as Chain } from './chain-
|
1
|
+
import { P as PublicRequests } from './eip1193-bbebfb3d.js';
|
2
|
+
import { a as Transport, b as ClientConfig, C as Client } from './createClient-cc01b906.js';
|
3
|
+
import { C as Chain } from './chain-9a8c6614.js';
|
4
4
|
|
5
5
|
type PublicClientConfig<TTransport extends Transport = Transport, TChain extends Chain = Chain> = Pick<ClientConfig<TTransport, TChain>, 'chain' | 'key' | 'name' | 'pollingInterval' | 'transport'>;
|
6
6
|
type PublicClient<TTransport extends Transport = Transport, TChain extends Chain = Chain> = Client<TTransport, TChain, PublicRequests>;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { T as TestRequests } from './eip1193-
|
2
|
-
import { a as Transport, b as ClientConfig, C as Client } from './createClient-
|
3
|
-
import { C as Chain } from './chain-
|
1
|
+
import { T as TestRequests } from './eip1193-bbebfb3d.js';
|
2
|
+
import { a as Transport, b as ClientConfig, C as Client } from './createClient-cc01b906.js';
|
3
|
+
import { C as Chain } from './chain-9a8c6614.js';
|
4
4
|
|
5
5
|
type TestClientModes = 'anvil' | 'hardhat';
|
6
6
|
type TestClientConfig<TTransport extends Transport = Transport, TChain extends Chain = Chain, TMode extends TestClientModes = TestClientModes> = {
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { S as SignableRequests, W as WalletRequests } from './eip1193-
|
2
|
-
import { a as Transport, b as ClientConfig, C as Client } from './createClient-
|
3
|
-
import { C as Chain } from './chain-
|
1
|
+
import { S as SignableRequests, W as WalletRequests } from './eip1193-bbebfb3d.js';
|
2
|
+
import { a as Transport, b as ClientConfig, C as Client } from './createClient-cc01b906.js';
|
3
|
+
import { C as Chain } from './chain-9a8c6614.js';
|
4
4
|
|
5
5
|
type WalletClientConfig<TTransport extends Transport = Transport, TChain extends Chain = Chain> = {
|
6
6
|
chain?: ClientConfig<TTransport, TChain>['chain'];
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Abi } from 'abitype';
|
2
|
-
import { H as Hex } from './chain-
|
3
|
-
import { A as AbiItem } from './contract-
|
2
|
+
import { H as Hex } from './chain-9a8c6614.js';
|
3
|
+
import { A as AbiItem } from './contract-3b4a1df6.js';
|
4
4
|
|
5
5
|
type DecodeErrorResultArgs = {
|
6
6
|
abi?: Abi;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { A as Address, a as Hash, Q as Quantity, q as RpcTransactionRequest, k as RpcBlockNumber, b as BlockTag, j as RpcBlockIdentifier, H as Hex, J as RpcEstimateGasParameters, l as RpcFeeHistory, R as RpcBlock, n as RpcLog, G as LogTopic, o as RpcTransaction, p as RpcTransactionReceipt, r as RpcUncle } from './chain-
|
1
|
+
import { A as Address, a as Hash, Q as Quantity, q as RpcTransactionRequest, k as RpcBlockNumber, b as BlockTag, j as RpcBlockIdentifier, H as Hex, J as RpcEstimateGasParameters, l as RpcFeeHistory, R as RpcBlock, n as RpcLog, G as LogTopic, o as RpcTransaction, p as RpcTransactionReceipt, r as RpcUncle } from './chain-9a8c6614.js';
|
2
2
|
|
3
3
|
declare class RpcError extends Error {
|
4
4
|
code: number;
|
package/dist/ens.d.ts
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
import { P as Prettify, A as Address } from './chain-
|
2
|
-
import { P as PublicClient } from './createPublicClient-
|
3
|
-
import { R as ReadContractArgs } from './readContract-
|
1
|
+
import { P as Prettify, A as Address } from './chain-9a8c6614.js';
|
2
|
+
import { P as PublicClient } from './createPublicClient-9823f081.js';
|
3
|
+
import { R as ReadContractArgs } from './readContract-5c96b3bc.js';
|
4
4
|
import '@wagmi/chains';
|
5
|
-
import './eip1193-
|
6
|
-
import './createClient-
|
5
|
+
import './eip1193-bbebfb3d.js';
|
6
|
+
import './createClient-cc01b906.js';
|
7
7
|
import 'abitype';
|
8
|
-
import './contract-
|
9
|
-
import './call-
|
10
|
-
import './transactionRequest-
|
8
|
+
import './contract-3b4a1df6.js';
|
9
|
+
import './call-14050d5c.js';
|
10
|
+
import './transactionRequest-37f60d32.js';
|
11
11
|
|
12
12
|
type GetEnsAddressArgs = Prettify<Pick<ReadContractArgs, 'blockNumber' | 'blockTag'> & {
|
13
13
|
/** ENS name to get address. */
|