viem 0.2.11 → 0.2.12
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/abi.js +2 -2
- package/dist/abi.mjs +1 -1
- package/dist/accounts/index.js +17 -17
- package/dist/accounts/index.mjs +2 -2
- package/dist/chains.js +89 -89
- package/dist/chains.mjs +1 -1
- package/dist/{chunk-YAP7NKRV.js → chunk-4ZTX23MO.js} +6 -6
- package/dist/{chunk-HU3K54ST.mjs → chunk-6T6EZJGF.mjs} +6 -6
- package/dist/chunk-6T6EZJGF.mjs.map +1 -0
- package/dist/{chunk-MOM6LTRA.js → chunk-BKEDQ7BF.js} +88 -88
- package/dist/chunk-BKEDQ7BF.js.map +1 -0
- package/dist/{chunk-YABBVXPP.mjs → chunk-L6YGD2ZT.mjs} +2 -2
- package/dist/contract.js +2 -2
- package/dist/contract.mjs +1 -1
- package/dist/ens.js +2 -2
- package/dist/ens.mjs +1 -1
- package/dist/ethers.js +4 -4
- package/dist/ethers.mjs +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +94 -94
- package/dist/index.mjs +1 -1
- package/dist/public.js +2 -2
- package/dist/public.mjs +1 -1
- package/dist/test.js +2 -2
- package/dist/test.mjs +1 -1
- package/dist/utils/index.js +2 -2
- package/dist/utils/index.mjs +1 -1
- package/dist/wallet.js +2 -2
- package/dist/wallet.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-HU3K54ST.mjs.map +0 -1
- package/dist/chunk-MOM6LTRA.js.map +0 -1
- /package/dist/{chunk-YAP7NKRV.js.map → chunk-4ZTX23MO.js.map} +0 -0
- /package/dist/{chunk-YABBVXPP.mjs.map → chunk-L6YGD2ZT.mjs.map} +0 -0
@@ -20,7 +20,7 @@ var _abitype = require('abitype');
|
|
20
20
|
var package_default = {
|
21
21
|
name: "viem",
|
22
22
|
description: "TypeScript Interface for Ethereum",
|
23
|
-
version: "0.2.
|
23
|
+
version: "0.2.12",
|
24
24
|
scripts: {
|
25
25
|
anvil: "dotenv -- sh -c 'anvil --fork-url $VITE_ANVIL_FORK_URL --fork-block-number $VITE_ANVIL_BLOCK_NUMBER --block-time $VITE_ANVIL_BLOCK_TIME'",
|
26
26
|
bench: "vitest bench --no-threads",
|
@@ -1488,14 +1488,14 @@ var RequestError = class extends BaseError {
|
|
1488
1488
|
super(shortMessage, {
|
1489
1489
|
cause: err,
|
1490
1490
|
docsPath: docsPath6,
|
1491
|
-
metaMessages
|
1491
|
+
metaMessages: metaMessages || _optionalChain([err, 'optionalAccess', _22 => _22.metaMessages])
|
1492
1492
|
});
|
1493
1493
|
this.name = err.name;
|
1494
1494
|
}
|
1495
1495
|
};
|
1496
1496
|
var RpcRequestError = class extends RequestError {
|
1497
1497
|
constructor(err, { docsPath: docsPath6, shortMessage }) {
|
1498
|
-
super(err, { docsPath: docsPath6,
|
1498
|
+
super(err, { docsPath: docsPath6, shortMessage });
|
1499
1499
|
__publicField(this, "code");
|
1500
1500
|
this.code = err.code;
|
1501
1501
|
this.name = err.name;
|
@@ -1601,7 +1601,7 @@ var JsonRpcVersionUnsupportedError = class extends RpcRequestError {
|
|
1601
1601
|
__publicField(this, "code", -32006);
|
1602
1602
|
}
|
1603
1603
|
};
|
1604
|
-
var UserRejectedRequestError = class extends
|
1604
|
+
var UserRejectedRequestError = class extends RequestError {
|
1605
1605
|
constructor(err) {
|
1606
1606
|
super(err, {
|
1607
1607
|
shortMessage: "User rejected the request."
|
@@ -1610,7 +1610,7 @@ var UserRejectedRequestError = class extends RpcRequestError {
|
|
1610
1610
|
__publicField(this, "code", 4001);
|
1611
1611
|
}
|
1612
1612
|
};
|
1613
|
-
var SwitchChainError = class extends
|
1613
|
+
var SwitchChainError = class extends RequestError {
|
1614
1614
|
constructor(err) {
|
1615
1615
|
super(err, {
|
1616
1616
|
shortMessage: "An error occurred when attempting to switch chain."
|
@@ -2122,9 +2122,9 @@ function rlpToBytes(bytes, offset = 0) {
|
|
2122
2122
|
var paramsRegex = /((function|event)\s)?(.*)(\((.*)\))/;
|
2123
2123
|
function extractFunctionParts(def) {
|
2124
2124
|
const parts = def.match(paramsRegex);
|
2125
|
-
const type = _optionalChain([parts, 'optionalAccess',
|
2126
|
-
const name = _optionalChain([parts, 'optionalAccess',
|
2127
|
-
const params = _optionalChain([parts, 'optionalAccess',
|
2125
|
+
const type = _optionalChain([parts, 'optionalAccess', _23 => _23[2]]) || void 0;
|
2126
|
+
const name = _optionalChain([parts, 'optionalAccess', _24 => _24[3]]);
|
2127
|
+
const params = _optionalChain([parts, 'optionalAccess', _25 => _25[5]]) || void 0;
|
2128
2128
|
return { type, name, params };
|
2129
2129
|
}
|
2130
2130
|
function extractFunctionName(def) {
|
@@ -2132,8 +2132,8 @@ function extractFunctionName(def) {
|
|
2132
2132
|
}
|
2133
2133
|
function extractFunctionParams(def) {
|
2134
2134
|
const params = extractFunctionParts(def).params;
|
2135
|
-
const splitParams = _optionalChain([params, 'optionalAccess',
|
2136
|
-
return _optionalChain([splitParams, 'optionalAccess',
|
2135
|
+
const splitParams = _optionalChain([params, 'optionalAccess', _26 => _26.split, 'call', _27 => _27(","), 'access', _28 => _28.map, 'call', _29 => _29((x) => x.trim().split(" "))]);
|
2136
|
+
return _optionalChain([splitParams, 'optionalAccess', _30 => _30.map, 'call', _31 => _31((param) => ({
|
2137
2137
|
type: param[0],
|
2138
2138
|
name: param[1] === "indexed" ? param[2] : param[1],
|
2139
2139
|
...param[1] === "indexed" ? { indexed: true } : {}
|
@@ -2546,7 +2546,7 @@ function decodeArray(data, {
|
|
2546
2546
|
}
|
2547
2547
|
if (hasDynamicChild(param)) {
|
2548
2548
|
const arrayComponents = getArrayComponents(param.type);
|
2549
|
-
const dynamicChild = !_optionalChain([arrayComponents, 'optionalAccess',
|
2549
|
+
const dynamicChild = !_optionalChain([arrayComponents, 'optionalAccess', _32 => _32[0]]);
|
2550
2550
|
let consumed2 = 0;
|
2551
2551
|
let value2 = [];
|
2552
2552
|
for (let i = 0; i < length; ++i) {
|
@@ -2622,7 +2622,7 @@ function decodeTuple(data, { param, position }) {
|
|
2622
2622
|
position: consumed
|
2623
2623
|
});
|
2624
2624
|
consumed += decodedChild.consumed;
|
2625
|
-
value[hasUnnamedChild ? i : _optionalChain([component, 'optionalAccess',
|
2625
|
+
value[hasUnnamedChild ? i : _optionalChain([component, 'optionalAccess', _33 => _33.name])] = decodedChild.value;
|
2626
2626
|
}
|
2627
2627
|
return { consumed: 32, value };
|
2628
2628
|
}
|
@@ -2634,7 +2634,7 @@ function decodeTuple(data, { param, position }) {
|
|
2634
2634
|
position: position + consumed
|
2635
2635
|
});
|
2636
2636
|
consumed += decodedChild.consumed;
|
2637
|
-
value[hasUnnamedChild ? i : _optionalChain([component, 'optionalAccess',
|
2637
|
+
value[hasUnnamedChild ? i : _optionalChain([component, 'optionalAccess', _34 => _34.name])] = decodedChild.value;
|
2638
2638
|
}
|
2639
2639
|
return { consumed, value };
|
2640
2640
|
}
|
@@ -2647,7 +2647,7 @@ function hasDynamicChild(param) {
|
|
2647
2647
|
if (type.endsWith("[]"))
|
2648
2648
|
return true;
|
2649
2649
|
if (type === "tuple")
|
2650
|
-
return _optionalChain([param, 'access',
|
2650
|
+
return _optionalChain([param, 'access', _35 => _35.components, 'optionalAccess', _36 => _36.some, 'call', _37 => _37(hasDynamicChild)]);
|
2651
2651
|
const arrayComponents = getArrayComponents(param.type);
|
2652
2652
|
if (arrayComponents && hasDynamicChild({ ...param, type: arrayComponents[1] }))
|
2653
2653
|
return true;
|
@@ -2718,7 +2718,7 @@ function decodeEventLog({
|
|
2718
2718
|
docsPath
|
2719
2719
|
});
|
2720
2720
|
const { name, inputs } = abiItem;
|
2721
|
-
const isUnnamed = _optionalChain([inputs, 'optionalAccess',
|
2721
|
+
const isUnnamed = _optionalChain([inputs, 'optionalAccess', _38 => _38.some, 'call', _39 => _39((x) => !("name" in x && x.name))]);
|
2722
2722
|
let args = isUnnamed ? [] : {};
|
2723
2723
|
if (argTopics.length > 0) {
|
2724
2724
|
const indexedInputs = inputs.filter((x) => "indexed" in x && x.indexed);
|
@@ -2949,8 +2949,8 @@ function encodeEventTopics({ abi, eventName, args }) {
|
|
2949
2949
|
const signature = getEventSelector(definition);
|
2950
2950
|
let topics = [];
|
2951
2951
|
if (args && "inputs" in abiItem) {
|
2952
|
-
const args_ = Array.isArray(args) ? args : _nullishCoalesce(_optionalChain([abiItem, 'access',
|
2953
|
-
topics = _nullishCoalesce(_optionalChain([abiItem, 'access',
|
2952
|
+
const args_ = Array.isArray(args) ? args : _nullishCoalesce(_optionalChain([abiItem, 'access', _40 => _40.inputs, 'optionalAccess', _41 => _41.map, 'call', _42 => _42((x) => args[x.name])]), () => ( []));
|
2953
|
+
topics = _nullishCoalesce(_optionalChain([abiItem, 'access', _43 => _43.inputs, 'optionalAccess', _44 => _44.filter, 'call', _45 => _45((param) => "indexed" in param && param.indexed), 'access', _46 => _46.map, 'call', _47 => _47(
|
2954
2954
|
(param, i) => Array.isArray(args_[i]) ? args_[i].map(
|
2955
2955
|
(_, j) => encodeArg({ param, value: args_[i][j] })
|
2956
2956
|
) : args_[i] ? encodeArg({ param, value: args_[i] }) : null
|
@@ -3205,7 +3205,7 @@ function withTimeout(fn, {
|
|
3205
3205
|
}
|
3206
3206
|
}, timeout);
|
3207
3207
|
}
|
3208
|
-
resolve(await fn({ signal: _optionalChain([controller, 'optionalAccess',
|
3208
|
+
resolve(await fn({ signal: _optionalChain([controller, 'optionalAccess', _48 => _48.signal]) }));
|
3209
3209
|
} catch (err) {
|
3210
3210
|
if (err.name === "AbortError")
|
3211
3211
|
reject(errorInstance);
|
@@ -3271,8 +3271,8 @@ function buildRequest(request, {
|
|
3271
3271
|
{
|
3272
3272
|
delay: ({ count, error }) => {
|
3273
3273
|
if (error && error instanceof HttpRequestError) {
|
3274
|
-
const retryAfter = _optionalChain([error, 'optionalAccess',
|
3275
|
-
if (_optionalChain([retryAfter, 'optionalAccess',
|
3274
|
+
const retryAfter = _optionalChain([error, 'optionalAccess', _49 => _49.headers, 'optionalAccess', _50 => _50.get, 'call', _51 => _51("Retry-After")]);
|
3275
|
+
if (_optionalChain([retryAfter, 'optionalAccess', _52 => _52.match, 'call', _53 => _53(/\d/)]))
|
3276
3276
|
return parseInt(retryAfter) * 1e3;
|
3277
3277
|
}
|
3278
3278
|
return ~~(1 << count) * retryDelay;
|
@@ -3292,7 +3292,7 @@ function getChainContractAddress({
|
|
3292
3292
|
chain,
|
3293
3293
|
contract: name
|
3294
3294
|
}) {
|
3295
|
-
const contract = _optionalChain([chain, 'optionalAccess',
|
3295
|
+
const contract = _optionalChain([chain, 'optionalAccess', _54 => _54.contracts, 'optionalAccess', _55 => _55[name]]);
|
3296
3296
|
if (!contract)
|
3297
3297
|
throw new ChainDoesNotSupportContract({
|
3298
3298
|
chain,
|
@@ -3329,7 +3329,7 @@ function defineFormatter({
|
|
3329
3329
|
}
|
3330
3330
|
return {
|
3331
3331
|
...formatted,
|
3332
|
-
..._optionalChain([formatOverride, 'optionalCall',
|
3332
|
+
..._optionalChain([formatOverride, 'optionalCall', _56 => _56(data)])
|
3333
3333
|
};
|
3334
3334
|
};
|
3335
3335
|
}
|
@@ -3372,7 +3372,7 @@ var defineTransaction = defineFormatter({ format: formatTransaction });
|
|
3372
3372
|
|
3373
3373
|
// src/utils/formatters/block.ts
|
3374
3374
|
function formatBlock(block) {
|
3375
|
-
const transactions = _optionalChain([block, 'access',
|
3375
|
+
const transactions = _optionalChain([block, 'access', _57 => _57.transactions, 'optionalAccess', _58 => _58.map, 'call', _59 => _59((transaction) => {
|
3376
3376
|
if (typeof transaction === "string")
|
3377
3377
|
return transaction;
|
3378
3378
|
return formatTransaction(transaction);
|
@@ -3401,7 +3401,7 @@ function extract(value, { formatter }) {
|
|
3401
3401
|
return {};
|
3402
3402
|
const keys = Object.keys(formatter({}));
|
3403
3403
|
return keys.reduce((data, key) => {
|
3404
|
-
if (_optionalChain([value, 'optionalAccess',
|
3404
|
+
if (_optionalChain([value, 'optionalAccess', _60 => _60.hasOwnProperty, 'call', _61 => _61(key)])) {
|
3405
3405
|
;
|
3406
3406
|
data[key] = value[key];
|
3407
3407
|
}
|
@@ -3415,7 +3415,7 @@ function formatFeeHistory(feeHistory) {
|
|
3415
3415
|
baseFeePerGas: feeHistory.baseFeePerGas.map((value) => BigInt(value)),
|
3416
3416
|
gasUsedRatio: feeHistory.gasUsedRatio,
|
3417
3417
|
oldestBlock: BigInt(feeHistory.oldestBlock),
|
3418
|
-
reward: _optionalChain([feeHistory, 'access',
|
3418
|
+
reward: _optionalChain([feeHistory, 'access', _62 => _62.reward, 'optionalAccess', _63 => _63.map, 'call', _64 => _64(
|
3419
3419
|
(reward) => reward.map((value) => BigInt(value))
|
3420
3420
|
)])
|
3421
3421
|
};
|
@@ -3483,34 +3483,34 @@ function getNodeError(err, args) {
|
|
3483
3483
|
if (FeeCapTooHighError.nodeMessage.test(message))
|
3484
3484
|
return new FeeCapTooHighError({
|
3485
3485
|
cause: err,
|
3486
|
-
maxFeePerGas: _optionalChain([args, 'optionalAccess',
|
3486
|
+
maxFeePerGas: _optionalChain([args, 'optionalAccess', _65 => _65.maxFeePerGas])
|
3487
3487
|
});
|
3488
3488
|
else if (FeeCapTooLowError.nodeMessage.test(message))
|
3489
3489
|
return new FeeCapTooLowError({
|
3490
3490
|
cause: err,
|
3491
|
-
maxFeePerGas: _optionalChain([args, 'optionalAccess',
|
3491
|
+
maxFeePerGas: _optionalChain([args, 'optionalAccess', _66 => _66.maxFeePerGas])
|
3492
3492
|
});
|
3493
3493
|
else if (NonceTooHighError.nodeMessage.test(message))
|
3494
|
-
return new NonceTooHighError({ cause: err, nonce: _optionalChain([args, 'optionalAccess',
|
3494
|
+
return new NonceTooHighError({ cause: err, nonce: _optionalChain([args, 'optionalAccess', _67 => _67.nonce]) });
|
3495
3495
|
else if (NonceTooLowError.nodeMessage.test(message))
|
3496
|
-
return new NonceTooLowError({ cause: err, nonce: _optionalChain([args, 'optionalAccess',
|
3496
|
+
return new NonceTooLowError({ cause: err, nonce: _optionalChain([args, 'optionalAccess', _68 => _68.nonce]) });
|
3497
3497
|
else if (NonceMaxValueError.nodeMessage.test(message))
|
3498
|
-
return new NonceMaxValueError({ cause: err, nonce: _optionalChain([args, 'optionalAccess',
|
3498
|
+
return new NonceMaxValueError({ cause: err, nonce: _optionalChain([args, 'optionalAccess', _69 => _69.nonce]) });
|
3499
3499
|
else if (InsufficientFundsError.nodeMessage.test(message))
|
3500
3500
|
return new InsufficientFundsError({ cause: err });
|
3501
3501
|
else if (IntrinsicGasTooHighError.nodeMessage.test(message))
|
3502
|
-
return new IntrinsicGasTooHighError({ cause: err, gas: _optionalChain([args, 'optionalAccess',
|
3502
|
+
return new IntrinsicGasTooHighError({ cause: err, gas: _optionalChain([args, 'optionalAccess', _70 => _70.gas]) });
|
3503
3503
|
else if (IntrinsicGasTooLowError.nodeMessage.test(message))
|
3504
|
-
return new IntrinsicGasTooLowError({ cause: err, gas: _optionalChain([args, 'optionalAccess',
|
3504
|
+
return new IntrinsicGasTooLowError({ cause: err, gas: _optionalChain([args, 'optionalAccess', _71 => _71.gas]) });
|
3505
3505
|
else if (TransactionTypeNotSupportedError.nodeMessage.test(message))
|
3506
3506
|
return new TransactionTypeNotSupportedError({ cause: err });
|
3507
3507
|
else if (TipAboveFeeCapError.nodeMessage.test(message))
|
3508
3508
|
return new TipAboveFeeCapError({
|
3509
3509
|
cause: err,
|
3510
|
-
maxFeePerGas: _optionalChain([args, 'optionalAccess',
|
3511
|
-
maxPriorityFeePerGas: _optionalChain([args, 'optionalAccess',
|
3510
|
+
maxFeePerGas: _optionalChain([args, 'optionalAccess', _72 => _72.maxFeePerGas]),
|
3511
|
+
maxPriorityFeePerGas: _optionalChain([args, 'optionalAccess', _73 => _73.maxPriorityFeePerGas])
|
3512
3512
|
});
|
3513
|
-
else if (message.match(ExecutionRevertedError.nodeMessage) || "code" in err.cause && _optionalChain([err, 'access',
|
3513
|
+
else if (message.match(ExecutionRevertedError.nodeMessage) || "code" in err.cause && _optionalChain([err, 'access', _74 => _74.cause, 'optionalAccess', _75 => _75.code]) === ExecutionRevertedError.code)
|
3514
3514
|
return new ExecutionRevertedError({
|
3515
3515
|
cause: err,
|
3516
3516
|
message: err.cause.details
|
@@ -3544,7 +3544,7 @@ function getContractError(err, {
|
|
3544
3544
|
functionName,
|
3545
3545
|
sender
|
3546
3546
|
}) {
|
3547
|
-
const { code, data, message } = err instanceof RawContractError ? err : err instanceof CallExecutionError || err instanceof EstimateGasExecutionError ? _optionalChain([err, 'access',
|
3547
|
+
const { code, data, message } = err instanceof RawContractError ? err : err instanceof CallExecutionError || err instanceof EstimateGasExecutionError ? _optionalChain([err, 'access', _76 => _76.cause, 'optionalAccess', _77 => _77.cause, 'optionalAccess', _78 => _78.cause]) || {} : err.cause || {};
|
3548
3548
|
let cause = err;
|
3549
3549
|
if (err instanceof AbiDecodingZeroDataError) {
|
3550
3550
|
cause = new ContractFunctionZeroDataError({ functionName });
|
@@ -3633,7 +3633,7 @@ async function http(url, { body, fetchOptions = {}, timeout = 1e4 }) {
|
|
3633
3633
|
}
|
3634
3634
|
);
|
3635
3635
|
let data;
|
3636
|
-
if (_optionalChain([response, 'access',
|
3636
|
+
if (_optionalChain([response, 'access', _79 => _79.headers, 'access', _80 => _80.get, 'call', _81 => _81("Content-Type"), 'optionalAccess', _82 => _82.startsWith, 'call', _83 => _83("application/json")])) {
|
3637
3637
|
data = await response.json();
|
3638
3638
|
} else {
|
3639
3639
|
data = await response.text();
|
@@ -3725,15 +3725,15 @@ function webSocket(socket, {
|
|
3725
3725
|
if (typeof message.id === "number" && id_ !== message.id)
|
3726
3726
|
return;
|
3727
3727
|
if (message.error) {
|
3728
|
-
_optionalChain([onError, 'optionalCall',
|
3728
|
+
_optionalChain([onError, 'optionalCall', _84 => _84(new RpcError({ body, error: message.error, url: socket.url }))]);
|
3729
3729
|
} else {
|
3730
|
-
_optionalChain([onData, 'optionalCall',
|
3730
|
+
_optionalChain([onData, 'optionalCall', _85 => _85(message)]);
|
3731
3731
|
}
|
3732
3732
|
if (body.method === "eth_subscribe" && typeof message.result === "string") {
|
3733
3733
|
socket.subscriptions.set(message.result, callback);
|
3734
3734
|
}
|
3735
3735
|
if (body.method === "eth_unsubscribe") {
|
3736
|
-
socket.subscriptions.delete(_optionalChain([body, 'access',
|
3736
|
+
socket.subscriptions.delete(_optionalChain([body, 'access', _86 => _86.params, 'optionalAccess', _87 => _87[0]]));
|
3737
3737
|
}
|
3738
3738
|
};
|
3739
3739
|
socket.requests.set(id_, callback);
|
@@ -3829,14 +3829,14 @@ function hashTypedData({
|
|
3829
3829
|
const domain = typeof domain_ === "undefined" ? {} : domain_;
|
3830
3830
|
const types = {
|
3831
3831
|
EIP712Domain: [
|
3832
|
-
_optionalChain([domain, 'optionalAccess',
|
3833
|
-
_optionalChain([domain, 'optionalAccess',
|
3834
|
-
_optionalChain([domain, 'optionalAccess',
|
3835
|
-
_optionalChain([domain, 'optionalAccess',
|
3832
|
+
_optionalChain([domain, 'optionalAccess', _88 => _88.name]) && { name: "name", type: "string" },
|
3833
|
+
_optionalChain([domain, 'optionalAccess', _89 => _89.version]) && { name: "version", type: "string" },
|
3834
|
+
_optionalChain([domain, 'optionalAccess', _90 => _90.chainId]) && { name: "chainId", type: "uint256" },
|
3835
|
+
_optionalChain([domain, 'optionalAccess', _91 => _91.verifyingContract]) && {
|
3836
3836
|
name: "verifyingContract",
|
3837
3837
|
type: "address"
|
3838
3838
|
},
|
3839
|
-
_optionalChain([domain, 'optionalAccess',
|
3839
|
+
_optionalChain([domain, 'optionalAccess', _92 => _92.salt]) && { name: "salt", type: "bytes32" }
|
3840
3840
|
].filter(Boolean),
|
3841
3841
|
...types_
|
3842
3842
|
};
|
@@ -3931,7 +3931,7 @@ function findTypeDependencies({
|
|
3931
3931
|
types
|
3932
3932
|
}, results = /* @__PURE__ */ new Set()) {
|
3933
3933
|
const match = primaryType_.match(/^\w*/u);
|
3934
|
-
const primaryType = _optionalChain([match, 'optionalAccess',
|
3934
|
+
const primaryType = _optionalChain([match, 'optionalAccess', _93 => _93[0]]);
|
3935
3935
|
if (results.has(primaryType) || types[primaryType] === void 0) {
|
3936
3936
|
return results;
|
3937
3937
|
}
|
@@ -4116,7 +4116,7 @@ async function isImageUri(uri) {
|
|
4116
4116
|
const res = await fetch(uri, { method: "HEAD" });
|
4117
4117
|
if (res.status === 200) {
|
4118
4118
|
const contentType = res.headers.get("content-type");
|
4119
|
-
return _optionalChain([contentType, 'optionalAccess',
|
4119
|
+
return _optionalChain([contentType, 'optionalAccess', _94 => _94.startsWith, 'call', _95 => _95("image/")]);
|
4120
4120
|
}
|
4121
4121
|
return false;
|
4122
4122
|
} catch (error) {
|
@@ -4151,21 +4151,21 @@ function resolveAvatarUri({
|
|
4151
4151
|
const isEncoded = base64Regex.test(uri);
|
4152
4152
|
if (isEncoded)
|
4153
4153
|
return { uri, isOnChain: true, isEncoded };
|
4154
|
-
const ipfsGateway = getGateway(_optionalChain([gatewayUrls, 'optionalAccess',
|
4155
|
-
const arweaveGateway = getGateway(_optionalChain([gatewayUrls, 'optionalAccess',
|
4154
|
+
const ipfsGateway = getGateway(_optionalChain([gatewayUrls, 'optionalAccess', _96 => _96.ipfs]), "https://ipfs.io");
|
4155
|
+
const arweaveGateway = getGateway(_optionalChain([gatewayUrls, 'optionalAccess', _97 => _97.arweave]), "https://arweave.net");
|
4156
4156
|
const networkRegexMatch = uri.match(networkRegex);
|
4157
4157
|
const {
|
4158
4158
|
protocol,
|
4159
4159
|
subpath,
|
4160
4160
|
target,
|
4161
4161
|
subtarget = ""
|
4162
|
-
} = _optionalChain([networkRegexMatch, 'optionalAccess',
|
4162
|
+
} = _optionalChain([networkRegexMatch, 'optionalAccess', _98 => _98.groups]) || {};
|
4163
4163
|
const isIPNS = protocol === "ipns:/" || subpath === "ipns/";
|
4164
4164
|
const isIPFS = protocol === "ipfs:/" || subpath === "ipfs/" || ipfsHashRegex.test(uri);
|
4165
4165
|
if (uri.startsWith("http") && !isIPNS && !isIPFS) {
|
4166
4166
|
let replacedUri = uri;
|
4167
|
-
if (_optionalChain([gatewayUrls, 'optionalAccess',
|
4168
|
-
replacedUri = uri.replace(/https:\/\/arweave.net/g, _optionalChain([gatewayUrls, 'optionalAccess',
|
4167
|
+
if (_optionalChain([gatewayUrls, 'optionalAccess', _99 => _99.arweave]))
|
4168
|
+
replacedUri = uri.replace(/https:\/\/arweave.net/g, _optionalChain([gatewayUrls, 'optionalAccess', _100 => _100.arweave]));
|
4169
4169
|
return { uri: replacedUri, isOnChain: false, isEncoded: false };
|
4170
4170
|
}
|
4171
4171
|
if ((isIPNS || isIPFS) && target) {
|
@@ -4393,10 +4393,10 @@ async function call(client, args) {
|
|
4393
4393
|
try {
|
4394
4394
|
assertRequest(args);
|
4395
4395
|
const blockNumberHex = blockNumber ? numberToHex(blockNumber) : void 0;
|
4396
|
-
const formatter = _optionalChain([client, 'access',
|
4396
|
+
const formatter = _optionalChain([client, 'access', _101 => _101.chain, 'optionalAccess', _102 => _102.formatters, 'optionalAccess', _103 => _103.transactionRequest]);
|
4397
4397
|
const request_ = format3(
|
4398
4398
|
{
|
4399
|
-
from: _optionalChain([account, 'optionalAccess',
|
4399
|
+
from: _optionalChain([account, 'optionalAccess', _104 => _104.address]),
|
4400
4400
|
accessList,
|
4401
4401
|
data,
|
4402
4402
|
gas,
|
@@ -4472,7 +4472,7 @@ async function simulateContract(client, {
|
|
4472
4472
|
args,
|
4473
4473
|
docsPath: "/docs/contract/simulateContract",
|
4474
4474
|
functionName,
|
4475
|
-
sender: _optionalChain([account, 'optionalAccess',
|
4475
|
+
sender: _optionalChain([account, 'optionalAccess', _105 => _105.address])
|
4476
4476
|
});
|
4477
4477
|
}
|
4478
4478
|
}
|
@@ -4586,7 +4586,7 @@ async function estimateGas(client, args) {
|
|
4586
4586
|
} = account.type === "local" ? await prepareRequest(client, args) : args;
|
4587
4587
|
const blockNumberHex = blockNumber ? numberToHex(blockNumber) : void 0;
|
4588
4588
|
assertRequest(args);
|
4589
|
-
const formatter = _optionalChain([client, 'access',
|
4589
|
+
const formatter = _optionalChain([client, 'access', _106 => _106.chain, 'optionalAccess', _107 => _107.formatters, 'optionalAccess', _108 => _108.transactionRequest]);
|
4590
4590
|
const request = format3(
|
4591
4591
|
{
|
4592
4592
|
from: account.address,
|
@@ -4648,7 +4648,7 @@ async function estimateContractGas(client, {
|
|
4648
4648
|
args,
|
4649
4649
|
docsPath: "/docs/contract/simulateContract",
|
4650
4650
|
functionName,
|
4651
|
-
sender: _optionalChain([account, 'optionalAccess',
|
4651
|
+
sender: _optionalChain([account, 'optionalAccess', _109 => _109.address])
|
4652
4652
|
});
|
4653
4653
|
}
|
4654
4654
|
}
|
@@ -4686,7 +4686,7 @@ async function getBlock(client, {
|
|
4686
4686
|
if (!block)
|
4687
4687
|
throw new BlockNotFoundError({ blockHash, blockNumber });
|
4688
4688
|
return format3(block, {
|
4689
|
-
formatter: _optionalChain([client, 'access',
|
4689
|
+
formatter: _optionalChain([client, 'access', _110 => _110.chain, 'optionalAccess', _111 => _111.formatters, 'optionalAccess', _112 => _112.block]) || formatBlock
|
4690
4690
|
});
|
4691
4691
|
}
|
4692
4692
|
|
@@ -4910,7 +4910,7 @@ async function getTransaction(client, {
|
|
4910
4910
|
index
|
4911
4911
|
});
|
4912
4912
|
return format3(transaction, {
|
4913
|
-
formatter: _optionalChain([client, 'access',
|
4913
|
+
formatter: _optionalChain([client, 'access', _113 => _113.chain, 'optionalAccess', _114 => _114.formatters, 'optionalAccess', _115 => _115.transaction]) || formatTransaction
|
4914
4914
|
});
|
4915
4915
|
}
|
4916
4916
|
|
@@ -4920,7 +4920,7 @@ async function getTransactionConfirmations(client, { hash: hash2, transactionRec
|
|
4920
4920
|
getBlockNumber(client),
|
4921
4921
|
hash2 ? getTransaction(client, { hash: hash2 }) : void 0
|
4922
4922
|
]);
|
4923
|
-
const transactionBlockNumber = _optionalChain([transactionReceipt, 'optionalAccess',
|
4923
|
+
const transactionBlockNumber = _optionalChain([transactionReceipt, 'optionalAccess', _116 => _116.blockNumber]) || _optionalChain([transaction, 'optionalAccess', _117 => _117.blockNumber]);
|
4924
4924
|
if (!transactionBlockNumber)
|
4925
4925
|
return 0n;
|
4926
4926
|
return blockNumber - transactionBlockNumber + 1n;
|
@@ -4944,7 +4944,7 @@ async function getTransactionReceipt(client, { hash: hash2 }) {
|
|
4944
4944
|
if (!receipt)
|
4945
4945
|
throw new TransactionReceiptNotFoundError({ hash: hash2 });
|
4946
4946
|
return format3(receipt, {
|
4947
|
-
formatter: _optionalChain([client, 'access',
|
4947
|
+
formatter: _optionalChain([client, 'access', _118 => _118.chain, 'optionalAccess', _119 => _119.formatters, 'optionalAccess', _120 => _120.transactionReceipt]) || formatTransactionReceipt
|
4948
4948
|
});
|
4949
4949
|
}
|
4950
4950
|
|
@@ -5113,7 +5113,7 @@ function observe(observerId, callbacks, fn) {
|
|
5113
5113
|
const listeners2 = getListeners();
|
5114
5114
|
if (listeners2.length === 0)
|
5115
5115
|
return;
|
5116
|
-
listeners2.forEach((listener) => _optionalChain([listener, 'access',
|
5116
|
+
listeners2.forEach((listener) => _optionalChain([listener, 'access', _121 => _121.fns, 'access', _122 => _122[key], 'optionalCall', _123 => _123(...args)]));
|
5117
5117
|
};
|
5118
5118
|
}
|
5119
5119
|
const cleanup = fn(emit);
|
@@ -5195,7 +5195,7 @@ async function waitForTransactionReceipt(client, {
|
|
5195
5195
|
reason = "cancelled";
|
5196
5196
|
}
|
5197
5197
|
done(() => {
|
5198
|
-
_optionalChain([emit, 'access',
|
5198
|
+
_optionalChain([emit, 'access', _124 => _124.onReplaced, 'optionalCall', _125 => _125({
|
5199
5199
|
reason,
|
5200
5200
|
replacedTransaction,
|
5201
5201
|
transaction: replacementTransaction,
|
@@ -5223,7 +5223,7 @@ function poll(fn, { emitOnBegin, initialWaitTime, interval }) {
|
|
5223
5223
|
let data;
|
5224
5224
|
if (emitOnBegin)
|
5225
5225
|
data = await fn({ unpoll: unwatch });
|
5226
|
-
const initialWait = await _asyncNullishCoalesce(await _optionalChain([initialWaitTime, 'optionalCall',
|
5226
|
+
const initialWait = await _asyncNullishCoalesce(await _optionalChain([initialWaitTime, 'optionalCall', _126 => _126(data)]), async () => ( interval));
|
5227
5227
|
await wait(initialWait);
|
5228
5228
|
const poll2 = async () => {
|
5229
5229
|
if (!active)
|
@@ -5279,7 +5279,7 @@ function watchBlockNumber(client, {
|
|
5279
5279
|
prevBlockNumber = blockNumber;
|
5280
5280
|
}
|
5281
5281
|
} catch (err) {
|
5282
|
-
_optionalChain([emit, 'access',
|
5282
|
+
_optionalChain([emit, 'access', _127 => _127.onError, 'optionalCall', _128 => _128(err)]);
|
5283
5283
|
}
|
5284
5284
|
},
|
5285
5285
|
{
|
@@ -5299,19 +5299,19 @@ function watchBlockNumber(client, {
|
|
5299
5299
|
onData(data) {
|
5300
5300
|
if (!active)
|
5301
5301
|
return;
|
5302
|
-
const blockNumber = hexToBigInt(_optionalChain([data, 'access',
|
5302
|
+
const blockNumber = hexToBigInt(_optionalChain([data, 'access', _129 => _129.result, 'optionalAccess', _130 => _130.number]));
|
5303
5303
|
onBlockNumber(blockNumber, prevBlockNumber);
|
5304
5304
|
prevBlockNumber = blockNumber;
|
5305
5305
|
},
|
5306
5306
|
onError(error) {
|
5307
|
-
_optionalChain([onError, 'optionalCall',
|
5307
|
+
_optionalChain([onError, 'optionalCall', _131 => _131(error)]);
|
5308
5308
|
}
|
5309
5309
|
});
|
5310
5310
|
unsubscribe = unsubscribe_;
|
5311
5311
|
if (!active)
|
5312
5312
|
unsubscribe();
|
5313
5313
|
} catch (err) {
|
5314
|
-
_optionalChain([onError, 'optionalCall',
|
5314
|
+
_optionalChain([onError, 'optionalCall', _132 => _132(err)]);
|
5315
5315
|
}
|
5316
5316
|
})();
|
5317
5317
|
return unsubscribe;
|
@@ -5351,11 +5351,11 @@ function watchBlocks(client, {
|
|
5351
5351
|
blockTag,
|
5352
5352
|
includeTransactions
|
5353
5353
|
});
|
5354
|
-
if (block.number && _optionalChain([prevBlock, 'optionalAccess',
|
5354
|
+
if (block.number && _optionalChain([prevBlock, 'optionalAccess', _133 => _133.number])) {
|
5355
5355
|
if (block.number === prevBlock.number)
|
5356
5356
|
return;
|
5357
5357
|
if (block.number - prevBlock.number > 1 && emitMissed) {
|
5358
|
-
for (let i = _optionalChain([prevBlock, 'optionalAccess',
|
5358
|
+
for (let i = _optionalChain([prevBlock, 'optionalAccess', _134 => _134.number]) + 1n; i < block.number; i++) {
|
5359
5359
|
const block2 = await getBlock(client, {
|
5360
5360
|
blockNumber: i,
|
5361
5361
|
includeTransactions
|
@@ -5367,8 +5367,8 @@ function watchBlocks(client, {
|
|
5367
5367
|
}
|
5368
5368
|
if (
|
5369
5369
|
// If no previous block exists, emit.
|
5370
|
-
!_optionalChain([prevBlock, 'optionalAccess',
|
5371
|
-
blockTag === "pending" && !_optionalChain([block, 'optionalAccess',
|
5370
|
+
!_optionalChain([prevBlock, 'optionalAccess', _135 => _135.number]) || // If the block tag is "pending" with no block number, emit.
|
5371
|
+
blockTag === "pending" && !_optionalChain([block, 'optionalAccess', _136 => _136.number]) || // If the next block number is greater than the previous block number, emit.
|
5372
5372
|
// We don't want to emit blocks in the past.
|
5373
5373
|
block.number && block.number > prevBlock.number
|
5374
5374
|
) {
|
@@ -5376,7 +5376,7 @@ function watchBlocks(client, {
|
|
5376
5376
|
prevBlock = block;
|
5377
5377
|
}
|
5378
5378
|
} catch (err) {
|
5379
|
-
_optionalChain([emit, 'access',
|
5379
|
+
_optionalChain([emit, 'access', _137 => _137.onError, 'optionalCall', _138 => _138(err)]);
|
5380
5380
|
}
|
5381
5381
|
},
|
5382
5382
|
{
|
@@ -5401,14 +5401,14 @@ function watchBlocks(client, {
|
|
5401
5401
|
prevBlock = block;
|
5402
5402
|
},
|
5403
5403
|
onError(error) {
|
5404
|
-
_optionalChain([onError, 'optionalCall',
|
5404
|
+
_optionalChain([onError, 'optionalCall', _139 => _139(error)]);
|
5405
5405
|
}
|
5406
5406
|
});
|
5407
5407
|
unsubscribe = unsubscribe_;
|
5408
5408
|
if (!active)
|
5409
5409
|
unsubscribe();
|
5410
5410
|
} catch (err) {
|
5411
|
-
_optionalChain([onError, 'optionalCall',
|
5411
|
+
_optionalChain([onError, 'optionalCall', _140 => _140(err)]);
|
5412
5412
|
}
|
5413
5413
|
})();
|
5414
5414
|
return unsubscribe;
|
@@ -5484,7 +5484,7 @@ function watchContractEvent(client, {
|
|
5484
5484
|
else
|
5485
5485
|
logs.forEach((log) => emit.onLogs([log]));
|
5486
5486
|
} catch (err) {
|
5487
|
-
_optionalChain([emit, 'access',
|
5487
|
+
_optionalChain([emit, 'access', _141 => _141.onError, 'optionalCall', _142 => _142(err)]);
|
5488
5488
|
}
|
5489
5489
|
},
|
5490
5490
|
{
|
@@ -5563,7 +5563,7 @@ function watchEvent(client, {
|
|
5563
5563
|
else
|
5564
5564
|
logs.forEach((log) => emit.onLogs([log]));
|
5565
5565
|
} catch (err) {
|
5566
|
-
_optionalChain([emit, 'access',
|
5566
|
+
_optionalChain([emit, 'access', _143 => _143.onError, 'optionalCall', _144 => _144(err)]);
|
5567
5567
|
}
|
5568
5568
|
},
|
5569
5569
|
{
|
@@ -5617,7 +5617,7 @@ function watchPendingTransactions(client, {
|
|
5617
5617
|
else
|
5618
5618
|
hashes.forEach((hash2) => emit.onTransactions([hash2]));
|
5619
5619
|
} catch (err) {
|
5620
|
-
_optionalChain([emit, 'access',
|
5620
|
+
_optionalChain([emit, 'access', _145 => _145.onError, 'optionalCall', _146 => _146(err)]);
|
5621
5621
|
}
|
5622
5622
|
},
|
5623
5623
|
{
|
@@ -5646,14 +5646,14 @@ function watchPendingTransactions(client, {
|
|
5646
5646
|
onTransactions([transaction]);
|
5647
5647
|
},
|
5648
5648
|
onError(error) {
|
5649
|
-
_optionalChain([onError, 'optionalCall',
|
5649
|
+
_optionalChain([onError, 'optionalCall', _147 => _147(error)]);
|
5650
5650
|
}
|
5651
5651
|
});
|
5652
5652
|
unsubscribe = unsubscribe_;
|
5653
5653
|
if (!active)
|
5654
5654
|
unsubscribe();
|
5655
5655
|
} catch (err) {
|
5656
|
-
_optionalChain([onError, 'optionalCall',
|
5656
|
+
_optionalChain([onError, 'optionalCall', _148 => _148(err)]);
|
5657
5657
|
}
|
5658
5658
|
})();
|
5659
5659
|
return unsubscribe;
|
@@ -6175,7 +6175,7 @@ async function sendTransaction(client, args) {
|
|
6175
6175
|
try {
|
6176
6176
|
assertRequest(args);
|
6177
6177
|
const chainId = await getChainId(client);
|
6178
|
-
if (chain !== null && chainId !== _optionalChain([chain, 'optionalAccess',
|
6178
|
+
if (chain !== null && chainId !== _optionalChain([chain, 'optionalAccess', _149 => _149.id])) {
|
6179
6179
|
if (!chain)
|
6180
6180
|
throw new ChainNotFoundError();
|
6181
6181
|
throw new ChainMismatchError({ chain, currentChainId: chainId });
|
@@ -6204,7 +6204,7 @@ async function sendTransaction(client, args) {
|
|
6204
6204
|
params: [signedRequest]
|
6205
6205
|
});
|
6206
6206
|
}
|
6207
|
-
const formatter = _optionalChain([chain, 'optionalAccess',
|
6207
|
+
const formatter = _optionalChain([chain, 'optionalAccess', _150 => _150.formatters, 'optionalAccess', _151 => _151.transactionRequest]);
|
6208
6208
|
const request = format3(
|
6209
6209
|
{
|
6210
6210
|
accessList,
|
@@ -6270,14 +6270,14 @@ async function signTypedData(client, {
|
|
6270
6270
|
const account = parseAccount(account_);
|
6271
6271
|
const types = {
|
6272
6272
|
EIP712Domain: [
|
6273
|
-
_optionalChain([domain, 'optionalAccess',
|
6274
|
-
_optionalChain([domain, 'optionalAccess',
|
6275
|
-
_optionalChain([domain, 'optionalAccess',
|
6276
|
-
_optionalChain([domain, 'optionalAccess',
|
6273
|
+
_optionalChain([domain, 'optionalAccess', _152 => _152.name]) && { name: "name", type: "string" },
|
6274
|
+
_optionalChain([domain, 'optionalAccess', _153 => _153.version]) && { name: "version", type: "string" },
|
6275
|
+
_optionalChain([domain, 'optionalAccess', _154 => _154.chainId]) && { name: "chainId", type: "uint256" },
|
6276
|
+
_optionalChain([domain, 'optionalAccess', _155 => _155.verifyingContract]) && {
|
6277
6277
|
name: "verifyingContract",
|
6278
6278
|
type: "address"
|
6279
6279
|
},
|
6280
|
-
_optionalChain([domain, 'optionalAccess',
|
6280
|
+
_optionalChain([domain, 'optionalAccess', _156 => _156.salt]) && { name: "salt", type: "bytes32" }
|
6281
6281
|
].filter(Boolean),
|
6282
6282
|
...types_
|
6283
6283
|
};
|
@@ -7306,4 +7306,4 @@ function parseEther(ether, unit = "wei") {
|
|
7306
7306
|
|
7307
7307
|
|
7308
7308
|
exports.multicall3Abi = multicall3Abi; exports.BaseError = BaseError; exports.AbiConstructorNotFoundError = AbiConstructorNotFoundError; exports.AbiConstructorParamsNotFoundError = AbiConstructorParamsNotFoundError; exports.AbiDecodingDataSizeInvalidError = AbiDecodingDataSizeInvalidError; exports.AbiDecodingZeroDataError = AbiDecodingZeroDataError; exports.AbiEncodingArrayLengthMismatchError = AbiEncodingArrayLengthMismatchError; exports.AbiEncodingLengthMismatchError = AbiEncodingLengthMismatchError; exports.AbiErrorInputsNotFoundError = AbiErrorInputsNotFoundError; exports.AbiErrorNotFoundError = AbiErrorNotFoundError; exports.AbiErrorSignatureNotFoundError = AbiErrorSignatureNotFoundError; exports.AbiEventSignatureEmptyTopicsError = AbiEventSignatureEmptyTopicsError; exports.AbiEventSignatureNotFoundError = AbiEventSignatureNotFoundError; exports.AbiEventNotFoundError = AbiEventNotFoundError; exports.AbiFunctionNotFoundError = AbiFunctionNotFoundError; exports.AbiFunctionOutputsNotFoundError = AbiFunctionOutputsNotFoundError; exports.AbiFunctionSignatureNotFoundError = AbiFunctionSignatureNotFoundError; exports.DecodeLogTopicsMismatch = DecodeLogTopicsMismatch; exports.InvalidAbiEncodingTypeError = InvalidAbiEncodingTypeError; exports.InvalidAbiDecodingTypeError = InvalidAbiDecodingTypeError; exports.InvalidArrayError = InvalidArrayError; exports.InvalidDefinitionTypeError = InvalidDefinitionTypeError; exports.InvalidAddressError = InvalidAddressError; exports.BlockNotFoundError = BlockNotFoundError; exports.ChainDoesNotSupportContract = ChainDoesNotSupportContract; exports.InvalidChainIdError = InvalidChainIdError; exports.etherUnits = etherUnits; exports.gweiUnits = gweiUnits; exports.weiUnits = weiUnits; exports.InvalidLegacyVError = InvalidLegacyVError; exports.TransactionExecutionError = TransactionExecutionError; exports.TransactionNotFoundError = TransactionNotFoundError; exports.TransactionReceiptNotFoundError = TransactionReceiptNotFoundError; exports.WaitForTransactionReceiptTimeoutError = WaitForTransactionReceiptTimeoutError; exports.CallExecutionError = CallExecutionError; exports.ContractFunctionExecutionError = ContractFunctionExecutionError; exports.ContractFunctionRevertedError = ContractFunctionRevertedError; exports.ContractFunctionZeroDataError = ContractFunctionZeroDataError; exports.RawContractError = RawContractError; exports.SizeExceedsPaddingSizeError = SizeExceedsPaddingSizeError; exports.DataLengthTooLongError = DataLengthTooLongError; exports.DataLengthTooShortError = DataLengthTooShortError; exports.InvalidBytesBooleanError = InvalidBytesBooleanError; exports.InvalidHexBooleanError = InvalidHexBooleanError; exports.InvalidHexValueError = InvalidHexValueError; exports.OffsetOutOfBoundsError = OffsetOutOfBoundsError; exports.EnsAvatarUriResolutionError = EnsAvatarUriResolutionError; exports.EstimateGasExecutionError = EstimateGasExecutionError; exports.FilterTypeNotSupportedError = FilterTypeNotSupportedError; exports.ExecutionRevertedError = ExecutionRevertedError; exports.FeeCapTooHighError = FeeCapTooHighError; exports.FeeCapTooLowError = FeeCapTooLowError; exports.NonceTooHighError = NonceTooHighError; exports.NonceTooLowError = NonceTooLowError; exports.NonceMaxValueError = NonceMaxValueError; exports.InsufficientFundsError = InsufficientFundsError; exports.IntrinsicGasTooHighError = IntrinsicGasTooHighError; exports.IntrinsicGasTooLowError = IntrinsicGasTooLowError; exports.TransactionTypeNotSupportedError = TransactionTypeNotSupportedError; exports.TipAboveFeeCapError = TipAboveFeeCapError; exports.UnknownNodeError = UnknownNodeError; exports.RequestError = RequestError; exports.RpcRequestError = RpcRequestError; exports.ParseRpcError = ParseRpcError; exports.InvalidRequestRpcError = InvalidRequestRpcError; exports.MethodNotFoundRpcError = MethodNotFoundRpcError; exports.InvalidParamsRpcError = InvalidParamsRpcError; exports.InternalRpcError = InternalRpcError; exports.InvalidInputRpcError = InvalidInputRpcError; exports.ResourceNotFoundRpcError = ResourceNotFoundRpcError; exports.ResourceUnavailableRpcError = ResourceUnavailableRpcError; exports.TransactionRejectedRpcError = TransactionRejectedRpcError; exports.MethodNotSupportedRpcError = MethodNotSupportedRpcError; exports.LimitExceededRpcError = LimitExceededRpcError; exports.JsonRpcVersionUnsupportedError = JsonRpcVersionUnsupportedError; exports.UserRejectedRequestError = UserRejectedRequestError; exports.SwitchChainError = SwitchChainError; exports.UnknownRpcError = UnknownRpcError; exports.HttpRequestError = HttpRequestError; exports.WebSocketRequestError = WebSocketRequestError; exports.RpcError = RpcError; exports.TimeoutError = TimeoutError; exports.UrlRequiredError = UrlRequiredError; exports.isHex = isHex; exports.concat = concat; exports.concatBytes = concatBytes; exports.concatHex = concatHex; exports.isBytes = isBytes; exports.pad = pad; exports.padHex = padHex; exports.padBytes = padBytes; exports.trim = trim; exports.size = size; exports.slice = slice; exports.sliceBytes = sliceBytes; exports.sliceHex = sliceHex; exports.boolToHex = boolToHex; exports.bytesToHex = bytesToHex; exports.toHex = toHex; exports.numberToHex = numberToHex; exports.stringToHex = stringToHex; exports.toBytes = toBytes; exports.boolToBytes = boolToBytes; exports.hexToBytes = hexToBytes; exports.numberToBytes = numberToBytes; exports.stringToBytes = stringToBytes; exports.toRlp = toRlp; exports.fromHex = fromHex; exports.hexToBigInt = hexToBigInt; exports.hexToBool = hexToBool; exports.hexToNumber = hexToNumber; exports.hexToString = hexToString; exports.fromBytes = fromBytes; exports.bytesToBigint = bytesToBigint; exports.bytesToBool = bytesToBool; exports.bytesToNumber = bytesToNumber; exports.bytesToString = bytesToString; exports.fromRlp = fromRlp; exports.extractFunctionParts = extractFunctionParts; exports.extractFunctionName = extractFunctionName; exports.extractFunctionParams = extractFunctionParams; exports.extractFunctionType = extractFunctionType; exports.keccak256 = keccak256; exports.getEventSelector = getEventSelector; exports.getFunctionSelector = getFunctionSelector; exports.isHash = isHash; exports.isAddress = isAddress; exports.getAddress = getAddress; exports.getContractAddress = getContractAddress2; exports.getCreateAddress = getCreateAddress; exports.getCreate2Address = getCreate2Address; exports.isAddressEqual = isAddressEqual; exports.encodeAbiParameters = encodeAbiParameters; exports.decodeAbiParameters = decodeAbiParameters; exports.formatAbiItem = formatAbiItem; exports.formatAbiParams = formatAbiParams; exports.decodeErrorResult = decodeErrorResult; exports.decodeEventLog = decodeEventLog; exports.decodeFunctionData = decodeFunctionData; exports.getAbiItem = getAbiItem; exports.decodeFunctionResult = decodeFunctionResult; exports.encodeDeployData = encodeDeployData; exports.encodeErrorResult = encodeErrorResult; exports.encodeEventTopics = encodeEventTopics; exports.encodeFunctionData = encodeFunctionData; exports.encodeFunctionResult = encodeFunctionResult; exports.arrayRegex = arrayRegex; exports.bytesRegex = bytesRegex; exports.integerRegex = integerRegex; exports.encodePacked = encodePacked; exports.formatAbiItemWithArgs = formatAbiItemWithArgs; exports.parseAbi = _abitype.parseAbi; exports.parseAbiItem = _abitype.parseAbiItem; exports.parseAbiParameter = _abitype.parseAbiParameter; exports.parseAbiParameters = _abitype.parseAbiParameters; exports.parseAccount = parseAccount; exports.publicKeyToAddress = publicKeyToAddress; exports.wait = wait; exports.isDeterministicError = isDeterministicError; exports.buildRequest = buildRequest; exports.defineChain = defineChain; exports.getChainContractAddress = getChainContractAddress; exports.format = format3; exports.defineFormatter = defineFormatter; exports.transactionType = transactionType; exports.formatTransaction = formatTransaction; exports.defineTransaction = defineTransaction; exports.formatBlock = formatBlock; exports.defineBlock = defineBlock; exports.extract = extract; exports.defineTransactionReceipt = defineTransactionReceipt; exports.formatTransactionRequest = formatTransactionRequest; exports.defineTransactionRequest = defineTransactionRequest; exports.containsNodeError = containsNodeError; exports.getNodeError = getNodeError; exports.getCallError = getCallError; exports.getContractError = getContractError; exports.getEstimateGasError = getEstimateGasError; exports.getTransactionError = getTransactionError; exports.stringify = stringify; exports.getSocket = getSocket; exports.rpc = rpc; exports.hashMessage = hashMessage; exports.validateTypedData = validateTypedData; exports.hashTypedData = hashTypedData; exports.recoverAddress = recoverAddress; exports.recoverMessageAddress = recoverMessageAddress; exports.recoverTypedDataAddress = recoverTypedDataAddress; exports.verifyMessage = verifyMessage; exports.verifyTypedData = verifyTypedData; exports.assertRequest = assertRequest; exports.getSerializedTransactionType = getSerializedTransactionType; exports.getTransactionType = getTransactionType; exports.parseUnits = parseUnits; exports.parseGwei = parseGwei; exports.prepareRequest = prepareRequest; exports.assertTransactionEIP1559 = assertTransactionEIP1559; exports.assertTransactionEIP2930 = assertTransactionEIP2930; exports.assertTransactionLegacy = assertTransactionLegacy; exports.parseTransaction = parseTransaction; exports.serializeTransaction = serializeTransaction; exports.formatUnits = formatUnits; exports.formatEther = formatEther; exports.formatGwei = formatGwei; exports.parseEther = parseEther; exports.labelhash = labelhash; exports.namehash = namehash; exports.call = call; exports.simulateContract = simulateContract; exports.createPendingTransactionFilter = createPendingTransactionFilter; exports.createBlockFilter = createBlockFilter; exports.createEventFilter = createEventFilter; exports.createContractEventFilter = createContractEventFilter; exports.estimateGas = estimateGas; exports.estimateContractGas = estimateContractGas; 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; exports.getEnsAddress = getEnsAddress; exports.getEnsText = getEnsText; exports.getEnsAvatar = getEnsAvatar; exports.getEnsName = getEnsName; exports.getEnsResolver = getEnsResolver; 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.setRpcUrl = setRpcUrl; exports.setStorageAt = setStorageAt; exports.snapshot = snapshot; exports.stopImpersonatingAccount = stopImpersonatingAccount; exports.addChain = addChain; exports.deployContract = deployContract; exports.getAddresses = getAddresses; exports.getPermissions = getPermissions; exports.requestAddresses = requestAddresses; exports.requestPermissions = requestPermissions; exports.sendTransaction = sendTransaction; exports.signMessage = signMessage; exports.signTypedData = signTypedData; exports.switchChain = switchChain; exports.watchAsset = watchAsset; exports.writeContract = writeContract; exports.getContract = getContract;
|
7309
|
-
//# sourceMappingURL=chunk-
|
7309
|
+
//# sourceMappingURL=chunk-BKEDQ7BF.js.map
|