@t2000/cli 0.22.25 → 0.23.0
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/README.md +11 -97
- package/dist/{ccip-JEEJV65M.js → ccip-XP27NGI7.js} +3 -3
- package/dist/{chunk-A5X4KG7U.js → chunk-3I6VJOM6.js} +210 -970
- package/dist/chunk-3I6VJOM6.js.map +1 -0
- package/dist/chunk-4N76GQCL.js +35382 -0
- package/dist/chunk-4N76GQCL.js.map +1 -0
- package/dist/{chunk-XOAZJ42V.js → chunk-DWOZSUBE.js} +588 -584
- package/dist/{chunk-XOAZJ42V.js.map → chunk-DWOZSUBE.js.map} +1 -1
- package/dist/chunk-EI3GHTKX.js +968 -0
- package/dist/chunk-EI3GHTKX.js.map +1 -0
- package/dist/{chunk-EEPD7SHV.js → chunk-TYYJRUQI.js} +15755 -15918
- package/dist/chunk-TYYJRUQI.js.map +1 -0
- package/dist/client-5KJQTN5X.js +84 -0
- package/dist/client-5KJQTN5X.js.map +1 -0
- package/dist/{client-R3NRAXMD.js → client-IXUBQ3HM.js} +334 -638
- package/dist/client-IXUBQ3HM.js.map +1 -0
- package/dist/{dist-LKHCKFGY.js → dist-E7HUP73Q.js} +5 -29
- package/dist/{dist-ZTFOTMJO.js → dist-W4Q4YXD7.js} +4200 -603
- package/dist/dist-W4Q4YXD7.js.map +1 -0
- package/dist/index.js +29 -1016
- package/dist/index.js.map +1 -1
- package/package.json +5 -6
- package/dist/chunk-77SWBATH.js +0 -204
- package/dist/chunk-77SWBATH.js.map +0 -1
- package/dist/chunk-A5X4KG7U.js.map +0 -1
- package/dist/chunk-EEPD7SHV.js.map +0 -1
- package/dist/chunk-FM4762OE.js +0 -77733
- package/dist/chunk-FM4762OE.js.map +0 -1
- package/dist/client-CK5OR2TP.js +0 -746
- package/dist/client-CK5OR2TP.js.map +0 -1
- package/dist/client-R3NRAXMD.js.map +0 -1
- package/dist/dist-ZTFOTMJO.js.map +0 -1
- /package/dist/{ccip-JEEJV65M.js.map → ccip-XP27NGI7.js.map} +0 -0
- /package/dist/{dist-LKHCKFGY.js.map → dist-E7HUP73Q.js.map} +0 -0
|
@@ -1,781 +1,23 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from 'module'; import { fileURLToPath as __fileURLToPath } from 'url'; import { dirname as __pathDirname } from 'path'; const require = __createRequire(import.meta.url); const __filename = __fileURLToPath(import.meta.url); const __dirname = __pathDirname(__filename);
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
formatAbiItem,
|
|
4
|
+
keccak_256,
|
|
5
|
+
parseAbi
|
|
6
|
+
} from "./chunk-EI3GHTKX.js";
|
|
5
7
|
import {
|
|
6
8
|
equalBytes
|
|
7
9
|
} from "./chunk-7LGHVVIJ.js";
|
|
8
10
|
|
|
9
|
-
// ../../node_modules/.pnpm/
|
|
10
|
-
var version = "1.
|
|
11
|
+
// ../../node_modules/.pnpm/ox@0.14.5_typescript@5.9.3_zod@4.3.6/node_modules/ox/_esm/core/version.js
|
|
12
|
+
var version = "0.1.1";
|
|
11
13
|
|
|
12
|
-
// ../../node_modules/.pnpm/
|
|
13
|
-
var BaseError = class _BaseError extends Error {
|
|
14
|
-
constructor(shortMessage, args = {}) {
|
|
15
|
-
const details = args.cause instanceof _BaseError ? args.cause.details : args.cause?.message ? args.cause.message : args.details;
|
|
16
|
-
const docsPath6 = args.cause instanceof _BaseError ? args.cause.docsPath || args.docsPath : args.docsPath;
|
|
17
|
-
const message = [
|
|
18
|
-
shortMessage || "An error occurred.",
|
|
19
|
-
"",
|
|
20
|
-
...args.metaMessages ? [...args.metaMessages, ""] : [],
|
|
21
|
-
...docsPath6 ? [`Docs: https://abitype.dev${docsPath6}`] : [],
|
|
22
|
-
...details ? [`Details: ${details}`] : [],
|
|
23
|
-
`Version: abitype@${version}`
|
|
24
|
-
].join("\n");
|
|
25
|
-
super(message);
|
|
26
|
-
Object.defineProperty(this, "details", {
|
|
27
|
-
enumerable: true,
|
|
28
|
-
configurable: true,
|
|
29
|
-
writable: true,
|
|
30
|
-
value: void 0
|
|
31
|
-
});
|
|
32
|
-
Object.defineProperty(this, "docsPath", {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
configurable: true,
|
|
35
|
-
writable: true,
|
|
36
|
-
value: void 0
|
|
37
|
-
});
|
|
38
|
-
Object.defineProperty(this, "metaMessages", {
|
|
39
|
-
enumerable: true,
|
|
40
|
-
configurable: true,
|
|
41
|
-
writable: true,
|
|
42
|
-
value: void 0
|
|
43
|
-
});
|
|
44
|
-
Object.defineProperty(this, "shortMessage", {
|
|
45
|
-
enumerable: true,
|
|
46
|
-
configurable: true,
|
|
47
|
-
writable: true,
|
|
48
|
-
value: void 0
|
|
49
|
-
});
|
|
50
|
-
Object.defineProperty(this, "name", {
|
|
51
|
-
enumerable: true,
|
|
52
|
-
configurable: true,
|
|
53
|
-
writable: true,
|
|
54
|
-
value: "AbiTypeError"
|
|
55
|
-
});
|
|
56
|
-
if (args.cause)
|
|
57
|
-
this.cause = args.cause;
|
|
58
|
-
this.details = details;
|
|
59
|
-
this.docsPath = docsPath6;
|
|
60
|
-
this.metaMessages = args.metaMessages;
|
|
61
|
-
this.shortMessage = shortMessage;
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
// ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@3.25.76/node_modules/abitype/dist/esm/regex.js
|
|
66
|
-
function execTyped(regex, string) {
|
|
67
|
-
const match = regex.exec(string);
|
|
68
|
-
return match?.groups;
|
|
69
|
-
}
|
|
70
|
-
var bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;
|
|
71
|
-
var integerRegex = /^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;
|
|
72
|
-
var isTupleRegex = /^\(.+?\).*?$/;
|
|
73
|
-
|
|
74
|
-
// ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@3.25.76/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js
|
|
75
|
-
var tupleRegex = /^tuple(?<array>(\[(\d*)\])*)$/;
|
|
76
|
-
function formatAbiParameter(abiParameter) {
|
|
77
|
-
let type = abiParameter.type;
|
|
78
|
-
if (tupleRegex.test(abiParameter.type) && "components" in abiParameter) {
|
|
79
|
-
type = "(";
|
|
80
|
-
const length = abiParameter.components.length;
|
|
81
|
-
for (let i = 0; i < length; i++) {
|
|
82
|
-
const component = abiParameter.components[i];
|
|
83
|
-
type += formatAbiParameter(component);
|
|
84
|
-
if (i < length - 1)
|
|
85
|
-
type += ", ";
|
|
86
|
-
}
|
|
87
|
-
const result = execTyped(tupleRegex, abiParameter.type);
|
|
88
|
-
type += `)${result?.array || ""}`;
|
|
89
|
-
return formatAbiParameter({
|
|
90
|
-
...abiParameter,
|
|
91
|
-
type
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
if ("indexed" in abiParameter && abiParameter.indexed)
|
|
95
|
-
type = `${type} indexed`;
|
|
96
|
-
if (abiParameter.name)
|
|
97
|
-
return `${type} ${abiParameter.name}`;
|
|
98
|
-
return type;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@3.25.76/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js
|
|
102
|
-
function formatAbiParameters(abiParameters) {
|
|
103
|
-
let params = "";
|
|
104
|
-
const length = abiParameters.length;
|
|
105
|
-
for (let i = 0; i < length; i++) {
|
|
106
|
-
const abiParameter = abiParameters[i];
|
|
107
|
-
params += formatAbiParameter(abiParameter);
|
|
108
|
-
if (i !== length - 1)
|
|
109
|
-
params += ", ";
|
|
110
|
-
}
|
|
111
|
-
return params;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@3.25.76/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js
|
|
115
|
-
function formatAbiItem(abiItem) {
|
|
116
|
-
if (abiItem.type === "function")
|
|
117
|
-
return `function ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability && abiItem.stateMutability !== "nonpayable" ? ` ${abiItem.stateMutability}` : ""}${abiItem.outputs?.length ? ` returns (${formatAbiParameters(abiItem.outputs)})` : ""}`;
|
|
118
|
-
if (abiItem.type === "event")
|
|
119
|
-
return `event ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;
|
|
120
|
-
if (abiItem.type === "error")
|
|
121
|
-
return `error ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;
|
|
122
|
-
if (abiItem.type === "constructor")
|
|
123
|
-
return `constructor(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability === "payable" ? " payable" : ""}`;
|
|
124
|
-
if (abiItem.type === "fallback")
|
|
125
|
-
return `fallback() external${abiItem.stateMutability === "payable" ? " payable" : ""}`;
|
|
126
|
-
return "receive() external payable";
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@3.25.76/node_modules/abitype/dist/esm/human-readable/runtime/signatures.js
|
|
130
|
-
var errorSignatureRegex = /^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
|
|
131
|
-
function isErrorSignature(signature) {
|
|
132
|
-
return errorSignatureRegex.test(signature);
|
|
133
|
-
}
|
|
134
|
-
function execErrorSignature(signature) {
|
|
135
|
-
return execTyped(errorSignatureRegex, signature);
|
|
136
|
-
}
|
|
137
|
-
var eventSignatureRegex = /^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
|
|
138
|
-
function isEventSignature(signature) {
|
|
139
|
-
return eventSignatureRegex.test(signature);
|
|
140
|
-
}
|
|
141
|
-
function execEventSignature(signature) {
|
|
142
|
-
return execTyped(eventSignatureRegex, signature);
|
|
143
|
-
}
|
|
144
|
-
var functionSignatureRegex = /^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;
|
|
145
|
-
function isFunctionSignature(signature) {
|
|
146
|
-
return functionSignatureRegex.test(signature);
|
|
147
|
-
}
|
|
148
|
-
function execFunctionSignature(signature) {
|
|
149
|
-
return execTyped(functionSignatureRegex, signature);
|
|
150
|
-
}
|
|
151
|
-
var structSignatureRegex = /^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;
|
|
152
|
-
function isStructSignature(signature) {
|
|
153
|
-
return structSignatureRegex.test(signature);
|
|
154
|
-
}
|
|
155
|
-
function execStructSignature(signature) {
|
|
156
|
-
return execTyped(structSignatureRegex, signature);
|
|
157
|
-
}
|
|
158
|
-
var constructorSignatureRegex = /^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;
|
|
159
|
-
function isConstructorSignature(signature) {
|
|
160
|
-
return constructorSignatureRegex.test(signature);
|
|
161
|
-
}
|
|
162
|
-
function execConstructorSignature(signature) {
|
|
163
|
-
return execTyped(constructorSignatureRegex, signature);
|
|
164
|
-
}
|
|
165
|
-
var fallbackSignatureRegex = /^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;
|
|
166
|
-
function isFallbackSignature(signature) {
|
|
167
|
-
return fallbackSignatureRegex.test(signature);
|
|
168
|
-
}
|
|
169
|
-
function execFallbackSignature(signature) {
|
|
170
|
-
return execTyped(fallbackSignatureRegex, signature);
|
|
171
|
-
}
|
|
172
|
-
var receiveSignatureRegex = /^receive\(\) external payable$/;
|
|
173
|
-
function isReceiveSignature(signature) {
|
|
174
|
-
return receiveSignatureRegex.test(signature);
|
|
175
|
-
}
|
|
176
|
-
var modifiers = /* @__PURE__ */ new Set([
|
|
177
|
-
"memory",
|
|
178
|
-
"indexed",
|
|
179
|
-
"storage",
|
|
180
|
-
"calldata"
|
|
181
|
-
]);
|
|
182
|
-
var eventModifiers = /* @__PURE__ */ new Set(["indexed"]);
|
|
183
|
-
var functionModifiers = /* @__PURE__ */ new Set([
|
|
184
|
-
"calldata",
|
|
185
|
-
"memory",
|
|
186
|
-
"storage"
|
|
187
|
-
]);
|
|
188
|
-
|
|
189
|
-
// ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@3.25.76/node_modules/abitype/dist/esm/human-readable/errors/abiItem.js
|
|
190
|
-
var UnknownTypeError = class extends BaseError {
|
|
191
|
-
constructor({ type }) {
|
|
192
|
-
super("Unknown type.", {
|
|
193
|
-
metaMessages: [
|
|
194
|
-
`Type "${type}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`
|
|
195
|
-
]
|
|
196
|
-
});
|
|
197
|
-
Object.defineProperty(this, "name", {
|
|
198
|
-
enumerable: true,
|
|
199
|
-
configurable: true,
|
|
200
|
-
writable: true,
|
|
201
|
-
value: "UnknownTypeError"
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
var UnknownSolidityTypeError = class extends BaseError {
|
|
206
|
-
constructor({ type }) {
|
|
207
|
-
super("Unknown type.", {
|
|
208
|
-
metaMessages: [`Type "${type}" is not a valid ABI type.`]
|
|
209
|
-
});
|
|
210
|
-
Object.defineProperty(this, "name", {
|
|
211
|
-
enumerable: true,
|
|
212
|
-
configurable: true,
|
|
213
|
-
writable: true,
|
|
214
|
-
value: "UnknownSolidityTypeError"
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
};
|
|
218
|
-
|
|
219
|
-
// ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@3.25.76/node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js
|
|
220
|
-
var InvalidAbiParametersError = class extends BaseError {
|
|
221
|
-
constructor({ params }) {
|
|
222
|
-
super("Failed to parse ABI parameters.", {
|
|
223
|
-
details: `parseAbiParameters(${JSON.stringify(params, null, 2)})`,
|
|
224
|
-
docsPath: "/api/human#parseabiparameters-1"
|
|
225
|
-
});
|
|
226
|
-
Object.defineProperty(this, "name", {
|
|
227
|
-
enumerable: true,
|
|
228
|
-
configurable: true,
|
|
229
|
-
writable: true,
|
|
230
|
-
value: "InvalidAbiParametersError"
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
var InvalidParameterError = class extends BaseError {
|
|
235
|
-
constructor({ param }) {
|
|
236
|
-
super("Invalid ABI parameter.", {
|
|
237
|
-
details: param
|
|
238
|
-
});
|
|
239
|
-
Object.defineProperty(this, "name", {
|
|
240
|
-
enumerable: true,
|
|
241
|
-
configurable: true,
|
|
242
|
-
writable: true,
|
|
243
|
-
value: "InvalidParameterError"
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
};
|
|
247
|
-
var SolidityProtectedKeywordError = class extends BaseError {
|
|
248
|
-
constructor({ param, name }) {
|
|
249
|
-
super("Invalid ABI parameter.", {
|
|
250
|
-
details: param,
|
|
251
|
-
metaMessages: [
|
|
252
|
-
`"${name}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`
|
|
253
|
-
]
|
|
254
|
-
});
|
|
255
|
-
Object.defineProperty(this, "name", {
|
|
256
|
-
enumerable: true,
|
|
257
|
-
configurable: true,
|
|
258
|
-
writable: true,
|
|
259
|
-
value: "SolidityProtectedKeywordError"
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
};
|
|
263
|
-
var InvalidModifierError = class extends BaseError {
|
|
264
|
-
constructor({ param, type, modifier }) {
|
|
265
|
-
super("Invalid ABI parameter.", {
|
|
266
|
-
details: param,
|
|
267
|
-
metaMessages: [
|
|
268
|
-
`Modifier "${modifier}" not allowed${type ? ` in "${type}" type` : ""}.`
|
|
269
|
-
]
|
|
270
|
-
});
|
|
271
|
-
Object.defineProperty(this, "name", {
|
|
272
|
-
enumerable: true,
|
|
273
|
-
configurable: true,
|
|
274
|
-
writable: true,
|
|
275
|
-
value: "InvalidModifierError"
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
};
|
|
279
|
-
var InvalidFunctionModifierError = class extends BaseError {
|
|
280
|
-
constructor({ param, type, modifier }) {
|
|
281
|
-
super("Invalid ABI parameter.", {
|
|
282
|
-
details: param,
|
|
283
|
-
metaMessages: [
|
|
284
|
-
`Modifier "${modifier}" not allowed${type ? ` in "${type}" type` : ""}.`,
|
|
285
|
-
`Data location can only be specified for array, struct, or mapping types, but "${modifier}" was given.`
|
|
286
|
-
]
|
|
287
|
-
});
|
|
288
|
-
Object.defineProperty(this, "name", {
|
|
289
|
-
enumerable: true,
|
|
290
|
-
configurable: true,
|
|
291
|
-
writable: true,
|
|
292
|
-
value: "InvalidFunctionModifierError"
|
|
293
|
-
});
|
|
294
|
-
}
|
|
295
|
-
};
|
|
296
|
-
var InvalidAbiTypeParameterError = class extends BaseError {
|
|
297
|
-
constructor({ abiParameter }) {
|
|
298
|
-
super("Invalid ABI parameter.", {
|
|
299
|
-
details: JSON.stringify(abiParameter, null, 2),
|
|
300
|
-
metaMessages: ["ABI parameter type is invalid."]
|
|
301
|
-
});
|
|
302
|
-
Object.defineProperty(this, "name", {
|
|
303
|
-
enumerable: true,
|
|
304
|
-
configurable: true,
|
|
305
|
-
writable: true,
|
|
306
|
-
value: "InvalidAbiTypeParameterError"
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
};
|
|
310
|
-
|
|
311
|
-
// ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@3.25.76/node_modules/abitype/dist/esm/human-readable/errors/signature.js
|
|
312
|
-
var InvalidSignatureError = class extends BaseError {
|
|
313
|
-
constructor({ signature, type }) {
|
|
314
|
-
super(`Invalid ${type} signature.`, {
|
|
315
|
-
details: signature
|
|
316
|
-
});
|
|
317
|
-
Object.defineProperty(this, "name", {
|
|
318
|
-
enumerable: true,
|
|
319
|
-
configurable: true,
|
|
320
|
-
writable: true,
|
|
321
|
-
value: "InvalidSignatureError"
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
};
|
|
325
|
-
var UnknownSignatureError = class extends BaseError {
|
|
326
|
-
constructor({ signature }) {
|
|
327
|
-
super("Unknown signature.", {
|
|
328
|
-
details: signature
|
|
329
|
-
});
|
|
330
|
-
Object.defineProperty(this, "name", {
|
|
331
|
-
enumerable: true,
|
|
332
|
-
configurable: true,
|
|
333
|
-
writable: true,
|
|
334
|
-
value: "UnknownSignatureError"
|
|
335
|
-
});
|
|
336
|
-
}
|
|
337
|
-
};
|
|
338
|
-
var InvalidStructSignatureError = class extends BaseError {
|
|
339
|
-
constructor({ signature }) {
|
|
340
|
-
super("Invalid struct signature.", {
|
|
341
|
-
details: signature,
|
|
342
|
-
metaMessages: ["No properties exist."]
|
|
343
|
-
});
|
|
344
|
-
Object.defineProperty(this, "name", {
|
|
345
|
-
enumerable: true,
|
|
346
|
-
configurable: true,
|
|
347
|
-
writable: true,
|
|
348
|
-
value: "InvalidStructSignatureError"
|
|
349
|
-
});
|
|
350
|
-
}
|
|
351
|
-
};
|
|
352
|
-
|
|
353
|
-
// ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@3.25.76/node_modules/abitype/dist/esm/human-readable/errors/struct.js
|
|
354
|
-
var CircularReferenceError = class extends BaseError {
|
|
355
|
-
constructor({ type }) {
|
|
356
|
-
super("Circular reference detected.", {
|
|
357
|
-
metaMessages: [`Struct "${type}" is a circular reference.`]
|
|
358
|
-
});
|
|
359
|
-
Object.defineProperty(this, "name", {
|
|
360
|
-
enumerable: true,
|
|
361
|
-
configurable: true,
|
|
362
|
-
writable: true,
|
|
363
|
-
value: "CircularReferenceError"
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
};
|
|
367
|
-
|
|
368
|
-
// ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@3.25.76/node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js
|
|
369
|
-
var InvalidParenthesisError = class extends BaseError {
|
|
370
|
-
constructor({ current, depth }) {
|
|
371
|
-
super("Unbalanced parentheses.", {
|
|
372
|
-
metaMessages: [
|
|
373
|
-
`"${current.trim()}" has too many ${depth > 0 ? "opening" : "closing"} parentheses.`
|
|
374
|
-
],
|
|
375
|
-
details: `Depth "${depth}"`
|
|
376
|
-
});
|
|
377
|
-
Object.defineProperty(this, "name", {
|
|
378
|
-
enumerable: true,
|
|
379
|
-
configurable: true,
|
|
380
|
-
writable: true,
|
|
381
|
-
value: "InvalidParenthesisError"
|
|
382
|
-
});
|
|
383
|
-
}
|
|
384
|
-
};
|
|
385
|
-
|
|
386
|
-
// ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@3.25.76/node_modules/abitype/dist/esm/human-readable/runtime/cache.js
|
|
387
|
-
function getParameterCacheKey(param, type, structs) {
|
|
388
|
-
let structKey = "";
|
|
389
|
-
if (structs)
|
|
390
|
-
for (const struct of Object.entries(structs)) {
|
|
391
|
-
if (!struct)
|
|
392
|
-
continue;
|
|
393
|
-
let propertyKey = "";
|
|
394
|
-
for (const property of struct[1]) {
|
|
395
|
-
propertyKey += `[${property.type}${property.name ? `:${property.name}` : ""}]`;
|
|
396
|
-
}
|
|
397
|
-
structKey += `(${struct[0]}{${propertyKey}})`;
|
|
398
|
-
}
|
|
399
|
-
if (type)
|
|
400
|
-
return `${type}:${param}${structKey}`;
|
|
401
|
-
return `${param}${structKey}`;
|
|
402
|
-
}
|
|
403
|
-
var parameterCache = /* @__PURE__ */ new Map([
|
|
404
|
-
// Unnamed
|
|
405
|
-
["address", { type: "address" }],
|
|
406
|
-
["bool", { type: "bool" }],
|
|
407
|
-
["bytes", { type: "bytes" }],
|
|
408
|
-
["bytes32", { type: "bytes32" }],
|
|
409
|
-
["int", { type: "int256" }],
|
|
410
|
-
["int256", { type: "int256" }],
|
|
411
|
-
["string", { type: "string" }],
|
|
412
|
-
["uint", { type: "uint256" }],
|
|
413
|
-
["uint8", { type: "uint8" }],
|
|
414
|
-
["uint16", { type: "uint16" }],
|
|
415
|
-
["uint24", { type: "uint24" }],
|
|
416
|
-
["uint32", { type: "uint32" }],
|
|
417
|
-
["uint64", { type: "uint64" }],
|
|
418
|
-
["uint96", { type: "uint96" }],
|
|
419
|
-
["uint112", { type: "uint112" }],
|
|
420
|
-
["uint160", { type: "uint160" }],
|
|
421
|
-
["uint192", { type: "uint192" }],
|
|
422
|
-
["uint256", { type: "uint256" }],
|
|
423
|
-
// Named
|
|
424
|
-
["address owner", { type: "address", name: "owner" }],
|
|
425
|
-
["address to", { type: "address", name: "to" }],
|
|
426
|
-
["bool approved", { type: "bool", name: "approved" }],
|
|
427
|
-
["bytes _data", { type: "bytes", name: "_data" }],
|
|
428
|
-
["bytes data", { type: "bytes", name: "data" }],
|
|
429
|
-
["bytes signature", { type: "bytes", name: "signature" }],
|
|
430
|
-
["bytes32 hash", { type: "bytes32", name: "hash" }],
|
|
431
|
-
["bytes32 r", { type: "bytes32", name: "r" }],
|
|
432
|
-
["bytes32 root", { type: "bytes32", name: "root" }],
|
|
433
|
-
["bytes32 s", { type: "bytes32", name: "s" }],
|
|
434
|
-
["string name", { type: "string", name: "name" }],
|
|
435
|
-
["string symbol", { type: "string", name: "symbol" }],
|
|
436
|
-
["string tokenURI", { type: "string", name: "tokenURI" }],
|
|
437
|
-
["uint tokenId", { type: "uint256", name: "tokenId" }],
|
|
438
|
-
["uint8 v", { type: "uint8", name: "v" }],
|
|
439
|
-
["uint256 balance", { type: "uint256", name: "balance" }],
|
|
440
|
-
["uint256 tokenId", { type: "uint256", name: "tokenId" }],
|
|
441
|
-
["uint256 value", { type: "uint256", name: "value" }],
|
|
442
|
-
// Indexed
|
|
443
|
-
[
|
|
444
|
-
"event:address indexed from",
|
|
445
|
-
{ type: "address", name: "from", indexed: true }
|
|
446
|
-
],
|
|
447
|
-
["event:address indexed to", { type: "address", name: "to", indexed: true }],
|
|
448
|
-
[
|
|
449
|
-
"event:uint indexed tokenId",
|
|
450
|
-
{ type: "uint256", name: "tokenId", indexed: true }
|
|
451
|
-
],
|
|
452
|
-
[
|
|
453
|
-
"event:uint256 indexed tokenId",
|
|
454
|
-
{ type: "uint256", name: "tokenId", indexed: true }
|
|
455
|
-
]
|
|
456
|
-
]);
|
|
457
|
-
|
|
458
|
-
// ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@3.25.76/node_modules/abitype/dist/esm/human-readable/runtime/utils.js
|
|
459
|
-
function parseSignature(signature, structs = {}) {
|
|
460
|
-
if (isFunctionSignature(signature))
|
|
461
|
-
return parseFunctionSignature(signature, structs);
|
|
462
|
-
if (isEventSignature(signature))
|
|
463
|
-
return parseEventSignature(signature, structs);
|
|
464
|
-
if (isErrorSignature(signature))
|
|
465
|
-
return parseErrorSignature(signature, structs);
|
|
466
|
-
if (isConstructorSignature(signature))
|
|
467
|
-
return parseConstructorSignature(signature, structs);
|
|
468
|
-
if (isFallbackSignature(signature))
|
|
469
|
-
return parseFallbackSignature(signature);
|
|
470
|
-
if (isReceiveSignature(signature))
|
|
471
|
-
return {
|
|
472
|
-
type: "receive",
|
|
473
|
-
stateMutability: "payable"
|
|
474
|
-
};
|
|
475
|
-
throw new UnknownSignatureError({ signature });
|
|
476
|
-
}
|
|
477
|
-
function parseFunctionSignature(signature, structs = {}) {
|
|
478
|
-
const match = execFunctionSignature(signature);
|
|
479
|
-
if (!match)
|
|
480
|
-
throw new InvalidSignatureError({ signature, type: "function" });
|
|
481
|
-
const inputParams = splitParameters(match.parameters);
|
|
482
|
-
const inputs = [];
|
|
483
|
-
const inputLength = inputParams.length;
|
|
484
|
-
for (let i = 0; i < inputLength; i++) {
|
|
485
|
-
inputs.push(parseAbiParameter(inputParams[i], {
|
|
486
|
-
modifiers: functionModifiers,
|
|
487
|
-
structs,
|
|
488
|
-
type: "function"
|
|
489
|
-
}));
|
|
490
|
-
}
|
|
491
|
-
const outputs = [];
|
|
492
|
-
if (match.returns) {
|
|
493
|
-
const outputParams = splitParameters(match.returns);
|
|
494
|
-
const outputLength = outputParams.length;
|
|
495
|
-
for (let i = 0; i < outputLength; i++) {
|
|
496
|
-
outputs.push(parseAbiParameter(outputParams[i], {
|
|
497
|
-
modifiers: functionModifiers,
|
|
498
|
-
structs,
|
|
499
|
-
type: "function"
|
|
500
|
-
}));
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
return {
|
|
504
|
-
name: match.name,
|
|
505
|
-
type: "function",
|
|
506
|
-
stateMutability: match.stateMutability ?? "nonpayable",
|
|
507
|
-
inputs,
|
|
508
|
-
outputs
|
|
509
|
-
};
|
|
510
|
-
}
|
|
511
|
-
function parseEventSignature(signature, structs = {}) {
|
|
512
|
-
const match = execEventSignature(signature);
|
|
513
|
-
if (!match)
|
|
514
|
-
throw new InvalidSignatureError({ signature, type: "event" });
|
|
515
|
-
const params = splitParameters(match.parameters);
|
|
516
|
-
const abiParameters = [];
|
|
517
|
-
const length = params.length;
|
|
518
|
-
for (let i = 0; i < length; i++)
|
|
519
|
-
abiParameters.push(parseAbiParameter(params[i], {
|
|
520
|
-
modifiers: eventModifiers,
|
|
521
|
-
structs,
|
|
522
|
-
type: "event"
|
|
523
|
-
}));
|
|
524
|
-
return { name: match.name, type: "event", inputs: abiParameters };
|
|
525
|
-
}
|
|
526
|
-
function parseErrorSignature(signature, structs = {}) {
|
|
527
|
-
const match = execErrorSignature(signature);
|
|
528
|
-
if (!match)
|
|
529
|
-
throw new InvalidSignatureError({ signature, type: "error" });
|
|
530
|
-
const params = splitParameters(match.parameters);
|
|
531
|
-
const abiParameters = [];
|
|
532
|
-
const length = params.length;
|
|
533
|
-
for (let i = 0; i < length; i++)
|
|
534
|
-
abiParameters.push(parseAbiParameter(params[i], { structs, type: "error" }));
|
|
535
|
-
return { name: match.name, type: "error", inputs: abiParameters };
|
|
536
|
-
}
|
|
537
|
-
function parseConstructorSignature(signature, structs = {}) {
|
|
538
|
-
const match = execConstructorSignature(signature);
|
|
539
|
-
if (!match)
|
|
540
|
-
throw new InvalidSignatureError({ signature, type: "constructor" });
|
|
541
|
-
const params = splitParameters(match.parameters);
|
|
542
|
-
const abiParameters = [];
|
|
543
|
-
const length = params.length;
|
|
544
|
-
for (let i = 0; i < length; i++)
|
|
545
|
-
abiParameters.push(parseAbiParameter(params[i], { structs, type: "constructor" }));
|
|
546
|
-
return {
|
|
547
|
-
type: "constructor",
|
|
548
|
-
stateMutability: match.stateMutability ?? "nonpayable",
|
|
549
|
-
inputs: abiParameters
|
|
550
|
-
};
|
|
551
|
-
}
|
|
552
|
-
function parseFallbackSignature(signature) {
|
|
553
|
-
const match = execFallbackSignature(signature);
|
|
554
|
-
if (!match)
|
|
555
|
-
throw new InvalidSignatureError({ signature, type: "fallback" });
|
|
556
|
-
return {
|
|
557
|
-
type: "fallback",
|
|
558
|
-
stateMutability: match.stateMutability ?? "nonpayable"
|
|
559
|
-
};
|
|
560
|
-
}
|
|
561
|
-
var abiParameterWithoutTupleRegex = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;
|
|
562
|
-
var abiParameterWithTupleRegex = /^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;
|
|
563
|
-
var dynamicIntegerRegex = /^u?int$/;
|
|
564
|
-
function parseAbiParameter(param, options) {
|
|
565
|
-
const parameterCacheKey = getParameterCacheKey(param, options?.type, options?.structs);
|
|
566
|
-
if (parameterCache.has(parameterCacheKey))
|
|
567
|
-
return parameterCache.get(parameterCacheKey);
|
|
568
|
-
const isTuple = isTupleRegex.test(param);
|
|
569
|
-
const match = execTyped(isTuple ? abiParameterWithTupleRegex : abiParameterWithoutTupleRegex, param);
|
|
570
|
-
if (!match)
|
|
571
|
-
throw new InvalidParameterError({ param });
|
|
572
|
-
if (match.name && isSolidityKeyword(match.name))
|
|
573
|
-
throw new SolidityProtectedKeywordError({ param, name: match.name });
|
|
574
|
-
const name = match.name ? { name: match.name } : {};
|
|
575
|
-
const indexed = match.modifier === "indexed" ? { indexed: true } : {};
|
|
576
|
-
const structs = options?.structs ?? {};
|
|
577
|
-
let type;
|
|
578
|
-
let components = {};
|
|
579
|
-
if (isTuple) {
|
|
580
|
-
type = "tuple";
|
|
581
|
-
const params = splitParameters(match.type);
|
|
582
|
-
const components_ = [];
|
|
583
|
-
const length = params.length;
|
|
584
|
-
for (let i = 0; i < length; i++) {
|
|
585
|
-
components_.push(parseAbiParameter(params[i], { structs }));
|
|
586
|
-
}
|
|
587
|
-
components = { components: components_ };
|
|
588
|
-
} else if (match.type in structs) {
|
|
589
|
-
type = "tuple";
|
|
590
|
-
components = { components: structs[match.type] };
|
|
591
|
-
} else if (dynamicIntegerRegex.test(match.type)) {
|
|
592
|
-
type = `${match.type}256`;
|
|
593
|
-
} else if (match.type === "address payable") {
|
|
594
|
-
type = "address";
|
|
595
|
-
} else {
|
|
596
|
-
type = match.type;
|
|
597
|
-
if (!(options?.type === "struct") && !isSolidityType(type))
|
|
598
|
-
throw new UnknownSolidityTypeError({ type });
|
|
599
|
-
}
|
|
600
|
-
if (match.modifier) {
|
|
601
|
-
if (!options?.modifiers?.has?.(match.modifier))
|
|
602
|
-
throw new InvalidModifierError({
|
|
603
|
-
param,
|
|
604
|
-
type: options?.type,
|
|
605
|
-
modifier: match.modifier
|
|
606
|
-
});
|
|
607
|
-
if (functionModifiers.has(match.modifier) && !isValidDataLocation(type, !!match.array))
|
|
608
|
-
throw new InvalidFunctionModifierError({
|
|
609
|
-
param,
|
|
610
|
-
type: options?.type,
|
|
611
|
-
modifier: match.modifier
|
|
612
|
-
});
|
|
613
|
-
}
|
|
614
|
-
const abiParameter = {
|
|
615
|
-
type: `${type}${match.array ?? ""}`,
|
|
616
|
-
...name,
|
|
617
|
-
...indexed,
|
|
618
|
-
...components
|
|
619
|
-
};
|
|
620
|
-
parameterCache.set(parameterCacheKey, abiParameter);
|
|
621
|
-
return abiParameter;
|
|
622
|
-
}
|
|
623
|
-
function splitParameters(params, result = [], current = "", depth = 0) {
|
|
624
|
-
const length = params.trim().length;
|
|
625
|
-
for (let i = 0; i < length; i++) {
|
|
626
|
-
const char = params[i];
|
|
627
|
-
const tail = params.slice(i + 1);
|
|
628
|
-
switch (char) {
|
|
629
|
-
case ",":
|
|
630
|
-
return depth === 0 ? splitParameters(tail, [...result, current.trim()]) : splitParameters(tail, result, `${current}${char}`, depth);
|
|
631
|
-
case "(":
|
|
632
|
-
return splitParameters(tail, result, `${current}${char}`, depth + 1);
|
|
633
|
-
case ")":
|
|
634
|
-
return splitParameters(tail, result, `${current}${char}`, depth - 1);
|
|
635
|
-
default:
|
|
636
|
-
return splitParameters(tail, result, `${current}${char}`, depth);
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
if (current === "")
|
|
640
|
-
return result;
|
|
641
|
-
if (depth !== 0)
|
|
642
|
-
throw new InvalidParenthesisError({ current, depth });
|
|
643
|
-
result.push(current.trim());
|
|
644
|
-
return result;
|
|
645
|
-
}
|
|
646
|
-
function isSolidityType(type) {
|
|
647
|
-
return type === "address" || type === "bool" || type === "function" || type === "string" || bytesRegex.test(type) || integerRegex.test(type);
|
|
648
|
-
}
|
|
649
|
-
var protectedKeywordsRegex = /^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;
|
|
650
|
-
function isSolidityKeyword(name) {
|
|
651
|
-
return name === "address" || name === "bool" || name === "function" || name === "string" || name === "tuple" || bytesRegex.test(name) || integerRegex.test(name) || protectedKeywordsRegex.test(name);
|
|
652
|
-
}
|
|
653
|
-
function isValidDataLocation(type, isArray) {
|
|
654
|
-
return isArray || type === "bytes" || type === "string" || type === "tuple";
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
// ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@3.25.76/node_modules/abitype/dist/esm/human-readable/runtime/structs.js
|
|
658
|
-
function parseStructs(signatures) {
|
|
659
|
-
const shallowStructs = {};
|
|
660
|
-
const signaturesLength = signatures.length;
|
|
661
|
-
for (let i = 0; i < signaturesLength; i++) {
|
|
662
|
-
const signature = signatures[i];
|
|
663
|
-
if (!isStructSignature(signature))
|
|
664
|
-
continue;
|
|
665
|
-
const match = execStructSignature(signature);
|
|
666
|
-
if (!match)
|
|
667
|
-
throw new InvalidSignatureError({ signature, type: "struct" });
|
|
668
|
-
const properties = match.properties.split(";");
|
|
669
|
-
const components = [];
|
|
670
|
-
const propertiesLength = properties.length;
|
|
671
|
-
for (let k = 0; k < propertiesLength; k++) {
|
|
672
|
-
const property = properties[k];
|
|
673
|
-
const trimmed = property.trim();
|
|
674
|
-
if (!trimmed)
|
|
675
|
-
continue;
|
|
676
|
-
const abiParameter = parseAbiParameter(trimmed, {
|
|
677
|
-
type: "struct"
|
|
678
|
-
});
|
|
679
|
-
components.push(abiParameter);
|
|
680
|
-
}
|
|
681
|
-
if (!components.length)
|
|
682
|
-
throw new InvalidStructSignatureError({ signature });
|
|
683
|
-
shallowStructs[match.name] = components;
|
|
684
|
-
}
|
|
685
|
-
const resolvedStructs = {};
|
|
686
|
-
const entries = Object.entries(shallowStructs);
|
|
687
|
-
const entriesLength = entries.length;
|
|
688
|
-
for (let i = 0; i < entriesLength; i++) {
|
|
689
|
-
const [name, parameters] = entries[i];
|
|
690
|
-
resolvedStructs[name] = resolveStructs(parameters, shallowStructs);
|
|
691
|
-
}
|
|
692
|
-
return resolvedStructs;
|
|
693
|
-
}
|
|
694
|
-
var typeWithoutTupleRegex = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;
|
|
695
|
-
function resolveStructs(abiParameters = [], structs = {}, ancestors = /* @__PURE__ */ new Set()) {
|
|
696
|
-
const components = [];
|
|
697
|
-
const length = abiParameters.length;
|
|
698
|
-
for (let i = 0; i < length; i++) {
|
|
699
|
-
const abiParameter = abiParameters[i];
|
|
700
|
-
const isTuple = isTupleRegex.test(abiParameter.type);
|
|
701
|
-
if (isTuple)
|
|
702
|
-
components.push(abiParameter);
|
|
703
|
-
else {
|
|
704
|
-
const match = execTyped(typeWithoutTupleRegex, abiParameter.type);
|
|
705
|
-
if (!match?.type)
|
|
706
|
-
throw new InvalidAbiTypeParameterError({ abiParameter });
|
|
707
|
-
const { array, type } = match;
|
|
708
|
-
if (type in structs) {
|
|
709
|
-
if (ancestors.has(type))
|
|
710
|
-
throw new CircularReferenceError({ type });
|
|
711
|
-
components.push({
|
|
712
|
-
...abiParameter,
|
|
713
|
-
type: `tuple${array ?? ""}`,
|
|
714
|
-
components: resolveStructs(structs[type], structs, /* @__PURE__ */ new Set([...ancestors, type]))
|
|
715
|
-
});
|
|
716
|
-
} else {
|
|
717
|
-
if (isSolidityType(type))
|
|
718
|
-
components.push(abiParameter);
|
|
719
|
-
else
|
|
720
|
-
throw new UnknownTypeError({ type });
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
return components;
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
// ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@3.25.76/node_modules/abitype/dist/esm/human-readable/parseAbi.js
|
|
728
|
-
function parseAbi(signatures) {
|
|
729
|
-
const structs = parseStructs(signatures);
|
|
730
|
-
const abi = [];
|
|
731
|
-
const length = signatures.length;
|
|
732
|
-
for (let i = 0; i < length; i++) {
|
|
733
|
-
const signature = signatures[i];
|
|
734
|
-
if (isStructSignature(signature))
|
|
735
|
-
continue;
|
|
736
|
-
abi.push(parseSignature(signature, structs));
|
|
737
|
-
}
|
|
738
|
-
return abi;
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
// ../../node_modules/.pnpm/abitype@1.2.3_typescript@5.9.3_zod@3.25.76/node_modules/abitype/dist/esm/human-readable/parseAbiParameters.js
|
|
742
|
-
function parseAbiParameters(params) {
|
|
743
|
-
const abiParameters = [];
|
|
744
|
-
if (typeof params === "string") {
|
|
745
|
-
const parameters = splitParameters(params);
|
|
746
|
-
const length = parameters.length;
|
|
747
|
-
for (let i = 0; i < length; i++) {
|
|
748
|
-
abiParameters.push(parseAbiParameter(parameters[i], { modifiers }));
|
|
749
|
-
}
|
|
750
|
-
} else {
|
|
751
|
-
const structs = parseStructs(params);
|
|
752
|
-
const length = params.length;
|
|
753
|
-
for (let i = 0; i < length; i++) {
|
|
754
|
-
const signature = params[i];
|
|
755
|
-
if (isStructSignature(signature))
|
|
756
|
-
continue;
|
|
757
|
-
const parameters = splitParameters(signature);
|
|
758
|
-
const length2 = parameters.length;
|
|
759
|
-
for (let k = 0; k < length2; k++) {
|
|
760
|
-
abiParameters.push(parseAbiParameter(parameters[k], { modifiers, structs }));
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
if (abiParameters.length === 0)
|
|
765
|
-
throw new InvalidAbiParametersError({ params });
|
|
766
|
-
return abiParameters;
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
// ../../node_modules/.pnpm/ox@0.14.5_typescript@5.9.3_zod@3.25.76/node_modules/ox/_esm/core/version.js
|
|
770
|
-
var version2 = "0.1.1";
|
|
771
|
-
|
|
772
|
-
// ../../node_modules/.pnpm/ox@0.14.5_typescript@5.9.3_zod@3.25.76/node_modules/ox/_esm/core/internal/errors.js
|
|
14
|
+
// ../../node_modules/.pnpm/ox@0.14.5_typescript@5.9.3_zod@4.3.6/node_modules/ox/_esm/core/internal/errors.js
|
|
773
15
|
function getVersion() {
|
|
774
|
-
return
|
|
16
|
+
return version;
|
|
775
17
|
}
|
|
776
18
|
|
|
777
|
-
// ../../node_modules/.pnpm/ox@0.14.5_typescript@5.9.3_zod@3.
|
|
778
|
-
var
|
|
19
|
+
// ../../node_modules/.pnpm/ox@0.14.5_typescript@5.9.3_zod@4.3.6/node_modules/ox/_esm/core/Errors.js
|
|
20
|
+
var BaseError = class _BaseError extends Error {
|
|
779
21
|
static setStaticOptions(options) {
|
|
780
22
|
_BaseError.prototype.docsOrigin = options.docsOrigin;
|
|
781
23
|
_BaseError.prototype.showVersion = options.showVersion;
|
|
@@ -803,7 +45,7 @@ var BaseError2 = class _BaseError extends Error {
|
|
|
803
45
|
const docsBaseUrl = options.docsOrigin ?? _BaseError.prototype.docsOrigin;
|
|
804
46
|
const docs = `${docsBaseUrl}${docsPath6 ?? ""}`;
|
|
805
47
|
const showVersion = Boolean(options.version ?? _BaseError.prototype.showVersion);
|
|
806
|
-
const
|
|
48
|
+
const version3 = options.version ?? _BaseError.prototype.version;
|
|
807
49
|
const message = [
|
|
808
50
|
shortMessage || "An error occurred.",
|
|
809
51
|
...options.metaMessages ? ["", ...options.metaMessages] : [],
|
|
@@ -811,7 +53,7 @@ var BaseError2 = class _BaseError extends Error {
|
|
|
811
53
|
"",
|
|
812
54
|
details ? `Details: ${details}` : void 0,
|
|
813
55
|
docsPath6 ? `See: ${docs}` : void 0,
|
|
814
|
-
showVersion ? `Version: ${
|
|
56
|
+
showVersion ? `Version: ${version3}` : void 0
|
|
815
57
|
] : []
|
|
816
58
|
].filter((x) => typeof x === "string").join("\n");
|
|
817
59
|
super(message, options.cause ? { cause: options.cause } : void 0);
|
|
@@ -876,13 +118,13 @@ var BaseError2 = class _BaseError extends Error {
|
|
|
876
118
|
this.docsPath = docsPath6;
|
|
877
119
|
this.shortMessage = shortMessage;
|
|
878
120
|
this.showVersion = showVersion;
|
|
879
|
-
this.version =
|
|
121
|
+
this.version = version3;
|
|
880
122
|
}
|
|
881
123
|
walk(fn) {
|
|
882
124
|
return walk(this, fn);
|
|
883
125
|
}
|
|
884
126
|
};
|
|
885
|
-
Object.defineProperty(
|
|
127
|
+
Object.defineProperty(BaseError, "defaultStaticOptions", {
|
|
886
128
|
enumerable: true,
|
|
887
129
|
configurable: true,
|
|
888
130
|
writable: true,
|
|
@@ -893,7 +135,7 @@ Object.defineProperty(BaseError2, "defaultStaticOptions", {
|
|
|
893
135
|
}
|
|
894
136
|
});
|
|
895
137
|
(() => {
|
|
896
|
-
|
|
138
|
+
BaseError.setStaticOptions(BaseError.defaultStaticOptions);
|
|
897
139
|
})();
|
|
898
140
|
function walk(err, fn) {
|
|
899
141
|
if (fn?.(err))
|
|
@@ -903,7 +145,7 @@ function walk(err, fn) {
|
|
|
903
145
|
return fn ? null : err;
|
|
904
146
|
}
|
|
905
147
|
|
|
906
|
-
// ../../node_modules/.pnpm/ox@0.14.5_typescript@5.9.3_zod@3.
|
|
148
|
+
// ../../node_modules/.pnpm/ox@0.14.5_typescript@5.9.3_zod@4.3.6/node_modules/ox/_esm/core/internal/bytes.js
|
|
907
149
|
function assertSize(bytes, size_) {
|
|
908
150
|
if (size(bytes) > size_)
|
|
909
151
|
throw new SizeOverflowError({
|
|
@@ -976,7 +218,7 @@ function trim(value, options = {}) {
|
|
|
976
218
|
return data;
|
|
977
219
|
}
|
|
978
220
|
|
|
979
|
-
// ../../node_modules/.pnpm/ox@0.14.5_typescript@5.9.3_zod@3.
|
|
221
|
+
// ../../node_modules/.pnpm/ox@0.14.5_typescript@5.9.3_zod@4.3.6/node_modules/ox/_esm/core/internal/hex.js
|
|
980
222
|
function assertSize2(hex, size_) {
|
|
981
223
|
if (size2(hex) > size_)
|
|
982
224
|
throw new SizeOverflowError2({
|
|
@@ -1032,7 +274,7 @@ function trim2(value, options = {}) {
|
|
|
1032
274
|
return `0x${data}`;
|
|
1033
275
|
}
|
|
1034
276
|
|
|
1035
|
-
// ../../node_modules/.pnpm/ox@0.14.5_typescript@5.9.3_zod@3.
|
|
277
|
+
// ../../node_modules/.pnpm/ox@0.14.5_typescript@5.9.3_zod@4.3.6/node_modules/ox/_esm/core/Json.js
|
|
1036
278
|
var bigIntSuffix = "#__bigint";
|
|
1037
279
|
function stringify(value, replacer, space) {
|
|
1038
280
|
return JSON.stringify(value, (key, value2) => {
|
|
@@ -1044,7 +286,7 @@ function stringify(value, replacer, space) {
|
|
|
1044
286
|
}, space);
|
|
1045
287
|
}
|
|
1046
288
|
|
|
1047
|
-
// ../../node_modules/.pnpm/ox@0.14.5_typescript@5.9.3_zod@3.
|
|
289
|
+
// ../../node_modules/.pnpm/ox@0.14.5_typescript@5.9.3_zod@4.3.6/node_modules/ox/_esm/core/Bytes.js
|
|
1048
290
|
var decoder = /* @__PURE__ */ new TextDecoder();
|
|
1049
291
|
var encoder = /* @__PURE__ */ new TextEncoder();
|
|
1050
292
|
function assert(value) {
|
|
@@ -1098,7 +340,7 @@ function fromHex(value, options = {}) {
|
|
|
1098
340
|
const nibbleLeft = charCodeToBase16(hexString.charCodeAt(j++));
|
|
1099
341
|
const nibbleRight = charCodeToBase16(hexString.charCodeAt(j++));
|
|
1100
342
|
if (nibbleLeft === void 0 || nibbleRight === void 0) {
|
|
1101
|
-
throw new
|
|
343
|
+
throw new BaseError(`Invalid byte sequence ("${hexString[j - 2]}${hexString[j - 1]}" in "${hexString}").`);
|
|
1102
344
|
}
|
|
1103
345
|
bytes[index] = nibbleLeft << 4 | nibbleRight;
|
|
1104
346
|
}
|
|
@@ -1181,7 +423,7 @@ function validate(value) {
|
|
|
1181
423
|
return false;
|
|
1182
424
|
}
|
|
1183
425
|
}
|
|
1184
|
-
var InvalidBytesBooleanError = class extends
|
|
426
|
+
var InvalidBytesBooleanError = class extends BaseError {
|
|
1185
427
|
constructor(bytes) {
|
|
1186
428
|
super(`Bytes value \`${bytes}\` is not a valid boolean.`, {
|
|
1187
429
|
metaMessages: [
|
|
@@ -1196,7 +438,7 @@ var InvalidBytesBooleanError = class extends BaseError2 {
|
|
|
1196
438
|
});
|
|
1197
439
|
}
|
|
1198
440
|
};
|
|
1199
|
-
var InvalidBytesTypeError = class extends
|
|
441
|
+
var InvalidBytesTypeError = class extends BaseError {
|
|
1200
442
|
constructor(value) {
|
|
1201
443
|
super(`Value \`${typeof value === "object" ? stringify(value) : value}\` of type \`${typeof value}\` is an invalid Bytes value.`, {
|
|
1202
444
|
metaMessages: ["Bytes values must be of type `Bytes`."]
|
|
@@ -1209,7 +451,7 @@ var InvalidBytesTypeError = class extends BaseError2 {
|
|
|
1209
451
|
});
|
|
1210
452
|
}
|
|
1211
453
|
};
|
|
1212
|
-
var SizeOverflowError = class extends
|
|
454
|
+
var SizeOverflowError = class extends BaseError {
|
|
1213
455
|
constructor({ givenSize, maxSize }) {
|
|
1214
456
|
super(`Size cannot exceed \`${maxSize}\` bytes. Given size: \`${givenSize}\` bytes.`);
|
|
1215
457
|
Object.defineProperty(this, "name", {
|
|
@@ -1220,7 +462,7 @@ var SizeOverflowError = class extends BaseError2 {
|
|
|
1220
462
|
});
|
|
1221
463
|
}
|
|
1222
464
|
};
|
|
1223
|
-
var SliceOffsetOutOfBoundsError = class extends
|
|
465
|
+
var SliceOffsetOutOfBoundsError = class extends BaseError {
|
|
1224
466
|
constructor({ offset, position, size: size4 }) {
|
|
1225
467
|
super(`Slice ${position === "start" ? "starting" : "ending"} at offset \`${offset}\` is out-of-bounds (size: \`${size4}\`).`);
|
|
1226
468
|
Object.defineProperty(this, "name", {
|
|
@@ -1231,7 +473,7 @@ var SliceOffsetOutOfBoundsError = class extends BaseError2 {
|
|
|
1231
473
|
});
|
|
1232
474
|
}
|
|
1233
475
|
};
|
|
1234
|
-
var SizeExceedsPaddingSizeError = class extends
|
|
476
|
+
var SizeExceedsPaddingSizeError = class extends BaseError {
|
|
1235
477
|
constructor({ size: size4, targetSize, type }) {
|
|
1236
478
|
super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (\`${size4}\`) exceeds padding size (\`${targetSize}\`).`);
|
|
1237
479
|
Object.defineProperty(this, "name", {
|
|
@@ -1243,7 +485,7 @@ var SizeExceedsPaddingSizeError = class extends BaseError2 {
|
|
|
1243
485
|
}
|
|
1244
486
|
};
|
|
1245
487
|
|
|
1246
|
-
// ../../node_modules/.pnpm/ox@0.14.5_typescript@5.9.3_zod@3.
|
|
488
|
+
// ../../node_modules/.pnpm/ox@0.14.5_typescript@5.9.3_zod@4.3.6/node_modules/ox/_esm/core/Hex.js
|
|
1247
489
|
var encoder2 = /* @__PURE__ */ new TextEncoder();
|
|
1248
490
|
var hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i) => i.toString(16).padStart(2, "0"));
|
|
1249
491
|
function assert2(value, options = {}) {
|
|
@@ -1381,7 +623,7 @@ function validate2(value, options = {}) {
|
|
|
1381
623
|
return false;
|
|
1382
624
|
}
|
|
1383
625
|
}
|
|
1384
|
-
var IntegerOutOfRangeError = class extends
|
|
626
|
+
var IntegerOutOfRangeError = class extends BaseError {
|
|
1385
627
|
constructor({ max, min, signed, size: size4, value }) {
|
|
1386
628
|
super(`Number \`${value}\` is not in safe${size4 ? ` ${size4 * 8}-bit` : ""}${signed ? " signed" : " unsigned"} integer range ${max ? `(\`${min}\` to \`${max}\`)` : `(above \`${min}\`)`}`);
|
|
1387
629
|
Object.defineProperty(this, "name", {
|
|
@@ -1392,7 +634,7 @@ var IntegerOutOfRangeError = class extends BaseError2 {
|
|
|
1392
634
|
});
|
|
1393
635
|
}
|
|
1394
636
|
};
|
|
1395
|
-
var InvalidHexTypeError = class extends
|
|
637
|
+
var InvalidHexTypeError = class extends BaseError {
|
|
1396
638
|
constructor(value) {
|
|
1397
639
|
super(`Value \`${typeof value === "object" ? stringify(value) : value}\` of type \`${typeof value}\` is an invalid hex type.`, {
|
|
1398
640
|
metaMessages: ['Hex types must be represented as `"0x${string}"`.']
|
|
@@ -1405,7 +647,7 @@ var InvalidHexTypeError = class extends BaseError2 {
|
|
|
1405
647
|
});
|
|
1406
648
|
}
|
|
1407
649
|
};
|
|
1408
|
-
var InvalidHexValueError = class extends
|
|
650
|
+
var InvalidHexValueError = class extends BaseError {
|
|
1409
651
|
constructor(value) {
|
|
1410
652
|
super(`Value \`${value}\` is an invalid hex value.`, {
|
|
1411
653
|
metaMessages: [
|
|
@@ -1420,7 +662,7 @@ var InvalidHexValueError = class extends BaseError2 {
|
|
|
1420
662
|
});
|
|
1421
663
|
}
|
|
1422
664
|
};
|
|
1423
|
-
var InvalidLengthError = class extends
|
|
665
|
+
var InvalidLengthError = class extends BaseError {
|
|
1424
666
|
constructor(value) {
|
|
1425
667
|
super(`Hex value \`"${value}"\` is an odd length (${value.length - 2} nibbles).`, {
|
|
1426
668
|
metaMessages: ["It must be an even length."]
|
|
@@ -1433,7 +675,7 @@ var InvalidLengthError = class extends BaseError2 {
|
|
|
1433
675
|
});
|
|
1434
676
|
}
|
|
1435
677
|
};
|
|
1436
|
-
var SizeOverflowError2 = class extends
|
|
678
|
+
var SizeOverflowError2 = class extends BaseError {
|
|
1437
679
|
constructor({ givenSize, maxSize }) {
|
|
1438
680
|
super(`Size cannot exceed \`${maxSize}\` bytes. Given size: \`${givenSize}\` bytes.`);
|
|
1439
681
|
Object.defineProperty(this, "name", {
|
|
@@ -1444,7 +686,7 @@ var SizeOverflowError2 = class extends BaseError2 {
|
|
|
1444
686
|
});
|
|
1445
687
|
}
|
|
1446
688
|
};
|
|
1447
|
-
var SliceOffsetOutOfBoundsError2 = class extends
|
|
689
|
+
var SliceOffsetOutOfBoundsError2 = class extends BaseError {
|
|
1448
690
|
constructor({ offset, position, size: size4 }) {
|
|
1449
691
|
super(`Slice ${position === "start" ? "starting" : "ending"} at offset \`${offset}\` is out-of-bounds (size: \`${size4}\`).`);
|
|
1450
692
|
Object.defineProperty(this, "name", {
|
|
@@ -1455,7 +697,7 @@ var SliceOffsetOutOfBoundsError2 = class extends BaseError2 {
|
|
|
1455
697
|
});
|
|
1456
698
|
}
|
|
1457
699
|
};
|
|
1458
|
-
var SizeExceedsPaddingSizeError2 = class extends
|
|
700
|
+
var SizeExceedsPaddingSizeError2 = class extends BaseError {
|
|
1459
701
|
constructor({ size: size4, targetSize, type }) {
|
|
1460
702
|
super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (\`${size4}\`) exceeds padding size (\`${targetSize}\`).`);
|
|
1461
703
|
Object.defineProperty(this, "name", {
|
|
@@ -1467,7 +709,7 @@ var SizeExceedsPaddingSizeError2 = class extends BaseError2 {
|
|
|
1467
709
|
}
|
|
1468
710
|
};
|
|
1469
711
|
|
|
1470
|
-
// ../../node_modules/.pnpm/ox@0.14.5_typescript@5.9.3_zod@3.
|
|
712
|
+
// ../../node_modules/.pnpm/ox@0.14.5_typescript@5.9.3_zod@4.3.6/node_modules/ox/_esm/core/Withdrawal.js
|
|
1471
713
|
function toRpc(withdrawal) {
|
|
1472
714
|
return {
|
|
1473
715
|
address: withdrawal.address,
|
|
@@ -1477,7 +719,7 @@ function toRpc(withdrawal) {
|
|
|
1477
719
|
};
|
|
1478
720
|
}
|
|
1479
721
|
|
|
1480
|
-
// ../../node_modules/.pnpm/ox@0.14.5_typescript@5.9.3_zod@3.
|
|
722
|
+
// ../../node_modules/.pnpm/ox@0.14.5_typescript@5.9.3_zod@4.3.6/node_modules/ox/_esm/core/BlockOverrides.js
|
|
1481
723
|
function toRpc2(blockOverrides) {
|
|
1482
724
|
return {
|
|
1483
725
|
...typeof blockOverrides.baseFeePerGas === "bigint" && {
|
|
@@ -1507,14 +749,14 @@ function toRpc2(blockOverrides) {
|
|
|
1507
749
|
};
|
|
1508
750
|
}
|
|
1509
751
|
|
|
1510
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
752
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/accounts/utils/parseAccount.js
|
|
1511
753
|
function parseAccount(account) {
|
|
1512
754
|
if (typeof account === "string")
|
|
1513
755
|
return { address: account, type: "json-rpc" };
|
|
1514
756
|
return account;
|
|
1515
757
|
}
|
|
1516
758
|
|
|
1517
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
759
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/constants/abis.js
|
|
1518
760
|
var multicall3Abi = [
|
|
1519
761
|
{
|
|
1520
762
|
inputs: [
|
|
@@ -1836,24 +1078,24 @@ var erc6492SignatureValidatorAbi = [
|
|
|
1836
1078
|
}
|
|
1837
1079
|
];
|
|
1838
1080
|
|
|
1839
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
1081
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/constants/contract.js
|
|
1840
1082
|
var aggregate3Signature = "0x82ad56cb";
|
|
1841
1083
|
|
|
1842
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
1084
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/constants/contracts.js
|
|
1843
1085
|
var deploylessCallViaBytecodeBytecode = "0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe";
|
|
1844
1086
|
var deploylessCallViaFactoryBytecode = "0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe";
|
|
1845
1087
|
var erc6492SignatureValidatorByteCode = "0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572";
|
|
1846
1088
|
var multicall3Bytecode = "0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033";
|
|
1847
1089
|
|
|
1848
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
1849
|
-
var
|
|
1090
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/version.js
|
|
1091
|
+
var version2 = "2.47.5";
|
|
1850
1092
|
|
|
1851
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
1093
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/base.js
|
|
1852
1094
|
var errorConfig = {
|
|
1853
1095
|
getDocsUrl: ({ docsBaseUrl, docsPath: docsPath6 = "", docsSlug }) => docsPath6 ? `${docsBaseUrl ?? "https://viem.sh"}${docsPath6}${docsSlug ? `#${docsSlug}` : ""}` : void 0,
|
|
1854
|
-
version: `viem@${
|
|
1096
|
+
version: `viem@${version2}`
|
|
1855
1097
|
};
|
|
1856
|
-
var
|
|
1098
|
+
var BaseError2 = class _BaseError extends Error {
|
|
1857
1099
|
constructor(shortMessage, args = {}) {
|
|
1858
1100
|
const details = (() => {
|
|
1859
1101
|
if (args.cause instanceof _BaseError)
|
|
@@ -1918,7 +1160,7 @@ var BaseError3 = class _BaseError extends Error {
|
|
|
1918
1160
|
this.metaMessages = args.metaMessages;
|
|
1919
1161
|
this.name = args.name ?? this.name;
|
|
1920
1162
|
this.shortMessage = shortMessage;
|
|
1921
|
-
this.version =
|
|
1163
|
+
this.version = version2;
|
|
1922
1164
|
}
|
|
1923
1165
|
walk(fn) {
|
|
1924
1166
|
return walk2(this, fn);
|
|
@@ -1932,8 +1174,8 @@ function walk2(err, fn) {
|
|
|
1932
1174
|
return fn ? null : err;
|
|
1933
1175
|
}
|
|
1934
1176
|
|
|
1935
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
1936
|
-
var ChainDoesNotSupportContract = class extends
|
|
1177
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/chain.js
|
|
1178
|
+
var ChainDoesNotSupportContract = class extends BaseError2 {
|
|
1937
1179
|
constructor({ blockNumber, chain, contract }) {
|
|
1938
1180
|
super(`Chain "${chain.name}" does not support contract "${contract.name}".`, {
|
|
1939
1181
|
metaMessages: [
|
|
@@ -1948,7 +1190,7 @@ var ChainDoesNotSupportContract = class extends BaseError3 {
|
|
|
1948
1190
|
});
|
|
1949
1191
|
}
|
|
1950
1192
|
};
|
|
1951
|
-
var ChainMismatchError = class extends
|
|
1193
|
+
var ChainMismatchError = class extends BaseError2 {
|
|
1952
1194
|
constructor({ chain, currentChainId }) {
|
|
1953
1195
|
super(`The current chain of the wallet (id: ${currentChainId}) does not match the target chain for the transaction (id: ${chain.id} \u2013 ${chain.name}).`, {
|
|
1954
1196
|
metaMessages: [
|
|
@@ -1959,7 +1201,7 @@ var ChainMismatchError = class extends BaseError3 {
|
|
|
1959
1201
|
});
|
|
1960
1202
|
}
|
|
1961
1203
|
};
|
|
1962
|
-
var ChainNotFoundError = class extends
|
|
1204
|
+
var ChainNotFoundError = class extends BaseError2 {
|
|
1963
1205
|
constructor() {
|
|
1964
1206
|
super([
|
|
1965
1207
|
"No chain was provided to the request.",
|
|
@@ -1969,20 +1211,20 @@ var ChainNotFoundError = class extends BaseError3 {
|
|
|
1969
1211
|
});
|
|
1970
1212
|
}
|
|
1971
1213
|
};
|
|
1972
|
-
var ClientChainNotConfiguredError = class extends
|
|
1214
|
+
var ClientChainNotConfiguredError = class extends BaseError2 {
|
|
1973
1215
|
constructor() {
|
|
1974
1216
|
super("No chain was provided to the Client.", {
|
|
1975
1217
|
name: "ClientChainNotConfiguredError"
|
|
1976
1218
|
});
|
|
1977
1219
|
}
|
|
1978
1220
|
};
|
|
1979
|
-
var InvalidChainIdError = class extends
|
|
1221
|
+
var InvalidChainIdError = class extends BaseError2 {
|
|
1980
1222
|
constructor({ chainId }) {
|
|
1981
1223
|
super(typeof chainId === "number" ? `Chain ID "${chainId}" is invalid.` : "Chain ID is invalid.", { name: "InvalidChainIdError" });
|
|
1982
1224
|
}
|
|
1983
1225
|
};
|
|
1984
1226
|
|
|
1985
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
1227
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/constants/solidity.js
|
|
1986
1228
|
var panicReasons = {
|
|
1987
1229
|
1: "An `assert` condition failed.",
|
|
1988
1230
|
17: "Arithmetic operation resulted in underflow or overflow.",
|
|
@@ -2015,7 +1257,7 @@ var solidityPanic = {
|
|
|
2015
1257
|
type: "error"
|
|
2016
1258
|
};
|
|
2017
1259
|
|
|
2018
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
1260
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/abi/formatAbiItem.js
|
|
2019
1261
|
function formatAbiItem2(abiItem, { includeName = false } = {}) {
|
|
2020
1262
|
if (abiItem.type !== "function" && abiItem.type !== "event" && abiItem.type !== "error")
|
|
2021
1263
|
throw new InvalidDefinitionTypeError(abiItem.type);
|
|
@@ -2033,7 +1275,7 @@ function formatAbiParam(param, { includeName }) {
|
|
|
2033
1275
|
return param.type + (includeName && param.name ? ` ${param.name}` : "");
|
|
2034
1276
|
}
|
|
2035
1277
|
|
|
2036
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
1278
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/isHex.js
|
|
2037
1279
|
function isHex(value, { strict = true } = {}) {
|
|
2038
1280
|
if (!value)
|
|
2039
1281
|
return false;
|
|
@@ -2042,15 +1284,15 @@ function isHex(value, { strict = true } = {}) {
|
|
|
2042
1284
|
return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith("0x");
|
|
2043
1285
|
}
|
|
2044
1286
|
|
|
2045
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
1287
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/size.js
|
|
2046
1288
|
function size3(value) {
|
|
2047
1289
|
if (isHex(value, { strict: false }))
|
|
2048
1290
|
return Math.ceil((value.length - 2) / 2);
|
|
2049
1291
|
return value.length;
|
|
2050
1292
|
}
|
|
2051
1293
|
|
|
2052
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2053
|
-
var AbiConstructorNotFoundError = class extends
|
|
1294
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/abi.js
|
|
1295
|
+
var AbiConstructorNotFoundError = class extends BaseError2 {
|
|
2054
1296
|
constructor({ docsPath: docsPath6 }) {
|
|
2055
1297
|
super([
|
|
2056
1298
|
"A constructor was not found on the ABI.",
|
|
@@ -2061,7 +1303,7 @@ var AbiConstructorNotFoundError = class extends BaseError3 {
|
|
|
2061
1303
|
});
|
|
2062
1304
|
}
|
|
2063
1305
|
};
|
|
2064
|
-
var AbiConstructorParamsNotFoundError = class extends
|
|
1306
|
+
var AbiConstructorParamsNotFoundError = class extends BaseError2 {
|
|
2065
1307
|
constructor({ docsPath: docsPath6 }) {
|
|
2066
1308
|
super([
|
|
2067
1309
|
"Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.",
|
|
@@ -2072,7 +1314,7 @@ var AbiConstructorParamsNotFoundError = class extends BaseError3 {
|
|
|
2072
1314
|
});
|
|
2073
1315
|
}
|
|
2074
1316
|
};
|
|
2075
|
-
var AbiDecodingDataSizeTooSmallError = class extends
|
|
1317
|
+
var AbiDecodingDataSizeTooSmallError = class extends BaseError2 {
|
|
2076
1318
|
constructor({ data, params, size: size4 }) {
|
|
2077
1319
|
super([`Data size of ${size4} bytes is too small for given parameters.`].join("\n"), {
|
|
2078
1320
|
metaMessages: [
|
|
@@ -2104,7 +1346,7 @@ var AbiDecodingDataSizeTooSmallError = class extends BaseError3 {
|
|
|
2104
1346
|
this.size = size4;
|
|
2105
1347
|
}
|
|
2106
1348
|
};
|
|
2107
|
-
var AbiDecodingZeroDataError = class extends
|
|
1349
|
+
var AbiDecodingZeroDataError = class extends BaseError2 {
|
|
2108
1350
|
constructor({ cause } = {}) {
|
|
2109
1351
|
super('Cannot decode zero data ("0x") with ABI parameters.', {
|
|
2110
1352
|
name: "AbiDecodingZeroDataError",
|
|
@@ -2112,7 +1354,7 @@ var AbiDecodingZeroDataError = class extends BaseError3 {
|
|
|
2112
1354
|
});
|
|
2113
1355
|
}
|
|
2114
1356
|
};
|
|
2115
|
-
var AbiEncodingArrayLengthMismatchError = class extends
|
|
1357
|
+
var AbiEncodingArrayLengthMismatchError = class extends BaseError2 {
|
|
2116
1358
|
constructor({ expectedLength, givenLength, type }) {
|
|
2117
1359
|
super([
|
|
2118
1360
|
`ABI encoding array length mismatch for type ${type}.`,
|
|
@@ -2121,12 +1363,12 @@ var AbiEncodingArrayLengthMismatchError = class extends BaseError3 {
|
|
|
2121
1363
|
].join("\n"), { name: "AbiEncodingArrayLengthMismatchError" });
|
|
2122
1364
|
}
|
|
2123
1365
|
};
|
|
2124
|
-
var AbiEncodingBytesSizeMismatchError = class extends
|
|
1366
|
+
var AbiEncodingBytesSizeMismatchError = class extends BaseError2 {
|
|
2125
1367
|
constructor({ expectedSize, value }) {
|
|
2126
1368
|
super(`Size of bytes "${value}" (bytes${size3(value)}) does not match expected size (bytes${expectedSize}).`, { name: "AbiEncodingBytesSizeMismatchError" });
|
|
2127
1369
|
}
|
|
2128
1370
|
};
|
|
2129
|
-
var AbiEncodingLengthMismatchError = class extends
|
|
1371
|
+
var AbiEncodingLengthMismatchError = class extends BaseError2 {
|
|
2130
1372
|
constructor({ expectedLength, givenLength }) {
|
|
2131
1373
|
super([
|
|
2132
1374
|
"ABI encoding params/values length mismatch.",
|
|
@@ -2135,7 +1377,7 @@ var AbiEncodingLengthMismatchError = class extends BaseError3 {
|
|
|
2135
1377
|
].join("\n"), { name: "AbiEncodingLengthMismatchError" });
|
|
2136
1378
|
}
|
|
2137
1379
|
};
|
|
2138
|
-
var AbiErrorInputsNotFoundError = class extends
|
|
1380
|
+
var AbiErrorInputsNotFoundError = class extends BaseError2 {
|
|
2139
1381
|
constructor(errorName, { docsPath: docsPath6 }) {
|
|
2140
1382
|
super([
|
|
2141
1383
|
`Arguments (\`args\`) were provided to "${errorName}", but "${errorName}" on the ABI does not contain any parameters (\`inputs\`).`,
|
|
@@ -2147,7 +1389,7 @@ var AbiErrorInputsNotFoundError = class extends BaseError3 {
|
|
|
2147
1389
|
});
|
|
2148
1390
|
}
|
|
2149
1391
|
};
|
|
2150
|
-
var AbiErrorNotFoundError = class extends
|
|
1392
|
+
var AbiErrorNotFoundError = class extends BaseError2 {
|
|
2151
1393
|
constructor(errorName, { docsPath: docsPath6 } = {}) {
|
|
2152
1394
|
super([
|
|
2153
1395
|
`Error ${errorName ? `"${errorName}" ` : ""}not found on ABI.`,
|
|
@@ -2158,7 +1400,7 @@ var AbiErrorNotFoundError = class extends BaseError3 {
|
|
|
2158
1400
|
});
|
|
2159
1401
|
}
|
|
2160
1402
|
};
|
|
2161
|
-
var AbiErrorSignatureNotFoundError = class extends
|
|
1403
|
+
var AbiErrorSignatureNotFoundError = class extends BaseError2 {
|
|
2162
1404
|
constructor(signature, { docsPath: docsPath6, cause }) {
|
|
2163
1405
|
super([
|
|
2164
1406
|
`Encoded error signature "${signature}" not found on ABI.`,
|
|
@@ -2178,7 +1420,7 @@ var AbiErrorSignatureNotFoundError = class extends BaseError3 {
|
|
|
2178
1420
|
this.signature = signature;
|
|
2179
1421
|
}
|
|
2180
1422
|
};
|
|
2181
|
-
var AbiEventSignatureEmptyTopicsError = class extends
|
|
1423
|
+
var AbiEventSignatureEmptyTopicsError = class extends BaseError2 {
|
|
2182
1424
|
constructor({ docsPath: docsPath6 }) {
|
|
2183
1425
|
super("Cannot extract event signature from empty topics.", {
|
|
2184
1426
|
docsPath: docsPath6,
|
|
@@ -2186,7 +1428,7 @@ var AbiEventSignatureEmptyTopicsError = class extends BaseError3 {
|
|
|
2186
1428
|
});
|
|
2187
1429
|
}
|
|
2188
1430
|
};
|
|
2189
|
-
var AbiEventSignatureNotFoundError = class extends
|
|
1431
|
+
var AbiEventSignatureNotFoundError = class extends BaseError2 {
|
|
2190
1432
|
constructor(signature, { docsPath: docsPath6 }) {
|
|
2191
1433
|
super([
|
|
2192
1434
|
`Encoded event signature "${signature}" not found on ABI.`,
|
|
@@ -2198,7 +1440,7 @@ var AbiEventSignatureNotFoundError = class extends BaseError3 {
|
|
|
2198
1440
|
});
|
|
2199
1441
|
}
|
|
2200
1442
|
};
|
|
2201
|
-
var AbiEventNotFoundError = class extends
|
|
1443
|
+
var AbiEventNotFoundError = class extends BaseError2 {
|
|
2202
1444
|
constructor(eventName, { docsPath: docsPath6 } = {}) {
|
|
2203
1445
|
super([
|
|
2204
1446
|
`Event ${eventName ? `"${eventName}" ` : ""}not found on ABI.`,
|
|
@@ -2209,7 +1451,7 @@ var AbiEventNotFoundError = class extends BaseError3 {
|
|
|
2209
1451
|
});
|
|
2210
1452
|
}
|
|
2211
1453
|
};
|
|
2212
|
-
var AbiFunctionNotFoundError = class extends
|
|
1454
|
+
var AbiFunctionNotFoundError = class extends BaseError2 {
|
|
2213
1455
|
constructor(functionName, { docsPath: docsPath6 } = {}) {
|
|
2214
1456
|
super([
|
|
2215
1457
|
`Function ${functionName ? `"${functionName}" ` : ""}not found on ABI.`,
|
|
@@ -2220,7 +1462,7 @@ var AbiFunctionNotFoundError = class extends BaseError3 {
|
|
|
2220
1462
|
});
|
|
2221
1463
|
}
|
|
2222
1464
|
};
|
|
2223
|
-
var AbiFunctionOutputsNotFoundError = class extends
|
|
1465
|
+
var AbiFunctionOutputsNotFoundError = class extends BaseError2 {
|
|
2224
1466
|
constructor(functionName, { docsPath: docsPath6 }) {
|
|
2225
1467
|
super([
|
|
2226
1468
|
`Function "${functionName}" does not contain any \`outputs\` on ABI.`,
|
|
@@ -2232,7 +1474,7 @@ var AbiFunctionOutputsNotFoundError = class extends BaseError3 {
|
|
|
2232
1474
|
});
|
|
2233
1475
|
}
|
|
2234
1476
|
};
|
|
2235
|
-
var AbiFunctionSignatureNotFoundError = class extends
|
|
1477
|
+
var AbiFunctionSignatureNotFoundError = class extends BaseError2 {
|
|
2236
1478
|
constructor(signature, { docsPath: docsPath6 }) {
|
|
2237
1479
|
super([
|
|
2238
1480
|
`Encoded function signature "${signature}" not found on ABI.`,
|
|
@@ -2244,7 +1486,7 @@ var AbiFunctionSignatureNotFoundError = class extends BaseError3 {
|
|
|
2244
1486
|
});
|
|
2245
1487
|
}
|
|
2246
1488
|
};
|
|
2247
|
-
var AbiItemAmbiguityError = class extends
|
|
1489
|
+
var AbiItemAmbiguityError = class extends BaseError2 {
|
|
2248
1490
|
constructor(x, y) {
|
|
2249
1491
|
super("Found ambiguous types in overloaded ABI items.", {
|
|
2250
1492
|
metaMessages: [
|
|
@@ -2258,14 +1500,14 @@ var AbiItemAmbiguityError = class extends BaseError3 {
|
|
|
2258
1500
|
});
|
|
2259
1501
|
}
|
|
2260
1502
|
};
|
|
2261
|
-
var BytesSizeMismatchError = class extends
|
|
1503
|
+
var BytesSizeMismatchError = class extends BaseError2 {
|
|
2262
1504
|
constructor({ expectedSize, givenSize }) {
|
|
2263
1505
|
super(`Expected bytes${expectedSize}, got bytes${givenSize}.`, {
|
|
2264
1506
|
name: "BytesSizeMismatchError"
|
|
2265
1507
|
});
|
|
2266
1508
|
}
|
|
2267
1509
|
};
|
|
2268
|
-
var DecodeLogDataMismatch = class extends
|
|
1510
|
+
var DecodeLogDataMismatch = class extends BaseError2 {
|
|
2269
1511
|
constructor({ abiItem, data, params, size: size4 }) {
|
|
2270
1512
|
super([
|
|
2271
1513
|
`Data size of ${size4} bytes is too small for non-indexed event parameters.`
|
|
@@ -2306,7 +1548,7 @@ var DecodeLogDataMismatch = class extends BaseError3 {
|
|
|
2306
1548
|
this.size = size4;
|
|
2307
1549
|
}
|
|
2308
1550
|
};
|
|
2309
|
-
var DecodeLogTopicsMismatch = class extends
|
|
1551
|
+
var DecodeLogTopicsMismatch = class extends BaseError2 {
|
|
2310
1552
|
constructor({ abiItem, param }) {
|
|
2311
1553
|
super([
|
|
2312
1554
|
`Expected a topic for indexed event parameter${param.name ? ` "${param.name}"` : ""} on event "${formatAbiItem2(abiItem, { includeName: true })}".`
|
|
@@ -2320,7 +1562,7 @@ var DecodeLogTopicsMismatch = class extends BaseError3 {
|
|
|
2320
1562
|
this.abiItem = abiItem;
|
|
2321
1563
|
}
|
|
2322
1564
|
};
|
|
2323
|
-
var InvalidAbiEncodingTypeError = class extends
|
|
1565
|
+
var InvalidAbiEncodingTypeError = class extends BaseError2 {
|
|
2324
1566
|
constructor(type, { docsPath: docsPath6 }) {
|
|
2325
1567
|
super([
|
|
2326
1568
|
`Type "${type}" is not a valid encoding type.`,
|
|
@@ -2328,7 +1570,7 @@ var InvalidAbiEncodingTypeError = class extends BaseError3 {
|
|
|
2328
1570
|
].join("\n"), { docsPath: docsPath6, name: "InvalidAbiEncodingType" });
|
|
2329
1571
|
}
|
|
2330
1572
|
};
|
|
2331
|
-
var InvalidAbiDecodingTypeError = class extends
|
|
1573
|
+
var InvalidAbiDecodingTypeError = class extends BaseError2 {
|
|
2332
1574
|
constructor(type, { docsPath: docsPath6 }) {
|
|
2333
1575
|
super([
|
|
2334
1576
|
`Type "${type}" is not a valid decoding type.`,
|
|
@@ -2336,14 +1578,14 @@ var InvalidAbiDecodingTypeError = class extends BaseError3 {
|
|
|
2336
1578
|
].join("\n"), { docsPath: docsPath6, name: "InvalidAbiDecodingType" });
|
|
2337
1579
|
}
|
|
2338
1580
|
};
|
|
2339
|
-
var InvalidArrayError = class extends
|
|
1581
|
+
var InvalidArrayError = class extends BaseError2 {
|
|
2340
1582
|
constructor(value) {
|
|
2341
1583
|
super([`Value "${value}" is not a valid array.`].join("\n"), {
|
|
2342
1584
|
name: "InvalidArrayError"
|
|
2343
1585
|
});
|
|
2344
1586
|
}
|
|
2345
1587
|
};
|
|
2346
|
-
var InvalidDefinitionTypeError = class extends
|
|
1588
|
+
var InvalidDefinitionTypeError = class extends BaseError2 {
|
|
2347
1589
|
constructor(type) {
|
|
2348
1590
|
super([
|
|
2349
1591
|
`"${type}" is not a valid definition type.`,
|
|
@@ -2352,24 +1594,24 @@ var InvalidDefinitionTypeError = class extends BaseError3 {
|
|
|
2352
1594
|
}
|
|
2353
1595
|
};
|
|
2354
1596
|
|
|
2355
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2356
|
-
var SliceOffsetOutOfBoundsError3 = class extends
|
|
1597
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/data.js
|
|
1598
|
+
var SliceOffsetOutOfBoundsError3 = class extends BaseError2 {
|
|
2357
1599
|
constructor({ offset, position, size: size4 }) {
|
|
2358
1600
|
super(`Slice ${position === "start" ? "starting" : "ending"} at offset "${offset}" is out-of-bounds (size: ${size4}).`, { name: "SliceOffsetOutOfBoundsError" });
|
|
2359
1601
|
}
|
|
2360
1602
|
};
|
|
2361
|
-
var SizeExceedsPaddingSizeError3 = class extends
|
|
1603
|
+
var SizeExceedsPaddingSizeError3 = class extends BaseError2 {
|
|
2362
1604
|
constructor({ size: size4, targetSize, type }) {
|
|
2363
1605
|
super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (${size4}) exceeds padding size (${targetSize}).`, { name: "SizeExceedsPaddingSizeError" });
|
|
2364
1606
|
}
|
|
2365
1607
|
};
|
|
2366
|
-
var InvalidBytesLengthError = class extends
|
|
1608
|
+
var InvalidBytesLengthError = class extends BaseError2 {
|
|
2367
1609
|
constructor({ size: size4, targetSize, type }) {
|
|
2368
1610
|
super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} is expected to be ${targetSize} ${type} long, but is ${size4} ${type} long.`, { name: "InvalidBytesLengthError" });
|
|
2369
1611
|
}
|
|
2370
1612
|
};
|
|
2371
1613
|
|
|
2372
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
1614
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/slice.js
|
|
2373
1615
|
function slice3(value, start, end, { strict } = {}) {
|
|
2374
1616
|
if (isHex(value, { strict: false }))
|
|
2375
1617
|
return sliceHex(value, start, end, {
|
|
@@ -2411,7 +1653,7 @@ function sliceHex(value_, start, end, { strict } = {}) {
|
|
|
2411
1653
|
return value;
|
|
2412
1654
|
}
|
|
2413
1655
|
|
|
2414
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
1656
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/pad.js
|
|
2415
1657
|
function pad3(hexOrBytes, { dir, size: size4 = 32 } = {}) {
|
|
2416
1658
|
if (typeof hexOrBytes === "string")
|
|
2417
1659
|
return padHex(hexOrBytes, { dir, size: size4 });
|
|
@@ -2446,36 +1688,36 @@ function padBytes(bytes, { dir, size: size4 = 32 } = {}) {
|
|
|
2446
1688
|
return paddedBytes;
|
|
2447
1689
|
}
|
|
2448
1690
|
|
|
2449
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2450
|
-
var IntegerOutOfRangeError2 = class extends
|
|
1691
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/encoding.js
|
|
1692
|
+
var IntegerOutOfRangeError2 = class extends BaseError2 {
|
|
2451
1693
|
constructor({ max, min, signed, size: size4, value }) {
|
|
2452
1694
|
super(`Number "${value}" is not in safe ${size4 ? `${size4 * 8}-bit ${signed ? "signed" : "unsigned"} ` : ""}integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`, { name: "IntegerOutOfRangeError" });
|
|
2453
1695
|
}
|
|
2454
1696
|
};
|
|
2455
|
-
var InvalidBytesBooleanError2 = class extends
|
|
1697
|
+
var InvalidBytesBooleanError2 = class extends BaseError2 {
|
|
2456
1698
|
constructor(bytes) {
|
|
2457
1699
|
super(`Bytes value "${bytes}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {
|
|
2458
1700
|
name: "InvalidBytesBooleanError"
|
|
2459
1701
|
});
|
|
2460
1702
|
}
|
|
2461
1703
|
};
|
|
2462
|
-
var InvalidHexBooleanError = class extends
|
|
1704
|
+
var InvalidHexBooleanError = class extends BaseError2 {
|
|
2463
1705
|
constructor(hex) {
|
|
2464
1706
|
super(`Hex value "${hex}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`, { name: "InvalidHexBooleanError" });
|
|
2465
1707
|
}
|
|
2466
1708
|
};
|
|
2467
|
-
var InvalidHexValueError2 = class extends
|
|
1709
|
+
var InvalidHexValueError2 = class extends BaseError2 {
|
|
2468
1710
|
constructor(value) {
|
|
2469
1711
|
super(`Hex value "${value}" is an odd length (${value.length}). It must be an even length.`, { name: "InvalidHexValueError" });
|
|
2470
1712
|
}
|
|
2471
1713
|
};
|
|
2472
|
-
var SizeOverflowError3 = class extends
|
|
1714
|
+
var SizeOverflowError3 = class extends BaseError2 {
|
|
2473
1715
|
constructor({ givenSize, maxSize }) {
|
|
2474
1716
|
super(`Size cannot exceed ${maxSize} bytes. Given size: ${givenSize} bytes.`, { name: "SizeOverflowError" });
|
|
2475
1717
|
}
|
|
2476
1718
|
};
|
|
2477
1719
|
|
|
2478
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
1720
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/trim.js
|
|
2479
1721
|
function trim3(hexOrBytes, { dir = "left" } = {}) {
|
|
2480
1722
|
let data = typeof hexOrBytes === "string" ? hexOrBytes.replace("0x", "") : hexOrBytes;
|
|
2481
1723
|
let sliceLength = 0;
|
|
@@ -2494,7 +1736,7 @@ function trim3(hexOrBytes, { dir = "left" } = {}) {
|
|
|
2494
1736
|
return data;
|
|
2495
1737
|
}
|
|
2496
1738
|
|
|
2497
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
1739
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/encoding/fromHex.js
|
|
2498
1740
|
function assertSize3(hexOrBytes, { size: size4 }) {
|
|
2499
1741
|
if (size3(hexOrBytes) > size4)
|
|
2500
1742
|
throw new SizeOverflowError3({
|
|
@@ -2541,7 +1783,7 @@ function hexToNumber(hex, opts = {}) {
|
|
|
2541
1783
|
return number;
|
|
2542
1784
|
}
|
|
2543
1785
|
|
|
2544
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
1786
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/encoding/toHex.js
|
|
2545
1787
|
var hexes2 = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i) => i.toString(16).padStart(2, "0"));
|
|
2546
1788
|
function toHex(value, opts = {}) {
|
|
2547
1789
|
if (typeof value === "number" || typeof value === "bigint")
|
|
@@ -2607,7 +1849,7 @@ function stringToHex(value_, opts = {}) {
|
|
|
2607
1849
|
return bytesToHex(value, opts);
|
|
2608
1850
|
}
|
|
2609
1851
|
|
|
2610
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
1852
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/encoding/toBytes.js
|
|
2611
1853
|
var encoder4 = /* @__PURE__ */ new TextEncoder();
|
|
2612
1854
|
function toBytes(value, opts = {}) {
|
|
2613
1855
|
if (typeof value === "number" || typeof value === "bigint")
|
|
@@ -2659,7 +1901,7 @@ function hexToBytes(hex_, opts = {}) {
|
|
|
2659
1901
|
const nibbleLeft = charCodeToBase162(hexString.charCodeAt(j++));
|
|
2660
1902
|
const nibbleRight = charCodeToBase162(hexString.charCodeAt(j++));
|
|
2661
1903
|
if (nibbleLeft === void 0 || nibbleRight === void 0) {
|
|
2662
|
-
throw new
|
|
1904
|
+
throw new BaseError2(`Invalid byte sequence ("${hexString[j - 2]}${hexString[j - 1]}" in "${hexString}").`);
|
|
2663
1905
|
}
|
|
2664
1906
|
bytes[index] = nibbleLeft * 16 + nibbleRight;
|
|
2665
1907
|
}
|
|
@@ -2678,7 +1920,7 @@ function stringToBytes(value, opts = {}) {
|
|
|
2678
1920
|
return bytes;
|
|
2679
1921
|
}
|
|
2680
1922
|
|
|
2681
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
1923
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/hash/keccak256.js
|
|
2682
1924
|
function keccak256(value, to_) {
|
|
2683
1925
|
const to = to_ || "hex";
|
|
2684
1926
|
const bytes = keccak_256(isHex(value, { strict: false }) ? toBytes(value) : value);
|
|
@@ -2687,13 +1929,13 @@ function keccak256(value, to_) {
|
|
|
2687
1929
|
return toHex(bytes);
|
|
2688
1930
|
}
|
|
2689
1931
|
|
|
2690
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
1932
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/hash/hashSignature.js
|
|
2691
1933
|
var hash = (value) => keccak256(toBytes(value));
|
|
2692
1934
|
function hashSignature(sig) {
|
|
2693
1935
|
return hash(sig);
|
|
2694
1936
|
}
|
|
2695
1937
|
|
|
2696
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
1938
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/hash/normalizeSignature.js
|
|
2697
1939
|
function normalizeSignature(signature) {
|
|
2698
1940
|
let active = true;
|
|
2699
1941
|
let current = "";
|
|
@@ -2733,11 +1975,11 @@ function normalizeSignature(signature) {
|
|
|
2733
1975
|
current += char;
|
|
2734
1976
|
}
|
|
2735
1977
|
if (!valid)
|
|
2736
|
-
throw new
|
|
1978
|
+
throw new BaseError2("Unable to normalize signature.");
|
|
2737
1979
|
return result;
|
|
2738
1980
|
}
|
|
2739
1981
|
|
|
2740
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
1982
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/hash/toSignature.js
|
|
2741
1983
|
var toSignature = (def) => {
|
|
2742
1984
|
const def_ = (() => {
|
|
2743
1985
|
if (typeof def === "string")
|
|
@@ -2747,16 +1989,16 @@ var toSignature = (def) => {
|
|
|
2747
1989
|
return normalizeSignature(def_);
|
|
2748
1990
|
};
|
|
2749
1991
|
|
|
2750
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
1992
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/hash/toSignatureHash.js
|
|
2751
1993
|
function toSignatureHash(fn) {
|
|
2752
1994
|
return hashSignature(toSignature(fn));
|
|
2753
1995
|
}
|
|
2754
1996
|
|
|
2755
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
1997
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/hash/toFunctionSelector.js
|
|
2756
1998
|
var toFunctionSelector = (fn) => slice3(toSignatureHash(fn), 0, 4);
|
|
2757
1999
|
|
|
2758
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2759
|
-
var InvalidAddressError = class extends
|
|
2000
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/address.js
|
|
2001
|
+
var InvalidAddressError = class extends BaseError2 {
|
|
2760
2002
|
constructor({ address }) {
|
|
2761
2003
|
super(`Address "${address}" is invalid.`, {
|
|
2762
2004
|
metaMessages: [
|
|
@@ -2768,7 +2010,7 @@ var InvalidAddressError = class extends BaseError3 {
|
|
|
2768
2010
|
}
|
|
2769
2011
|
};
|
|
2770
2012
|
|
|
2771
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2013
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/lru.js
|
|
2772
2014
|
var LruMap = class extends Map {
|
|
2773
2015
|
constructor(size4) {
|
|
2774
2016
|
super();
|
|
@@ -2801,7 +2043,7 @@ var LruMap = class extends Map {
|
|
|
2801
2043
|
}
|
|
2802
2044
|
};
|
|
2803
2045
|
|
|
2804
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2046
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/address/isAddress.js
|
|
2805
2047
|
var addressRegex = /^0x[a-fA-F0-9]{40}$/;
|
|
2806
2048
|
var isAddressCache = /* @__PURE__ */ new LruMap(8192);
|
|
2807
2049
|
function isAddress(address, options) {
|
|
@@ -2822,7 +2064,7 @@ function isAddress(address, options) {
|
|
|
2822
2064
|
return result;
|
|
2823
2065
|
}
|
|
2824
2066
|
|
|
2825
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2067
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/address/getAddress.js
|
|
2826
2068
|
var checksumAddressCache = /* @__PURE__ */ new LruMap(8192);
|
|
2827
2069
|
function checksumAddress(address_, chainId) {
|
|
2828
2070
|
if (checksumAddressCache.has(`${address_}.${chainId}`))
|
|
@@ -2848,26 +2090,26 @@ function getAddress(address, chainId) {
|
|
|
2848
2090
|
return checksumAddress(address, chainId);
|
|
2849
2091
|
}
|
|
2850
2092
|
|
|
2851
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2852
|
-
var NegativeOffsetError = class extends
|
|
2093
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/cursor.js
|
|
2094
|
+
var NegativeOffsetError = class extends BaseError2 {
|
|
2853
2095
|
constructor({ offset }) {
|
|
2854
2096
|
super(`Offset \`${offset}\` cannot be negative.`, {
|
|
2855
2097
|
name: "NegativeOffsetError"
|
|
2856
2098
|
});
|
|
2857
2099
|
}
|
|
2858
2100
|
};
|
|
2859
|
-
var PositionOutOfBoundsError = class extends
|
|
2101
|
+
var PositionOutOfBoundsError = class extends BaseError2 {
|
|
2860
2102
|
constructor({ length, position }) {
|
|
2861
2103
|
super(`Position \`${position}\` is out of bounds (\`0 < position < ${length}\`).`, { name: "PositionOutOfBoundsError" });
|
|
2862
2104
|
}
|
|
2863
2105
|
};
|
|
2864
|
-
var RecursiveReadLimitExceededError = class extends
|
|
2106
|
+
var RecursiveReadLimitExceededError = class extends BaseError2 {
|
|
2865
2107
|
constructor({ count, limit }) {
|
|
2866
2108
|
super(`Recursive read limit of \`${limit}\` exceeded (recursive read count: \`${count}\`).`, { name: "RecursiveReadLimitExceededError" });
|
|
2867
2109
|
}
|
|
2868
2110
|
};
|
|
2869
2111
|
|
|
2870
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2112
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/cursor.js
|
|
2871
2113
|
var staticCursor = {
|
|
2872
2114
|
bytes: new Uint8Array(),
|
|
2873
2115
|
dataView: new DataView(new ArrayBuffer(0)),
|
|
@@ -3036,7 +2278,7 @@ function createCursor(bytes, { recursiveReadLimit = 8192 } = {}) {
|
|
|
3036
2278
|
return cursor;
|
|
3037
2279
|
}
|
|
3038
2280
|
|
|
3039
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2281
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/encoding/fromBytes.js
|
|
3040
2282
|
function bytesToBigInt(bytes, opts = {}) {
|
|
3041
2283
|
if (typeof opts.size !== "undefined")
|
|
3042
2284
|
assertSize3(bytes, { size: opts.size });
|
|
@@ -3068,7 +2310,7 @@ function bytesToString(bytes_, opts = {}) {
|
|
|
3068
2310
|
return new TextDecoder().decode(bytes);
|
|
3069
2311
|
}
|
|
3070
2312
|
|
|
3071
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2313
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/concat.js
|
|
3072
2314
|
function concat3(values) {
|
|
3073
2315
|
if (typeof values[0] === "string")
|
|
3074
2316
|
return concatHex(values);
|
|
@@ -3091,11 +2333,11 @@ function concatHex(values) {
|
|
|
3091
2333
|
return `0x${values.reduce((acc, x) => acc + x.replace("0x", ""), "")}`;
|
|
3092
2334
|
}
|
|
3093
2335
|
|
|
3094
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
3095
|
-
var
|
|
3096
|
-
var
|
|
2336
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/regex.js
|
|
2337
|
+
var bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;
|
|
2338
|
+
var integerRegex = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;
|
|
3097
2339
|
|
|
3098
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2340
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js
|
|
3099
2341
|
function encodeAbiParameters(params, values) {
|
|
3100
2342
|
if (params.length !== values.length)
|
|
3101
2343
|
throw new AbiEncodingLengthMismatchError({
|
|
@@ -3137,7 +2379,7 @@ function prepareParam({ param, value }) {
|
|
|
3137
2379
|
}
|
|
3138
2380
|
if (param.type.startsWith("uint") || param.type.startsWith("int")) {
|
|
3139
2381
|
const signed = param.type.startsWith("int");
|
|
3140
|
-
const [, , size4 = "256"] =
|
|
2382
|
+
const [, , size4 = "256"] = integerRegex.exec(param.type) ?? [];
|
|
3141
2383
|
return encodeNumber(value, {
|
|
3142
2384
|
signed,
|
|
3143
2385
|
size: Number(size4)
|
|
@@ -3241,7 +2483,7 @@ function encodeBytes(value, { param }) {
|
|
|
3241
2483
|
}
|
|
3242
2484
|
function encodeBool(value) {
|
|
3243
2485
|
if (typeof value !== "boolean")
|
|
3244
|
-
throw new
|
|
2486
|
+
throw new BaseError2(`Invalid boolean value: "${value}" (type: ${typeof value}). Expected: \`true\` or \`false\`.`);
|
|
3245
2487
|
return { dynamic: false, encoded: padHex(boolToHex(value)) };
|
|
3246
2488
|
}
|
|
3247
2489
|
function encodeNumber(value, { signed, size: size4 = 256 }) {
|
|
@@ -3309,7 +2551,7 @@ function getArrayComponents(type) {
|
|
|
3309
2551
|
) : void 0;
|
|
3310
2552
|
}
|
|
3311
2553
|
|
|
3312
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2554
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/abi/decodeAbiParameters.js
|
|
3313
2555
|
function decodeAbiParameters(params, data) {
|
|
3314
2556
|
const bytes = typeof data === "string" ? hexToBytes(data) : data;
|
|
3315
2557
|
const cursor = createCursor(bytes);
|
|
@@ -3496,7 +2738,7 @@ function hasDynamicChild(param) {
|
|
|
3496
2738
|
return false;
|
|
3497
2739
|
}
|
|
3498
2740
|
|
|
3499
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2741
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/abi/decodeErrorResult.js
|
|
3500
2742
|
function decodeErrorResult(parameters) {
|
|
3501
2743
|
const { abi, data, cause } = parameters;
|
|
3502
2744
|
const signature = slice3(data, 0, 4);
|
|
@@ -3516,13 +2758,13 @@ function decodeErrorResult(parameters) {
|
|
|
3516
2758
|
};
|
|
3517
2759
|
}
|
|
3518
2760
|
|
|
3519
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2761
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/stringify.js
|
|
3520
2762
|
var stringify2 = (value, replacer, space) => JSON.stringify(value, (key, value_) => {
|
|
3521
2763
|
const value2 = typeof value_ === "bigint" ? value_.toString() : value_;
|
|
3522
2764
|
return typeof replacer === "function" ? replacer(key, value2) : value2;
|
|
3523
2765
|
}, space);
|
|
3524
2766
|
|
|
3525
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2767
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js
|
|
3526
2768
|
function formatAbiItemWithArgs({ abiItem, args, includeFunctionName = true, includeName = false }) {
|
|
3527
2769
|
if (!("name" in abiItem))
|
|
3528
2770
|
return;
|
|
@@ -3533,10 +2775,10 @@ function formatAbiItemWithArgs({ abiItem, args, includeFunctionName = true, incl
|
|
|
3533
2775
|
return `${includeFunctionName ? abiItem.name : ""}(${abiItem.inputs.map((input, i) => `${includeName && input.name ? `${input.name}: ` : ""}${typeof args[i] === "object" ? stringify2(args[i]) : args[i]}`).join(", ")})`;
|
|
3534
2776
|
}
|
|
3535
2777
|
|
|
3536
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2778
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/hash/toEventSelector.js
|
|
3537
2779
|
var toEventSelector = toSignatureHash;
|
|
3538
2780
|
|
|
3539
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2781
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/abi/getAbiItem.js
|
|
3540
2782
|
function getAbiItem(parameters) {
|
|
3541
2783
|
const { abi, args = [], name } = parameters;
|
|
3542
2784
|
const isSelector = isHex(name, { strict: false });
|
|
@@ -3648,7 +2890,7 @@ function getAmbiguousTypes(sourceParameters, targetParameters, args) {
|
|
|
3648
2890
|
return;
|
|
3649
2891
|
}
|
|
3650
2892
|
|
|
3651
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2893
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/constants/unit.js
|
|
3652
2894
|
var etherUnits = {
|
|
3653
2895
|
gwei: 9,
|
|
3654
2896
|
wei: 18
|
|
@@ -3658,7 +2900,7 @@ var gweiUnits = {
|
|
|
3658
2900
|
wei: 9
|
|
3659
2901
|
};
|
|
3660
2902
|
|
|
3661
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2903
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/unit/formatUnits.js
|
|
3662
2904
|
function formatUnits(value, decimals) {
|
|
3663
2905
|
let display = value.toString();
|
|
3664
2906
|
const negative = display.startsWith("-");
|
|
@@ -3673,25 +2915,25 @@ function formatUnits(value, decimals) {
|
|
|
3673
2915
|
return `${negative ? "-" : ""}${integer || "0"}${fraction ? `.${fraction}` : ""}`;
|
|
3674
2916
|
}
|
|
3675
2917
|
|
|
3676
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2918
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/unit/formatEther.js
|
|
3677
2919
|
function formatEther(wei, unit = "wei") {
|
|
3678
2920
|
return formatUnits(wei, etherUnits[unit]);
|
|
3679
2921
|
}
|
|
3680
2922
|
|
|
3681
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2923
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/unit/formatGwei.js
|
|
3682
2924
|
function formatGwei(wei, unit = "wei") {
|
|
3683
2925
|
return formatUnits(wei, gweiUnits[unit]);
|
|
3684
2926
|
}
|
|
3685
2927
|
|
|
3686
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
3687
|
-
var AccountStateConflictError = class extends
|
|
2928
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/stateOverride.js
|
|
2929
|
+
var AccountStateConflictError = class extends BaseError2 {
|
|
3688
2930
|
constructor({ address }) {
|
|
3689
2931
|
super(`State for account "${address}" is set multiple times.`, {
|
|
3690
2932
|
name: "AccountStateConflictError"
|
|
3691
2933
|
});
|
|
3692
2934
|
}
|
|
3693
2935
|
};
|
|
3694
|
-
var StateAssignmentConflictError = class extends
|
|
2936
|
+
var StateAssignmentConflictError = class extends BaseError2 {
|
|
3695
2937
|
constructor() {
|
|
3696
2938
|
super("state and stateDiff are set on the same account.", {
|
|
3697
2939
|
name: "StateAssignmentConflictError"
|
|
@@ -3729,7 +2971,7 @@ function prettyStateOverride(stateOverride) {
|
|
|
3729
2971
|
}, " State Override:\n").slice(0, -1);
|
|
3730
2972
|
}
|
|
3731
2973
|
|
|
3732
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
2974
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/transaction.js
|
|
3733
2975
|
function prettyPrint(args) {
|
|
3734
2976
|
const entries = Object.entries(args).map(([key, value]) => {
|
|
3735
2977
|
if (value === void 0 || value === false)
|
|
@@ -3739,14 +2981,14 @@ function prettyPrint(args) {
|
|
|
3739
2981
|
const maxLength = entries.reduce((acc, [key]) => Math.max(acc, key.length), 0);
|
|
3740
2982
|
return entries.map(([key, value]) => ` ${`${key}:`.padEnd(maxLength + 1)} ${value}`).join("\n");
|
|
3741
2983
|
}
|
|
3742
|
-
var InvalidLegacyVError = class extends
|
|
2984
|
+
var InvalidLegacyVError = class extends BaseError2 {
|
|
3743
2985
|
constructor({ v }) {
|
|
3744
2986
|
super(`Invalid \`v\` value "${v}". Expected 27 or 28.`, {
|
|
3745
2987
|
name: "InvalidLegacyVError"
|
|
3746
2988
|
});
|
|
3747
2989
|
}
|
|
3748
2990
|
};
|
|
3749
|
-
var InvalidSerializableTransactionError = class extends
|
|
2991
|
+
var InvalidSerializableTransactionError = class extends BaseError2 {
|
|
3750
2992
|
constructor({ transaction }) {
|
|
3751
2993
|
super("Cannot infer a transaction type from provided transaction.", {
|
|
3752
2994
|
metaMessages: [
|
|
@@ -3767,7 +3009,7 @@ var InvalidSerializableTransactionError = class extends BaseError3 {
|
|
|
3767
3009
|
});
|
|
3768
3010
|
}
|
|
3769
3011
|
};
|
|
3770
|
-
var InvalidSerializedTransactionTypeError = class extends
|
|
3012
|
+
var InvalidSerializedTransactionTypeError = class extends BaseError2 {
|
|
3771
3013
|
constructor({ serializedType }) {
|
|
3772
3014
|
super(`Serialized transaction type "${serializedType}" is invalid.`, {
|
|
3773
3015
|
name: "InvalidSerializedTransactionType"
|
|
@@ -3781,7 +3023,7 @@ var InvalidSerializedTransactionTypeError = class extends BaseError3 {
|
|
|
3781
3023
|
this.serializedType = serializedType;
|
|
3782
3024
|
}
|
|
3783
3025
|
};
|
|
3784
|
-
var InvalidSerializedTransactionError = class extends
|
|
3026
|
+
var InvalidSerializedTransactionError = class extends BaseError2 {
|
|
3785
3027
|
constructor({ attributes, serializedTransaction, type }) {
|
|
3786
3028
|
const missing = Object.entries(attributes).map(([key, value]) => typeof value === "undefined" ? key : void 0).filter(Boolean);
|
|
3787
3029
|
super(`Invalid serialized transaction of type "${type}" was provided.`, {
|
|
@@ -3807,12 +3049,12 @@ var InvalidSerializedTransactionError = class extends BaseError3 {
|
|
|
3807
3049
|
this.type = type;
|
|
3808
3050
|
}
|
|
3809
3051
|
};
|
|
3810
|
-
var InvalidStorageKeySizeError = class extends
|
|
3052
|
+
var InvalidStorageKeySizeError = class extends BaseError2 {
|
|
3811
3053
|
constructor({ storageKey }) {
|
|
3812
3054
|
super(`Size for storage key "${storageKey}" is invalid. Expected 32 bytes. Got ${Math.floor((storageKey.length - 2) / 2)} bytes.`, { name: "InvalidStorageKeySizeError" });
|
|
3813
3055
|
}
|
|
3814
3056
|
};
|
|
3815
|
-
var TransactionExecutionError = class extends
|
|
3057
|
+
var TransactionExecutionError = class extends BaseError2 {
|
|
3816
3058
|
constructor(cause, { account, docsPath: docsPath6, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value }) {
|
|
3817
3059
|
const prettyArgs = prettyPrint({
|
|
3818
3060
|
chain: chain && `${chain?.name} (id: ${chain?.id})`,
|
|
@@ -3845,7 +3087,7 @@ var TransactionExecutionError = class extends BaseError3 {
|
|
|
3845
3087
|
this.cause = cause;
|
|
3846
3088
|
}
|
|
3847
3089
|
};
|
|
3848
|
-
var TransactionNotFoundError = class extends
|
|
3090
|
+
var TransactionNotFoundError = class extends BaseError2 {
|
|
3849
3091
|
constructor({ blockHash, blockNumber, blockTag, hash: hash2, index }) {
|
|
3850
3092
|
let identifier = "Transaction";
|
|
3851
3093
|
if (blockTag && index !== void 0)
|
|
@@ -3861,14 +3103,14 @@ var TransactionNotFoundError = class extends BaseError3 {
|
|
|
3861
3103
|
});
|
|
3862
3104
|
}
|
|
3863
3105
|
};
|
|
3864
|
-
var TransactionReceiptNotFoundError = class extends
|
|
3106
|
+
var TransactionReceiptNotFoundError = class extends BaseError2 {
|
|
3865
3107
|
constructor({ hash: hash2 }) {
|
|
3866
3108
|
super(`Transaction receipt with hash "${hash2}" could not be found. The Transaction may not be processed on a block yet.`, {
|
|
3867
3109
|
name: "TransactionReceiptNotFoundError"
|
|
3868
3110
|
});
|
|
3869
3111
|
}
|
|
3870
3112
|
};
|
|
3871
|
-
var TransactionReceiptRevertedError = class extends
|
|
3113
|
+
var TransactionReceiptRevertedError = class extends BaseError2 {
|
|
3872
3114
|
constructor({ receipt }) {
|
|
3873
3115
|
super(`Transaction with hash "${receipt.transactionHash}" reverted.`, {
|
|
3874
3116
|
metaMessages: [
|
|
@@ -3889,18 +3131,18 @@ var TransactionReceiptRevertedError = class extends BaseError3 {
|
|
|
3889
3131
|
this.receipt = receipt;
|
|
3890
3132
|
}
|
|
3891
3133
|
};
|
|
3892
|
-
var WaitForTransactionReceiptTimeoutError = class extends
|
|
3134
|
+
var WaitForTransactionReceiptTimeoutError = class extends BaseError2 {
|
|
3893
3135
|
constructor({ hash: hash2 }) {
|
|
3894
3136
|
super(`Timed out while waiting for transaction with hash "${hash2}" to be confirmed.`, { name: "WaitForTransactionReceiptTimeoutError" });
|
|
3895
3137
|
}
|
|
3896
3138
|
};
|
|
3897
3139
|
|
|
3898
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
3140
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/utils.js
|
|
3899
3141
|
var getContractAddress = (address) => address;
|
|
3900
3142
|
var getUrl = (url) => url;
|
|
3901
3143
|
|
|
3902
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
3903
|
-
var CallExecutionError = class extends
|
|
3144
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/contract.js
|
|
3145
|
+
var CallExecutionError = class extends BaseError2 {
|
|
3904
3146
|
constructor(cause, { account: account_, docsPath: docsPath6, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride }) {
|
|
3905
3147
|
const account = account_ ? parseAccount(account_) : void 0;
|
|
3906
3148
|
let prettyArgs = prettyPrint({
|
|
@@ -3937,7 +3179,7 @@ ${prettyStateOverride(stateOverride)}`;
|
|
|
3937
3179
|
this.cause = cause;
|
|
3938
3180
|
}
|
|
3939
3181
|
};
|
|
3940
|
-
var ContractFunctionExecutionError = class extends
|
|
3182
|
+
var ContractFunctionExecutionError = class extends BaseError2 {
|
|
3941
3183
|
constructor(cause, { abi, args, contractAddress, docsPath: docsPath6, functionName, sender }) {
|
|
3942
3184
|
const abiItem = getAbiItem({ abi, args, name: functionName });
|
|
3943
3185
|
const formattedArgs = abiItem ? formatAbiItemWithArgs({
|
|
@@ -4013,7 +3255,7 @@ var ContractFunctionExecutionError = class extends BaseError3 {
|
|
|
4013
3255
|
this.sender = sender;
|
|
4014
3256
|
}
|
|
4015
3257
|
};
|
|
4016
|
-
var ContractFunctionRevertedError = class extends
|
|
3258
|
+
var ContractFunctionRevertedError = class extends BaseError2 {
|
|
4017
3259
|
constructor({ abi, data, functionName, message, cause: error }) {
|
|
4018
3260
|
let cause;
|
|
4019
3261
|
let decodedData;
|
|
@@ -4093,7 +3335,7 @@ var ContractFunctionRevertedError = class extends BaseError3 {
|
|
|
4093
3335
|
this.signature = signature;
|
|
4094
3336
|
}
|
|
4095
3337
|
};
|
|
4096
|
-
var ContractFunctionZeroDataError = class extends
|
|
3338
|
+
var ContractFunctionZeroDataError = class extends BaseError2 {
|
|
4097
3339
|
constructor({ functionName, cause }) {
|
|
4098
3340
|
super(`The contract function "${functionName}" returned no data ("0x").`, {
|
|
4099
3341
|
metaMessages: [
|
|
@@ -4107,7 +3349,7 @@ var ContractFunctionZeroDataError = class extends BaseError3 {
|
|
|
4107
3349
|
});
|
|
4108
3350
|
}
|
|
4109
3351
|
};
|
|
4110
|
-
var CounterfactualDeploymentFailedError = class extends
|
|
3352
|
+
var CounterfactualDeploymentFailedError = class extends BaseError2 {
|
|
4111
3353
|
constructor({ factory }) {
|
|
4112
3354
|
super(`Deployment for counterfactual contract call failed${factory ? ` for factory "${factory}".` : ""}`, {
|
|
4113
3355
|
metaMessages: [
|
|
@@ -4119,7 +3361,7 @@ var CounterfactualDeploymentFailedError = class extends BaseError3 {
|
|
|
4119
3361
|
});
|
|
4120
3362
|
}
|
|
4121
3363
|
};
|
|
4122
|
-
var RawContractError = class extends
|
|
3364
|
+
var RawContractError = class extends BaseError2 {
|
|
4123
3365
|
constructor({ data, message }) {
|
|
4124
3366
|
super(message || "", { name: "RawContractError" });
|
|
4125
3367
|
Object.defineProperty(this, "code", {
|
|
@@ -4138,7 +3380,7 @@ var RawContractError = class extends BaseError3 {
|
|
|
4138
3380
|
}
|
|
4139
3381
|
};
|
|
4140
3382
|
|
|
4141
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
3383
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/abi/decodeFunctionResult.js
|
|
4142
3384
|
var docsPath = "/docs/contract/decodeFunctionResult";
|
|
4143
3385
|
function decodeFunctionResult(parameters) {
|
|
4144
3386
|
const { abi, args, functionName, data } = parameters;
|
|
@@ -4161,7 +3403,7 @@ function decodeFunctionResult(parameters) {
|
|
|
4161
3403
|
return void 0;
|
|
4162
3404
|
}
|
|
4163
3405
|
|
|
4164
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
3406
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/abi/encodeDeployData.js
|
|
4165
3407
|
var docsPath2 = "/docs/contract/encodeDeployData";
|
|
4166
3408
|
function encodeDeployData(parameters) {
|
|
4167
3409
|
const { abi, args, bytecode } = parameters;
|
|
@@ -4178,7 +3420,7 @@ function encodeDeployData(parameters) {
|
|
|
4178
3420
|
return concatHex([bytecode, data]);
|
|
4179
3421
|
}
|
|
4180
3422
|
|
|
4181
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
3423
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js
|
|
4182
3424
|
var docsPath3 = "/docs/contract/encodeFunctionData";
|
|
4183
3425
|
function prepareEncodeFunctionData(parameters) {
|
|
4184
3426
|
const { abi, args, functionName } = parameters;
|
|
@@ -4201,7 +3443,7 @@ function prepareEncodeFunctionData(parameters) {
|
|
|
4201
3443
|
};
|
|
4202
3444
|
}
|
|
4203
3445
|
|
|
4204
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
3446
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/abi/encodeFunctionData.js
|
|
4205
3447
|
function encodeFunctionData(parameters) {
|
|
4206
3448
|
const { args } = parameters;
|
|
4207
3449
|
const { abi, functionName } = (() => {
|
|
@@ -4215,7 +3457,7 @@ function encodeFunctionData(parameters) {
|
|
|
4215
3457
|
return concatHex([signature, data ?? "0x"]);
|
|
4216
3458
|
}
|
|
4217
3459
|
|
|
4218
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
3460
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/chain/getChainContractAddress.js
|
|
4219
3461
|
function getChainContractAddress({ blockNumber, chain, contract: name }) {
|
|
4220
3462
|
const contract = chain?.contracts?.[name];
|
|
4221
3463
|
if (!contract)
|
|
@@ -4235,8 +3477,8 @@ function getChainContractAddress({ blockNumber, chain, contract: name }) {
|
|
|
4235
3477
|
return contract.address;
|
|
4236
3478
|
}
|
|
4237
3479
|
|
|
4238
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
4239
|
-
var ExecutionRevertedError = class extends
|
|
3480
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/node.js
|
|
3481
|
+
var ExecutionRevertedError = class extends BaseError2 {
|
|
4240
3482
|
constructor({ cause, message } = {}) {
|
|
4241
3483
|
const reason = message?.replace("execution reverted: ", "")?.replace("execution reverted", "");
|
|
4242
3484
|
super(`Execution reverted ${reason ? `with reason: ${reason}` : "for an unknown reason"}.`, {
|
|
@@ -4257,7 +3499,7 @@ Object.defineProperty(ExecutionRevertedError, "nodeMessage", {
|
|
|
4257
3499
|
writable: true,
|
|
4258
3500
|
value: /execution reverted|gas required exceeds allowance/
|
|
4259
3501
|
});
|
|
4260
|
-
var FeeCapTooHighError = class extends
|
|
3502
|
+
var FeeCapTooHighError = class extends BaseError2 {
|
|
4261
3503
|
constructor({ cause, maxFeePerGas } = {}) {
|
|
4262
3504
|
super(`The fee cap (\`maxFeePerGas\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ""}) cannot be higher than the maximum allowed value (2^256-1).`, {
|
|
4263
3505
|
cause,
|
|
@@ -4271,7 +3513,7 @@ Object.defineProperty(FeeCapTooHighError, "nodeMessage", {
|
|
|
4271
3513
|
writable: true,
|
|
4272
3514
|
value: /max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/
|
|
4273
3515
|
});
|
|
4274
|
-
var FeeCapTooLowError = class extends
|
|
3516
|
+
var FeeCapTooLowError = class extends BaseError2 {
|
|
4275
3517
|
constructor({ cause, maxFeePerGas } = {}) {
|
|
4276
3518
|
super(`The fee cap (\`maxFeePerGas\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)}` : ""} gwei) cannot be lower than the block base fee.`, {
|
|
4277
3519
|
cause,
|
|
@@ -4285,7 +3527,7 @@ Object.defineProperty(FeeCapTooLowError, "nodeMessage", {
|
|
|
4285
3527
|
writable: true,
|
|
4286
3528
|
value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/
|
|
4287
3529
|
});
|
|
4288
|
-
var NonceTooHighError = class extends
|
|
3530
|
+
var NonceTooHighError = class extends BaseError2 {
|
|
4289
3531
|
constructor({ cause, nonce } = {}) {
|
|
4290
3532
|
super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ""}is higher than the next one expected.`, { cause, name: "NonceTooHighError" });
|
|
4291
3533
|
}
|
|
@@ -4296,7 +3538,7 @@ Object.defineProperty(NonceTooHighError, "nodeMessage", {
|
|
|
4296
3538
|
writable: true,
|
|
4297
3539
|
value: /nonce too high/
|
|
4298
3540
|
});
|
|
4299
|
-
var NonceTooLowError = class extends
|
|
3541
|
+
var NonceTooLowError = class extends BaseError2 {
|
|
4300
3542
|
constructor({ cause, nonce } = {}) {
|
|
4301
3543
|
super([
|
|
4302
3544
|
`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ""}is lower than the current nonce of the account.`,
|
|
@@ -4310,7 +3552,7 @@ Object.defineProperty(NonceTooLowError, "nodeMessage", {
|
|
|
4310
3552
|
writable: true,
|
|
4311
3553
|
value: /nonce too low|transaction already imported|already known/
|
|
4312
3554
|
});
|
|
4313
|
-
var NonceMaxValueError = class extends
|
|
3555
|
+
var NonceMaxValueError = class extends BaseError2 {
|
|
4314
3556
|
constructor({ cause, nonce } = {}) {
|
|
4315
3557
|
super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ""}exceeds the maximum allowed nonce.`, { cause, name: "NonceMaxValueError" });
|
|
4316
3558
|
}
|
|
@@ -4321,7 +3563,7 @@ Object.defineProperty(NonceMaxValueError, "nodeMessage", {
|
|
|
4321
3563
|
writable: true,
|
|
4322
3564
|
value: /nonce has max value/
|
|
4323
3565
|
});
|
|
4324
|
-
var InsufficientFundsError = class extends
|
|
3566
|
+
var InsufficientFundsError = class extends BaseError2 {
|
|
4325
3567
|
constructor({ cause } = {}) {
|
|
4326
3568
|
super([
|
|
4327
3569
|
"The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."
|
|
@@ -4347,7 +3589,7 @@ Object.defineProperty(InsufficientFundsError, "nodeMessage", {
|
|
|
4347
3589
|
writable: true,
|
|
4348
3590
|
value: /insufficient funds|exceeds transaction sender account balance/
|
|
4349
3591
|
});
|
|
4350
|
-
var IntrinsicGasTooHighError = class extends
|
|
3592
|
+
var IntrinsicGasTooHighError = class extends BaseError2 {
|
|
4351
3593
|
constructor({ cause, gas } = {}) {
|
|
4352
3594
|
super(`The amount of gas ${gas ? `(${gas}) ` : ""}provided for the transaction exceeds the limit allowed for the block.`, {
|
|
4353
3595
|
cause,
|
|
@@ -4361,7 +3603,7 @@ Object.defineProperty(IntrinsicGasTooHighError, "nodeMessage", {
|
|
|
4361
3603
|
writable: true,
|
|
4362
3604
|
value: /intrinsic gas too high|gas limit reached/
|
|
4363
3605
|
});
|
|
4364
|
-
var IntrinsicGasTooLowError = class extends
|
|
3606
|
+
var IntrinsicGasTooLowError = class extends BaseError2 {
|
|
4365
3607
|
constructor({ cause, gas } = {}) {
|
|
4366
3608
|
super(`The amount of gas ${gas ? `(${gas}) ` : ""}provided for the transaction is too low.`, {
|
|
4367
3609
|
cause,
|
|
@@ -4375,7 +3617,7 @@ Object.defineProperty(IntrinsicGasTooLowError, "nodeMessage", {
|
|
|
4375
3617
|
writable: true,
|
|
4376
3618
|
value: /intrinsic gas too low/
|
|
4377
3619
|
});
|
|
4378
|
-
var TransactionTypeNotSupportedError = class extends
|
|
3620
|
+
var TransactionTypeNotSupportedError = class extends BaseError2 {
|
|
4379
3621
|
constructor({ cause }) {
|
|
4380
3622
|
super("The transaction type is not supported for this chain.", {
|
|
4381
3623
|
cause,
|
|
@@ -4389,7 +3631,7 @@ Object.defineProperty(TransactionTypeNotSupportedError, "nodeMessage", {
|
|
|
4389
3631
|
writable: true,
|
|
4390
3632
|
value: /transaction type not valid/
|
|
4391
3633
|
});
|
|
4392
|
-
var TipAboveFeeCapError = class extends
|
|
3634
|
+
var TipAboveFeeCapError = class extends BaseError2 {
|
|
4393
3635
|
constructor({ cause, maxPriorityFeePerGas, maxFeePerGas } = {}) {
|
|
4394
3636
|
super([
|
|
4395
3637
|
`The provided tip (\`maxPriorityFeePerGas\`${maxPriorityFeePerGas ? ` = ${formatGwei(maxPriorityFeePerGas)} gwei` : ""}) cannot be higher than the fee cap (\`maxFeePerGas\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ""}).`
|
|
@@ -4405,7 +3647,7 @@ Object.defineProperty(TipAboveFeeCapError, "nodeMessage", {
|
|
|
4405
3647
|
writable: true,
|
|
4406
3648
|
value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/
|
|
4407
3649
|
});
|
|
4408
|
-
var UnknownNodeError = class extends
|
|
3650
|
+
var UnknownNodeError = class extends BaseError2 {
|
|
4409
3651
|
constructor({ cause }) {
|
|
4410
3652
|
super(`An error occurred while executing: ${cause?.shortMessage}`, {
|
|
4411
3653
|
cause,
|
|
@@ -4414,8 +3656,8 @@ var UnknownNodeError = class extends BaseError3 {
|
|
|
4414
3656
|
}
|
|
4415
3657
|
};
|
|
4416
3658
|
|
|
4417
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
4418
|
-
var HttpRequestError = class extends
|
|
3659
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/request.js
|
|
3660
|
+
var HttpRequestError = class extends BaseError2 {
|
|
4419
3661
|
constructor({ body, cause, details, headers, status, url }) {
|
|
4420
3662
|
super("HTTP request failed.", {
|
|
4421
3663
|
cause,
|
|
@@ -4457,7 +3699,7 @@ var HttpRequestError = class extends BaseError3 {
|
|
|
4457
3699
|
this.url = url;
|
|
4458
3700
|
}
|
|
4459
3701
|
};
|
|
4460
|
-
var RpcRequestError = class extends
|
|
3702
|
+
var RpcRequestError = class extends BaseError2 {
|
|
4461
3703
|
constructor({ body, error, url }) {
|
|
4462
3704
|
super("RPC Request failed.", {
|
|
4463
3705
|
cause: error,
|
|
@@ -4488,7 +3730,7 @@ var RpcRequestError = class extends BaseError3 {
|
|
|
4488
3730
|
this.url = url;
|
|
4489
3731
|
}
|
|
4490
3732
|
};
|
|
4491
|
-
var TimeoutError = class extends
|
|
3733
|
+
var TimeoutError = class extends BaseError2 {
|
|
4492
3734
|
constructor({ body, url }) {
|
|
4493
3735
|
super("The request took too long to respond.", {
|
|
4494
3736
|
details: "The request timed out.",
|
|
@@ -4505,9 +3747,9 @@ var TimeoutError = class extends BaseError3 {
|
|
|
4505
3747
|
}
|
|
4506
3748
|
};
|
|
4507
3749
|
|
|
4508
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
3750
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/rpc.js
|
|
4509
3751
|
var unknownErrorCode = -1;
|
|
4510
|
-
var RpcError = class extends
|
|
3752
|
+
var RpcError = class extends BaseError2 {
|
|
4511
3753
|
constructor(cause, { code, docsPath: docsPath6, metaMessages, name, shortMessage }) {
|
|
4512
3754
|
super(shortMessage, {
|
|
4513
3755
|
cause,
|
|
@@ -4948,11 +4190,11 @@ var UnknownRpcError = class extends RpcError {
|
|
|
4948
4190
|
}
|
|
4949
4191
|
};
|
|
4950
4192
|
|
|
4951
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
4193
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/errors/getNodeError.js
|
|
4952
4194
|
function getNodeError(err, args) {
|
|
4953
4195
|
const message = (err.details || "").toLowerCase();
|
|
4954
|
-
const executionRevertedError = err instanceof
|
|
4955
|
-
if (executionRevertedError instanceof
|
|
4196
|
+
const executionRevertedError = err instanceof BaseError2 ? err.walk((e) => e?.code === ExecutionRevertedError.code) : err;
|
|
4197
|
+
if (executionRevertedError instanceof BaseError2)
|
|
4956
4198
|
return new ExecutionRevertedError({
|
|
4957
4199
|
cause: err,
|
|
4958
4200
|
message: executionRevertedError.details
|
|
@@ -4997,7 +4239,7 @@ function getNodeError(err, args) {
|
|
|
4997
4239
|
});
|
|
4998
4240
|
}
|
|
4999
4241
|
|
|
5000
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
4242
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/errors/getCallError.js
|
|
5001
4243
|
function getCallError(err, { docsPath: docsPath6, ...args }) {
|
|
5002
4244
|
const cause = (() => {
|
|
5003
4245
|
const cause2 = getNodeError(err, args);
|
|
@@ -5011,7 +4253,7 @@ function getCallError(err, { docsPath: docsPath6, ...args }) {
|
|
|
5011
4253
|
});
|
|
5012
4254
|
}
|
|
5013
4255
|
|
|
5014
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
4256
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/extract.js
|
|
5015
4257
|
function extract(value_, { format }) {
|
|
5016
4258
|
if (!format)
|
|
5017
4259
|
return {};
|
|
@@ -5030,7 +4272,7 @@ function extract(value_, { format }) {
|
|
|
5030
4272
|
return value;
|
|
5031
4273
|
}
|
|
5032
4274
|
|
|
5033
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
4275
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/formatter.js
|
|
5034
4276
|
function defineFormatter(type, format) {
|
|
5035
4277
|
return ({ exclude, format: overrides }) => {
|
|
5036
4278
|
return {
|
|
@@ -5052,7 +4294,7 @@ function defineFormatter(type, format) {
|
|
|
5052
4294
|
};
|
|
5053
4295
|
}
|
|
5054
4296
|
|
|
5055
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
4297
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/transactionRequest.js
|
|
5056
4298
|
var rpcTransactionType = {
|
|
5057
4299
|
legacy: "0x0",
|
|
5058
4300
|
eip2930: "0x1",
|
|
@@ -5113,7 +4355,7 @@ function formatAuthorizationList(authorizationList) {
|
|
|
5113
4355
|
}));
|
|
5114
4356
|
}
|
|
5115
4357
|
|
|
5116
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
4358
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/promise/withResolvers.js
|
|
5117
4359
|
function withResolvers() {
|
|
5118
4360
|
let resolve = () => void 0;
|
|
5119
4361
|
let reject = () => void 0;
|
|
@@ -5124,7 +4366,7 @@ function withResolvers() {
|
|
|
5124
4366
|
return { promise, resolve, reject };
|
|
5125
4367
|
}
|
|
5126
4368
|
|
|
5127
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
4369
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/promise/createBatchScheduler.js
|
|
5128
4370
|
var schedulerCache = /* @__PURE__ */ new Map();
|
|
5129
4371
|
function createBatchScheduler({ fn, id, shouldSplitBatch, wait = 0, sort }) {
|
|
5130
4372
|
const exec = async () => {
|
|
@@ -5170,7 +4412,7 @@ function createBatchScheduler({ fn, id, shouldSplitBatch, wait = 0, sort }) {
|
|
|
5170
4412
|
};
|
|
5171
4413
|
}
|
|
5172
4414
|
|
|
5173
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
4415
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/stateOverride.js
|
|
5174
4416
|
function serializeStateMapping(stateMapping) {
|
|
5175
4417
|
if (!stateMapping || stateMapping.length === 0)
|
|
5176
4418
|
return void 0;
|
|
@@ -5223,7 +4465,7 @@ function serializeStateOverride(parameters) {
|
|
|
5223
4465
|
return rpcStateOverride;
|
|
5224
4466
|
}
|
|
5225
4467
|
|
|
5226
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
4468
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/constants/number.js
|
|
5227
4469
|
var maxInt8 = 2n ** (8n - 1n) - 1n;
|
|
5228
4470
|
var maxInt16 = 2n ** (16n - 1n) - 1n;
|
|
5229
4471
|
var maxInt24 = 2n ** (24n - 1n) - 1n;
|
|
@@ -5321,7 +4563,7 @@ var maxUint240 = 2n ** 240n - 1n;
|
|
|
5321
4563
|
var maxUint248 = 2n ** 248n - 1n;
|
|
5322
4564
|
var maxUint256 = 2n ** 256n - 1n;
|
|
5323
4565
|
|
|
5324
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
4566
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/transaction/assertRequest.js
|
|
5325
4567
|
function assertRequest(args) {
|
|
5326
4568
|
const { account: account_, maxFeePerGas, maxPriorityFeePerGas, to } = args;
|
|
5327
4569
|
const account = account_ ? parseAccount(account_) : void 0;
|
|
@@ -5335,14 +4577,14 @@ function assertRequest(args) {
|
|
|
5335
4577
|
throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });
|
|
5336
4578
|
}
|
|
5337
4579
|
|
|
5338
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
4580
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/actions/public/call.js
|
|
5339
4581
|
async function call(client, args) {
|
|
5340
4582
|
const { account: account_ = client.account, authorizationList, batch = Boolean(client.batch?.multicall), blockNumber, blockTag = client.experimental_blockTag ?? "latest", accessList, blobs, blockOverrides, code, data: data_, factory, factoryData, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride, ...rest } = args;
|
|
5341
4583
|
const account = account_ ? parseAccount(account_) : void 0;
|
|
5342
4584
|
if (code && (factory || factoryData))
|
|
5343
|
-
throw new
|
|
4585
|
+
throw new BaseError2("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
|
|
5344
4586
|
if (code && to)
|
|
5345
|
-
throw new
|
|
4587
|
+
throw new BaseError2("Cannot provide both `code` & `to` as parameters.");
|
|
5346
4588
|
const deploylessCallViaBytecode = code && data_;
|
|
5347
4589
|
const deploylessCallViaFactory = factory && factoryData && to && data_;
|
|
5348
4590
|
const deploylessCall = deploylessCallViaBytecode || deploylessCallViaFactory;
|
|
@@ -5420,7 +4662,7 @@ async function call(client, args) {
|
|
|
5420
4662
|
return { data: response };
|
|
5421
4663
|
} catch (err) {
|
|
5422
4664
|
const data2 = getRevertErrorData(err);
|
|
5423
|
-
const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-
|
|
4665
|
+
const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-XP27NGI7.js");
|
|
5424
4666
|
if (client.ccipRead !== false && data2?.slice(0, 10) === offchainLookupSignature2 && to)
|
|
5425
4667
|
return { data: await offchainLookup2(client, { data: data2, to }) };
|
|
5426
4668
|
if (deploylessCall && data2?.slice(0, 10) === "0x101bb98d")
|
|
@@ -5527,14 +4769,14 @@ function toDeploylessCallViaFactoryData(parameters) {
|
|
|
5527
4769
|
});
|
|
5528
4770
|
}
|
|
5529
4771
|
function getRevertErrorData(err) {
|
|
5530
|
-
if (!(err instanceof
|
|
4772
|
+
if (!(err instanceof BaseError2))
|
|
5531
4773
|
return void 0;
|
|
5532
4774
|
const error = err.walk();
|
|
5533
4775
|
return typeof error?.data === "object" ? error.data?.data : error.data;
|
|
5534
4776
|
}
|
|
5535
4777
|
|
|
5536
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
5537
|
-
var OffchainLookupError = class extends
|
|
4778
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/ccip.js
|
|
4779
|
+
var OffchainLookupError = class extends BaseError2 {
|
|
5538
4780
|
constructor({ callbackSelector, cause, data, extraData, sender, urls }) {
|
|
5539
4781
|
super(cause.shortMessage || "An error occurred while fetching for an offchain result.", {
|
|
5540
4782
|
cause,
|
|
@@ -5555,7 +4797,7 @@ var OffchainLookupError = class extends BaseError3 {
|
|
|
5555
4797
|
});
|
|
5556
4798
|
}
|
|
5557
4799
|
};
|
|
5558
|
-
var OffchainLookupResponseMalformedError = class extends
|
|
4800
|
+
var OffchainLookupResponseMalformedError = class extends BaseError2 {
|
|
5559
4801
|
constructor({ result, url }) {
|
|
5560
4802
|
super("Offchain gateway response is malformed. Response data must be a hex value.", {
|
|
5561
4803
|
metaMessages: [
|
|
@@ -5566,7 +4808,7 @@ var OffchainLookupResponseMalformedError = class extends BaseError3 {
|
|
|
5566
4808
|
});
|
|
5567
4809
|
}
|
|
5568
4810
|
};
|
|
5569
|
-
var OffchainLookupSenderMismatchError = class extends
|
|
4811
|
+
var OffchainLookupSenderMismatchError = class extends BaseError2 {
|
|
5570
4812
|
constructor({ sender, to }) {
|
|
5571
4813
|
super("Reverted sender address does not match target contract address (`to`).", {
|
|
5572
4814
|
metaMessages: [
|
|
@@ -5578,7 +4820,7 @@ var OffchainLookupSenderMismatchError = class extends BaseError3 {
|
|
|
5578
4820
|
}
|
|
5579
4821
|
};
|
|
5580
4822
|
|
|
5581
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
4823
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/address/isAddressEqual.js
|
|
5582
4824
|
function isAddressEqual(a, b) {
|
|
5583
4825
|
if (!isAddress(a, { strict: false }))
|
|
5584
4826
|
throw new InvalidAddressError({ address: a });
|
|
@@ -5587,7 +4829,7 @@ function isAddressEqual(a, b) {
|
|
|
5587
4829
|
return a.toLowerCase() === b.toLowerCase();
|
|
5588
4830
|
}
|
|
5589
4831
|
|
|
5590
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
4832
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/abi/decodeFunctionData.js
|
|
5591
4833
|
function decodeFunctionData(parameters) {
|
|
5592
4834
|
const { abi, data } = parameters;
|
|
5593
4835
|
const signature = slice3(data, 0, 4);
|
|
@@ -5602,7 +4844,7 @@ function decodeFunctionData(parameters) {
|
|
|
5602
4844
|
};
|
|
5603
4845
|
}
|
|
5604
4846
|
|
|
5605
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
4847
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/abi/encodeErrorResult.js
|
|
5606
4848
|
var docsPath4 = "/docs/contract/encodeErrorResult";
|
|
5607
4849
|
function encodeErrorResult(parameters) {
|
|
5608
4850
|
const { abi, errorName, args } = parameters;
|
|
@@ -5626,7 +4868,7 @@ function encodeErrorResult(parameters) {
|
|
|
5626
4868
|
return concatHex([signature, data]);
|
|
5627
4869
|
}
|
|
5628
4870
|
|
|
5629
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
4871
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/abi/encodeFunctionResult.js
|
|
5630
4872
|
var docsPath5 = "/docs/contract/encodeFunctionResult";
|
|
5631
4873
|
function encodeFunctionResult(parameters) {
|
|
5632
4874
|
const { abi, functionName, result } = parameters;
|
|
@@ -5653,7 +4895,7 @@ function encodeFunctionResult(parameters) {
|
|
|
5653
4895
|
return encodeAbiParameters(abiItem.outputs, values);
|
|
5654
4896
|
}
|
|
5655
4897
|
|
|
5656
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
4898
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/ens/localBatchGatewayRequest.js
|
|
5657
4899
|
var localBatchGatewayUrl = "x-batch-gateway:true";
|
|
5658
4900
|
async function localBatchGatewayRequest(parameters) {
|
|
5659
4901
|
const { data, ccipRequest: ccipRequest2 } = parameters;
|
|
@@ -5689,7 +4931,7 @@ function encodeError(error) {
|
|
|
5689
4931
|
});
|
|
5690
4932
|
}
|
|
5691
4933
|
|
|
5692
|
-
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@3.
|
|
4934
|
+
// ../../node_modules/.pnpm/viem@2.47.5_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/ccip.js
|
|
5693
4935
|
var offchainLookupSignature = "0x556f1830";
|
|
5694
4936
|
var offchainLookupAbiItem = {
|
|
5695
4937
|
name: "OffchainLookup",
|
|
@@ -5802,12 +5044,10 @@ async function ccipRequest({ data, sender, urls }) {
|
|
|
5802
5044
|
}
|
|
5803
5045
|
|
|
5804
5046
|
export {
|
|
5805
|
-
formatAbiParameters,
|
|
5806
|
-
parseAbiParameters,
|
|
5807
5047
|
formatAbiItem2 as formatAbiItem,
|
|
5808
5048
|
isHex,
|
|
5809
5049
|
size3 as size,
|
|
5810
|
-
|
|
5050
|
+
BaseError2 as BaseError,
|
|
5811
5051
|
AbiDecodingDataSizeTooSmallError,
|
|
5812
5052
|
AbiDecodingZeroDataError,
|
|
5813
5053
|
AbiEventSignatureEmptyTopicsError,
|
|
@@ -5839,8 +5079,8 @@ export {
|
|
|
5839
5079
|
concatHex,
|
|
5840
5080
|
slice3 as slice,
|
|
5841
5081
|
sliceHex,
|
|
5842
|
-
|
|
5843
|
-
|
|
5082
|
+
bytesRegex,
|
|
5083
|
+
integerRegex,
|
|
5844
5084
|
encodeAbiParameters,
|
|
5845
5085
|
toFunctionSelector,
|
|
5846
5086
|
getAbiItem,
|
|
@@ -5911,7 +5151,7 @@ export {
|
|
|
5911
5151
|
assertRequest,
|
|
5912
5152
|
isAddressEqual,
|
|
5913
5153
|
decodeFunctionResult,
|
|
5914
|
-
BaseError2,
|
|
5154
|
+
BaseError as BaseError2,
|
|
5915
5155
|
stringify as stringify2,
|
|
5916
5156
|
concat as concat2,
|
|
5917
5157
|
from,
|
|
@@ -5963,4 +5203,4 @@ export {
|
|
|
5963
5203
|
ccipRequest,
|
|
5964
5204
|
call
|
|
5965
5205
|
};
|
|
5966
|
-
//# sourceMappingURL=chunk-
|
|
5206
|
+
//# sourceMappingURL=chunk-3I6VJOM6.js.map
|