@gardenfi/utils 2.1.3-beta.2 → 2.1.3
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/index102.cjs +1 -1
- package/dist/index102.js +8 -12
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +1 -1
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +26 -38
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +43 -45
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +1 -1
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +1 -1
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +1 -1
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +1 -1
- package/dist/index125.cjs +1 -1
- package/dist/index125.js +1 -1
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +4 -4
- package/dist/index189.cjs +1 -1
- package/dist/index189.js +2 -2
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +15 -19
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +6 -6
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +13 -31
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +10 -25
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +16 -13
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +21 -14
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +2 -6
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +12 -12
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +12 -10
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +46 -15
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +11 -10
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +7 -16
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +8 -21
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +58 -32
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +13 -30
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +15 -2
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +9 -13
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +30 -12
- package/dist/index244.cjs +1 -1
- package/dist/index244.js +24 -47
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +12 -11
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +24 -7
- package/dist/index247.cjs +2 -1
- package/dist/index247.js +24 -9
- package/dist/index248.cjs +1 -1
- package/dist/index248.js +10 -10
- package/dist/index249.cjs +1 -1
- package/dist/index249.js +15 -14
- package/dist/index25.cjs +16 -1
- package/dist/index25.js +113 -11
- package/dist/index250.cjs +1 -1
- package/dist/index250.js +52 -9
- package/dist/index251.cjs +1 -1
- package/dist/index251.js +25 -24
- package/dist/index252.cjs +1 -1
- package/dist/index252.js +13 -12
- package/dist/index253.cjs +1 -1
- package/dist/index253.js +15 -24
- package/dist/index254.cjs +1 -2
- package/dist/index254.js +5 -24
- package/dist/index255.cjs +1 -1
- package/dist/index255.js +12 -12
- package/dist/index256.cjs +1 -1
- package/dist/index256.js +10 -15
- package/dist/index257.cjs +1 -1
- package/dist/index257.js +16 -52
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +32 -58
- package/dist/index266.cjs +1 -1
- package/dist/index266.js +1 -1
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +31 -13
- package/dist/index275.cjs +1 -1
- package/dist/index275.js +6 -7
- package/dist/index277.cjs +1 -1
- package/dist/index277.js +2 -2
- package/dist/index278.cjs +1 -1
- package/dist/index278.js +1 -1
- package/dist/index28.cjs +1 -16
- package/dist/index28.js +11 -113
- package/dist/index284.cjs +1 -1
- package/dist/index284.js +1 -1
- package/dist/index286.cjs +1 -1
- package/dist/index286.js +3 -40
- package/dist/index287.cjs +1 -1
- package/dist/index287.js +141 -2
- package/dist/index288.cjs +1 -1
- package/dist/index288.js +148 -199
- package/dist/index289.cjs +1 -1
- package/dist/index289.js +9 -3
- package/dist/index290.cjs +1 -1
- package/dist/index290.js +103 -130
- package/dist/index291.cjs +2 -1
- package/dist/index291.js +102 -123
- package/dist/index292.cjs +1 -1
- package/dist/index292.js +11 -9
- package/dist/index293.cjs +1 -1
- package/dist/index293.js +18 -112
- package/dist/index294.cjs +1 -2
- package/dist/index294.js +24 -130
- package/dist/index295.cjs +1 -1
- package/dist/index295.js +37 -10
- package/dist/index296.cjs +1 -1
- package/dist/index296.js +68 -19
- package/dist/index297.cjs +1 -1
- package/dist/index297.js +2 -69
- package/dist/index298.cjs +1 -1
- package/dist/index298.js +39 -641
- package/dist/index299.cjs +1 -1
- package/dist/index299.js +620 -150
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +1 -1
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +1 -1
- package/dist/index300.cjs +1 -2
- package/dist/index300.js +203 -63
- package/dist/index301.cjs +1 -1
- package/dist/index301.js +172 -4
- package/dist/index302.cjs +2 -1
- package/dist/index302.js +65 -39
- package/dist/index303.cjs +1 -1
- package/dist/index303.js +4 -7
- package/dist/index304.cjs +1 -1
- package/dist/index304.js +38 -60
- package/dist/index305.cjs +1 -1
- package/dist/index305.js +7 -77
- package/dist/index306.cjs +1 -1
- package/dist/index306.js +63 -4
- package/dist/index307.cjs +1 -1
- package/dist/index307.js +64 -181
- package/dist/index308.cjs +1 -1
- package/dist/index308.js +4 -64
- package/dist/index309.cjs +1 -1
- package/dist/index309.js +194 -44
- package/dist/index310.cjs +1 -1
- package/dist/index310.js +18 -4
- package/dist/index311.cjs +1 -1
- package/dist/index311.js +58 -99
- package/dist/index312.cjs +1 -1
- package/dist/index312.js +45 -5
- package/dist/index313.cjs +1 -1
- package/dist/index313.js +5 -2
- package/dist/index314.cjs +1 -1
- package/dist/index314.js +103 -18
- package/dist/index315.cjs +1 -1
- package/dist/index315.js +5 -72
- package/dist/index316.cjs +1 -1
- package/dist/index316.js +2 -22
- package/dist/index317.cjs +1 -0
- package/dist/index317.js +24 -0
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +1 -1
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +2 -2
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +1 -1
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +2 -2
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +1 -1
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +2 -2
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +111 -114
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +11 -11
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +1 -1
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +1 -1
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +1 -1
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +26 -26
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +3 -3
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +1 -1
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +8 -8
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +1 -1
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +3 -8
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +19 -19
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +2 -2
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +1 -1
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +1 -1
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +4 -4
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +27 -27
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +1 -1
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +1 -1
- package/dist/src/lib/utils.d.ts +1 -2
- package/package.json +1 -1
package/dist/index58.js
CHANGED
|
@@ -1,168 +1,165 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { parseAccount as K } from "./index45.js";
|
|
1
|
+
import { parseAccount as $ } from "./index45.js";
|
|
3
2
|
import { multicall3Abi as z } from "./index21.js";
|
|
4
|
-
import { aggregate3Signature as
|
|
5
|
-
import { deploylessCallViaBytecodeBytecode as
|
|
6
|
-
import { BaseError as
|
|
7
|
-
import { ClientChainNotConfiguredError as
|
|
8
|
-
import { CounterfactualDeploymentFailedError as
|
|
9
|
-
import { decodeFunctionResult as
|
|
10
|
-
import { encodeDeployData as
|
|
11
|
-
import { encodeFunctionData as
|
|
12
|
-
import { getChainContractAddress as
|
|
13
|
-
import { numberToHex as
|
|
14
|
-
import { getCallError as
|
|
15
|
-
import { extract as
|
|
16
|
-
import { formatTransactionRequest as
|
|
17
|
-
import { createBatchScheduler as
|
|
18
|
-
import { serializeStateOverride as
|
|
19
|
-
import { assertRequest as
|
|
20
|
-
import { parseAbi as
|
|
21
|
-
async function
|
|
22
|
-
var E,
|
|
23
|
-
const { account: e = t.account, batch:
|
|
24
|
-
if (
|
|
25
|
-
throw new
|
|
26
|
-
if (
|
|
27
|
-
throw new
|
|
28
|
-
const
|
|
29
|
-
code:
|
|
30
|
-
data:
|
|
31
|
-
}) :
|
|
32
|
-
data:
|
|
33
|
-
factory:
|
|
34
|
-
factoryData:
|
|
35
|
-
to:
|
|
36
|
-
}) :
|
|
3
|
+
import { aggregate3Signature as W } from "./index233.js";
|
|
4
|
+
import { deploylessCallViaBytecodeBytecode as I, deploylessCallViaFactoryBytecode as J } from "./index118.js";
|
|
5
|
+
import { BaseError as S } from "./index38.js";
|
|
6
|
+
import { ClientChainNotConfiguredError as O, ChainDoesNotSupportContract as K } from "./index139.js";
|
|
7
|
+
import { CounterfactualDeploymentFailedError as Q, RawContractError as U } from "./index127.js";
|
|
8
|
+
import { decodeFunctionResult as X } from "./index170.js";
|
|
9
|
+
import { encodeDeployData as T } from "./index174.js";
|
|
10
|
+
import { encodeFunctionData as Y } from "./index177.js";
|
|
11
|
+
import { getChainContractAddress as Z } from "./index214.js";
|
|
12
|
+
import { numberToHex as j } from "./index150.js";
|
|
13
|
+
import { getCallError as tt } from "./index234.js";
|
|
14
|
+
import { extract as at } from "./index235.js";
|
|
15
|
+
import { formatTransactionRequest as et } from "./index184.js";
|
|
16
|
+
import { createBatchScheduler as ot } from "./index49.js";
|
|
17
|
+
import { serializeStateOverride as rt } from "./index236.js";
|
|
18
|
+
import { assertRequest as ct } from "./index197.js";
|
|
19
|
+
import { parseAbi as G } from "./index237.js";
|
|
20
|
+
async function qt(t, a) {
|
|
21
|
+
var E, P, V, _;
|
|
22
|
+
const { account: e = t.account, batch: s = !!((E = t.batch) != null && E.multicall), blockNumber: o, blockTag: h = "latest", accessList: x, blobs: k, code: i, data: n, factory: d, factoryData: l, gas: F, gasPrice: u, maxFeePerBlobGas: B, maxFeePerGas: y, maxPriorityFeePerGas: f, nonce: m, to: r, value: p, stateOverride: g, ...L } = a, w = e ? $(e) : void 0;
|
|
23
|
+
if (i && (d || l))
|
|
24
|
+
throw new S("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
|
|
25
|
+
if (i && r)
|
|
26
|
+
throw new S("Cannot provide both `code` & `to` as parameters.");
|
|
27
|
+
const A = i && n, R = d && l && r && n, q = A || R, M = A ? it({
|
|
28
|
+
code: i,
|
|
29
|
+
data: n
|
|
30
|
+
}) : R ? lt({
|
|
31
|
+
data: n,
|
|
32
|
+
factory: d,
|
|
33
|
+
factoryData: l,
|
|
34
|
+
to: r
|
|
35
|
+
}) : n;
|
|
37
36
|
try {
|
|
38
|
-
|
|
39
|
-
const c = (
|
|
37
|
+
ct(a);
|
|
38
|
+
const c = (o ? j(o) : void 0) || h, b = rt(g), C = (_ = (V = (P = t.chain) == null ? void 0 : P.formatters) == null ? void 0 : V.transactionRequest) == null ? void 0 : _.format, D = (C || et)({
|
|
40
39
|
// Pick out extra data that might exist on the chain's transaction request type.
|
|
41
|
-
...
|
|
42
|
-
from:
|
|
40
|
+
...at(L, { format: C }),
|
|
41
|
+
from: w == null ? void 0 : w.address,
|
|
43
42
|
accessList: x,
|
|
44
|
-
blobs:
|
|
45
|
-
data:
|
|
46
|
-
gas:
|
|
47
|
-
gasPrice:
|
|
48
|
-
maxFeePerBlobGas:
|
|
49
|
-
maxFeePerGas:
|
|
50
|
-
maxPriorityFeePerGas:
|
|
51
|
-
nonce:
|
|
52
|
-
to: q ? void 0 :
|
|
53
|
-
value:
|
|
43
|
+
blobs: k,
|
|
44
|
+
data: M,
|
|
45
|
+
gas: F,
|
|
46
|
+
gasPrice: u,
|
|
47
|
+
maxFeePerBlobGas: B,
|
|
48
|
+
maxFeePerGas: y,
|
|
49
|
+
maxPriorityFeePerGas: f,
|
|
50
|
+
nonce: m,
|
|
51
|
+
to: q ? void 0 : r,
|
|
52
|
+
value: p
|
|
54
53
|
});
|
|
55
|
-
if (
|
|
54
|
+
if (s && nt({ request: D }) && !b)
|
|
56
55
|
try {
|
|
57
|
-
return await
|
|
58
|
-
...
|
|
59
|
-
blockNumber:
|
|
60
|
-
blockTag:
|
|
56
|
+
return await st(t, {
|
|
57
|
+
...D,
|
|
58
|
+
blockNumber: o,
|
|
59
|
+
blockTag: h
|
|
61
60
|
});
|
|
62
|
-
} catch (
|
|
63
|
-
if (!(
|
|
64
|
-
throw
|
|
61
|
+
} catch (v) {
|
|
62
|
+
if (!(v instanceof O) && !(v instanceof K))
|
|
63
|
+
throw v;
|
|
65
64
|
}
|
|
66
|
-
const
|
|
67
|
-
const s = [
|
|
68
|
-
N,
|
|
69
|
-
c
|
|
70
|
-
];
|
|
71
|
-
return u && d ? [...s, u, d] : u ? [...s, u] : d ? [...s, {}, d] : s;
|
|
72
|
-
})(), H = await t.request({
|
|
65
|
+
const H = await t.request({
|
|
73
66
|
method: "eth_call",
|
|
74
|
-
params:
|
|
67
|
+
params: b ? [
|
|
68
|
+
D,
|
|
69
|
+
c,
|
|
70
|
+
b
|
|
71
|
+
] : [D, c]
|
|
75
72
|
});
|
|
76
73
|
return H === "0x" ? { data: void 0 } : { data: H };
|
|
77
|
-
} catch (
|
|
78
|
-
const c =
|
|
79
|
-
if (t.ccipRead !== !1 && (c == null ? void 0 : c.slice(0, 10)) ===
|
|
80
|
-
return { data: await
|
|
81
|
-
throw q && (c == null ? void 0 : c.slice(0, 10)) === "0x101bb98d" ? new
|
|
74
|
+
} catch (N) {
|
|
75
|
+
const c = dt(N), { offchainLookup: b, offchainLookupSignature: C } = await import("./index201.js");
|
|
76
|
+
if (t.ccipRead !== !1 && (c == null ? void 0 : c.slice(0, 10)) === C && r)
|
|
77
|
+
return { data: await b(t, { data: c, to: r }) };
|
|
78
|
+
throw q && (c == null ? void 0 : c.slice(0, 10)) === "0x101bb98d" ? new Q({ factory: d }) : tt(N, {
|
|
82
79
|
...a,
|
|
83
|
-
account:
|
|
80
|
+
account: w,
|
|
84
81
|
chain: t.chain
|
|
85
82
|
});
|
|
86
83
|
}
|
|
87
84
|
}
|
|
88
|
-
function
|
|
89
|
-
const { data: a, to: e, ...
|
|
90
|
-
return !(!a || a.startsWith(
|
|
85
|
+
function nt({ request: t }) {
|
|
86
|
+
const { data: a, to: e, ...s } = t;
|
|
87
|
+
return !(!a || a.startsWith(W) || !e || Object.values(s).filter((o) => typeof o < "u").length > 0);
|
|
91
88
|
}
|
|
92
|
-
async function
|
|
93
|
-
var
|
|
94
|
-
const { batchSize: e = 1024, wait:
|
|
95
|
-
let n =
|
|
89
|
+
async function st(t, a) {
|
|
90
|
+
var y;
|
|
91
|
+
const { batchSize: e = 1024, wait: s = 0 } = typeof ((y = t.batch) == null ? void 0 : y.multicall) == "object" ? t.batch.multicall : {}, { blockNumber: o, blockTag: h = "latest", data: x, multicallAddress: k, to: i } = a;
|
|
92
|
+
let n = k;
|
|
96
93
|
if (!n) {
|
|
97
94
|
if (!t.chain)
|
|
98
|
-
throw new
|
|
99
|
-
n =
|
|
100
|
-
blockNumber:
|
|
95
|
+
throw new O();
|
|
96
|
+
n = Z({
|
|
97
|
+
blockNumber: o,
|
|
101
98
|
chain: t.chain,
|
|
102
99
|
contract: "multicall3"
|
|
103
100
|
});
|
|
104
101
|
}
|
|
105
|
-
const l = (
|
|
102
|
+
const l = (o ? j(o) : void 0) || h, { schedule: F } = ot({
|
|
106
103
|
id: `${t.uid}.${l}`,
|
|
107
|
-
wait:
|
|
108
|
-
shouldSplitBatch(
|
|
109
|
-
return
|
|
104
|
+
wait: s,
|
|
105
|
+
shouldSplitBatch(f) {
|
|
106
|
+
return f.reduce((r, { data: p }) => r + (p.length - 2), 0) > e * 2;
|
|
110
107
|
},
|
|
111
|
-
fn: async (
|
|
112
|
-
const
|
|
108
|
+
fn: async (f) => {
|
|
109
|
+
const m = f.map((g) => ({
|
|
113
110
|
allowFailure: !0,
|
|
114
|
-
callData:
|
|
115
|
-
target:
|
|
116
|
-
})),
|
|
111
|
+
callData: g.data,
|
|
112
|
+
target: g.to
|
|
113
|
+
})), r = Y({
|
|
117
114
|
abi: z,
|
|
118
|
-
args: [
|
|
115
|
+
args: [m],
|
|
119
116
|
functionName: "aggregate3"
|
|
120
|
-
}),
|
|
117
|
+
}), p = await t.request({
|
|
121
118
|
method: "eth_call",
|
|
122
119
|
params: [
|
|
123
120
|
{
|
|
124
|
-
data:
|
|
121
|
+
data: r,
|
|
125
122
|
to: n
|
|
126
123
|
},
|
|
127
124
|
l
|
|
128
125
|
]
|
|
129
126
|
});
|
|
130
|
-
return
|
|
127
|
+
return X({
|
|
131
128
|
abi: z,
|
|
132
|
-
args: [
|
|
129
|
+
args: [m],
|
|
133
130
|
functionName: "aggregate3",
|
|
134
|
-
data:
|
|
131
|
+
data: p || "0x"
|
|
135
132
|
});
|
|
136
133
|
}
|
|
137
|
-
}), [{ returnData:
|
|
138
|
-
if (!
|
|
139
|
-
throw new
|
|
140
|
-
return
|
|
134
|
+
}), [{ returnData: u, success: B }] = await F({ data: x, to: i });
|
|
135
|
+
if (!B)
|
|
136
|
+
throw new U({ data: u });
|
|
137
|
+
return u === "0x" ? { data: void 0 } : { data: u };
|
|
141
138
|
}
|
|
142
|
-
function
|
|
139
|
+
function it(t) {
|
|
143
140
|
const { code: a, data: e } = t;
|
|
144
|
-
return
|
|
145
|
-
abi:
|
|
146
|
-
bytecode:
|
|
141
|
+
return T({
|
|
142
|
+
abi: G(["constructor(bytes, bytes)"]),
|
|
143
|
+
bytecode: I,
|
|
147
144
|
args: [a, e]
|
|
148
145
|
});
|
|
149
146
|
}
|
|
150
|
-
function
|
|
151
|
-
const { data: a, factory: e, factoryData:
|
|
152
|
-
return
|
|
153
|
-
abi:
|
|
154
|
-
bytecode:
|
|
155
|
-
args: [
|
|
147
|
+
function lt(t) {
|
|
148
|
+
const { data: a, factory: e, factoryData: s, to: o } = t;
|
|
149
|
+
return T({
|
|
150
|
+
abi: G(["constructor(address, bytes, address, bytes)"]),
|
|
151
|
+
bytecode: J,
|
|
152
|
+
args: [o, a, e, s]
|
|
156
153
|
});
|
|
157
154
|
}
|
|
158
|
-
function
|
|
155
|
+
function dt(t) {
|
|
159
156
|
var e;
|
|
160
|
-
if (!(t instanceof
|
|
157
|
+
if (!(t instanceof S))
|
|
161
158
|
return;
|
|
162
159
|
const a = t.walk();
|
|
163
160
|
return typeof (a == null ? void 0 : a.data) == "object" ? (e = a.data) == null ? void 0 : e.data : a.data;
|
|
164
161
|
}
|
|
165
162
|
export {
|
|
166
|
-
|
|
167
|
-
|
|
163
|
+
qt as call,
|
|
164
|
+
dt as getRevertErrorData
|
|
168
165
|
};
|
package/dist/index59.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index45.cjs"),R=require("./index150.cjs"),F=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index45.cjs"),R=require("./index150.cjs"),F=require("./index234.cjs"),H=require("./index235.cjs"),T=require("./index184.cjs"),G=require("./index197.cjs");async function N(e,s){var c,o,n;const{account:r=e.account,blockNumber:a,blockTag:b="latest",blobs:l,data:q,gas:d,gasPrice:f,maxFeePerBlobGas:x,maxFeePerGas:g,maxPriorityFeePerGas:h,to:P,value:k,...p}=s,t=r?L.parseAccount(r):void 0;try{G.assertRequest(s);const y=(a?R.numberToHex(a):void 0)||b,i=(n=(o=(c=e.chain)==null?void 0:c.formatters)==null?void 0:o.transactionRequest)==null?void 0:n.format,A=(i||T.formatTransactionRequest)({...H.extract(p,{format:i}),from:t==null?void 0:t.address,blobs:l,data:q,gas:d,gasPrice:f,maxFeePerBlobGas:x,maxFeePerGas:g,maxPriorityFeePerGas:h,to:P,value:k}),m=await e.request({method:"eth_createAccessList",params:[A,y]});return{accessList:m.accessList,gasUsed:BigInt(m.gasUsed)}}catch(u){throw F.getCallError(u,{...s,account:t,chain:e.chain})}}exports.createAccessList=N;
|
package/dist/index59.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { parseAccount as
|
|
1
|
+
import { parseAccount as y } from "./index45.js";
|
|
2
2
|
import { numberToHex as A } from "./index150.js";
|
|
3
|
-
import { getCallError as G } from "./
|
|
4
|
-
import { extract as H } from "./
|
|
3
|
+
import { getCallError as G } from "./index234.js";
|
|
4
|
+
import { extract as H } from "./index235.js";
|
|
5
5
|
import { formatTransactionRequest as N } from "./index184.js";
|
|
6
6
|
import { assertRequest as R } from "./index197.js";
|
|
7
7
|
async function E(t, r) {
|
|
8
8
|
var a, c, m;
|
|
9
|
-
const { account: o = t.account, blockNumber: s, blockTag:
|
|
9
|
+
const { account: o = t.account, blockNumber: s, blockTag: f = "latest", blobs: b, data: d, gas: p, gasPrice: h, maxFeePerBlobGas: l, maxFeePerGas: x, maxPriorityFeePerGas: g, to: k, value: q, ...P } = r, e = o ? y(o) : void 0;
|
|
10
10
|
try {
|
|
11
11
|
R(r);
|
|
12
|
-
const
|
|
12
|
+
const F = (s ? A(s) : void 0) || f, i = (m = (c = (a = t.chain) == null ? void 0 : a.formatters) == null ? void 0 : c.transactionRequest) == null ? void 0 : m.format, L = (i || N)({
|
|
13
13
|
// Pick out extra data that might exist on the chain's transaction request type.
|
|
14
14
|
...H(P, { format: i }),
|
|
15
15
|
from: e == null ? void 0 : e.address,
|
|
16
16
|
blobs: b,
|
|
17
|
-
data:
|
|
18
|
-
gas:
|
|
17
|
+
data: d,
|
|
18
|
+
gas: p,
|
|
19
19
|
gasPrice: h,
|
|
20
20
|
maxFeePerBlobGas: l,
|
|
21
21
|
maxFeePerGas: x,
|
|
22
22
|
maxPriorityFeePerGas: g,
|
|
23
23
|
to: k,
|
|
24
24
|
value: q
|
|
25
|
-
}),
|
|
25
|
+
}), u = await t.request({
|
|
26
26
|
method: "eth_createAccessList",
|
|
27
|
-
params: [
|
|
27
|
+
params: [L, F]
|
|
28
28
|
});
|
|
29
29
|
return {
|
|
30
|
-
accessList:
|
|
31
|
-
gasUsed: BigInt(
|
|
30
|
+
accessList: u.accessList,
|
|
31
|
+
gasUsed: BigInt(u.gasUsed)
|
|
32
32
|
};
|
|
33
33
|
} catch (n) {
|
|
34
34
|
throw G(n, {
|
package/dist/index60.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index238.cjs");async function o(e){const r=c.createFilterRequestScope(e,{method:"eth_newBlockFilter"}),t=await e.request({method:"eth_newBlockFilter"});return{id:t,request:r(t),type:"block"}}exports.createBlockFilter=o;
|
package/dist/index60.js
CHANGED
package/dist/index61.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index176.cjs"),u=require("./index150.cjs"),q=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index176.cjs"),u=require("./index150.cjs"),q=require("./index238.cjs");async function f(o,{address:d,args:s,event:e,events:p,fromBlock:n,strict:b,toBlock:i}={}){const r=p??(e?[e]:void 0),l=q.createFilterRequestScope(o,{method:"eth_newFilter"});let t=[];r&&(t=[r.flatMap(a=>m.encodeEventTopics({abi:[a],eventName:a.name,args:s}))],e&&(t=t[0]));const c=await o.request({method:"eth_newFilter",params:[{address:d,fromBlock:typeof n=="bigint"?u.numberToHex(n):n,toBlock:typeof i=="bigint"?u.numberToHex(i):i,...t.length?{topics:t}:{}}]});return{abi:r,args:s,eventName:e?e.name:void 0,fromBlock:n,id:c,request:l(c),strict:!!b,toBlock:i,type:"event"}}exports.createEventFilter=f;
|
package/dist/index61.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { encodeEventTopics as b } from "./index176.js";
|
|
2
2
|
import { numberToHex as m } from "./index150.js";
|
|
3
|
-
import { createFilterRequestScope as h } from "./
|
|
3
|
+
import { createFilterRequestScope as h } from "./index238.js";
|
|
4
4
|
async function l(r, { address: p, args: a, event: e, events: c, fromBlock: n, strict: f, toBlock: i } = {}) {
|
|
5
5
|
const o = c ?? (e ? [e] : void 0), u = h(r, {
|
|
6
6
|
method: "eth_newFilter"
|
package/dist/index62.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index238.cjs");async function i(e){const n=r.createFilterRequestScope(e,{method:"eth_newPendingTransactionFilter"}),t=await e.request({method:"eth_newPendingTransactionFilter"});return{id:t,request:n(t),type:"transaction"}}exports.createPendingTransactionFilter=i;
|
package/dist/index62.js
CHANGED
package/dist/index64.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index45.cjs"),N=require("./index38.cjs"),_=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./index45.cjs"),N=require("./index38.cjs"),_=require("./index239.cjs"),G=require("./index150.cjs"),I=require("./index240.cjs"),V=require("./index235.cjs"),j=require("./index184.cjs"),C=require("./index236.cjs"),M=require("./index197.cjs"),$=require("./index96.cjs"),D=require("./index66.cjs");async function J(r,n){var m,q,f;const{account:d=r.account}=n,e=d?L.parseAccount(d):void 0;try{let x=function(u){const{block:o,request:t,rpcStateOverride:s}=u;return r.request({method:"eth_estimateGas",params:s?[t,o??"latest",s]:o?[t,o]:[t]})};const{accessList:i,authorizationList:a,blobs:y,blobVersionedHashes:z,blockNumber:l,blockTag:H,data:b,gas:O,gasPrice:P,maxFeePerBlobGas:R,maxFeePerGas:T,maxPriorityFeePerGas:k,nonce:A,value:B,stateOverride:E,...c}=await $.prepareTransactionRequest(r,{...n,parameters:(e==null?void 0:e.type)==="local"?void 0:["blobVersionedHashes"]}),h=(l?G.numberToHex(l):void 0)||H,p=C.serializeStateOverride(E),S=await(async()=>{if(c.to)return c.to;if(a&&a.length>0)return await _.recoverAuthorizationAddress({authorization:a[0]}).catch(()=>{throw new N.BaseError("`to` is required. Could not infer from `authorizationList`")})})();M.assertRequest(n);const v=(f=(q=(m=r.chain)==null?void 0:m.formatters)==null?void 0:q.transactionRequest)==null?void 0:f.format,w=(v||j.formatTransactionRequest)({...V.extract(c,{format:v}),from:e==null?void 0:e.address,accessList:i,authorizationList:a,blobs:y,blobVersionedHashes:z,data:b,gas:O,gasPrice:P,maxFeePerBlobGas:R,maxFeePerGas:T,maxPriorityFeePerGas:k,nonce:A,to:S,value:B});let g=BigInt(await x({block:h,request:w,rpcStateOverride:p}));if(a){const u=await D.getBalance(r,{address:w.from}),o=await Promise.all(a.map(async t=>{const{address:s}=t,F=await x({block:h,request:{authorizationList:void 0,data:b,from:e==null?void 0:e.address,to:s,value:G.numberToHex(u)},rpcStateOverride:p}).catch(()=>100000n);return 2n*BigInt(F)}));g+=o.reduce((t,s)=>t+s,0n)}return g}catch(i){throw I.getEstimateGasError(i,{...n,account:e,chain:r.chain})}}exports.estimateGas=J;
|
package/dist/index64.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { parseAccount as N } from "./index45.js";
|
|
2
2
|
import { BaseError as S } from "./index38.js";
|
|
3
|
-
import { recoverAuthorizationAddress as _ } from "./
|
|
4
|
-
import { numberToHex as
|
|
5
|
-
import { getEstimateGasError as I } from "./
|
|
6
|
-
import { extract as V } from "./
|
|
3
|
+
import { recoverAuthorizationAddress as _ } from "./index239.js";
|
|
4
|
+
import { numberToHex as k } from "./index150.js";
|
|
5
|
+
import { getEstimateGasError as I } from "./index240.js";
|
|
6
|
+
import { extract as V } from "./index235.js";
|
|
7
7
|
import { formatTransactionRequest as C } from "./index184.js";
|
|
8
|
-
import { serializeStateOverride as j } from "./
|
|
8
|
+
import { serializeStateOverride as j } from "./index236.js";
|
|
9
9
|
import { assertRequest as D } from "./index197.js";
|
|
10
10
|
import { prepareTransactionRequest as J } from "./index96.js";
|
|
11
11
|
import { getBalance as K } from "./index66.js";
|
|
@@ -14,25 +14,25 @@ async function st(r, i) {
|
|
|
14
14
|
const { account: u = r.account } = i, t = u ? N(u) : void 0;
|
|
15
15
|
try {
|
|
16
16
|
let x = function(c) {
|
|
17
|
-
const { block: s, request: e, rpcStateOverride:
|
|
17
|
+
const { block: s, request: e, rpcStateOverride: o } = c;
|
|
18
18
|
return r.request({
|
|
19
19
|
method: "eth_estimateGas",
|
|
20
|
-
params:
|
|
20
|
+
params: o ? [e, s ?? "latest", o] : s ? [e, s] : [e]
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
|
-
const { accessList: n, authorizationList:
|
|
23
|
+
const { accessList: n, authorizationList: a, blobs: y, blobVersionedHashes: z, blockNumber: h, blockTag: P, data: l, gas: g, gasPrice: B, maxFeePerBlobGas: H, maxFeePerGas: F, maxPriorityFeePerGas: L, nonce: O, value: R, stateOverride: T, ...m } = await J(r, {
|
|
24
24
|
...i,
|
|
25
25
|
parameters: (
|
|
26
26
|
// Some RPC Providers do not compute versioned hashes from blobs. We will need
|
|
27
27
|
// to compute them.
|
|
28
28
|
(t == null ? void 0 : t.type) === "local" ? void 0 : ["blobVersionedHashes"]
|
|
29
29
|
)
|
|
30
|
-
}),
|
|
30
|
+
}), b = (h ? k(h) : void 0) || P, w = j(T), A = await (async () => {
|
|
31
31
|
if (m.to)
|
|
32
32
|
return m.to;
|
|
33
|
-
if (
|
|
33
|
+
if (a && a.length > 0)
|
|
34
34
|
return await _({
|
|
35
|
-
authorization:
|
|
35
|
+
authorization: a[0]
|
|
36
36
|
}).catch(() => {
|
|
37
37
|
throw new S("`to` is required. Could not infer from `authorizationList`");
|
|
38
38
|
});
|
|
@@ -43,11 +43,11 @@ async function st(r, i) {
|
|
|
43
43
|
...V(m, { format: q }),
|
|
44
44
|
from: t == null ? void 0 : t.address,
|
|
45
45
|
accessList: n,
|
|
46
|
-
authorizationList:
|
|
47
|
-
blobs:
|
|
48
|
-
blobVersionedHashes:
|
|
49
|
-
data:
|
|
50
|
-
gas:
|
|
46
|
+
authorizationList: a,
|
|
47
|
+
blobs: y,
|
|
48
|
+
blobVersionedHashes: z,
|
|
49
|
+
data: l,
|
|
50
|
+
gas: g,
|
|
51
51
|
gasPrice: B,
|
|
52
52
|
maxFeePerBlobGas: H,
|
|
53
53
|
maxFeePerGas: F,
|
|
@@ -56,25 +56,25 @@ async function st(r, i) {
|
|
|
56
56
|
to: A,
|
|
57
57
|
value: R
|
|
58
58
|
});
|
|
59
|
-
let
|
|
60
|
-
if (
|
|
61
|
-
const c = await K(r, { address: v.from }), s = await Promise.all(
|
|
62
|
-
const { address:
|
|
63
|
-
block:
|
|
59
|
+
let G = BigInt(await x({ block: b, request: v, rpcStateOverride: w }));
|
|
60
|
+
if (a) {
|
|
61
|
+
const c = await K(r, { address: v.from }), s = await Promise.all(a.map(async (e) => {
|
|
62
|
+
const { address: o } = e, E = await x({
|
|
63
|
+
block: b,
|
|
64
64
|
request: {
|
|
65
65
|
authorizationList: void 0,
|
|
66
|
-
data:
|
|
66
|
+
data: l,
|
|
67
67
|
from: t == null ? void 0 : t.address,
|
|
68
|
-
to:
|
|
69
|
-
value:
|
|
68
|
+
to: o,
|
|
69
|
+
value: k(c)
|
|
70
70
|
},
|
|
71
71
|
rpcStateOverride: w
|
|
72
72
|
}).catch(() => 100000n);
|
|
73
73
|
return 2n * BigInt(E);
|
|
74
74
|
}));
|
|
75
|
-
|
|
75
|
+
G += s.reduce((e, o) => e + o, 0n);
|
|
76
76
|
}
|
|
77
|
-
return
|
|
77
|
+
return G;
|
|
78
78
|
} catch (n) {
|
|
79
79
|
throw I(n, {
|
|
80
80
|
...i,
|
package/dist/index66.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index150.cjs");async function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index150.cjs");async function s(t,{address:n,blockNumber:e,blockTag:a="latest"}){const c=e?r.numberToHex(e):void 0,o=await t.request({method:"eth_getBalance",params:[n,c||a]});return BigInt(o)}exports.getBalance=s;
|
package/dist/index66.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { numberToHex as c } from "./index150.js";
|
|
2
|
-
async function
|
|
3
|
-
const o =
|
|
2
|
+
async function i(t, { address: n, blockNumber: e, blockTag: a = "latest" }) {
|
|
3
|
+
const o = e ? c(e) : void 0, r = await t.request({
|
|
4
4
|
method: "eth_getBalance",
|
|
5
5
|
params: [n, o || a]
|
|
6
6
|
});
|
|
7
7
|
return BigInt(r);
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
i as getBalance
|
|
11
11
|
};
|
package/dist/index73.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index241.cjs"),d=require("./index29.cjs"),f=require("./index33.cjs");async function g(a,i){const{address:n,factory:r,factoryData:o}=i;try{const[e,t,c,s,u,m,y]=await d.getAction(a,f.readContract,"readContract")({abi:l,address:n,functionName:"eip712Domain",factory:r,factoryData:o});return{domain:{name:t,version:c,chainId:Number(s),verifyingContract:u,salt:m},extensions:y,fields:e}}catch(e){const t=e;throw t.name==="ContractFunctionExecutionError"&&t.cause.name==="ContractFunctionZeroDataError"?new p.Eip712DomainNotFoundError({address:n}):t}}const l=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];exports.getEip712Domain=g;
|
package/dist/index73.js
CHANGED
package/dist/index74.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index150.cjs"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index150.cjs"),a=require("./index242.cjs");async function H(r,{blockCount:s,blockNumber:e,blockTag:n="latest",rewardPercentiles:i}){const t=e?o.numberToHex(e):void 0,u=await r.request({method:"eth_feeHistory",params:[o.numberToHex(s),t||n,i]},{dedupe:!!t});return a.formatFeeHistory(u)}exports.getFeeHistory=H;
|
package/dist/index74.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { numberToHex as o } from "./index150.js";
|
|
2
|
-
import { formatFeeHistory as
|
|
3
|
-
async function
|
|
4
|
-
const t =
|
|
2
|
+
import { formatFeeHistory as m } from "./index242.js";
|
|
3
|
+
async function H(r, { blockCount: n, blockNumber: e, blockTag: s = "latest", rewardPercentiles: i }) {
|
|
4
|
+
const t = e ? o(e) : void 0, a = await r.request({
|
|
5
5
|
method: "eth_feeHistory",
|
|
6
6
|
params: [
|
|
7
|
-
o(
|
|
8
|
-
t ||
|
|
9
|
-
|
|
7
|
+
o(n),
|
|
8
|
+
t || s,
|
|
9
|
+
i
|
|
10
10
|
]
|
|
11
11
|
}, { dedupe: !!t });
|
|
12
|
-
return
|
|
12
|
+
return m(a);
|
|
13
13
|
}
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
H as getFeeHistory
|
|
16
16
|
};
|
package/dist/index79.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index150.cjs"),u=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index150.cjs"),u=require("./index249.cjs");async function i(o,{address:t,blockNumber:e,blockTag:r,storageKeys:n}){const a=r??"latest",c=e!==void 0?s.numberToHex(e):void 0,f=await o.request({method:"eth_getProof",params:[t,n,c||a]});return u.formatProof(f)}exports.getProof=i;
|
package/dist/index79.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { numberToHex as c } from "./index150.js";
|
|
2
|
-
import { formatProof as s } from "./
|
|
2
|
+
import { formatProof as s } from "./index249.js";
|
|
3
3
|
async function d(t, { address: e, blockNumber: o, blockTag: r, storageKeys: n }) {
|
|
4
4
|
const f = r ?? "latest", a = o !== void 0 ? c(o) : void 0, m = await t.request({
|
|
5
5
|
method: "eth_getProof",
|
package/dist/index83.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index182.cjs"),u=require("./index150.cjs");async function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index182.cjs"),u=require("./index150.cjs");async function s(e,{address:n,blockTag:o="latest",blockNumber:t}){const r=await e.request({method:"eth_getTransactionCount",params:[n,t?u.numberToHex(t):o]},{dedupe:!!t});return a.hexToNumber(r)}exports.getTransactionCount=s;
|
package/dist/index83.js
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import { hexToNumber as r } from "./index182.js";
|
|
2
|
-
import { numberToHex as
|
|
2
|
+
import { numberToHex as s } from "./index150.js";
|
|
3
3
|
async function m(o, { address: e, blockTag: n = "latest", blockNumber: t }) {
|
|
4
4
|
const a = await o.request({
|
|
5
5
|
method: "eth_getTransactionCount",
|
|
6
|
-
params: [
|
|
7
|
-
|
|
8
|
-
typeof t == "bigint" ? i(t) : n
|
|
9
|
-
]
|
|
10
|
-
}, {
|
|
11
|
-
dedupe: !!t
|
|
12
|
-
});
|
|
6
|
+
params: [e, t ? s(t) : n]
|
|
7
|
+
}, { dedupe: !!t });
|
|
13
8
|
return r(a);
|
|
14
9
|
}
|
|
15
10
|
export {
|
package/dist/index85.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("./index243.cjs"),F=require("./index45.cjs"),y=require("./index122.cjs"),C=require("./index127.cjs"),H=require("./index143.cjs"),S=require("./index170.cjs"),A=require("./index177.cjs"),U=require("./index150.cjs"),j=require("./index221.cjs"),z=require("./index244.cjs"),I=require("./index155.cjs"),L=require("./index157.cjs"),M=require("./index184.cjs"),P=require("./index236.cjs"),V=require("./index197.cjs");async function Z(p,O){const{blockNumber:m,blockTag:w="latest",blocks:q,returnFullTransactions:N,traceTransfers:R,validation:x}=O;try{const c=[];for(const t of q){const l=t.blockOverrides?D.toRpc(t.blockOverrides):void 0,e=t.calls.map(n=>{const r=n,s=r.account?F.parseAccount(r.account):void 0,u={...r,data:r.abi?A.encodeFunctionData(r):r.data,from:r.from??(s==null?void 0:s.address)};return V.assertRequest(u),M.formatTransactionRequest(u)}),f=t.stateOverrides?P.serializeStateOverride(t.stateOverrides):void 0;c.push({blockOverrides:l,calls:e,stateOverrides:f})}const a=(m?U.numberToHex(m):void 0)||w;return(await p.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:N,traceTransfers:R,validation:x},a]})).map((t,l)=>({...I.formatBlock(t),calls:t.calls.map((e,f)=>{var k,g;const{abi:n,args:r,functionName:s,to:u}=q[l].calls[f],b=((k=e.error)==null?void 0:k.data)??e.returnData,E=BigInt(e.gasUsed),h=(g=e.logs)==null?void 0:g.map(o=>L.formatLog(o)),i=e.status==="0x1"?"success":"failure",T=n&&i==="success"&&b!=="0x"?S.decodeFunctionResult({abi:n,data:b,functionName:s}):null,B=(()=>{var v;if(i==="success")return;let o;if(((v=e.error)==null?void 0:v.data)==="0x"?o=new y.AbiDecodingZeroDataError:e.error&&(o=new C.RawContractError(e.error)),!!o)return j.getContractError(o,{abi:n??[],address:u,args:r,functionName:s??"<unknown>"})})();return{data:b,gasUsed:E,logs:h,status:i,...i==="success"?{result:T}:{error:B}}})}))}catch(c){const d=c,a=z.getNodeError(d,{});throw a instanceof H.UnknownNodeError?d:a}}exports.simulateBlocks=Z;
|