tenjin-cli 0.1.0-alpha.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/LICENSE +21 -0
- package/NOTICE.md +52 -0
- package/README.md +124 -0
- package/dist/_esm-ZH2J4QEH.js +3737 -0
- package/dist/_esm-ZH2J4QEH.js.map +1 -0
- package/dist/ccip-FXWZDDF5.js +17 -0
- package/dist/ccip-FXWZDDF5.js.map +1 -0
- package/dist/chunk-376LHMK2.js +100 -0
- package/dist/chunk-376LHMK2.js.map +1 -0
- package/dist/chunk-3IMLRUZE.js +44 -0
- package/dist/chunk-3IMLRUZE.js.map +1 -0
- package/dist/chunk-CPUZRZ2A.js +410 -0
- package/dist/chunk-CPUZRZ2A.js.map +1 -0
- package/dist/chunk-F5DZJLU3.js +2058 -0
- package/dist/chunk-F5DZJLU3.js.map +1 -0
- package/dist/chunk-FIYZLITH.js +14577 -0
- package/dist/chunk-FIYZLITH.js.map +1 -0
- package/dist/chunk-LTTRND4A.js +135 -0
- package/dist/chunk-LTTRND4A.js.map +1 -0
- package/dist/chunk-PAAL45FJ.js +7307 -0
- package/dist/chunk-PAAL45FJ.js.map +1 -0
- package/dist/chunk-QHIEYBLV.js +320 -0
- package/dist/chunk-QHIEYBLV.js.map +1 -0
- package/dist/chunk-SXQQ2ZSR.js +887 -0
- package/dist/chunk-SXQQ2ZSR.js.map +1 -0
- package/dist/chunk-TX5T3LKJ.js +2249 -0
- package/dist/chunk-TX5T3LKJ.js.map +1 -0
- package/dist/chunk-WOHCAMDQ.js +4474 -0
- package/dist/chunk-WOHCAMDQ.js.map +1 -0
- package/dist/chunk-ZPZFPVDN.js +67 -0
- package/dist/chunk-ZPZFPVDN.js.map +1 -0
- package/dist/cli-LMHGCZ5S.js +3763 -0
- package/dist/cli-LMHGCZ5S.js.map +1 -0
- package/dist/config-XVXZ3V2Q.js +206 -0
- package/dist/config-XVXZ3V2Q.js.map +1 -0
- package/dist/doctor-MVLZRVPU.js +338 -0
- package/dist/doctor-MVLZRVPU.js.map +1 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/mine.wasm-GQECMSGN.js +11 -0
- package/dist/mine.wasm-GQECMSGN.js.map +1 -0
- package/dist/secp256k1-35YNNB6F.js +18 -0
- package/dist/secp256k1-35YNNB6F.js.map +1 -0
- package/dist/usdc-OQUOFF6R.js +18 -0
- package/dist/usdc-OQUOFF6R.js.map +1 -0
- package/dist/wallet-NRKWLKHX.js +153 -0
- package/dist/wallet-NRKWLKHX.js.map +1 -0
- package/dist/wallet-QUWK2PA4.js +22 -0
- package/dist/wallet-QUWK2PA4.js.map +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1,2058 @@
|
|
|
1
|
+
import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
Hash,
|
|
4
|
+
abytes,
|
|
5
|
+
aexists,
|
|
6
|
+
anumber,
|
|
7
|
+
aoutput,
|
|
8
|
+
clean,
|
|
9
|
+
createHasher,
|
|
10
|
+
rotlBH,
|
|
11
|
+
rotlBL,
|
|
12
|
+
rotlSH,
|
|
13
|
+
rotlSL,
|
|
14
|
+
split,
|
|
15
|
+
swap32IfBE,
|
|
16
|
+
toBytes,
|
|
17
|
+
u32
|
|
18
|
+
} from "./chunk-CPUZRZ2A.js";
|
|
19
|
+
|
|
20
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/data/isHex.js
|
|
21
|
+
function isHex(value, { strict = true } = {}) {
|
|
22
|
+
if (!value)
|
|
23
|
+
return false;
|
|
24
|
+
if (typeof value !== "string")
|
|
25
|
+
return false;
|
|
26
|
+
return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith("0x");
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/data/concat.js
|
|
30
|
+
function concat(values) {
|
|
31
|
+
if (typeof values[0] === "string")
|
|
32
|
+
return concatHex(values);
|
|
33
|
+
return concatBytes(values);
|
|
34
|
+
}
|
|
35
|
+
function concatBytes(values) {
|
|
36
|
+
let length = 0;
|
|
37
|
+
for (const arr of values) {
|
|
38
|
+
length += arr.length;
|
|
39
|
+
}
|
|
40
|
+
const result = new Uint8Array(length);
|
|
41
|
+
let offset = 0;
|
|
42
|
+
for (const arr of values) {
|
|
43
|
+
result.set(arr, offset);
|
|
44
|
+
offset += arr.length;
|
|
45
|
+
}
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
|
+
function concatHex(values) {
|
|
49
|
+
return `0x${values.reduce((acc, x) => acc + x.replace("0x", ""), "")}`;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/abi/formatAbiItem.js
|
|
53
|
+
function formatAbiItem(abiItem, { includeName = false } = {}) {
|
|
54
|
+
if (abiItem.type !== "function" && abiItem.type !== "event" && abiItem.type !== "error")
|
|
55
|
+
throw new InvalidDefinitionTypeError(abiItem.type);
|
|
56
|
+
return `${abiItem.name}(${formatAbiParams(abiItem.inputs, { includeName })})`;
|
|
57
|
+
}
|
|
58
|
+
function formatAbiParams(params, { includeName = false } = {}) {
|
|
59
|
+
if (!params)
|
|
60
|
+
return "";
|
|
61
|
+
return params.map((param) => formatAbiParam(param, { includeName })).join(includeName ? ", " : ",");
|
|
62
|
+
}
|
|
63
|
+
function formatAbiParam(param, { includeName }) {
|
|
64
|
+
if (param.type.startsWith("tuple")) {
|
|
65
|
+
return `(${formatAbiParams(param.components, { includeName })})${param.type.slice("tuple".length)}`;
|
|
66
|
+
}
|
|
67
|
+
return param.type + (includeName && param.name ? ` ${param.name}` : "");
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/data/size.js
|
|
71
|
+
function size(value) {
|
|
72
|
+
if (isHex(value, { strict: false }))
|
|
73
|
+
return Math.ceil((value.length - 2) / 2);
|
|
74
|
+
return value.length;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/errors/version.js
|
|
78
|
+
var version = "2.55.2";
|
|
79
|
+
|
|
80
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/errors/base.js
|
|
81
|
+
var errorConfig = {
|
|
82
|
+
getDocsUrl: ({ docsBaseUrl, docsPath = "", docsSlug }) => docsPath ? `${docsBaseUrl ?? "https://viem.sh"}${docsPath}${docsSlug ? `#${docsSlug}` : ""}` : void 0,
|
|
83
|
+
version: `viem@${version}`
|
|
84
|
+
};
|
|
85
|
+
var BaseError = class _BaseError extends Error {
|
|
86
|
+
constructor(shortMessage, args = {}) {
|
|
87
|
+
const details = (() => {
|
|
88
|
+
if (args.cause instanceof _BaseError)
|
|
89
|
+
return args.cause.details;
|
|
90
|
+
if (args.cause?.message)
|
|
91
|
+
return args.cause.message;
|
|
92
|
+
return args.details;
|
|
93
|
+
})();
|
|
94
|
+
const docsPath = (() => {
|
|
95
|
+
if (args.cause instanceof _BaseError)
|
|
96
|
+
return args.cause.docsPath || args.docsPath;
|
|
97
|
+
return args.docsPath;
|
|
98
|
+
})();
|
|
99
|
+
const docsUrl = errorConfig.getDocsUrl?.({ ...args, docsPath });
|
|
100
|
+
const message = [
|
|
101
|
+
shortMessage || "An error occurred.",
|
|
102
|
+
"",
|
|
103
|
+
...args.metaMessages ? [...args.metaMessages, ""] : [],
|
|
104
|
+
...docsUrl ? [`Docs: ${docsUrl}`] : [],
|
|
105
|
+
...details ? [`Details: ${details}`] : [],
|
|
106
|
+
...errorConfig.version ? [`Version: ${errorConfig.version}`] : []
|
|
107
|
+
].join("\n");
|
|
108
|
+
super(message, args.cause ? { cause: args.cause } : void 0);
|
|
109
|
+
Object.defineProperty(this, "details", {
|
|
110
|
+
enumerable: true,
|
|
111
|
+
configurable: true,
|
|
112
|
+
writable: true,
|
|
113
|
+
value: void 0
|
|
114
|
+
});
|
|
115
|
+
Object.defineProperty(this, "docsPath", {
|
|
116
|
+
enumerable: true,
|
|
117
|
+
configurable: true,
|
|
118
|
+
writable: true,
|
|
119
|
+
value: void 0
|
|
120
|
+
});
|
|
121
|
+
Object.defineProperty(this, "metaMessages", {
|
|
122
|
+
enumerable: true,
|
|
123
|
+
configurable: true,
|
|
124
|
+
writable: true,
|
|
125
|
+
value: void 0
|
|
126
|
+
});
|
|
127
|
+
Object.defineProperty(this, "shortMessage", {
|
|
128
|
+
enumerable: true,
|
|
129
|
+
configurable: true,
|
|
130
|
+
writable: true,
|
|
131
|
+
value: void 0
|
|
132
|
+
});
|
|
133
|
+
Object.defineProperty(this, "version", {
|
|
134
|
+
enumerable: true,
|
|
135
|
+
configurable: true,
|
|
136
|
+
writable: true,
|
|
137
|
+
value: void 0
|
|
138
|
+
});
|
|
139
|
+
Object.defineProperty(this, "name", {
|
|
140
|
+
enumerable: true,
|
|
141
|
+
configurable: true,
|
|
142
|
+
writable: true,
|
|
143
|
+
value: "BaseError"
|
|
144
|
+
});
|
|
145
|
+
this.details = details;
|
|
146
|
+
this.docsPath = docsPath;
|
|
147
|
+
this.metaMessages = args.metaMessages;
|
|
148
|
+
this.name = args.name ?? this.name;
|
|
149
|
+
this.shortMessage = shortMessage;
|
|
150
|
+
this.version = version;
|
|
151
|
+
}
|
|
152
|
+
walk(fn) {
|
|
153
|
+
return walk(this, fn);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
function walk(err, fn) {
|
|
157
|
+
if (fn?.(err))
|
|
158
|
+
return err;
|
|
159
|
+
if (err && typeof err === "object" && "cause" in err && err.cause !== void 0)
|
|
160
|
+
return walk(err.cause, fn);
|
|
161
|
+
return fn ? null : err;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/errors/abi.js
|
|
165
|
+
var AbiConstructorNotFoundError = class extends BaseError {
|
|
166
|
+
constructor({ docsPath }) {
|
|
167
|
+
super([
|
|
168
|
+
"A constructor was not found on the ABI.",
|
|
169
|
+
"Make sure you are using the correct ABI and that the constructor exists on it."
|
|
170
|
+
].join("\n"), {
|
|
171
|
+
docsPath,
|
|
172
|
+
name: "AbiConstructorNotFoundError"
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
var AbiConstructorParamsNotFoundError = class extends BaseError {
|
|
177
|
+
constructor({ docsPath }) {
|
|
178
|
+
super([
|
|
179
|
+
"Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.",
|
|
180
|
+
"Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."
|
|
181
|
+
].join("\n"), {
|
|
182
|
+
docsPath,
|
|
183
|
+
name: "AbiConstructorParamsNotFoundError"
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
var AbiDecodingDataSizeTooSmallError = class extends BaseError {
|
|
188
|
+
constructor({ data, params, size: size2 }) {
|
|
189
|
+
super([`Data size of ${size2} bytes is too small for given parameters.`].join("\n"), {
|
|
190
|
+
metaMessages: [
|
|
191
|
+
`Params: (${formatAbiParams(params, { includeName: true })})`,
|
|
192
|
+
`Data: ${data} (${size2} bytes)`
|
|
193
|
+
],
|
|
194
|
+
name: "AbiDecodingDataSizeTooSmallError"
|
|
195
|
+
});
|
|
196
|
+
Object.defineProperty(this, "data", {
|
|
197
|
+
enumerable: true,
|
|
198
|
+
configurable: true,
|
|
199
|
+
writable: true,
|
|
200
|
+
value: void 0
|
|
201
|
+
});
|
|
202
|
+
Object.defineProperty(this, "params", {
|
|
203
|
+
enumerable: true,
|
|
204
|
+
configurable: true,
|
|
205
|
+
writable: true,
|
|
206
|
+
value: void 0
|
|
207
|
+
});
|
|
208
|
+
Object.defineProperty(this, "size", {
|
|
209
|
+
enumerable: true,
|
|
210
|
+
configurable: true,
|
|
211
|
+
writable: true,
|
|
212
|
+
value: void 0
|
|
213
|
+
});
|
|
214
|
+
this.data = data;
|
|
215
|
+
this.params = params;
|
|
216
|
+
this.size = size2;
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
var AbiDecodingZeroDataError = class extends BaseError {
|
|
220
|
+
constructor({ cause } = {}) {
|
|
221
|
+
super('Cannot decode zero data ("0x") with ABI parameters.', {
|
|
222
|
+
name: "AbiDecodingZeroDataError",
|
|
223
|
+
cause
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
var AbiEncodingArrayLengthMismatchError = class extends BaseError {
|
|
228
|
+
constructor({ expectedLength, givenLength, type }) {
|
|
229
|
+
super([
|
|
230
|
+
`ABI encoding array length mismatch for type ${type}.`,
|
|
231
|
+
`Expected length: ${expectedLength}`,
|
|
232
|
+
`Given length: ${givenLength}`
|
|
233
|
+
].join("\n"), { name: "AbiEncodingArrayLengthMismatchError" });
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
var AbiEncodingBytesSizeMismatchError = class extends BaseError {
|
|
237
|
+
constructor({ expectedSize, value }) {
|
|
238
|
+
super(`Size of bytes "${value}" (bytes${size(value)}) does not match expected size (bytes${expectedSize}).`, { name: "AbiEncodingBytesSizeMismatchError" });
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
var AbiEncodingLengthMismatchError = class extends BaseError {
|
|
242
|
+
constructor({ expectedLength, givenLength }) {
|
|
243
|
+
super([
|
|
244
|
+
"ABI encoding params/values length mismatch.",
|
|
245
|
+
`Expected length (params): ${expectedLength}`,
|
|
246
|
+
`Given length (values): ${givenLength}`
|
|
247
|
+
].join("\n"), { name: "AbiEncodingLengthMismatchError" });
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
var AbiErrorInputsNotFoundError = class extends BaseError {
|
|
251
|
+
constructor(errorName, { docsPath }) {
|
|
252
|
+
super([
|
|
253
|
+
`Arguments (\`args\`) were provided to "${errorName}", but "${errorName}" on the ABI does not contain any parameters (\`inputs\`).`,
|
|
254
|
+
"Cannot encode error result without knowing what the parameter types are.",
|
|
255
|
+
"Make sure you are using the correct ABI and that the inputs exist on it."
|
|
256
|
+
].join("\n"), {
|
|
257
|
+
docsPath,
|
|
258
|
+
name: "AbiErrorInputsNotFoundError"
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
var AbiErrorNotFoundError = class extends BaseError {
|
|
263
|
+
constructor(errorName, { docsPath } = {}) {
|
|
264
|
+
super([
|
|
265
|
+
`Error ${errorName ? `"${errorName}" ` : ""}not found on ABI.`,
|
|
266
|
+
"Make sure you are using the correct ABI and that the error exists on it."
|
|
267
|
+
].join("\n"), {
|
|
268
|
+
docsPath,
|
|
269
|
+
name: "AbiErrorNotFoundError"
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
var AbiErrorSignatureNotFoundError = class extends BaseError {
|
|
274
|
+
constructor(signature, { docsPath, cause }) {
|
|
275
|
+
super([
|
|
276
|
+
`Encoded error signature "${signature}" not found on ABI.`,
|
|
277
|
+
"Make sure you are using the correct ABI and that the error exists on it.",
|
|
278
|
+
`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${signature}.`
|
|
279
|
+
].join("\n"), {
|
|
280
|
+
docsPath,
|
|
281
|
+
name: "AbiErrorSignatureNotFoundError",
|
|
282
|
+
cause
|
|
283
|
+
});
|
|
284
|
+
Object.defineProperty(this, "signature", {
|
|
285
|
+
enumerable: true,
|
|
286
|
+
configurable: true,
|
|
287
|
+
writable: true,
|
|
288
|
+
value: void 0
|
|
289
|
+
});
|
|
290
|
+
this.signature = signature;
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
var AbiEventSignatureEmptyTopicsError = class extends BaseError {
|
|
294
|
+
constructor({ docsPath }) {
|
|
295
|
+
super("Cannot extract event signature from empty topics.", {
|
|
296
|
+
docsPath,
|
|
297
|
+
name: "AbiEventSignatureEmptyTopicsError"
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
var AbiEventSignatureNotFoundError = class extends BaseError {
|
|
302
|
+
constructor(signature, { docsPath }) {
|
|
303
|
+
super([
|
|
304
|
+
`Encoded event signature "${signature}" not found on ABI.`,
|
|
305
|
+
"Make sure you are using the correct ABI and that the event exists on it.",
|
|
306
|
+
`You can look up the signature here: https://4byte.sourcify.dev/?q=${signature}.`
|
|
307
|
+
].join("\n"), {
|
|
308
|
+
docsPath,
|
|
309
|
+
name: "AbiEventSignatureNotFoundError"
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
var AbiEventNotFoundError = class extends BaseError {
|
|
314
|
+
constructor(eventName, { docsPath } = {}) {
|
|
315
|
+
super([
|
|
316
|
+
`Event ${eventName ? `"${eventName}" ` : ""}not found on ABI.`,
|
|
317
|
+
"Make sure you are using the correct ABI and that the event exists on it."
|
|
318
|
+
].join("\n"), {
|
|
319
|
+
docsPath,
|
|
320
|
+
name: "AbiEventNotFoundError"
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
var AbiFunctionNotFoundError = class extends BaseError {
|
|
325
|
+
constructor(functionName, { docsPath } = {}) {
|
|
326
|
+
super([
|
|
327
|
+
`Function ${functionName ? `"${functionName}" ` : ""}not found on ABI.`,
|
|
328
|
+
"Make sure you are using the correct ABI and that the function exists on it."
|
|
329
|
+
].join("\n"), {
|
|
330
|
+
docsPath,
|
|
331
|
+
name: "AbiFunctionNotFoundError"
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
var AbiFunctionOutputsNotFoundError = class extends BaseError {
|
|
336
|
+
constructor(functionName, { docsPath }) {
|
|
337
|
+
super([
|
|
338
|
+
`Function "${functionName}" does not contain any \`outputs\` on ABI.`,
|
|
339
|
+
"Cannot decode function result without knowing what the parameter types are.",
|
|
340
|
+
"Make sure you are using the correct ABI and that the function exists on it."
|
|
341
|
+
].join("\n"), {
|
|
342
|
+
docsPath,
|
|
343
|
+
name: "AbiFunctionOutputsNotFoundError"
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
var AbiFunctionSignatureNotFoundError = class extends BaseError {
|
|
348
|
+
constructor(signature, { docsPath }) {
|
|
349
|
+
super([
|
|
350
|
+
`Encoded function signature "${signature}" not found on ABI.`,
|
|
351
|
+
"Make sure you are using the correct ABI and that the function exists on it.",
|
|
352
|
+
`You can look up the signature here: https://4byte.sourcify.dev/?q=${signature}.`
|
|
353
|
+
].join("\n"), {
|
|
354
|
+
docsPath,
|
|
355
|
+
name: "AbiFunctionSignatureNotFoundError"
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
var AbiItemAmbiguityError = class extends BaseError {
|
|
360
|
+
constructor(x, y) {
|
|
361
|
+
super("Found ambiguous types in overloaded ABI items.", {
|
|
362
|
+
metaMessages: [
|
|
363
|
+
`\`${x.type}\` in \`${formatAbiItem(x.abiItem)}\`, and`,
|
|
364
|
+
`\`${y.type}\` in \`${formatAbiItem(y.abiItem)}\``,
|
|
365
|
+
"",
|
|
366
|
+
"These types encode differently and cannot be distinguished at runtime.",
|
|
367
|
+
"Remove one of the ambiguous items in the ABI."
|
|
368
|
+
],
|
|
369
|
+
name: "AbiItemAmbiguityError"
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
var BytesSizeMismatchError = class extends BaseError {
|
|
374
|
+
constructor({ expectedSize, givenSize }) {
|
|
375
|
+
super(`Expected bytes${expectedSize}, got bytes${givenSize}.`, {
|
|
376
|
+
name: "BytesSizeMismatchError"
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
var DecodeLogDataMismatch = class extends BaseError {
|
|
381
|
+
constructor({ abiItem, data, params, size: size2 }) {
|
|
382
|
+
super([
|
|
383
|
+
`Data size of ${size2} bytes is too small for non-indexed event parameters.`
|
|
384
|
+
].join("\n"), {
|
|
385
|
+
metaMessages: [
|
|
386
|
+
`Params: (${formatAbiParams(params, { includeName: true })})`,
|
|
387
|
+
`Data: ${data} (${size2} bytes)`
|
|
388
|
+
],
|
|
389
|
+
name: "DecodeLogDataMismatch"
|
|
390
|
+
});
|
|
391
|
+
Object.defineProperty(this, "abiItem", {
|
|
392
|
+
enumerable: true,
|
|
393
|
+
configurable: true,
|
|
394
|
+
writable: true,
|
|
395
|
+
value: void 0
|
|
396
|
+
});
|
|
397
|
+
Object.defineProperty(this, "data", {
|
|
398
|
+
enumerable: true,
|
|
399
|
+
configurable: true,
|
|
400
|
+
writable: true,
|
|
401
|
+
value: void 0
|
|
402
|
+
});
|
|
403
|
+
Object.defineProperty(this, "params", {
|
|
404
|
+
enumerable: true,
|
|
405
|
+
configurable: true,
|
|
406
|
+
writable: true,
|
|
407
|
+
value: void 0
|
|
408
|
+
});
|
|
409
|
+
Object.defineProperty(this, "size", {
|
|
410
|
+
enumerable: true,
|
|
411
|
+
configurable: true,
|
|
412
|
+
writable: true,
|
|
413
|
+
value: void 0
|
|
414
|
+
});
|
|
415
|
+
this.abiItem = abiItem;
|
|
416
|
+
this.data = data;
|
|
417
|
+
this.params = params;
|
|
418
|
+
this.size = size2;
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
var DecodeLogTopicsMismatch = class extends BaseError {
|
|
422
|
+
constructor({ abiItem, param }) {
|
|
423
|
+
super([
|
|
424
|
+
`Expected a topic for indexed event parameter${param.name ? ` "${param.name}"` : ""} on event "${formatAbiItem(abiItem, { includeName: true })}".`
|
|
425
|
+
].join("\n"), { name: "DecodeLogTopicsMismatch" });
|
|
426
|
+
Object.defineProperty(this, "abiItem", {
|
|
427
|
+
enumerable: true,
|
|
428
|
+
configurable: true,
|
|
429
|
+
writable: true,
|
|
430
|
+
value: void 0
|
|
431
|
+
});
|
|
432
|
+
this.abiItem = abiItem;
|
|
433
|
+
}
|
|
434
|
+
};
|
|
435
|
+
var InvalidAbiEncodingTypeError = class extends BaseError {
|
|
436
|
+
constructor(type, { docsPath }) {
|
|
437
|
+
super([
|
|
438
|
+
`Type "${type}" is not a valid encoding type.`,
|
|
439
|
+
"Please provide a valid ABI type."
|
|
440
|
+
].join("\n"), { docsPath, name: "InvalidAbiEncodingType" });
|
|
441
|
+
}
|
|
442
|
+
};
|
|
443
|
+
var InvalidAbiDecodingTypeError = class extends BaseError {
|
|
444
|
+
constructor(type, { docsPath }) {
|
|
445
|
+
super([
|
|
446
|
+
`Type "${type}" is not a valid decoding type.`,
|
|
447
|
+
"Please provide a valid ABI type."
|
|
448
|
+
].join("\n"), { docsPath, name: "InvalidAbiDecodingType" });
|
|
449
|
+
}
|
|
450
|
+
};
|
|
451
|
+
var InvalidArrayError = class extends BaseError {
|
|
452
|
+
constructor(value) {
|
|
453
|
+
super([`Value "${value}" is not a valid array.`].join("\n"), {
|
|
454
|
+
name: "InvalidArrayError"
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
};
|
|
458
|
+
var InvalidDefinitionTypeError = class extends BaseError {
|
|
459
|
+
constructor(type) {
|
|
460
|
+
super([
|
|
461
|
+
`"${type}" is not a valid definition type.`,
|
|
462
|
+
'Valid types: "function", "event", "error"'
|
|
463
|
+
].join("\n"), { name: "InvalidDefinitionTypeError" });
|
|
464
|
+
}
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/errors/address.js
|
|
468
|
+
var InvalidAddressError = class extends BaseError {
|
|
469
|
+
constructor({ address }) {
|
|
470
|
+
super(`Address "${address}" is invalid.`, {
|
|
471
|
+
metaMessages: [
|
|
472
|
+
"- Address must be a hex value of 20 bytes (40 hex characters).",
|
|
473
|
+
"- Address must match its checksum counterpart."
|
|
474
|
+
],
|
|
475
|
+
name: "InvalidAddressError"
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
};
|
|
479
|
+
|
|
480
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/errors/encoding.js
|
|
481
|
+
var IntegerOutOfRangeError = class extends BaseError {
|
|
482
|
+
constructor({ max, min, signed, size: size2, value }) {
|
|
483
|
+
super(`Number "${value}" is not in safe ${size2 ? `${size2 * 8}-bit ${signed ? "signed" : "unsigned"} ` : ""}integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`, { name: "IntegerOutOfRangeError" });
|
|
484
|
+
}
|
|
485
|
+
};
|
|
486
|
+
var InvalidBytesBooleanError = class extends BaseError {
|
|
487
|
+
constructor(bytes) {
|
|
488
|
+
super(`Bytes value "${bytes}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {
|
|
489
|
+
name: "InvalidBytesBooleanError"
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
};
|
|
493
|
+
var InvalidHexBooleanError = class extends BaseError {
|
|
494
|
+
constructor(hex) {
|
|
495
|
+
super(`Hex value "${hex}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`, { name: "InvalidHexBooleanError" });
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
var SizeOverflowError = class extends BaseError {
|
|
499
|
+
constructor({ givenSize, maxSize }) {
|
|
500
|
+
super(`Size cannot exceed ${maxSize} bytes. Given size: ${givenSize} bytes.`, { name: "SizeOverflowError" });
|
|
501
|
+
}
|
|
502
|
+
};
|
|
503
|
+
|
|
504
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/lru.js
|
|
505
|
+
var LruMap = class extends Map {
|
|
506
|
+
constructor(size2) {
|
|
507
|
+
super();
|
|
508
|
+
Object.defineProperty(this, "maxSize", {
|
|
509
|
+
enumerable: true,
|
|
510
|
+
configurable: true,
|
|
511
|
+
writable: true,
|
|
512
|
+
value: void 0
|
|
513
|
+
});
|
|
514
|
+
this.maxSize = size2;
|
|
515
|
+
}
|
|
516
|
+
get(key) {
|
|
517
|
+
const value = super.get(key);
|
|
518
|
+
if (super.has(key)) {
|
|
519
|
+
super.delete(key);
|
|
520
|
+
super.set(key, value);
|
|
521
|
+
}
|
|
522
|
+
return value;
|
|
523
|
+
}
|
|
524
|
+
set(key, value) {
|
|
525
|
+
if (super.has(key))
|
|
526
|
+
super.delete(key);
|
|
527
|
+
super.set(key, value);
|
|
528
|
+
if (this.maxSize && this.size > this.maxSize) {
|
|
529
|
+
const firstKey = super.keys().next().value;
|
|
530
|
+
if (firstKey !== void 0)
|
|
531
|
+
super.delete(firstKey);
|
|
532
|
+
}
|
|
533
|
+
return this;
|
|
534
|
+
}
|
|
535
|
+
};
|
|
536
|
+
|
|
537
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/errors/data.js
|
|
538
|
+
var SliceOffsetOutOfBoundsError = class extends BaseError {
|
|
539
|
+
constructor({ offset, position, size: size2 }) {
|
|
540
|
+
super(`Slice ${position === "start" ? "starting" : "ending"} at offset "${offset}" is out-of-bounds (size: ${size2}).`, { name: "SliceOffsetOutOfBoundsError" });
|
|
541
|
+
}
|
|
542
|
+
};
|
|
543
|
+
var SizeExceedsPaddingSizeError = class extends BaseError {
|
|
544
|
+
constructor({ size: size2, targetSize, type }) {
|
|
545
|
+
super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (${size2}) exceeds padding size (${targetSize}).`, { name: "SizeExceedsPaddingSizeError" });
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
var InvalidBytesLengthError = class extends BaseError {
|
|
549
|
+
constructor({ size: size2, targetSize, type }) {
|
|
550
|
+
super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} is expected to be ${targetSize} ${type} long, but is ${size2} ${type} long.`, { name: "InvalidBytesLengthError" });
|
|
551
|
+
}
|
|
552
|
+
};
|
|
553
|
+
|
|
554
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/data/pad.js
|
|
555
|
+
function pad(hexOrBytes, { dir, size: size2 = 32 } = {}) {
|
|
556
|
+
if (typeof hexOrBytes === "string")
|
|
557
|
+
return padHex(hexOrBytes, { dir, size: size2 });
|
|
558
|
+
return padBytes(hexOrBytes, { dir, size: size2 });
|
|
559
|
+
}
|
|
560
|
+
function padHex(hex_, { dir, size: size2 = 32 } = {}) {
|
|
561
|
+
if (size2 === null)
|
|
562
|
+
return hex_;
|
|
563
|
+
const hex = hex_.replace("0x", "");
|
|
564
|
+
if (hex.length > size2 * 2)
|
|
565
|
+
throw new SizeExceedsPaddingSizeError({
|
|
566
|
+
size: Math.ceil(hex.length / 2),
|
|
567
|
+
targetSize: size2,
|
|
568
|
+
type: "hex"
|
|
569
|
+
});
|
|
570
|
+
return `0x${hex[dir === "right" ? "padEnd" : "padStart"](size2 * 2, "0")}`;
|
|
571
|
+
}
|
|
572
|
+
function padBytes(bytes, { dir, size: size2 = 32 } = {}) {
|
|
573
|
+
if (size2 === null)
|
|
574
|
+
return bytes;
|
|
575
|
+
if (bytes.length > size2)
|
|
576
|
+
throw new SizeExceedsPaddingSizeError({
|
|
577
|
+
size: bytes.length,
|
|
578
|
+
targetSize: size2,
|
|
579
|
+
type: "bytes"
|
|
580
|
+
});
|
|
581
|
+
const paddedBytes = new Uint8Array(size2);
|
|
582
|
+
for (let i = 0; i < size2; i++) {
|
|
583
|
+
const padEnd = dir === "right";
|
|
584
|
+
paddedBytes[padEnd ? i : size2 - i - 1] = bytes[padEnd ? i : bytes.length - i - 1];
|
|
585
|
+
}
|
|
586
|
+
return paddedBytes;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/data/trim.js
|
|
590
|
+
function trim(hexOrBytes, { dir = "left" } = {}) {
|
|
591
|
+
let data = typeof hexOrBytes === "string" ? hexOrBytes.replace("0x", "") : hexOrBytes;
|
|
592
|
+
let sliceLength = 0;
|
|
593
|
+
for (let i = 0; i < data.length - 1; i++) {
|
|
594
|
+
if (data[dir === "left" ? i : data.length - i - 1].toString() === "0")
|
|
595
|
+
sliceLength++;
|
|
596
|
+
else
|
|
597
|
+
break;
|
|
598
|
+
}
|
|
599
|
+
data = dir === "left" ? data.slice(sliceLength) : data.slice(0, data.length - sliceLength);
|
|
600
|
+
if (typeof hexOrBytes === "string") {
|
|
601
|
+
if (data.length === 1 && dir === "right")
|
|
602
|
+
data = `${data}0`;
|
|
603
|
+
return `0x${data.length % 2 === 1 ? `0${data}` : data}`;
|
|
604
|
+
}
|
|
605
|
+
return data;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/encoding/fromHex.js
|
|
609
|
+
function assertSize(hexOrBytes, { size: size2 }) {
|
|
610
|
+
if (size(hexOrBytes) > size2)
|
|
611
|
+
throw new SizeOverflowError({
|
|
612
|
+
givenSize: size(hexOrBytes),
|
|
613
|
+
maxSize: size2
|
|
614
|
+
});
|
|
615
|
+
}
|
|
616
|
+
function hexToBigInt(hex, opts = {}) {
|
|
617
|
+
const { signed } = opts;
|
|
618
|
+
if (opts.size)
|
|
619
|
+
assertSize(hex, { size: opts.size });
|
|
620
|
+
const value = BigInt(hex);
|
|
621
|
+
if (!signed)
|
|
622
|
+
return value;
|
|
623
|
+
const size2 = (hex.length - 2) / 2;
|
|
624
|
+
const max = (1n << BigInt(size2) * 8n - 1n) - 1n;
|
|
625
|
+
if (value <= max)
|
|
626
|
+
return value;
|
|
627
|
+
return value - BigInt(`0x${"f".padStart(size2 * 2, "f")}`) - 1n;
|
|
628
|
+
}
|
|
629
|
+
function hexToBool(hex_, opts = {}) {
|
|
630
|
+
let hex = hex_;
|
|
631
|
+
if (opts.size) {
|
|
632
|
+
assertSize(hex, { size: opts.size });
|
|
633
|
+
hex = trim(hex);
|
|
634
|
+
}
|
|
635
|
+
if (trim(hex) === "0x00")
|
|
636
|
+
return false;
|
|
637
|
+
if (trim(hex) === "0x01")
|
|
638
|
+
return true;
|
|
639
|
+
throw new InvalidHexBooleanError(hex);
|
|
640
|
+
}
|
|
641
|
+
function hexToNumber(hex, opts = {}) {
|
|
642
|
+
const value = hexToBigInt(hex, opts);
|
|
643
|
+
const number = Number(value);
|
|
644
|
+
if (!Number.isSafeInteger(number))
|
|
645
|
+
throw new IntegerOutOfRangeError({
|
|
646
|
+
max: `${Number.MAX_SAFE_INTEGER}`,
|
|
647
|
+
min: `${Number.MIN_SAFE_INTEGER}`,
|
|
648
|
+
signed: opts.signed,
|
|
649
|
+
size: opts.size,
|
|
650
|
+
value: `${value}n`
|
|
651
|
+
});
|
|
652
|
+
return number;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/encoding/toHex.js
|
|
656
|
+
var hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i) => i.toString(16).padStart(2, "0"));
|
|
657
|
+
function toHex(value, opts = {}) {
|
|
658
|
+
if (typeof value === "number" || typeof value === "bigint")
|
|
659
|
+
return numberToHex(value, opts);
|
|
660
|
+
if (typeof value === "string") {
|
|
661
|
+
return stringToHex(value, opts);
|
|
662
|
+
}
|
|
663
|
+
if (typeof value === "boolean")
|
|
664
|
+
return boolToHex(value, opts);
|
|
665
|
+
return bytesToHex(value, opts);
|
|
666
|
+
}
|
|
667
|
+
function boolToHex(value, opts = {}) {
|
|
668
|
+
const hex = `0x${Number(value)}`;
|
|
669
|
+
if (typeof opts.size === "number") {
|
|
670
|
+
assertSize(hex, { size: opts.size });
|
|
671
|
+
return pad(hex, { size: opts.size });
|
|
672
|
+
}
|
|
673
|
+
return hex;
|
|
674
|
+
}
|
|
675
|
+
function bytesToHex(value, opts = {}) {
|
|
676
|
+
let string = "";
|
|
677
|
+
for (let i = 0; i < value.length; i++) {
|
|
678
|
+
string += hexes[value[i]];
|
|
679
|
+
}
|
|
680
|
+
const hex = `0x${string}`;
|
|
681
|
+
if (typeof opts.size === "number") {
|
|
682
|
+
assertSize(hex, { size: opts.size });
|
|
683
|
+
return pad(hex, { dir: "right", size: opts.size });
|
|
684
|
+
}
|
|
685
|
+
return hex;
|
|
686
|
+
}
|
|
687
|
+
function numberToHex(value_, opts = {}) {
|
|
688
|
+
const { signed, size: size2 } = opts;
|
|
689
|
+
const value = BigInt(value_);
|
|
690
|
+
let maxValue;
|
|
691
|
+
if (size2) {
|
|
692
|
+
if (signed)
|
|
693
|
+
maxValue = (1n << BigInt(size2) * 8n - 1n) - 1n;
|
|
694
|
+
else
|
|
695
|
+
maxValue = 2n ** (BigInt(size2) * 8n) - 1n;
|
|
696
|
+
} else if (typeof value_ === "number") {
|
|
697
|
+
maxValue = BigInt(Number.MAX_SAFE_INTEGER);
|
|
698
|
+
}
|
|
699
|
+
const minValue = typeof maxValue === "bigint" && signed ? -maxValue - 1n : 0;
|
|
700
|
+
if (maxValue && value > maxValue || value < minValue) {
|
|
701
|
+
const suffix = typeof value_ === "bigint" ? "n" : "";
|
|
702
|
+
throw new IntegerOutOfRangeError({
|
|
703
|
+
max: maxValue ? `${maxValue}${suffix}` : void 0,
|
|
704
|
+
min: `${minValue}${suffix}`,
|
|
705
|
+
signed,
|
|
706
|
+
size: size2,
|
|
707
|
+
value: `${value_}${suffix}`
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
const hex = `0x${(signed && value < 0 ? (1n << BigInt(size2 * 8)) + BigInt(value) : value).toString(16)}`;
|
|
711
|
+
if (size2)
|
|
712
|
+
return pad(hex, { size: size2 });
|
|
713
|
+
return hex;
|
|
714
|
+
}
|
|
715
|
+
var encoder = /* @__PURE__ */ new TextEncoder();
|
|
716
|
+
function stringToHex(value_, opts = {}) {
|
|
717
|
+
const value = encoder.encode(value_);
|
|
718
|
+
return bytesToHex(value, opts);
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/encoding/toBytes.js
|
|
722
|
+
var encoder2 = /* @__PURE__ */ new TextEncoder();
|
|
723
|
+
function toBytes2(value, opts = {}) {
|
|
724
|
+
if (typeof value === "number" || typeof value === "bigint")
|
|
725
|
+
return numberToBytes(value, opts);
|
|
726
|
+
if (typeof value === "boolean")
|
|
727
|
+
return boolToBytes(value, opts);
|
|
728
|
+
if (isHex(value))
|
|
729
|
+
return hexToBytes(value, opts);
|
|
730
|
+
return stringToBytes(value, opts);
|
|
731
|
+
}
|
|
732
|
+
function boolToBytes(value, opts = {}) {
|
|
733
|
+
const bytes = new Uint8Array(1);
|
|
734
|
+
bytes[0] = Number(value);
|
|
735
|
+
if (typeof opts.size === "number") {
|
|
736
|
+
assertSize(bytes, { size: opts.size });
|
|
737
|
+
return pad(bytes, { size: opts.size });
|
|
738
|
+
}
|
|
739
|
+
return bytes;
|
|
740
|
+
}
|
|
741
|
+
var charCodeMap = {
|
|
742
|
+
zero: 48,
|
|
743
|
+
nine: 57,
|
|
744
|
+
A: 65,
|
|
745
|
+
F: 70,
|
|
746
|
+
a: 97,
|
|
747
|
+
f: 102
|
|
748
|
+
};
|
|
749
|
+
function charCodeToBase16(char) {
|
|
750
|
+
if (char >= charCodeMap.zero && char <= charCodeMap.nine)
|
|
751
|
+
return char - charCodeMap.zero;
|
|
752
|
+
if (char >= charCodeMap.A && char <= charCodeMap.F)
|
|
753
|
+
return char - (charCodeMap.A - 10);
|
|
754
|
+
if (char >= charCodeMap.a && char <= charCodeMap.f)
|
|
755
|
+
return char - (charCodeMap.a - 10);
|
|
756
|
+
return void 0;
|
|
757
|
+
}
|
|
758
|
+
function hexToBytes(hex_, opts = {}) {
|
|
759
|
+
let hex = hex_;
|
|
760
|
+
if (opts.size) {
|
|
761
|
+
assertSize(hex, { size: opts.size });
|
|
762
|
+
hex = pad(hex, { dir: "right", size: opts.size });
|
|
763
|
+
}
|
|
764
|
+
let hexString = hex.slice(2);
|
|
765
|
+
if (hexString.length % 2)
|
|
766
|
+
hexString = `0${hexString}`;
|
|
767
|
+
const length = hexString.length / 2;
|
|
768
|
+
const bytes = new Uint8Array(length);
|
|
769
|
+
for (let index = 0, j = 0; index < length; index++) {
|
|
770
|
+
const nibbleLeft = charCodeToBase16(hexString.charCodeAt(j++));
|
|
771
|
+
const nibbleRight = charCodeToBase16(hexString.charCodeAt(j++));
|
|
772
|
+
if (nibbleLeft === void 0 || nibbleRight === void 0) {
|
|
773
|
+
throw new BaseError(`Invalid byte sequence ("${hexString[j - 2]}${hexString[j - 1]}" in "${hexString}").`);
|
|
774
|
+
}
|
|
775
|
+
bytes[index] = nibbleLeft * 16 + nibbleRight;
|
|
776
|
+
}
|
|
777
|
+
return bytes;
|
|
778
|
+
}
|
|
779
|
+
function numberToBytes(value, opts) {
|
|
780
|
+
const hex = numberToHex(value, opts);
|
|
781
|
+
return hexToBytes(hex);
|
|
782
|
+
}
|
|
783
|
+
function stringToBytes(value, opts = {}) {
|
|
784
|
+
const bytes = encoder2.encode(value);
|
|
785
|
+
if (typeof opts.size === "number") {
|
|
786
|
+
assertSize(bytes, { size: opts.size });
|
|
787
|
+
return pad(bytes, { dir: "right", size: opts.size });
|
|
788
|
+
}
|
|
789
|
+
return bytes;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
// node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha3.js
|
|
793
|
+
var _0n = BigInt(0);
|
|
794
|
+
var _1n = BigInt(1);
|
|
795
|
+
var _2n = BigInt(2);
|
|
796
|
+
var _7n = BigInt(7);
|
|
797
|
+
var _256n = BigInt(256);
|
|
798
|
+
var _0x71n = BigInt(113);
|
|
799
|
+
var SHA3_PI = [];
|
|
800
|
+
var SHA3_ROTL = [];
|
|
801
|
+
var _SHA3_IOTA = [];
|
|
802
|
+
for (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {
|
|
803
|
+
[x, y] = [y, (2 * x + 3 * y) % 5];
|
|
804
|
+
SHA3_PI.push(2 * (5 * y + x));
|
|
805
|
+
SHA3_ROTL.push((round + 1) * (round + 2) / 2 % 64);
|
|
806
|
+
let t = _0n;
|
|
807
|
+
for (let j = 0; j < 7; j++) {
|
|
808
|
+
R = (R << _1n ^ (R >> _7n) * _0x71n) % _256n;
|
|
809
|
+
if (R & _2n)
|
|
810
|
+
t ^= _1n << (_1n << /* @__PURE__ */ BigInt(j)) - _1n;
|
|
811
|
+
}
|
|
812
|
+
_SHA3_IOTA.push(t);
|
|
813
|
+
}
|
|
814
|
+
var IOTAS = split(_SHA3_IOTA, true);
|
|
815
|
+
var SHA3_IOTA_H = IOTAS[0];
|
|
816
|
+
var SHA3_IOTA_L = IOTAS[1];
|
|
817
|
+
var rotlH = (h, l, s) => s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s);
|
|
818
|
+
var rotlL = (h, l, s) => s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s);
|
|
819
|
+
function keccakP(s, rounds = 24) {
|
|
820
|
+
const B = new Uint32Array(5 * 2);
|
|
821
|
+
for (let round = 24 - rounds; round < 24; round++) {
|
|
822
|
+
for (let x = 0; x < 10; x++)
|
|
823
|
+
B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];
|
|
824
|
+
for (let x = 0; x < 10; x += 2) {
|
|
825
|
+
const idx1 = (x + 8) % 10;
|
|
826
|
+
const idx0 = (x + 2) % 10;
|
|
827
|
+
const B0 = B[idx0];
|
|
828
|
+
const B1 = B[idx0 + 1];
|
|
829
|
+
const Th = rotlH(B0, B1, 1) ^ B[idx1];
|
|
830
|
+
const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];
|
|
831
|
+
for (let y = 0; y < 50; y += 10) {
|
|
832
|
+
s[x + y] ^= Th;
|
|
833
|
+
s[x + y + 1] ^= Tl;
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
let curH = s[2];
|
|
837
|
+
let curL = s[3];
|
|
838
|
+
for (let t = 0; t < 24; t++) {
|
|
839
|
+
const shift = SHA3_ROTL[t];
|
|
840
|
+
const Th = rotlH(curH, curL, shift);
|
|
841
|
+
const Tl = rotlL(curH, curL, shift);
|
|
842
|
+
const PI = SHA3_PI[t];
|
|
843
|
+
curH = s[PI];
|
|
844
|
+
curL = s[PI + 1];
|
|
845
|
+
s[PI] = Th;
|
|
846
|
+
s[PI + 1] = Tl;
|
|
847
|
+
}
|
|
848
|
+
for (let y = 0; y < 50; y += 10) {
|
|
849
|
+
for (let x = 0; x < 10; x++)
|
|
850
|
+
B[x] = s[y + x];
|
|
851
|
+
for (let x = 0; x < 10; x++)
|
|
852
|
+
s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];
|
|
853
|
+
}
|
|
854
|
+
s[0] ^= SHA3_IOTA_H[round];
|
|
855
|
+
s[1] ^= SHA3_IOTA_L[round];
|
|
856
|
+
}
|
|
857
|
+
clean(B);
|
|
858
|
+
}
|
|
859
|
+
var Keccak = class _Keccak extends Hash {
|
|
860
|
+
// NOTE: we accept arguments in bytes instead of bits here.
|
|
861
|
+
constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {
|
|
862
|
+
super();
|
|
863
|
+
this.pos = 0;
|
|
864
|
+
this.posOut = 0;
|
|
865
|
+
this.finished = false;
|
|
866
|
+
this.destroyed = false;
|
|
867
|
+
this.enableXOF = false;
|
|
868
|
+
this.blockLen = blockLen;
|
|
869
|
+
this.suffix = suffix;
|
|
870
|
+
this.outputLen = outputLen;
|
|
871
|
+
this.enableXOF = enableXOF;
|
|
872
|
+
this.rounds = rounds;
|
|
873
|
+
anumber(outputLen);
|
|
874
|
+
if (!(0 < blockLen && blockLen < 200))
|
|
875
|
+
throw new Error("only keccak-f1600 function is supported");
|
|
876
|
+
this.state = new Uint8Array(200);
|
|
877
|
+
this.state32 = u32(this.state);
|
|
878
|
+
}
|
|
879
|
+
clone() {
|
|
880
|
+
return this._cloneInto();
|
|
881
|
+
}
|
|
882
|
+
keccak() {
|
|
883
|
+
swap32IfBE(this.state32);
|
|
884
|
+
keccakP(this.state32, this.rounds);
|
|
885
|
+
swap32IfBE(this.state32);
|
|
886
|
+
this.posOut = 0;
|
|
887
|
+
this.pos = 0;
|
|
888
|
+
}
|
|
889
|
+
update(data) {
|
|
890
|
+
aexists(this);
|
|
891
|
+
data = toBytes(data);
|
|
892
|
+
abytes(data);
|
|
893
|
+
const { blockLen, state } = this;
|
|
894
|
+
const len = data.length;
|
|
895
|
+
for (let pos = 0; pos < len; ) {
|
|
896
|
+
const take = Math.min(blockLen - this.pos, len - pos);
|
|
897
|
+
for (let i = 0; i < take; i++)
|
|
898
|
+
state[this.pos++] ^= data[pos++];
|
|
899
|
+
if (this.pos === blockLen)
|
|
900
|
+
this.keccak();
|
|
901
|
+
}
|
|
902
|
+
return this;
|
|
903
|
+
}
|
|
904
|
+
finish() {
|
|
905
|
+
if (this.finished)
|
|
906
|
+
return;
|
|
907
|
+
this.finished = true;
|
|
908
|
+
const { state, suffix, pos, blockLen } = this;
|
|
909
|
+
state[pos] ^= suffix;
|
|
910
|
+
if ((suffix & 128) !== 0 && pos === blockLen - 1)
|
|
911
|
+
this.keccak();
|
|
912
|
+
state[blockLen - 1] ^= 128;
|
|
913
|
+
this.keccak();
|
|
914
|
+
}
|
|
915
|
+
writeInto(out) {
|
|
916
|
+
aexists(this, false);
|
|
917
|
+
abytes(out);
|
|
918
|
+
this.finish();
|
|
919
|
+
const bufferOut = this.state;
|
|
920
|
+
const { blockLen } = this;
|
|
921
|
+
for (let pos = 0, len = out.length; pos < len; ) {
|
|
922
|
+
if (this.posOut >= blockLen)
|
|
923
|
+
this.keccak();
|
|
924
|
+
const take = Math.min(blockLen - this.posOut, len - pos);
|
|
925
|
+
out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);
|
|
926
|
+
this.posOut += take;
|
|
927
|
+
pos += take;
|
|
928
|
+
}
|
|
929
|
+
return out;
|
|
930
|
+
}
|
|
931
|
+
xofInto(out) {
|
|
932
|
+
if (!this.enableXOF)
|
|
933
|
+
throw new Error("XOF is not possible for this instance");
|
|
934
|
+
return this.writeInto(out);
|
|
935
|
+
}
|
|
936
|
+
xof(bytes) {
|
|
937
|
+
anumber(bytes);
|
|
938
|
+
return this.xofInto(new Uint8Array(bytes));
|
|
939
|
+
}
|
|
940
|
+
digestInto(out) {
|
|
941
|
+
aoutput(out, this);
|
|
942
|
+
if (this.finished)
|
|
943
|
+
throw new Error("digest() was already called");
|
|
944
|
+
this.writeInto(out);
|
|
945
|
+
this.destroy();
|
|
946
|
+
return out;
|
|
947
|
+
}
|
|
948
|
+
digest() {
|
|
949
|
+
return this.digestInto(new Uint8Array(this.outputLen));
|
|
950
|
+
}
|
|
951
|
+
destroy() {
|
|
952
|
+
this.destroyed = true;
|
|
953
|
+
clean(this.state);
|
|
954
|
+
}
|
|
955
|
+
_cloneInto(to) {
|
|
956
|
+
const { blockLen, suffix, outputLen, rounds, enableXOF } = this;
|
|
957
|
+
to || (to = new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds));
|
|
958
|
+
to.state32.set(this.state32);
|
|
959
|
+
to.pos = this.pos;
|
|
960
|
+
to.posOut = this.posOut;
|
|
961
|
+
to.finished = this.finished;
|
|
962
|
+
to.rounds = rounds;
|
|
963
|
+
to.suffix = suffix;
|
|
964
|
+
to.outputLen = outputLen;
|
|
965
|
+
to.enableXOF = enableXOF;
|
|
966
|
+
to.destroyed = this.destroyed;
|
|
967
|
+
return to;
|
|
968
|
+
}
|
|
969
|
+
};
|
|
970
|
+
var gen = (suffix, blockLen, outputLen) => createHasher(() => new Keccak(blockLen, suffix, outputLen));
|
|
971
|
+
var keccak_256 = /* @__PURE__ */ (() => gen(1, 136, 256 / 8))();
|
|
972
|
+
|
|
973
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/hash/keccak256.js
|
|
974
|
+
function keccak256(value, to_) {
|
|
975
|
+
const to = to_ || "hex";
|
|
976
|
+
const bytes = keccak_256(isHex(value, { strict: false }) ? toBytes2(value) : value);
|
|
977
|
+
if (to === "bytes")
|
|
978
|
+
return bytes;
|
|
979
|
+
return toHex(bytes);
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/address/getAddress.js
|
|
983
|
+
var checksumAddressCache = /* @__PURE__ */ new LruMap(8192);
|
|
984
|
+
function checksumAddress(address_, chainId) {
|
|
985
|
+
if (checksumAddressCache.has(`${address_}.${chainId}`))
|
|
986
|
+
return checksumAddressCache.get(`${address_}.${chainId}`);
|
|
987
|
+
const hexAddress = chainId ? `${chainId}${address_.toLowerCase()}` : address_.substring(2).toLowerCase();
|
|
988
|
+
const hash = keccak256(stringToBytes(hexAddress), "bytes");
|
|
989
|
+
const address = (chainId ? hexAddress.substring(`${chainId}0x`.length) : hexAddress).split("");
|
|
990
|
+
for (let i = 0; i < 40; i += 2) {
|
|
991
|
+
if (hash[i >> 1] >> 4 >= 8 && address[i]) {
|
|
992
|
+
address[i] = address[i].toUpperCase();
|
|
993
|
+
}
|
|
994
|
+
if ((hash[i >> 1] & 15) >= 8 && address[i + 1]) {
|
|
995
|
+
address[i + 1] = address[i + 1].toUpperCase();
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
const result = `0x${address.join("")}`;
|
|
999
|
+
checksumAddressCache.set(`${address_}.${chainId}`, result);
|
|
1000
|
+
return result;
|
|
1001
|
+
}
|
|
1002
|
+
function getAddress(address, chainId) {
|
|
1003
|
+
if (!isAddress(address, { strict: false }))
|
|
1004
|
+
throw new InvalidAddressError({ address });
|
|
1005
|
+
return checksumAddress(address, chainId);
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/address/isAddress.js
|
|
1009
|
+
var addressRegex = /^0x[a-fA-F0-9]{40}$/;
|
|
1010
|
+
var isAddressCache = /* @__PURE__ */ new LruMap(8192);
|
|
1011
|
+
function isAddress(address, options) {
|
|
1012
|
+
const { strict = true } = options ?? {};
|
|
1013
|
+
const cacheKey = `${address}.${strict}`;
|
|
1014
|
+
if (isAddressCache.has(cacheKey))
|
|
1015
|
+
return isAddressCache.get(cacheKey);
|
|
1016
|
+
const result = (() => {
|
|
1017
|
+
if (!addressRegex.test(address))
|
|
1018
|
+
return false;
|
|
1019
|
+
if (address.toLowerCase() === address)
|
|
1020
|
+
return true;
|
|
1021
|
+
if (strict)
|
|
1022
|
+
return checksumAddress(address) === address;
|
|
1023
|
+
return true;
|
|
1024
|
+
})();
|
|
1025
|
+
isAddressCache.set(cacheKey, result);
|
|
1026
|
+
return result;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/data/slice.js
|
|
1030
|
+
function slice(value, start, end, { strict } = {}) {
|
|
1031
|
+
if (isHex(value, { strict: false }))
|
|
1032
|
+
return sliceHex(value, start, end, {
|
|
1033
|
+
strict
|
|
1034
|
+
});
|
|
1035
|
+
return sliceBytes(value, start, end, {
|
|
1036
|
+
strict
|
|
1037
|
+
});
|
|
1038
|
+
}
|
|
1039
|
+
function assertStartOffset(value, start) {
|
|
1040
|
+
if (typeof start === "number" && start > 0 && start > size(value) - 1)
|
|
1041
|
+
throw new SliceOffsetOutOfBoundsError({
|
|
1042
|
+
offset: start,
|
|
1043
|
+
position: "start",
|
|
1044
|
+
size: size(value)
|
|
1045
|
+
});
|
|
1046
|
+
}
|
|
1047
|
+
function assertEndOffset(value, start, end) {
|
|
1048
|
+
if (typeof start === "number" && typeof end === "number" && size(value) !== end - start) {
|
|
1049
|
+
throw new SliceOffsetOutOfBoundsError({
|
|
1050
|
+
offset: end,
|
|
1051
|
+
position: "end",
|
|
1052
|
+
size: size(value)
|
|
1053
|
+
});
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
function sliceBytes(value_, start, end, { strict } = {}) {
|
|
1057
|
+
assertStartOffset(value_, start);
|
|
1058
|
+
const value = value_.slice(start, end);
|
|
1059
|
+
if (strict)
|
|
1060
|
+
assertEndOffset(value, start, end);
|
|
1061
|
+
return value;
|
|
1062
|
+
}
|
|
1063
|
+
function sliceHex(value_, start, end, { strict } = {}) {
|
|
1064
|
+
assertStartOffset(value_, start);
|
|
1065
|
+
const value = `0x${value_.replace("0x", "").slice((start ?? 0) * 2, (end ?? value_.length) * 2)}`;
|
|
1066
|
+
if (strict)
|
|
1067
|
+
assertEndOffset(value, start, end);
|
|
1068
|
+
return value;
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/regex.js
|
|
1072
|
+
var bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;
|
|
1073
|
+
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)?$/;
|
|
1074
|
+
|
|
1075
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js
|
|
1076
|
+
function encodeAbiParameters(params, values) {
|
|
1077
|
+
if (params.length !== values.length)
|
|
1078
|
+
throw new AbiEncodingLengthMismatchError({
|
|
1079
|
+
expectedLength: params.length,
|
|
1080
|
+
givenLength: values.length
|
|
1081
|
+
});
|
|
1082
|
+
const preparedParams = prepareParams({
|
|
1083
|
+
params,
|
|
1084
|
+
values
|
|
1085
|
+
});
|
|
1086
|
+
return encodeParams(preparedParams);
|
|
1087
|
+
}
|
|
1088
|
+
function prepareParams({ params, values }) {
|
|
1089
|
+
const preparedParams = [];
|
|
1090
|
+
for (let i = 0; i < params.length; i++) {
|
|
1091
|
+
preparedParams.push(prepareParam({ param: params[i], value: values[i] }));
|
|
1092
|
+
}
|
|
1093
|
+
return preparedParams;
|
|
1094
|
+
}
|
|
1095
|
+
function prepareParam({ param, value }) {
|
|
1096
|
+
const arrayComponents = getArrayComponents(param.type);
|
|
1097
|
+
if (arrayComponents) {
|
|
1098
|
+
const [length, type] = arrayComponents;
|
|
1099
|
+
return encodeArray(value, { length, param: { ...param, type } });
|
|
1100
|
+
}
|
|
1101
|
+
if (param.type === "tuple") {
|
|
1102
|
+
return encodeTuple(value, {
|
|
1103
|
+
param
|
|
1104
|
+
});
|
|
1105
|
+
}
|
|
1106
|
+
if (param.type === "address") {
|
|
1107
|
+
return encodeAddress(value);
|
|
1108
|
+
}
|
|
1109
|
+
if (param.type === "bool") {
|
|
1110
|
+
return encodeBool(value);
|
|
1111
|
+
}
|
|
1112
|
+
if (param.type.startsWith("uint") || param.type.startsWith("int")) {
|
|
1113
|
+
const signed = param.type.startsWith("int");
|
|
1114
|
+
const [, , size2 = "256"] = integerRegex.exec(param.type) ?? [];
|
|
1115
|
+
return encodeNumber(value, {
|
|
1116
|
+
signed,
|
|
1117
|
+
size: Number(size2)
|
|
1118
|
+
});
|
|
1119
|
+
}
|
|
1120
|
+
if (param.type.startsWith("bytes")) {
|
|
1121
|
+
return encodeBytes(value, { param });
|
|
1122
|
+
}
|
|
1123
|
+
if (param.type === "string") {
|
|
1124
|
+
return encodeString(value);
|
|
1125
|
+
}
|
|
1126
|
+
throw new InvalidAbiEncodingTypeError(param.type, {
|
|
1127
|
+
docsPath: "/docs/contract/encodeAbiParameters"
|
|
1128
|
+
});
|
|
1129
|
+
}
|
|
1130
|
+
function encodeParams(preparedParams) {
|
|
1131
|
+
let staticSize = 0;
|
|
1132
|
+
for (let i = 0; i < preparedParams.length; i++) {
|
|
1133
|
+
const { dynamic, encoded } = preparedParams[i];
|
|
1134
|
+
if (dynamic)
|
|
1135
|
+
staticSize += 32;
|
|
1136
|
+
else
|
|
1137
|
+
staticSize += size(encoded);
|
|
1138
|
+
}
|
|
1139
|
+
const staticParams = [];
|
|
1140
|
+
const dynamicParams = [];
|
|
1141
|
+
let dynamicSize = 0;
|
|
1142
|
+
for (let i = 0; i < preparedParams.length; i++) {
|
|
1143
|
+
const { dynamic, encoded } = preparedParams[i];
|
|
1144
|
+
if (dynamic) {
|
|
1145
|
+
staticParams.push(numberToHex(staticSize + dynamicSize, { size: 32 }));
|
|
1146
|
+
dynamicParams.push(encoded);
|
|
1147
|
+
dynamicSize += size(encoded);
|
|
1148
|
+
} else {
|
|
1149
|
+
staticParams.push(encoded);
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
return concatHex([...staticParams, ...dynamicParams]);
|
|
1153
|
+
}
|
|
1154
|
+
function encodeAddress(value) {
|
|
1155
|
+
if (!isAddress(value))
|
|
1156
|
+
throw new InvalidAddressError({ address: value });
|
|
1157
|
+
return { dynamic: false, encoded: padHex(value.toLowerCase()) };
|
|
1158
|
+
}
|
|
1159
|
+
function encodeArray(value, { length, param }) {
|
|
1160
|
+
const dynamic = length === null;
|
|
1161
|
+
if (!Array.isArray(value))
|
|
1162
|
+
throw new InvalidArrayError(value);
|
|
1163
|
+
if (!dynamic && value.length !== length)
|
|
1164
|
+
throw new AbiEncodingArrayLengthMismatchError({
|
|
1165
|
+
expectedLength: length,
|
|
1166
|
+
givenLength: value.length,
|
|
1167
|
+
type: `${param.type}[${length}]`
|
|
1168
|
+
});
|
|
1169
|
+
let dynamicChild = value.length === 0 && isDynamicType(param);
|
|
1170
|
+
const preparedParams = [];
|
|
1171
|
+
for (let i = 0; i < value.length; i++) {
|
|
1172
|
+
const preparedParam = prepareParam({ param, value: value[i] });
|
|
1173
|
+
if (preparedParam.dynamic)
|
|
1174
|
+
dynamicChild = true;
|
|
1175
|
+
preparedParams.push(preparedParam);
|
|
1176
|
+
}
|
|
1177
|
+
if (dynamic || dynamicChild) {
|
|
1178
|
+
const data = encodeParams(preparedParams);
|
|
1179
|
+
if (dynamic) {
|
|
1180
|
+
const length2 = numberToHex(preparedParams.length, { size: 32 });
|
|
1181
|
+
return {
|
|
1182
|
+
dynamic: true,
|
|
1183
|
+
encoded: concatHex([length2, data])
|
|
1184
|
+
};
|
|
1185
|
+
}
|
|
1186
|
+
if (dynamicChild)
|
|
1187
|
+
return { dynamic: true, encoded: data };
|
|
1188
|
+
}
|
|
1189
|
+
return {
|
|
1190
|
+
dynamic: false,
|
|
1191
|
+
encoded: concatHex(preparedParams.map(({ encoded }) => encoded))
|
|
1192
|
+
};
|
|
1193
|
+
}
|
|
1194
|
+
function encodeBytes(value, { param }) {
|
|
1195
|
+
const [, paramSize] = param.type.split("bytes");
|
|
1196
|
+
const bytesSize = size(value);
|
|
1197
|
+
if (!paramSize) {
|
|
1198
|
+
let value_ = value;
|
|
1199
|
+
if (bytesSize % 32 !== 0)
|
|
1200
|
+
value_ = padHex(value_, {
|
|
1201
|
+
dir: "right",
|
|
1202
|
+
size: Math.ceil((value.length - 2) / 2 / 32) * 32
|
|
1203
|
+
});
|
|
1204
|
+
return {
|
|
1205
|
+
dynamic: true,
|
|
1206
|
+
encoded: concatHex([
|
|
1207
|
+
padHex(numberToHex(bytesSize, { size: 32 })),
|
|
1208
|
+
value_
|
|
1209
|
+
])
|
|
1210
|
+
};
|
|
1211
|
+
}
|
|
1212
|
+
if (bytesSize !== Number.parseInt(paramSize, 10))
|
|
1213
|
+
throw new AbiEncodingBytesSizeMismatchError({
|
|
1214
|
+
expectedSize: Number.parseInt(paramSize, 10),
|
|
1215
|
+
value
|
|
1216
|
+
});
|
|
1217
|
+
return { dynamic: false, encoded: padHex(value, { dir: "right" }) };
|
|
1218
|
+
}
|
|
1219
|
+
function encodeBool(value) {
|
|
1220
|
+
if (typeof value !== "boolean")
|
|
1221
|
+
throw new BaseError(`Invalid boolean value: "${value}" (type: ${typeof value}). Expected: \`true\` or \`false\`.`);
|
|
1222
|
+
return { dynamic: false, encoded: padHex(boolToHex(value)) };
|
|
1223
|
+
}
|
|
1224
|
+
function encodeNumber(value, { signed, size: size2 = 256 }) {
|
|
1225
|
+
if (typeof size2 === "number") {
|
|
1226
|
+
const max = 2n ** (BigInt(size2) - (signed ? 1n : 0n)) - 1n;
|
|
1227
|
+
const min = signed ? -max - 1n : 0n;
|
|
1228
|
+
if (value > max || value < min)
|
|
1229
|
+
throw new IntegerOutOfRangeError({
|
|
1230
|
+
max: max.toString(),
|
|
1231
|
+
min: min.toString(),
|
|
1232
|
+
signed,
|
|
1233
|
+
size: size2 / 8,
|
|
1234
|
+
value: value.toString()
|
|
1235
|
+
});
|
|
1236
|
+
}
|
|
1237
|
+
return {
|
|
1238
|
+
dynamic: false,
|
|
1239
|
+
encoded: numberToHex(value, {
|
|
1240
|
+
size: 32,
|
|
1241
|
+
signed
|
|
1242
|
+
})
|
|
1243
|
+
};
|
|
1244
|
+
}
|
|
1245
|
+
function encodeString(value) {
|
|
1246
|
+
const hexValue = stringToHex(value);
|
|
1247
|
+
const partsLength = Math.ceil(size(hexValue) / 32);
|
|
1248
|
+
const parts = [];
|
|
1249
|
+
for (let i = 0; i < partsLength; i++) {
|
|
1250
|
+
parts.push(padHex(slice(hexValue, i * 32, (i + 1) * 32), {
|
|
1251
|
+
dir: "right"
|
|
1252
|
+
}));
|
|
1253
|
+
}
|
|
1254
|
+
return {
|
|
1255
|
+
dynamic: true,
|
|
1256
|
+
encoded: concatHex([
|
|
1257
|
+
padHex(numberToHex(size(hexValue), { size: 32 })),
|
|
1258
|
+
...parts
|
|
1259
|
+
])
|
|
1260
|
+
};
|
|
1261
|
+
}
|
|
1262
|
+
function encodeTuple(value, { param }) {
|
|
1263
|
+
let dynamic = false;
|
|
1264
|
+
const preparedParams = [];
|
|
1265
|
+
for (let i = 0; i < param.components.length; i++) {
|
|
1266
|
+
const param_ = param.components[i];
|
|
1267
|
+
const index = Array.isArray(value) ? i : param_.name;
|
|
1268
|
+
const preparedParam = prepareParam({
|
|
1269
|
+
param: param_,
|
|
1270
|
+
value: value[index]
|
|
1271
|
+
});
|
|
1272
|
+
preparedParams.push(preparedParam);
|
|
1273
|
+
if (preparedParam.dynamic)
|
|
1274
|
+
dynamic = true;
|
|
1275
|
+
}
|
|
1276
|
+
return {
|
|
1277
|
+
dynamic,
|
|
1278
|
+
encoded: dynamic ? encodeParams(preparedParams) : concatHex(preparedParams.map(({ encoded }) => encoded))
|
|
1279
|
+
};
|
|
1280
|
+
}
|
|
1281
|
+
function getArrayComponents(type) {
|
|
1282
|
+
const matches = type.match(/^(.*)\[(\d+)?\]$/);
|
|
1283
|
+
return matches ? (
|
|
1284
|
+
// Return `null` if the array is dynamic.
|
|
1285
|
+
[matches[2] ? Number(matches[2]) : null, matches[1]]
|
|
1286
|
+
) : void 0;
|
|
1287
|
+
}
|
|
1288
|
+
function isDynamicType(param) {
|
|
1289
|
+
const { type } = param;
|
|
1290
|
+
if (type === "string")
|
|
1291
|
+
return true;
|
|
1292
|
+
if (type === "bytes")
|
|
1293
|
+
return true;
|
|
1294
|
+
if (type.endsWith("[]"))
|
|
1295
|
+
return true;
|
|
1296
|
+
if (type === "tuple")
|
|
1297
|
+
return param.components.some(isDynamicType);
|
|
1298
|
+
const arrayComponents = getArrayComponents(type);
|
|
1299
|
+
if (arrayComponents)
|
|
1300
|
+
return isDynamicType({ ...param, type: arrayComponents[1] });
|
|
1301
|
+
return false;
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/stringify.js
|
|
1305
|
+
var stringify = (value, replacer, space) => JSON.stringify(value, (key, value_) => {
|
|
1306
|
+
const value2 = typeof value_ === "bigint" ? value_.toString() : value_;
|
|
1307
|
+
return typeof replacer === "function" ? replacer(key, value2) : value2;
|
|
1308
|
+
}, space);
|
|
1309
|
+
|
|
1310
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/constants/unit.js
|
|
1311
|
+
var etherUnits = {
|
|
1312
|
+
gwei: 9,
|
|
1313
|
+
wei: 18
|
|
1314
|
+
};
|
|
1315
|
+
var gweiUnits = {
|
|
1316
|
+
ether: -9,
|
|
1317
|
+
wei: 9
|
|
1318
|
+
};
|
|
1319
|
+
|
|
1320
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/unit/formatUnits.js
|
|
1321
|
+
function formatUnits(value, decimals) {
|
|
1322
|
+
let display = value.toString();
|
|
1323
|
+
const negative = display.startsWith("-");
|
|
1324
|
+
if (negative)
|
|
1325
|
+
display = display.slice(1);
|
|
1326
|
+
display = display.padStart(decimals, "0");
|
|
1327
|
+
let [integer, fraction] = [
|
|
1328
|
+
display.slice(0, display.length - decimals),
|
|
1329
|
+
display.slice(display.length - decimals)
|
|
1330
|
+
];
|
|
1331
|
+
fraction = fraction.replace(/(0+)$/, "");
|
|
1332
|
+
return `${negative ? "-" : ""}${integer || "0"}${fraction ? `.${fraction}` : ""}`;
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/unit/formatEther.js
|
|
1336
|
+
function formatEther(wei, unit = "wei") {
|
|
1337
|
+
return formatUnits(wei, etherUnits[unit]);
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/unit/formatGwei.js
|
|
1341
|
+
function formatGwei(wei, unit = "wei") {
|
|
1342
|
+
return formatUnits(wei, gweiUnits[unit]);
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/errors/transaction.js
|
|
1346
|
+
function prettyPrint(args) {
|
|
1347
|
+
const entries = Object.entries(args).map(([key, value]) => {
|
|
1348
|
+
if (value === void 0 || value === false)
|
|
1349
|
+
return null;
|
|
1350
|
+
return [key, value];
|
|
1351
|
+
}).filter(Boolean);
|
|
1352
|
+
const maxLength = entries.reduce((acc, [key]) => Math.max(acc, key.length), 0);
|
|
1353
|
+
return entries.map(([key, value]) => ` ${`${key}:`.padEnd(maxLength + 1)} ${value}`).join("\n");
|
|
1354
|
+
}
|
|
1355
|
+
var InvalidLegacyVError = class extends BaseError {
|
|
1356
|
+
constructor({ v }) {
|
|
1357
|
+
super(`Invalid \`v\` value "${v}". Expected 27 or 28.`, {
|
|
1358
|
+
name: "InvalidLegacyVError"
|
|
1359
|
+
});
|
|
1360
|
+
}
|
|
1361
|
+
};
|
|
1362
|
+
var InvalidSerializableTransactionError = class extends BaseError {
|
|
1363
|
+
constructor({ transaction }) {
|
|
1364
|
+
super("Cannot infer a transaction type from provided transaction.", {
|
|
1365
|
+
metaMessages: [
|
|
1366
|
+
"Provided Transaction:",
|
|
1367
|
+
"{",
|
|
1368
|
+
prettyPrint(transaction),
|
|
1369
|
+
"}",
|
|
1370
|
+
"",
|
|
1371
|
+
"To infer the type, either provide:",
|
|
1372
|
+
"- a `type` to the Transaction, or",
|
|
1373
|
+
"- an EIP-1559 Transaction with `maxFeePerGas`, or",
|
|
1374
|
+
"- an EIP-2930 Transaction with `gasPrice` & `accessList`, or",
|
|
1375
|
+
"- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or",
|
|
1376
|
+
"- an EIP-7702 Transaction with `authorizationList`, or",
|
|
1377
|
+
"- a Legacy Transaction with `gasPrice`"
|
|
1378
|
+
],
|
|
1379
|
+
name: "InvalidSerializableTransactionError"
|
|
1380
|
+
});
|
|
1381
|
+
}
|
|
1382
|
+
};
|
|
1383
|
+
var InvalidStorageKeySizeError = class extends BaseError {
|
|
1384
|
+
constructor({ storageKey }) {
|
|
1385
|
+
super(`Size for storage key "${storageKey}" is invalid. Expected 32 bytes. Got ${Math.floor((storageKey.length - 2) / 2)} bytes.`, { name: "InvalidStorageKeySizeError" });
|
|
1386
|
+
}
|
|
1387
|
+
};
|
|
1388
|
+
var TransactionExecutionError = class extends BaseError {
|
|
1389
|
+
constructor(cause, { account, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value }) {
|
|
1390
|
+
const prettyArgs = prettyPrint({
|
|
1391
|
+
chain: chain && `${chain?.name} (id: ${chain?.id})`,
|
|
1392
|
+
from: account?.address,
|
|
1393
|
+
to,
|
|
1394
|
+
value: typeof value !== "undefined" && `${formatEther(value)} ${chain?.nativeCurrency?.symbol || "ETH"}`,
|
|
1395
|
+
data,
|
|
1396
|
+
gas,
|
|
1397
|
+
gasPrice: typeof gasPrice !== "undefined" && `${formatGwei(gasPrice)} gwei`,
|
|
1398
|
+
maxFeePerGas: typeof maxFeePerGas !== "undefined" && `${formatGwei(maxFeePerGas)} gwei`,
|
|
1399
|
+
maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== "undefined" && `${formatGwei(maxPriorityFeePerGas)} gwei`,
|
|
1400
|
+
nonce
|
|
1401
|
+
});
|
|
1402
|
+
super(cause.shortMessage, {
|
|
1403
|
+
cause,
|
|
1404
|
+
docsPath,
|
|
1405
|
+
metaMessages: [
|
|
1406
|
+
...cause.metaMessages ? [...cause.metaMessages, " "] : [],
|
|
1407
|
+
"Request Arguments:",
|
|
1408
|
+
prettyArgs
|
|
1409
|
+
].filter(Boolean),
|
|
1410
|
+
name: "TransactionExecutionError"
|
|
1411
|
+
});
|
|
1412
|
+
Object.defineProperty(this, "cause", {
|
|
1413
|
+
enumerable: true,
|
|
1414
|
+
configurable: true,
|
|
1415
|
+
writable: true,
|
|
1416
|
+
value: void 0
|
|
1417
|
+
});
|
|
1418
|
+
this.cause = cause;
|
|
1419
|
+
}
|
|
1420
|
+
};
|
|
1421
|
+
var TransactionNotFoundError = class extends BaseError {
|
|
1422
|
+
constructor({ blockHash, blockNumber, blockTag, hash, index }) {
|
|
1423
|
+
let identifier = "Transaction";
|
|
1424
|
+
if (blockTag && index !== void 0)
|
|
1425
|
+
identifier = `Transaction at block time "${blockTag}" at index "${index}"`;
|
|
1426
|
+
if (blockHash && index !== void 0)
|
|
1427
|
+
identifier = `Transaction at block hash "${blockHash}" at index "${index}"`;
|
|
1428
|
+
if (blockNumber && index !== void 0)
|
|
1429
|
+
identifier = `Transaction at block number "${blockNumber}" at index "${index}"`;
|
|
1430
|
+
if (hash)
|
|
1431
|
+
identifier = `Transaction with hash "${hash}"`;
|
|
1432
|
+
super(`${identifier} could not be found.`, {
|
|
1433
|
+
name: "TransactionNotFoundError"
|
|
1434
|
+
});
|
|
1435
|
+
}
|
|
1436
|
+
};
|
|
1437
|
+
var TransactionReceiptNotFoundError = class extends BaseError {
|
|
1438
|
+
constructor({ hash }) {
|
|
1439
|
+
super(`Transaction receipt with hash "${hash}" could not be found. The Transaction may not be processed on a block yet.`, {
|
|
1440
|
+
name: "TransactionReceiptNotFoundError"
|
|
1441
|
+
});
|
|
1442
|
+
}
|
|
1443
|
+
};
|
|
1444
|
+
var TransactionReceiptRevertedError = class extends BaseError {
|
|
1445
|
+
constructor({ receipt }) {
|
|
1446
|
+
super(`Transaction with hash "${receipt.transactionHash}" reverted.`, {
|
|
1447
|
+
metaMessages: [
|
|
1448
|
+
'The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.',
|
|
1449
|
+
" ",
|
|
1450
|
+
"You can attempt to extract the revert reason by:",
|
|
1451
|
+
"- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract",
|
|
1452
|
+
"- using the `call` Action with raw `data`"
|
|
1453
|
+
],
|
|
1454
|
+
name: "TransactionReceiptRevertedError"
|
|
1455
|
+
});
|
|
1456
|
+
Object.defineProperty(this, "receipt", {
|
|
1457
|
+
enumerable: true,
|
|
1458
|
+
configurable: true,
|
|
1459
|
+
writable: true,
|
|
1460
|
+
value: void 0
|
|
1461
|
+
});
|
|
1462
|
+
this.receipt = receipt;
|
|
1463
|
+
}
|
|
1464
|
+
};
|
|
1465
|
+
var WaitForTransactionReceiptTimeoutError = class extends BaseError {
|
|
1466
|
+
constructor({ hash }) {
|
|
1467
|
+
super(`Timed out while waiting for transaction with hash "${hash}" to be confirmed.`, { name: "WaitForTransactionReceiptTimeoutError" });
|
|
1468
|
+
}
|
|
1469
|
+
};
|
|
1470
|
+
|
|
1471
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/constants/number.js
|
|
1472
|
+
var maxInt8 = 2n ** (8n - 1n) - 1n;
|
|
1473
|
+
var maxInt16 = 2n ** (16n - 1n) - 1n;
|
|
1474
|
+
var maxInt24 = 2n ** (24n - 1n) - 1n;
|
|
1475
|
+
var maxInt32 = 2n ** (32n - 1n) - 1n;
|
|
1476
|
+
var maxInt40 = 2n ** (40n - 1n) - 1n;
|
|
1477
|
+
var maxInt48 = 2n ** (48n - 1n) - 1n;
|
|
1478
|
+
var maxInt56 = 2n ** (56n - 1n) - 1n;
|
|
1479
|
+
var maxInt64 = 2n ** (64n - 1n) - 1n;
|
|
1480
|
+
var maxInt72 = 2n ** (72n - 1n) - 1n;
|
|
1481
|
+
var maxInt80 = 2n ** (80n - 1n) - 1n;
|
|
1482
|
+
var maxInt88 = 2n ** (88n - 1n) - 1n;
|
|
1483
|
+
var maxInt96 = 2n ** (96n - 1n) - 1n;
|
|
1484
|
+
var maxInt104 = 2n ** (104n - 1n) - 1n;
|
|
1485
|
+
var maxInt112 = 2n ** (112n - 1n) - 1n;
|
|
1486
|
+
var maxInt120 = 2n ** (120n - 1n) - 1n;
|
|
1487
|
+
var maxInt128 = 2n ** (128n - 1n) - 1n;
|
|
1488
|
+
var maxInt136 = 2n ** (136n - 1n) - 1n;
|
|
1489
|
+
var maxInt144 = 2n ** (144n - 1n) - 1n;
|
|
1490
|
+
var maxInt152 = 2n ** (152n - 1n) - 1n;
|
|
1491
|
+
var maxInt160 = 2n ** (160n - 1n) - 1n;
|
|
1492
|
+
var maxInt168 = 2n ** (168n - 1n) - 1n;
|
|
1493
|
+
var maxInt176 = 2n ** (176n - 1n) - 1n;
|
|
1494
|
+
var maxInt184 = 2n ** (184n - 1n) - 1n;
|
|
1495
|
+
var maxInt192 = 2n ** (192n - 1n) - 1n;
|
|
1496
|
+
var maxInt200 = 2n ** (200n - 1n) - 1n;
|
|
1497
|
+
var maxInt208 = 2n ** (208n - 1n) - 1n;
|
|
1498
|
+
var maxInt216 = 2n ** (216n - 1n) - 1n;
|
|
1499
|
+
var maxInt224 = 2n ** (224n - 1n) - 1n;
|
|
1500
|
+
var maxInt232 = 2n ** (232n - 1n) - 1n;
|
|
1501
|
+
var maxInt240 = 2n ** (240n - 1n) - 1n;
|
|
1502
|
+
var maxInt248 = 2n ** (248n - 1n) - 1n;
|
|
1503
|
+
var maxInt256 = 2n ** (256n - 1n) - 1n;
|
|
1504
|
+
var minInt8 = -(2n ** (8n - 1n));
|
|
1505
|
+
var minInt16 = -(2n ** (16n - 1n));
|
|
1506
|
+
var minInt24 = -(2n ** (24n - 1n));
|
|
1507
|
+
var minInt32 = -(2n ** (32n - 1n));
|
|
1508
|
+
var minInt40 = -(2n ** (40n - 1n));
|
|
1509
|
+
var minInt48 = -(2n ** (48n - 1n));
|
|
1510
|
+
var minInt56 = -(2n ** (56n - 1n));
|
|
1511
|
+
var minInt64 = -(2n ** (64n - 1n));
|
|
1512
|
+
var minInt72 = -(2n ** (72n - 1n));
|
|
1513
|
+
var minInt80 = -(2n ** (80n - 1n));
|
|
1514
|
+
var minInt88 = -(2n ** (88n - 1n));
|
|
1515
|
+
var minInt96 = -(2n ** (96n - 1n));
|
|
1516
|
+
var minInt104 = -(2n ** (104n - 1n));
|
|
1517
|
+
var minInt112 = -(2n ** (112n - 1n));
|
|
1518
|
+
var minInt120 = -(2n ** (120n - 1n));
|
|
1519
|
+
var minInt128 = -(2n ** (128n - 1n));
|
|
1520
|
+
var minInt136 = -(2n ** (136n - 1n));
|
|
1521
|
+
var minInt144 = -(2n ** (144n - 1n));
|
|
1522
|
+
var minInt152 = -(2n ** (152n - 1n));
|
|
1523
|
+
var minInt160 = -(2n ** (160n - 1n));
|
|
1524
|
+
var minInt168 = -(2n ** (168n - 1n));
|
|
1525
|
+
var minInt176 = -(2n ** (176n - 1n));
|
|
1526
|
+
var minInt184 = -(2n ** (184n - 1n));
|
|
1527
|
+
var minInt192 = -(2n ** (192n - 1n));
|
|
1528
|
+
var minInt200 = -(2n ** (200n - 1n));
|
|
1529
|
+
var minInt208 = -(2n ** (208n - 1n));
|
|
1530
|
+
var minInt216 = -(2n ** (216n - 1n));
|
|
1531
|
+
var minInt224 = -(2n ** (224n - 1n));
|
|
1532
|
+
var minInt232 = -(2n ** (232n - 1n));
|
|
1533
|
+
var minInt240 = -(2n ** (240n - 1n));
|
|
1534
|
+
var minInt248 = -(2n ** (248n - 1n));
|
|
1535
|
+
var minInt256 = -(2n ** (256n - 1n));
|
|
1536
|
+
var maxUint8 = 2n ** 8n - 1n;
|
|
1537
|
+
var maxUint16 = 2n ** 16n - 1n;
|
|
1538
|
+
var maxUint24 = 2n ** 24n - 1n;
|
|
1539
|
+
var maxUint32 = 2n ** 32n - 1n;
|
|
1540
|
+
var maxUint40 = 2n ** 40n - 1n;
|
|
1541
|
+
var maxUint48 = 2n ** 48n - 1n;
|
|
1542
|
+
var maxUint56 = 2n ** 56n - 1n;
|
|
1543
|
+
var maxUint64 = 2n ** 64n - 1n;
|
|
1544
|
+
var maxUint72 = 2n ** 72n - 1n;
|
|
1545
|
+
var maxUint80 = 2n ** 80n - 1n;
|
|
1546
|
+
var maxUint88 = 2n ** 88n - 1n;
|
|
1547
|
+
var maxUint96 = 2n ** 96n - 1n;
|
|
1548
|
+
var maxUint104 = 2n ** 104n - 1n;
|
|
1549
|
+
var maxUint112 = 2n ** 112n - 1n;
|
|
1550
|
+
var maxUint120 = 2n ** 120n - 1n;
|
|
1551
|
+
var maxUint128 = 2n ** 128n - 1n;
|
|
1552
|
+
var maxUint136 = 2n ** 136n - 1n;
|
|
1553
|
+
var maxUint144 = 2n ** 144n - 1n;
|
|
1554
|
+
var maxUint152 = 2n ** 152n - 1n;
|
|
1555
|
+
var maxUint160 = 2n ** 160n - 1n;
|
|
1556
|
+
var maxUint168 = 2n ** 168n - 1n;
|
|
1557
|
+
var maxUint176 = 2n ** 176n - 1n;
|
|
1558
|
+
var maxUint184 = 2n ** 184n - 1n;
|
|
1559
|
+
var maxUint192 = 2n ** 192n - 1n;
|
|
1560
|
+
var maxUint200 = 2n ** 200n - 1n;
|
|
1561
|
+
var maxUint208 = 2n ** 208n - 1n;
|
|
1562
|
+
var maxUint216 = 2n ** 216n - 1n;
|
|
1563
|
+
var maxUint224 = 2n ** 224n - 1n;
|
|
1564
|
+
var maxUint232 = 2n ** 232n - 1n;
|
|
1565
|
+
var maxUint240 = 2n ** 240n - 1n;
|
|
1566
|
+
var maxUint248 = 2n ** 248n - 1n;
|
|
1567
|
+
var maxUint256 = 2n ** 256n - 1n;
|
|
1568
|
+
|
|
1569
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/errors/chain.js
|
|
1570
|
+
var ChainDoesNotSupportContract = class extends BaseError {
|
|
1571
|
+
constructor({ blockNumber, chain, contract }) {
|
|
1572
|
+
super(`Chain "${chain.name}" does not support contract "${contract.name}".`, {
|
|
1573
|
+
metaMessages: [
|
|
1574
|
+
"This could be due to any of the following:",
|
|
1575
|
+
...blockNumber && contract.blockCreated && contract.blockCreated > blockNumber ? [
|
|
1576
|
+
`- The contract "${contract.name}" was not deployed until block ${contract.blockCreated} (current block ${blockNumber}).`
|
|
1577
|
+
] : [
|
|
1578
|
+
`- The chain does not have the contract "${contract.name}" configured.`
|
|
1579
|
+
]
|
|
1580
|
+
],
|
|
1581
|
+
name: "ChainDoesNotSupportContract"
|
|
1582
|
+
});
|
|
1583
|
+
}
|
|
1584
|
+
};
|
|
1585
|
+
var ClientChainNotConfiguredError = class extends BaseError {
|
|
1586
|
+
constructor() {
|
|
1587
|
+
super("No chain was provided to the Client.", {
|
|
1588
|
+
name: "ClientChainNotConfiguredError"
|
|
1589
|
+
});
|
|
1590
|
+
}
|
|
1591
|
+
};
|
|
1592
|
+
var InvalidChainIdError = class extends BaseError {
|
|
1593
|
+
constructor({ chainId }) {
|
|
1594
|
+
super(typeof chainId === "number" ? `Chain ID "${chainId}" is invalid.` : "Chain ID is invalid.", { name: "InvalidChainIdError" });
|
|
1595
|
+
}
|
|
1596
|
+
};
|
|
1597
|
+
|
|
1598
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/errors/node.js
|
|
1599
|
+
var ExecutionRevertedError = class extends BaseError {
|
|
1600
|
+
constructor({ cause, message } = {}) {
|
|
1601
|
+
const reason = message?.replace("execution reverted: ", "")?.replace("execution reverted", "");
|
|
1602
|
+
super(`Execution reverted ${reason ? `with reason: ${reason}` : "for an unknown reason"}.`, {
|
|
1603
|
+
cause,
|
|
1604
|
+
name: "ExecutionRevertedError"
|
|
1605
|
+
});
|
|
1606
|
+
}
|
|
1607
|
+
};
|
|
1608
|
+
Object.defineProperty(ExecutionRevertedError, "code", {
|
|
1609
|
+
enumerable: true,
|
|
1610
|
+
configurable: true,
|
|
1611
|
+
writable: true,
|
|
1612
|
+
value: 3
|
|
1613
|
+
});
|
|
1614
|
+
Object.defineProperty(ExecutionRevertedError, "nodeMessage", {
|
|
1615
|
+
enumerable: true,
|
|
1616
|
+
configurable: true,
|
|
1617
|
+
writable: true,
|
|
1618
|
+
value: /execution reverted|gas required exceeds allowance/
|
|
1619
|
+
});
|
|
1620
|
+
var FeeCapTooHighError = class extends BaseError {
|
|
1621
|
+
constructor({ cause, maxFeePerGas } = {}) {
|
|
1622
|
+
super(`The fee cap (\`maxFeePerGas\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ""}) cannot be higher than the maximum allowed value (2^256-1).`, {
|
|
1623
|
+
cause,
|
|
1624
|
+
name: "FeeCapTooHighError"
|
|
1625
|
+
});
|
|
1626
|
+
}
|
|
1627
|
+
};
|
|
1628
|
+
Object.defineProperty(FeeCapTooHighError, "nodeMessage", {
|
|
1629
|
+
enumerable: true,
|
|
1630
|
+
configurable: true,
|
|
1631
|
+
writable: true,
|
|
1632
|
+
value: /max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/
|
|
1633
|
+
});
|
|
1634
|
+
var FeeCapTooLowError = class extends BaseError {
|
|
1635
|
+
constructor({ cause, maxFeePerGas } = {}) {
|
|
1636
|
+
super(`The fee cap (\`maxFeePerGas\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)}` : ""} gwei) cannot be lower than the block base fee.`, {
|
|
1637
|
+
cause,
|
|
1638
|
+
name: "FeeCapTooLowError"
|
|
1639
|
+
});
|
|
1640
|
+
}
|
|
1641
|
+
};
|
|
1642
|
+
Object.defineProperty(FeeCapTooLowError, "nodeMessage", {
|
|
1643
|
+
enumerable: true,
|
|
1644
|
+
configurable: true,
|
|
1645
|
+
writable: true,
|
|
1646
|
+
value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/
|
|
1647
|
+
});
|
|
1648
|
+
var NonceTooHighError = class extends BaseError {
|
|
1649
|
+
constructor({ cause, nonce } = {}) {
|
|
1650
|
+
super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ""}is higher than the next one expected.`, { cause, name: "NonceTooHighError" });
|
|
1651
|
+
}
|
|
1652
|
+
};
|
|
1653
|
+
Object.defineProperty(NonceTooHighError, "nodeMessage", {
|
|
1654
|
+
enumerable: true,
|
|
1655
|
+
configurable: true,
|
|
1656
|
+
writable: true,
|
|
1657
|
+
value: /nonce too high/
|
|
1658
|
+
});
|
|
1659
|
+
var NonceTooLowError = class extends BaseError {
|
|
1660
|
+
constructor({ cause, nonce } = {}) {
|
|
1661
|
+
super([
|
|
1662
|
+
`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ""}is lower than the current nonce of the account.`,
|
|
1663
|
+
"Try increasing the nonce or find the latest nonce with `getTransactionCount`."
|
|
1664
|
+
].join("\n"), { cause, name: "NonceTooLowError" });
|
|
1665
|
+
}
|
|
1666
|
+
};
|
|
1667
|
+
Object.defineProperty(NonceTooLowError, "nodeMessage", {
|
|
1668
|
+
enumerable: true,
|
|
1669
|
+
configurable: true,
|
|
1670
|
+
writable: true,
|
|
1671
|
+
value: /nonce too low|transaction already imported|already known/
|
|
1672
|
+
});
|
|
1673
|
+
var NonceMaxValueError = class extends BaseError {
|
|
1674
|
+
constructor({ cause, nonce } = {}) {
|
|
1675
|
+
super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ""}exceeds the maximum allowed nonce.`, { cause, name: "NonceMaxValueError" });
|
|
1676
|
+
}
|
|
1677
|
+
};
|
|
1678
|
+
Object.defineProperty(NonceMaxValueError, "nodeMessage", {
|
|
1679
|
+
enumerable: true,
|
|
1680
|
+
configurable: true,
|
|
1681
|
+
writable: true,
|
|
1682
|
+
value: /nonce has max value/
|
|
1683
|
+
});
|
|
1684
|
+
var InsufficientFundsError = class extends BaseError {
|
|
1685
|
+
constructor({ cause } = {}) {
|
|
1686
|
+
super([
|
|
1687
|
+
"The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."
|
|
1688
|
+
].join("\n"), {
|
|
1689
|
+
cause,
|
|
1690
|
+
metaMessages: [
|
|
1691
|
+
"This error could arise when the account does not have enough funds to:",
|
|
1692
|
+
" - pay for the total gas fee,",
|
|
1693
|
+
" - pay for the value to send.",
|
|
1694
|
+
" ",
|
|
1695
|
+
"The cost of the transaction is calculated as `gas * gas fee + value`, where:",
|
|
1696
|
+
" - `gas` is the amount of gas needed for transaction to execute,",
|
|
1697
|
+
" - `gas fee` is the gas fee,",
|
|
1698
|
+
" - `value` is the amount of ether to send to the recipient."
|
|
1699
|
+
],
|
|
1700
|
+
name: "InsufficientFundsError"
|
|
1701
|
+
});
|
|
1702
|
+
}
|
|
1703
|
+
};
|
|
1704
|
+
Object.defineProperty(InsufficientFundsError, "nodeMessage", {
|
|
1705
|
+
enumerable: true,
|
|
1706
|
+
configurable: true,
|
|
1707
|
+
writable: true,
|
|
1708
|
+
value: /insufficient funds|exceeds transaction sender account balance/
|
|
1709
|
+
});
|
|
1710
|
+
var IntrinsicGasTooHighError = class extends BaseError {
|
|
1711
|
+
constructor({ cause, gas } = {}) {
|
|
1712
|
+
super(`The amount of gas ${gas ? `(${gas}) ` : ""}provided for the transaction exceeds the limit allowed for the block.`, {
|
|
1713
|
+
cause,
|
|
1714
|
+
name: "IntrinsicGasTooHighError"
|
|
1715
|
+
});
|
|
1716
|
+
}
|
|
1717
|
+
};
|
|
1718
|
+
Object.defineProperty(IntrinsicGasTooHighError, "nodeMessage", {
|
|
1719
|
+
enumerable: true,
|
|
1720
|
+
configurable: true,
|
|
1721
|
+
writable: true,
|
|
1722
|
+
value: /intrinsic gas too high|gas limit reached/
|
|
1723
|
+
});
|
|
1724
|
+
var IntrinsicGasTooLowError = class extends BaseError {
|
|
1725
|
+
constructor({ cause, gas } = {}) {
|
|
1726
|
+
super(`The amount of gas ${gas ? `(${gas}) ` : ""}provided for the transaction is too low.`, {
|
|
1727
|
+
cause,
|
|
1728
|
+
name: "IntrinsicGasTooLowError"
|
|
1729
|
+
});
|
|
1730
|
+
}
|
|
1731
|
+
};
|
|
1732
|
+
Object.defineProperty(IntrinsicGasTooLowError, "nodeMessage", {
|
|
1733
|
+
enumerable: true,
|
|
1734
|
+
configurable: true,
|
|
1735
|
+
writable: true,
|
|
1736
|
+
value: /intrinsic gas too low/
|
|
1737
|
+
});
|
|
1738
|
+
var TransactionTypeNotSupportedError = class extends BaseError {
|
|
1739
|
+
constructor({ cause }) {
|
|
1740
|
+
super("The transaction type is not supported for this chain.", {
|
|
1741
|
+
cause,
|
|
1742
|
+
name: "TransactionTypeNotSupportedError"
|
|
1743
|
+
});
|
|
1744
|
+
}
|
|
1745
|
+
};
|
|
1746
|
+
Object.defineProperty(TransactionTypeNotSupportedError, "nodeMessage", {
|
|
1747
|
+
enumerable: true,
|
|
1748
|
+
configurable: true,
|
|
1749
|
+
writable: true,
|
|
1750
|
+
value: /transaction type not valid/
|
|
1751
|
+
});
|
|
1752
|
+
var TipAboveFeeCapError = class extends BaseError {
|
|
1753
|
+
constructor({ cause, maxPriorityFeePerGas, maxFeePerGas } = {}) {
|
|
1754
|
+
super([
|
|
1755
|
+
`The provided tip (\`maxPriorityFeePerGas\`${maxPriorityFeePerGas ? ` = ${formatGwei(maxPriorityFeePerGas)} gwei` : ""}) cannot be higher than the fee cap (\`maxFeePerGas\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ""}).`
|
|
1756
|
+
].join("\n"), {
|
|
1757
|
+
cause,
|
|
1758
|
+
name: "TipAboveFeeCapError"
|
|
1759
|
+
});
|
|
1760
|
+
}
|
|
1761
|
+
};
|
|
1762
|
+
Object.defineProperty(TipAboveFeeCapError, "nodeMessage", {
|
|
1763
|
+
enumerable: true,
|
|
1764
|
+
configurable: true,
|
|
1765
|
+
writable: true,
|
|
1766
|
+
value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/
|
|
1767
|
+
});
|
|
1768
|
+
var UnknownNodeError = class extends BaseError {
|
|
1769
|
+
constructor({ cause }) {
|
|
1770
|
+
super(`An error occurred while executing: ${cause?.shortMessage}`, {
|
|
1771
|
+
cause,
|
|
1772
|
+
name: "UnknownNodeError"
|
|
1773
|
+
});
|
|
1774
|
+
}
|
|
1775
|
+
};
|
|
1776
|
+
|
|
1777
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/accounts/utils/parseAccount.js
|
|
1778
|
+
function parseAccount(account) {
|
|
1779
|
+
if (typeof account === "string")
|
|
1780
|
+
return { address: account, type: "json-rpc" };
|
|
1781
|
+
return account;
|
|
1782
|
+
}
|
|
1783
|
+
|
|
1784
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/errors/cursor.js
|
|
1785
|
+
var NegativeOffsetError = class extends BaseError {
|
|
1786
|
+
constructor({ offset }) {
|
|
1787
|
+
super(`Offset \`${offset}\` cannot be negative.`, {
|
|
1788
|
+
name: "NegativeOffsetError"
|
|
1789
|
+
});
|
|
1790
|
+
}
|
|
1791
|
+
};
|
|
1792
|
+
var PositionOutOfBoundsError = class extends BaseError {
|
|
1793
|
+
constructor({ length, position }) {
|
|
1794
|
+
super(`Position \`${position}\` is out of bounds (\`0 < position < ${length}\`).`, { name: "PositionOutOfBoundsError" });
|
|
1795
|
+
}
|
|
1796
|
+
};
|
|
1797
|
+
var RecursiveReadLimitExceededError = class extends BaseError {
|
|
1798
|
+
constructor({ count, limit }) {
|
|
1799
|
+
super(`Recursive read limit of \`${limit}\` exceeded (recursive read count: \`${count}\`).`, { name: "RecursiveReadLimitExceededError" });
|
|
1800
|
+
}
|
|
1801
|
+
};
|
|
1802
|
+
|
|
1803
|
+
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/cursor.js
|
|
1804
|
+
var staticCursor = {
|
|
1805
|
+
bytes: new Uint8Array(),
|
|
1806
|
+
dataView: new DataView(new ArrayBuffer(0)),
|
|
1807
|
+
position: 0,
|
|
1808
|
+
positionReadCount: /* @__PURE__ */ new Map(),
|
|
1809
|
+
recursiveReadCount: 0,
|
|
1810
|
+
recursiveReadLimit: Number.POSITIVE_INFINITY,
|
|
1811
|
+
assertReadLimit() {
|
|
1812
|
+
if (this.recursiveReadCount >= this.recursiveReadLimit)
|
|
1813
|
+
throw new RecursiveReadLimitExceededError({
|
|
1814
|
+
count: this.recursiveReadCount + 1,
|
|
1815
|
+
limit: this.recursiveReadLimit
|
|
1816
|
+
});
|
|
1817
|
+
},
|
|
1818
|
+
assertPosition(position) {
|
|
1819
|
+
if (position < 0 || position > this.bytes.length - 1)
|
|
1820
|
+
throw new PositionOutOfBoundsError({
|
|
1821
|
+
length: this.bytes.length,
|
|
1822
|
+
position
|
|
1823
|
+
});
|
|
1824
|
+
},
|
|
1825
|
+
decrementPosition(offset) {
|
|
1826
|
+
if (offset < 0)
|
|
1827
|
+
throw new NegativeOffsetError({ offset });
|
|
1828
|
+
const position = this.position - offset;
|
|
1829
|
+
this.assertPosition(position);
|
|
1830
|
+
this.position = position;
|
|
1831
|
+
},
|
|
1832
|
+
getReadCount(position) {
|
|
1833
|
+
return this.positionReadCount.get(position || this.position) || 0;
|
|
1834
|
+
},
|
|
1835
|
+
incrementPosition(offset) {
|
|
1836
|
+
if (offset < 0)
|
|
1837
|
+
throw new NegativeOffsetError({ offset });
|
|
1838
|
+
const position = this.position + offset;
|
|
1839
|
+
this.assertPosition(position);
|
|
1840
|
+
this.position = position;
|
|
1841
|
+
},
|
|
1842
|
+
inspectByte(position_) {
|
|
1843
|
+
const position = position_ ?? this.position;
|
|
1844
|
+
this.assertPosition(position);
|
|
1845
|
+
return this.bytes[position];
|
|
1846
|
+
},
|
|
1847
|
+
inspectBytes(length, position_) {
|
|
1848
|
+
const position = position_ ?? this.position;
|
|
1849
|
+
this.assertPosition(position + length - 1);
|
|
1850
|
+
return this.bytes.subarray(position, position + length);
|
|
1851
|
+
},
|
|
1852
|
+
inspectUint8(position_) {
|
|
1853
|
+
const position = position_ ?? this.position;
|
|
1854
|
+
this.assertPosition(position);
|
|
1855
|
+
return this.bytes[position];
|
|
1856
|
+
},
|
|
1857
|
+
inspectUint16(position_) {
|
|
1858
|
+
const position = position_ ?? this.position;
|
|
1859
|
+
this.assertPosition(position + 1);
|
|
1860
|
+
return this.dataView.getUint16(position);
|
|
1861
|
+
},
|
|
1862
|
+
inspectUint24(position_) {
|
|
1863
|
+
const position = position_ ?? this.position;
|
|
1864
|
+
this.assertPosition(position + 2);
|
|
1865
|
+
return (this.dataView.getUint16(position) << 8) + this.dataView.getUint8(position + 2);
|
|
1866
|
+
},
|
|
1867
|
+
inspectUint32(position_) {
|
|
1868
|
+
const position = position_ ?? this.position;
|
|
1869
|
+
this.assertPosition(position + 3);
|
|
1870
|
+
return this.dataView.getUint32(position);
|
|
1871
|
+
},
|
|
1872
|
+
pushByte(byte) {
|
|
1873
|
+
this.assertPosition(this.position);
|
|
1874
|
+
this.bytes[this.position] = byte;
|
|
1875
|
+
this.position++;
|
|
1876
|
+
},
|
|
1877
|
+
pushBytes(bytes) {
|
|
1878
|
+
this.assertPosition(this.position + bytes.length - 1);
|
|
1879
|
+
this.bytes.set(bytes, this.position);
|
|
1880
|
+
this.position += bytes.length;
|
|
1881
|
+
},
|
|
1882
|
+
pushUint8(value) {
|
|
1883
|
+
this.assertPosition(this.position);
|
|
1884
|
+
this.bytes[this.position] = value;
|
|
1885
|
+
this.position++;
|
|
1886
|
+
},
|
|
1887
|
+
pushUint16(value) {
|
|
1888
|
+
this.assertPosition(this.position + 1);
|
|
1889
|
+
this.dataView.setUint16(this.position, value);
|
|
1890
|
+
this.position += 2;
|
|
1891
|
+
},
|
|
1892
|
+
pushUint24(value) {
|
|
1893
|
+
this.assertPosition(this.position + 2);
|
|
1894
|
+
this.dataView.setUint16(this.position, value >> 8);
|
|
1895
|
+
this.dataView.setUint8(this.position + 2, value & ~4294967040);
|
|
1896
|
+
this.position += 3;
|
|
1897
|
+
},
|
|
1898
|
+
pushUint32(value) {
|
|
1899
|
+
this.assertPosition(this.position + 3);
|
|
1900
|
+
this.dataView.setUint32(this.position, value);
|
|
1901
|
+
this.position += 4;
|
|
1902
|
+
},
|
|
1903
|
+
readByte() {
|
|
1904
|
+
this.assertReadLimit();
|
|
1905
|
+
this._touch();
|
|
1906
|
+
const value = this.inspectByte();
|
|
1907
|
+
this.position++;
|
|
1908
|
+
return value;
|
|
1909
|
+
},
|
|
1910
|
+
readBytes(length, size2) {
|
|
1911
|
+
this.assertReadLimit();
|
|
1912
|
+
this._touch();
|
|
1913
|
+
const value = this.inspectBytes(length);
|
|
1914
|
+
this.position += size2 ?? length;
|
|
1915
|
+
return value;
|
|
1916
|
+
},
|
|
1917
|
+
readUint8() {
|
|
1918
|
+
this.assertReadLimit();
|
|
1919
|
+
this._touch();
|
|
1920
|
+
const value = this.inspectUint8();
|
|
1921
|
+
this.position += 1;
|
|
1922
|
+
return value;
|
|
1923
|
+
},
|
|
1924
|
+
readUint16() {
|
|
1925
|
+
this.assertReadLimit();
|
|
1926
|
+
this._touch();
|
|
1927
|
+
const value = this.inspectUint16();
|
|
1928
|
+
this.position += 2;
|
|
1929
|
+
return value;
|
|
1930
|
+
},
|
|
1931
|
+
readUint24() {
|
|
1932
|
+
this.assertReadLimit();
|
|
1933
|
+
this._touch();
|
|
1934
|
+
const value = this.inspectUint24();
|
|
1935
|
+
this.position += 3;
|
|
1936
|
+
return value;
|
|
1937
|
+
},
|
|
1938
|
+
readUint32() {
|
|
1939
|
+
this.assertReadLimit();
|
|
1940
|
+
this._touch();
|
|
1941
|
+
const value = this.inspectUint32();
|
|
1942
|
+
this.position += 4;
|
|
1943
|
+
return value;
|
|
1944
|
+
},
|
|
1945
|
+
get remaining() {
|
|
1946
|
+
return this.bytes.length - this.position;
|
|
1947
|
+
},
|
|
1948
|
+
setPosition(position) {
|
|
1949
|
+
const oldPosition = this.position;
|
|
1950
|
+
this.assertPosition(position);
|
|
1951
|
+
this.position = position;
|
|
1952
|
+
return () => this.position = oldPosition;
|
|
1953
|
+
},
|
|
1954
|
+
_touch() {
|
|
1955
|
+
if (this.recursiveReadLimit === Number.POSITIVE_INFINITY)
|
|
1956
|
+
return;
|
|
1957
|
+
const count = this.getReadCount();
|
|
1958
|
+
this.positionReadCount.set(this.position, count + 1);
|
|
1959
|
+
if (count > 0)
|
|
1960
|
+
this.recursiveReadCount++;
|
|
1961
|
+
}
|
|
1962
|
+
};
|
|
1963
|
+
function createCursor(bytes, { recursiveReadLimit = 8192 } = {}) {
|
|
1964
|
+
const cursor = Object.create(staticCursor);
|
|
1965
|
+
cursor.bytes = bytes;
|
|
1966
|
+
cursor.dataView = new DataView(bytes.buffer ?? bytes, bytes.byteOffset, bytes.byteLength);
|
|
1967
|
+
cursor.positionReadCount = /* @__PURE__ */ new Map();
|
|
1968
|
+
cursor.recursiveReadLimit = recursiveReadLimit;
|
|
1969
|
+
return cursor;
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
export {
|
|
1973
|
+
BaseError,
|
|
1974
|
+
InvalidBytesBooleanError,
|
|
1975
|
+
InvalidBytesLengthError,
|
|
1976
|
+
isHex,
|
|
1977
|
+
size,
|
|
1978
|
+
trim,
|
|
1979
|
+
toBytes2 as toBytes,
|
|
1980
|
+
hexToBytes,
|
|
1981
|
+
stringToBytes,
|
|
1982
|
+
assertSize,
|
|
1983
|
+
hexToBigInt,
|
|
1984
|
+
hexToBool,
|
|
1985
|
+
hexToNumber,
|
|
1986
|
+
toHex,
|
|
1987
|
+
bytesToHex,
|
|
1988
|
+
numberToHex,
|
|
1989
|
+
stringToHex,
|
|
1990
|
+
LruMap,
|
|
1991
|
+
InvalidAddressError,
|
|
1992
|
+
keccak_256,
|
|
1993
|
+
keccak256,
|
|
1994
|
+
checksumAddress,
|
|
1995
|
+
getAddress,
|
|
1996
|
+
isAddress,
|
|
1997
|
+
concat,
|
|
1998
|
+
concatHex,
|
|
1999
|
+
PositionOutOfBoundsError,
|
|
2000
|
+
createCursor,
|
|
2001
|
+
formatUnits,
|
|
2002
|
+
formatEther,
|
|
2003
|
+
formatGwei,
|
|
2004
|
+
prettyPrint,
|
|
2005
|
+
InvalidLegacyVError,
|
|
2006
|
+
InvalidSerializableTransactionError,
|
|
2007
|
+
InvalidStorageKeySizeError,
|
|
2008
|
+
TransactionExecutionError,
|
|
2009
|
+
TransactionNotFoundError,
|
|
2010
|
+
TransactionReceiptNotFoundError,
|
|
2011
|
+
TransactionReceiptRevertedError,
|
|
2012
|
+
WaitForTransactionReceiptTimeoutError,
|
|
2013
|
+
maxUint256,
|
|
2014
|
+
ChainDoesNotSupportContract,
|
|
2015
|
+
ClientChainNotConfiguredError,
|
|
2016
|
+
InvalidChainIdError,
|
|
2017
|
+
ExecutionRevertedError,
|
|
2018
|
+
FeeCapTooHighError,
|
|
2019
|
+
FeeCapTooLowError,
|
|
2020
|
+
NonceTooHighError,
|
|
2021
|
+
NonceTooLowError,
|
|
2022
|
+
NonceMaxValueError,
|
|
2023
|
+
InsufficientFundsError,
|
|
2024
|
+
IntrinsicGasTooHighError,
|
|
2025
|
+
IntrinsicGasTooLowError,
|
|
2026
|
+
TransactionTypeNotSupportedError,
|
|
2027
|
+
TipAboveFeeCapError,
|
|
2028
|
+
UnknownNodeError,
|
|
2029
|
+
slice,
|
|
2030
|
+
sliceBytes,
|
|
2031
|
+
formatAbiItem,
|
|
2032
|
+
AbiConstructorNotFoundError,
|
|
2033
|
+
AbiConstructorParamsNotFoundError,
|
|
2034
|
+
AbiDecodingDataSizeTooSmallError,
|
|
2035
|
+
AbiDecodingZeroDataError,
|
|
2036
|
+
AbiErrorInputsNotFoundError,
|
|
2037
|
+
AbiErrorNotFoundError,
|
|
2038
|
+
AbiErrorSignatureNotFoundError,
|
|
2039
|
+
AbiEventSignatureEmptyTopicsError,
|
|
2040
|
+
AbiEventSignatureNotFoundError,
|
|
2041
|
+
AbiEventNotFoundError,
|
|
2042
|
+
AbiFunctionNotFoundError,
|
|
2043
|
+
AbiFunctionOutputsNotFoundError,
|
|
2044
|
+
AbiFunctionSignatureNotFoundError,
|
|
2045
|
+
AbiItemAmbiguityError,
|
|
2046
|
+
BytesSizeMismatchError,
|
|
2047
|
+
DecodeLogDataMismatch,
|
|
2048
|
+
DecodeLogTopicsMismatch,
|
|
2049
|
+
InvalidAbiDecodingTypeError,
|
|
2050
|
+
InvalidArrayError,
|
|
2051
|
+
bytesRegex,
|
|
2052
|
+
integerRegex,
|
|
2053
|
+
encodeAbiParameters,
|
|
2054
|
+
getArrayComponents,
|
|
2055
|
+
stringify,
|
|
2056
|
+
parseAccount
|
|
2057
|
+
};
|
|
2058
|
+
//# sourceMappingURL=chunk-F5DZJLU3.js.map
|