@zoralabs/protocol-deployments 0.4.0 → 0.4.2
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/.turbo/turbo-build.log +24 -26
- package/CHANGELOG.md +13 -0
- package/dist/{_esm-MDYU65PS.js → _esm-HGK3TS7P.js} +36 -36
- package/dist/{_esm-MDYU65PS.js.map → _esm-HGK3TS7P.js.map} +1 -1
- package/dist/{ccip-MZCNL5YG.js → ccip-OTD7W43P.js} +2 -3
- package/dist/{chunk-MCOK75CU.js → chunk-ETO2D44V.js} +284 -183
- package/dist/chunk-ETO2D44V.js.map +1 -0
- package/dist/generated/wagmi.d.ts +1997 -0
- package/dist/generated/wagmi.d.ts.map +1 -1
- package/dist/index.cjs +1372 -127
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1219 -5
- package/dist/index.js.map +1 -1
- package/dist/{secp256k1-NJATWSDZ.js → secp256k1-DTX2GS77.js} +592 -432
- package/dist/secp256k1-DTX2GS77.js.map +1 -0
- package/package.json +1 -1
- package/src/generated/wagmi.ts +1235 -0
- package/dist/chunk-FJ2PMLO3.js +0 -132
- package/dist/chunk-FJ2PMLO3.js.map +0 -1
- package/dist/chunk-MCOK75CU.js.map +0 -1
- package/dist/secp256k1-NJATWSDZ.js.map +0 -1
- /package/dist/{ccip-MZCNL5YG.js.map → ccip-OTD7W43P.js.map} +0 -0
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
exists,
|
|
6
|
-
isLE,
|
|
7
|
-
number,
|
|
8
|
-
output,
|
|
9
|
-
toBytes,
|
|
10
|
-
u32,
|
|
11
|
-
wrapConstructor,
|
|
12
|
-
wrapXOFConstructorWithOpts
|
|
13
|
-
} from "./chunk-FJ2PMLO3.js";
|
|
14
|
-
|
|
15
|
-
// ../../node_modules/.pnpm/abitype@1.0.6_typescript@5.5.4_zod@3.23.8/node_modules/abitype/dist/esm/version.js
|
|
16
|
-
var version = "1.0.6";
|
|
17
|
-
|
|
18
|
-
// ../../node_modules/.pnpm/abitype@1.0.6_typescript@5.5.4_zod@3.23.8/node_modules/abitype/dist/esm/errors.js
|
|
1
|
+
// ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/version.js
|
|
2
|
+
var version = "1.0.7";
|
|
3
|
+
|
|
4
|
+
// ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/errors.js
|
|
19
5
|
var BaseError = class _BaseError extends Error {
|
|
20
6
|
constructor(shortMessage, args = {}) {
|
|
21
7
|
const details = args.cause instanceof _BaseError ? args.cause.details : args.cause?.message ? args.cause.message : args.details;
|
|
@@ -68,7 +54,7 @@ var BaseError = class _BaseError extends Error {
|
|
|
68
54
|
}
|
|
69
55
|
};
|
|
70
56
|
|
|
71
|
-
// ../../node_modules/.pnpm/abitype@1.0.
|
|
57
|
+
// ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/regex.js
|
|
72
58
|
function execTyped(regex, string) {
|
|
73
59
|
const match = regex.exec(string);
|
|
74
60
|
return match?.groups;
|
|
@@ -77,7 +63,7 @@ var bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;
|
|
|
77
63
|
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)?$/;
|
|
78
64
|
var isTupleRegex = /^\(.+?\).*?$/;
|
|
79
65
|
|
|
80
|
-
// ../../node_modules/.pnpm/abitype@1.0.
|
|
66
|
+
// ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js
|
|
81
67
|
var tupleRegex = /^tuple(?<array>(\[(\d*)\])*)$/;
|
|
82
68
|
function formatAbiParameter(abiParameter) {
|
|
83
69
|
let type = abiParameter.type;
|
|
@@ -104,7 +90,7 @@ function formatAbiParameter(abiParameter) {
|
|
|
104
90
|
return type;
|
|
105
91
|
}
|
|
106
92
|
|
|
107
|
-
// ../../node_modules/.pnpm/abitype@1.0.
|
|
93
|
+
// ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js
|
|
108
94
|
function formatAbiParameters(abiParameters) {
|
|
109
95
|
let params = "";
|
|
110
96
|
const length = abiParameters.length;
|
|
@@ -117,10 +103,10 @@ function formatAbiParameters(abiParameters) {
|
|
|
117
103
|
return params;
|
|
118
104
|
}
|
|
119
105
|
|
|
120
|
-
// ../../node_modules/.pnpm/abitype@1.0.
|
|
106
|
+
// ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js
|
|
121
107
|
function formatAbiItem(abiItem) {
|
|
122
108
|
if (abiItem.type === "function")
|
|
123
|
-
return `function ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability && abiItem.stateMutability !== "nonpayable" ? ` ${abiItem.stateMutability}` : ""}${abiItem.outputs
|
|
109
|
+
return `function ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability && abiItem.stateMutability !== "nonpayable" ? ` ${abiItem.stateMutability}` : ""}${abiItem.outputs?.length ? ` returns (${formatAbiParameters(abiItem.outputs)})` : ""}`;
|
|
124
110
|
if (abiItem.type === "event")
|
|
125
111
|
return `event ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;
|
|
126
112
|
if (abiItem.type === "error")
|
|
@@ -128,11 +114,11 @@ function formatAbiItem(abiItem) {
|
|
|
128
114
|
if (abiItem.type === "constructor")
|
|
129
115
|
return `constructor(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability === "payable" ? " payable" : ""}`;
|
|
130
116
|
if (abiItem.type === "fallback")
|
|
131
|
-
return
|
|
117
|
+
return `fallback() external${abiItem.stateMutability === "payable" ? " payable" : ""}`;
|
|
132
118
|
return "receive() external payable";
|
|
133
119
|
}
|
|
134
120
|
|
|
135
|
-
// ../../node_modules/.pnpm/abitype@1.0.
|
|
121
|
+
// ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/runtime/signatures.js
|
|
136
122
|
var errorSignatureRegex = /^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;
|
|
137
123
|
function isErrorSignature(signature) {
|
|
138
124
|
return errorSignatureRegex.test(signature);
|
|
@@ -183,7 +169,7 @@ var functionModifiers = /* @__PURE__ */ new Set([
|
|
|
183
169
|
"storage"
|
|
184
170
|
]);
|
|
185
171
|
|
|
186
|
-
// ../../node_modules/.pnpm/abitype@1.0.
|
|
172
|
+
// ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/errors/abiItem.js
|
|
187
173
|
var UnknownTypeError = class extends BaseError {
|
|
188
174
|
constructor({ type }) {
|
|
189
175
|
super("Unknown type.", {
|
|
@@ -213,7 +199,7 @@ var UnknownSolidityTypeError = class extends BaseError {
|
|
|
213
199
|
}
|
|
214
200
|
};
|
|
215
201
|
|
|
216
|
-
// ../../node_modules/.pnpm/abitype@1.0.
|
|
202
|
+
// ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js
|
|
217
203
|
var InvalidParameterError = class extends BaseError {
|
|
218
204
|
constructor({ param }) {
|
|
219
205
|
super("Invalid ABI parameter.", {
|
|
@@ -291,7 +277,7 @@ var InvalidAbiTypeParameterError = class extends BaseError {
|
|
|
291
277
|
}
|
|
292
278
|
};
|
|
293
279
|
|
|
294
|
-
// ../../node_modules/.pnpm/abitype@1.0.
|
|
280
|
+
// ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/errors/signature.js
|
|
295
281
|
var InvalidSignatureError = class extends BaseError {
|
|
296
282
|
constructor({ signature, type }) {
|
|
297
283
|
super(`Invalid ${type} signature.`, {
|
|
@@ -333,7 +319,7 @@ var InvalidStructSignatureError = class extends BaseError {
|
|
|
333
319
|
}
|
|
334
320
|
};
|
|
335
321
|
|
|
336
|
-
// ../../node_modules/.pnpm/abitype@1.0.
|
|
322
|
+
// ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/errors/struct.js
|
|
337
323
|
var CircularReferenceError = class extends BaseError {
|
|
338
324
|
constructor({ type }) {
|
|
339
325
|
super("Circular reference detected.", {
|
|
@@ -348,7 +334,7 @@ var CircularReferenceError = class extends BaseError {
|
|
|
348
334
|
}
|
|
349
335
|
};
|
|
350
336
|
|
|
351
|
-
// ../../node_modules/.pnpm/abitype@1.0.
|
|
337
|
+
// ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js
|
|
352
338
|
var InvalidParenthesisError = class extends BaseError {
|
|
353
339
|
constructor({ current, depth }) {
|
|
354
340
|
super("Unbalanced parentheses.", {
|
|
@@ -366,10 +352,21 @@ var InvalidParenthesisError = class extends BaseError {
|
|
|
366
352
|
}
|
|
367
353
|
};
|
|
368
354
|
|
|
369
|
-
// ../../node_modules/.pnpm/abitype@1.0.
|
|
370
|
-
function getParameterCacheKey(param, type) {
|
|
355
|
+
// ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/runtime/cache.js
|
|
356
|
+
function getParameterCacheKey(param, type, structs) {
|
|
357
|
+
let structKey = "";
|
|
358
|
+
if (structs)
|
|
359
|
+
for (const struct of Object.entries(structs)) {
|
|
360
|
+
if (!struct)
|
|
361
|
+
continue;
|
|
362
|
+
let propertyKey = "";
|
|
363
|
+
for (const property of struct[1]) {
|
|
364
|
+
propertyKey += `[${property.type}${property.name ? `:${property.name}` : ""}]`;
|
|
365
|
+
}
|
|
366
|
+
structKey += `(${struct[0]}{${propertyKey}})`;
|
|
367
|
+
}
|
|
371
368
|
if (type)
|
|
372
|
-
return `${type}:${param}`;
|
|
369
|
+
return `${type}:${param}${structKey}`;
|
|
373
370
|
return param;
|
|
374
371
|
}
|
|
375
372
|
var parameterCache = /* @__PURE__ */ new Map([
|
|
@@ -427,7 +424,7 @@ var parameterCache = /* @__PURE__ */ new Map([
|
|
|
427
424
|
]
|
|
428
425
|
]);
|
|
429
426
|
|
|
430
|
-
// ../../node_modules/.pnpm/abitype@1.0.
|
|
427
|
+
// ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/runtime/utils.js
|
|
431
428
|
function parseSignature(signature, structs = {}) {
|
|
432
429
|
if (isFunctionSignature(signature)) {
|
|
433
430
|
const match = execFunctionSignature(signature);
|
|
@@ -520,7 +517,7 @@ var abiParameterWithoutTupleRegex = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>
|
|
|
520
517
|
var abiParameterWithTupleRegex = /^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;
|
|
521
518
|
var dynamicIntegerRegex = /^u?int$/;
|
|
522
519
|
function parseAbiParameter(param, options) {
|
|
523
|
-
const parameterCacheKey = getParameterCacheKey(param, options?.type);
|
|
520
|
+
const parameterCacheKey = getParameterCacheKey(param, options?.type, options?.structs);
|
|
524
521
|
if (parameterCache.has(parameterCacheKey))
|
|
525
522
|
return parameterCache.get(parameterCacheKey);
|
|
526
523
|
const isTuple = isTupleRegex.test(param);
|
|
@@ -610,7 +607,7 @@ function isValidDataLocation(type, isArray) {
|
|
|
610
607
|
return isArray || type === "bytes" || type === "string" || type === "tuple";
|
|
611
608
|
}
|
|
612
609
|
|
|
613
|
-
// ../../node_modules/.pnpm/abitype@1.0.
|
|
610
|
+
// ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/runtime/structs.js
|
|
614
611
|
function parseStructs(signatures) {
|
|
615
612
|
const shallowStructs = {};
|
|
616
613
|
const signaturesLength = signatures.length;
|
|
@@ -680,7 +677,7 @@ function resolveStructs(abiParameters, structs, ancestors = /* @__PURE__ */ new
|
|
|
680
677
|
return components;
|
|
681
678
|
}
|
|
682
679
|
|
|
683
|
-
// ../../node_modules/.pnpm/abitype@1.0.
|
|
680
|
+
// ../../node_modules/.pnpm/abitype@1.0.7_typescript@5.7.3_zod@3.24.1/node_modules/abitype/dist/esm/human-readable/parseAbi.js
|
|
684
681
|
function parseAbi(signatures) {
|
|
685
682
|
const structs = parseStructs(signatures);
|
|
686
683
|
const abi = [];
|
|
@@ -694,14 +691,14 @@ function parseAbi(signatures) {
|
|
|
694
691
|
return abi;
|
|
695
692
|
}
|
|
696
693
|
|
|
697
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
694
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/accounts/utils/parseAccount.js
|
|
698
695
|
function parseAccount(account) {
|
|
699
696
|
if (typeof account === "string")
|
|
700
697
|
return { address: account, type: "json-rpc" };
|
|
701
698
|
return account;
|
|
702
699
|
}
|
|
703
700
|
|
|
704
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
701
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/constants/abis.js
|
|
705
702
|
var multicall3Abi = [
|
|
706
703
|
{
|
|
707
704
|
inputs: [
|
|
@@ -853,20 +850,20 @@ var universalResolverReverseAbi = [
|
|
|
853
850
|
}
|
|
854
851
|
];
|
|
855
852
|
|
|
856
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
853
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/constants/contract.js
|
|
857
854
|
var aggregate3Signature = "0x82ad56cb";
|
|
858
855
|
|
|
859
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
856
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/constants/contracts.js
|
|
860
857
|
var deploylessCallViaBytecodeBytecode = "0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe";
|
|
861
858
|
var deploylessCallViaFactoryBytecode = "0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe";
|
|
862
859
|
|
|
863
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
864
|
-
var version2 = "2.
|
|
860
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/version.js
|
|
861
|
+
var version2 = "2.22.12";
|
|
865
862
|
|
|
866
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
863
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/base.js
|
|
867
864
|
var errorConfig = {
|
|
868
865
|
getDocsUrl: ({ docsBaseUrl, docsPath: docsPath4 = "", docsSlug }) => docsPath4 ? `${docsBaseUrl ?? "https://viem.sh"}${docsPath4}${docsSlug ? `#${docsSlug}` : ""}` : void 0,
|
|
869
|
-
version: version2
|
|
866
|
+
version: `viem@${version2}`
|
|
870
867
|
};
|
|
871
868
|
var BaseError2 = class _BaseError extends Error {
|
|
872
869
|
constructor(shortMessage, args = {}) {
|
|
@@ -942,12 +939,12 @@ var BaseError2 = class _BaseError extends Error {
|
|
|
942
939
|
function walk(err, fn) {
|
|
943
940
|
if (fn?.(err))
|
|
944
941
|
return err;
|
|
945
|
-
if (err && typeof err === "object" && "cause" in err)
|
|
942
|
+
if (err && typeof err === "object" && "cause" in err && err.cause !== void 0)
|
|
946
943
|
return walk(err.cause, fn);
|
|
947
944
|
return fn ? null : err;
|
|
948
945
|
}
|
|
949
946
|
|
|
950
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
947
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/chain.js
|
|
951
948
|
var ChainDoesNotSupportContract = class extends BaseError2 {
|
|
952
949
|
constructor({ blockNumber, chain, contract }) {
|
|
953
950
|
super(`Chain "${chain.name}" does not support contract "${contract.name}".`, {
|
|
@@ -971,7 +968,7 @@ var ClientChainNotConfiguredError = class extends BaseError2 {
|
|
|
971
968
|
}
|
|
972
969
|
};
|
|
973
970
|
|
|
974
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
971
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/constants/solidity.js
|
|
975
972
|
var solidityError = {
|
|
976
973
|
inputs: [
|
|
977
974
|
{
|
|
@@ -993,7 +990,7 @@ var solidityPanic = {
|
|
|
993
990
|
type: "error"
|
|
994
991
|
};
|
|
995
992
|
|
|
996
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
993
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/formatAbiItem.js
|
|
997
994
|
function formatAbiItem2(abiItem, { includeName = false } = {}) {
|
|
998
995
|
if (abiItem.type !== "function" && abiItem.type !== "event" && abiItem.type !== "error")
|
|
999
996
|
throw new InvalidDefinitionTypeError(abiItem.type);
|
|
@@ -1011,7 +1008,7 @@ function formatAbiParam(param, { includeName }) {
|
|
|
1011
1008
|
return param.type + (includeName && param.name ? ` ${param.name}` : "");
|
|
1012
1009
|
}
|
|
1013
1010
|
|
|
1014
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1011
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/isHex.js
|
|
1015
1012
|
function isHex(value, { strict = true } = {}) {
|
|
1016
1013
|
if (!value)
|
|
1017
1014
|
return false;
|
|
@@ -1020,14 +1017,14 @@ function isHex(value, { strict = true } = {}) {
|
|
|
1020
1017
|
return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith("0x");
|
|
1021
1018
|
}
|
|
1022
1019
|
|
|
1023
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1020
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/size.js
|
|
1024
1021
|
function size(value) {
|
|
1025
1022
|
if (isHex(value, { strict: false }))
|
|
1026
1023
|
return Math.ceil((value.length - 2) / 2);
|
|
1027
1024
|
return value.length;
|
|
1028
1025
|
}
|
|
1029
1026
|
|
|
1030
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1027
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/abi.js
|
|
1031
1028
|
var AbiConstructorNotFoundError = class extends BaseError2 {
|
|
1032
1029
|
constructor({ docsPath: docsPath4 }) {
|
|
1033
1030
|
super([
|
|
@@ -1200,7 +1197,7 @@ var InvalidDefinitionTypeError = class extends BaseError2 {
|
|
|
1200
1197
|
}
|
|
1201
1198
|
};
|
|
1202
1199
|
|
|
1203
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1200
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/data.js
|
|
1204
1201
|
var SliceOffsetOutOfBoundsError = class extends BaseError2 {
|
|
1205
1202
|
constructor({ offset, position, size: size2 }) {
|
|
1206
1203
|
super(`Slice ${position === "start" ? "starting" : "ending"} at offset "${offset}" is out-of-bounds (size: ${size2}).`, { name: "SliceOffsetOutOfBoundsError" });
|
|
@@ -1217,7 +1214,7 @@ var InvalidBytesLengthError = class extends BaseError2 {
|
|
|
1217
1214
|
}
|
|
1218
1215
|
};
|
|
1219
1216
|
|
|
1220
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1217
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/slice.js
|
|
1221
1218
|
function slice(value, start, end, { strict } = {}) {
|
|
1222
1219
|
if (isHex(value, { strict: false }))
|
|
1223
1220
|
return sliceHex(value, start, end, {
|
|
@@ -1259,7 +1256,7 @@ function sliceHex(value_, start, end, { strict } = {}) {
|
|
|
1259
1256
|
return value;
|
|
1260
1257
|
}
|
|
1261
1258
|
|
|
1262
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1259
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/pad.js
|
|
1263
1260
|
function pad(hexOrBytes, { dir, size: size2 = 32 } = {}) {
|
|
1264
1261
|
if (typeof hexOrBytes === "string")
|
|
1265
1262
|
return padHex(hexOrBytes, { dir, size: size2 });
|
|
@@ -1277,32 +1274,32 @@ function padHex(hex_, { dir, size: size2 = 32 } = {}) {
|
|
|
1277
1274
|
});
|
|
1278
1275
|
return `0x${hex[dir === "right" ? "padEnd" : "padStart"](size2 * 2, "0")}`;
|
|
1279
1276
|
}
|
|
1280
|
-
function padBytes(
|
|
1277
|
+
function padBytes(bytes, { dir, size: size2 = 32 } = {}) {
|
|
1281
1278
|
if (size2 === null)
|
|
1282
|
-
return
|
|
1283
|
-
if (
|
|
1279
|
+
return bytes;
|
|
1280
|
+
if (bytes.length > size2)
|
|
1284
1281
|
throw new SizeExceedsPaddingSizeError({
|
|
1285
|
-
size:
|
|
1282
|
+
size: bytes.length,
|
|
1286
1283
|
targetSize: size2,
|
|
1287
1284
|
type: "bytes"
|
|
1288
1285
|
});
|
|
1289
1286
|
const paddedBytes = new Uint8Array(size2);
|
|
1290
1287
|
for (let i = 0; i < size2; i++) {
|
|
1291
1288
|
const padEnd = dir === "right";
|
|
1292
|
-
paddedBytes[padEnd ? i : size2 - i - 1] =
|
|
1289
|
+
paddedBytes[padEnd ? i : size2 - i - 1] = bytes[padEnd ? i : bytes.length - i - 1];
|
|
1293
1290
|
}
|
|
1294
1291
|
return paddedBytes;
|
|
1295
1292
|
}
|
|
1296
1293
|
|
|
1297
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1294
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/encoding.js
|
|
1298
1295
|
var IntegerOutOfRangeError = class extends BaseError2 {
|
|
1299
1296
|
constructor({ max, min, signed, size: size2, value }) {
|
|
1300
1297
|
super(`Number "${value}" is not in safe ${size2 ? `${size2 * 8}-bit ${signed ? "signed" : "unsigned"} ` : ""}integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`, { name: "IntegerOutOfRangeError" });
|
|
1301
1298
|
}
|
|
1302
1299
|
};
|
|
1303
1300
|
var InvalidBytesBooleanError = class extends BaseError2 {
|
|
1304
|
-
constructor(
|
|
1305
|
-
super(`Bytes value "${
|
|
1301
|
+
constructor(bytes) {
|
|
1302
|
+
super(`Bytes value "${bytes}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {
|
|
1306
1303
|
name: "InvalidBytesBooleanError"
|
|
1307
1304
|
});
|
|
1308
1305
|
}
|
|
@@ -1313,7 +1310,7 @@ var SizeOverflowError = class extends BaseError2 {
|
|
|
1313
1310
|
}
|
|
1314
1311
|
};
|
|
1315
1312
|
|
|
1316
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1313
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/trim.js
|
|
1317
1314
|
function trim(hexOrBytes, { dir = "left" } = {}) {
|
|
1318
1315
|
let data = typeof hexOrBytes === "string" ? hexOrBytes.replace("0x", "") : hexOrBytes;
|
|
1319
1316
|
let sliceLength = 0;
|
|
@@ -1332,7 +1329,7 @@ function trim(hexOrBytes, { dir = "left" } = {}) {
|
|
|
1332
1329
|
return data;
|
|
1333
1330
|
}
|
|
1334
1331
|
|
|
1335
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1332
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/encoding/fromHex.js
|
|
1336
1333
|
function assertSize(hexOrBytes, { size: size2 }) {
|
|
1337
1334
|
if (size(hexOrBytes) > size2)
|
|
1338
1335
|
throw new SizeOverflowError({
|
|
@@ -1357,7 +1354,7 @@ function hexToNumber(hex, opts = {}) {
|
|
|
1357
1354
|
return Number(hexToBigInt(hex, opts));
|
|
1358
1355
|
}
|
|
1359
1356
|
|
|
1360
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1357
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/encoding/toHex.js
|
|
1361
1358
|
var hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i) => i.toString(16).padStart(2, "0"));
|
|
1362
1359
|
function toHex(value, opts = {}) {
|
|
1363
1360
|
if (typeof value === "number" || typeof value === "bigint")
|
|
@@ -1423,9 +1420,9 @@ function stringToHex(value_, opts = {}) {
|
|
|
1423
1420
|
return bytesToHex(value, opts);
|
|
1424
1421
|
}
|
|
1425
1422
|
|
|
1426
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1423
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/encoding/toBytes.js
|
|
1427
1424
|
var encoder2 = /* @__PURE__ */ new TextEncoder();
|
|
1428
|
-
function
|
|
1425
|
+
function toBytes(value, opts = {}) {
|
|
1429
1426
|
if (typeof value === "number" || typeof value === "bigint")
|
|
1430
1427
|
return numberToBytes(value, opts);
|
|
1431
1428
|
if (typeof value === "boolean")
|
|
@@ -1435,13 +1432,13 @@ function toBytes2(value, opts = {}) {
|
|
|
1435
1432
|
return stringToBytes(value, opts);
|
|
1436
1433
|
}
|
|
1437
1434
|
function boolToBytes(value, opts = {}) {
|
|
1438
|
-
const
|
|
1439
|
-
|
|
1435
|
+
const bytes = new Uint8Array(1);
|
|
1436
|
+
bytes[0] = Number(value);
|
|
1440
1437
|
if (typeof opts.size === "number") {
|
|
1441
|
-
assertSize(
|
|
1442
|
-
return pad(
|
|
1438
|
+
assertSize(bytes, { size: opts.size });
|
|
1439
|
+
return pad(bytes, { size: opts.size });
|
|
1443
1440
|
}
|
|
1444
|
-
return
|
|
1441
|
+
return bytes;
|
|
1445
1442
|
}
|
|
1446
1443
|
var charCodeMap = {
|
|
1447
1444
|
zero: 48,
|
|
@@ -1470,31 +1467,59 @@ function hexToBytes(hex_, opts = {}) {
|
|
|
1470
1467
|
if (hexString.length % 2)
|
|
1471
1468
|
hexString = `0${hexString}`;
|
|
1472
1469
|
const length = hexString.length / 2;
|
|
1473
|
-
const
|
|
1470
|
+
const bytes = new Uint8Array(length);
|
|
1474
1471
|
for (let index = 0, j = 0; index < length; index++) {
|
|
1475
1472
|
const nibbleLeft = charCodeToBase16(hexString.charCodeAt(j++));
|
|
1476
1473
|
const nibbleRight = charCodeToBase16(hexString.charCodeAt(j++));
|
|
1477
1474
|
if (nibbleLeft === void 0 || nibbleRight === void 0) {
|
|
1478
1475
|
throw new BaseError2(`Invalid byte sequence ("${hexString[j - 2]}${hexString[j - 1]}" in "${hexString}").`);
|
|
1479
1476
|
}
|
|
1480
|
-
|
|
1477
|
+
bytes[index] = nibbleLeft * 16 + nibbleRight;
|
|
1481
1478
|
}
|
|
1482
|
-
return
|
|
1479
|
+
return bytes;
|
|
1483
1480
|
}
|
|
1484
1481
|
function numberToBytes(value, opts) {
|
|
1485
1482
|
const hex = numberToHex(value, opts);
|
|
1486
1483
|
return hexToBytes(hex);
|
|
1487
1484
|
}
|
|
1488
1485
|
function stringToBytes(value, opts = {}) {
|
|
1489
|
-
const
|
|
1486
|
+
const bytes = encoder2.encode(value);
|
|
1490
1487
|
if (typeof opts.size === "number") {
|
|
1491
|
-
assertSize(
|
|
1492
|
-
return pad(
|
|
1488
|
+
assertSize(bytes, { size: opts.size });
|
|
1489
|
+
return pad(bytes, { dir: "right", size: opts.size });
|
|
1490
|
+
}
|
|
1491
|
+
return bytes;
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
// ../../node_modules/.pnpm/@noble+hashes@1.6.1/node_modules/@noble/hashes/esm/_assert.js
|
|
1495
|
+
function anumber(n) {
|
|
1496
|
+
if (!Number.isSafeInteger(n) || n < 0)
|
|
1497
|
+
throw new Error("positive integer expected, got " + n);
|
|
1498
|
+
}
|
|
1499
|
+
function isBytes(a) {
|
|
1500
|
+
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
|
|
1501
|
+
}
|
|
1502
|
+
function abytes(b, ...lengths) {
|
|
1503
|
+
if (!isBytes(b))
|
|
1504
|
+
throw new Error("Uint8Array expected");
|
|
1505
|
+
if (lengths.length > 0 && !lengths.includes(b.length))
|
|
1506
|
+
throw new Error("Uint8Array expected of length " + lengths + ", got length=" + b.length);
|
|
1507
|
+
}
|
|
1508
|
+
function aexists(instance, checkFinished = true) {
|
|
1509
|
+
if (instance.destroyed)
|
|
1510
|
+
throw new Error("Hash instance has been destroyed");
|
|
1511
|
+
if (checkFinished && instance.finished)
|
|
1512
|
+
throw new Error("Hash#digest() has already been called");
|
|
1513
|
+
}
|
|
1514
|
+
function aoutput(out, instance) {
|
|
1515
|
+
abytes(out);
|
|
1516
|
+
const min = instance.outputLen;
|
|
1517
|
+
if (out.length < min) {
|
|
1518
|
+
throw new Error("digestInto() expects output buffer of length at least " + min);
|
|
1493
1519
|
}
|
|
1494
|
-
return bytes2;
|
|
1495
1520
|
}
|
|
1496
1521
|
|
|
1497
|
-
// ../../node_modules/.pnpm/@noble+hashes@1.
|
|
1522
|
+
// ../../node_modules/.pnpm/@noble+hashes@1.6.1/node_modules/@noble/hashes/esm/_u64.js
|
|
1498
1523
|
var U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
|
|
1499
1524
|
var _32n = /* @__PURE__ */ BigInt(32);
|
|
1500
1525
|
function fromBig(n, le = false) {
|
|
@@ -1516,7 +1541,50 @@ var rotlSL = (h, l, s) => l << s | h >>> 32 - s;
|
|
|
1516
1541
|
var rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
|
|
1517
1542
|
var rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
|
|
1518
1543
|
|
|
1519
|
-
// ../../node_modules/.pnpm/@noble+hashes@1.
|
|
1544
|
+
// ../../node_modules/.pnpm/@noble+hashes@1.6.1/node_modules/@noble/hashes/esm/utils.js
|
|
1545
|
+
var u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
|
|
1546
|
+
var isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();
|
|
1547
|
+
var byteSwap = (word) => word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;
|
|
1548
|
+
function byteSwap32(arr) {
|
|
1549
|
+
for (let i = 0; i < arr.length; i++) {
|
|
1550
|
+
arr[i] = byteSwap(arr[i]);
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
function utf8ToBytes(str) {
|
|
1554
|
+
if (typeof str !== "string")
|
|
1555
|
+
throw new Error("utf8ToBytes expected string, got " + typeof str);
|
|
1556
|
+
return new Uint8Array(new TextEncoder().encode(str));
|
|
1557
|
+
}
|
|
1558
|
+
function toBytes2(data) {
|
|
1559
|
+
if (typeof data === "string")
|
|
1560
|
+
data = utf8ToBytes(data);
|
|
1561
|
+
abytes(data);
|
|
1562
|
+
return data;
|
|
1563
|
+
}
|
|
1564
|
+
var Hash = class {
|
|
1565
|
+
// Safe version that clones internal state
|
|
1566
|
+
clone() {
|
|
1567
|
+
return this._cloneInto();
|
|
1568
|
+
}
|
|
1569
|
+
};
|
|
1570
|
+
function wrapConstructor(hashCons) {
|
|
1571
|
+
const hashC = (msg) => hashCons().update(toBytes2(msg)).digest();
|
|
1572
|
+
const tmp = hashCons();
|
|
1573
|
+
hashC.outputLen = tmp.outputLen;
|
|
1574
|
+
hashC.blockLen = tmp.blockLen;
|
|
1575
|
+
hashC.create = () => hashCons();
|
|
1576
|
+
return hashC;
|
|
1577
|
+
}
|
|
1578
|
+
function wrapXOFConstructorWithOpts(hashCons) {
|
|
1579
|
+
const hashC = (msg, opts) => hashCons(opts).update(toBytes2(msg)).digest();
|
|
1580
|
+
const tmp = hashCons({});
|
|
1581
|
+
hashC.outputLen = tmp.outputLen;
|
|
1582
|
+
hashC.blockLen = tmp.blockLen;
|
|
1583
|
+
hashC.create = (opts) => hashCons(opts);
|
|
1584
|
+
return hashC;
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
// ../../node_modules/.pnpm/@noble+hashes@1.6.1/node_modules/@noble/hashes/esm/sha3.js
|
|
1520
1588
|
var SHA3_PI = [];
|
|
1521
1589
|
var SHA3_ROTL = [];
|
|
1522
1590
|
var _SHA3_IOTA = [];
|
|
@@ -1594,7 +1662,7 @@ var Keccak = class _Keccak extends Hash {
|
|
|
1594
1662
|
this.posOut = 0;
|
|
1595
1663
|
this.finished = false;
|
|
1596
1664
|
this.destroyed = false;
|
|
1597
|
-
|
|
1665
|
+
anumber(outputLen);
|
|
1598
1666
|
if (0 >= this.blockLen || this.blockLen >= 200)
|
|
1599
1667
|
throw new Error("Sha3 supports only keccak-f1600 function");
|
|
1600
1668
|
this.state = new Uint8Array(200);
|
|
@@ -1610,9 +1678,9 @@ var Keccak = class _Keccak extends Hash {
|
|
|
1610
1678
|
this.pos = 0;
|
|
1611
1679
|
}
|
|
1612
1680
|
update(data) {
|
|
1613
|
-
|
|
1681
|
+
aexists(this);
|
|
1614
1682
|
const { blockLen, state } = this;
|
|
1615
|
-
data =
|
|
1683
|
+
data = toBytes2(data);
|
|
1616
1684
|
const len = data.length;
|
|
1617
1685
|
for (let pos = 0; pos < len; ) {
|
|
1618
1686
|
const take = Math.min(blockLen - this.pos, len - pos);
|
|
@@ -1635,8 +1703,8 @@ var Keccak = class _Keccak extends Hash {
|
|
|
1635
1703
|
this.keccak();
|
|
1636
1704
|
}
|
|
1637
1705
|
writeInto(out) {
|
|
1638
|
-
|
|
1639
|
-
|
|
1706
|
+
aexists(this, false);
|
|
1707
|
+
abytes(out);
|
|
1640
1708
|
this.finish();
|
|
1641
1709
|
const bufferOut = this.state;
|
|
1642
1710
|
const { blockLen } = this;
|
|
@@ -1655,12 +1723,12 @@ var Keccak = class _Keccak extends Hash {
|
|
|
1655
1723
|
throw new Error("XOF is not possible for this instance");
|
|
1656
1724
|
return this.writeInto(out);
|
|
1657
1725
|
}
|
|
1658
|
-
xof(
|
|
1659
|
-
|
|
1660
|
-
return this.xofInto(new Uint8Array(
|
|
1726
|
+
xof(bytes) {
|
|
1727
|
+
anumber(bytes);
|
|
1728
|
+
return this.xofInto(new Uint8Array(bytes));
|
|
1661
1729
|
}
|
|
1662
1730
|
digestInto(out) {
|
|
1663
|
-
|
|
1731
|
+
aoutput(out, this);
|
|
1664
1732
|
if (this.finished)
|
|
1665
1733
|
throw new Error("digest() was already called");
|
|
1666
1734
|
this.writeInto(out);
|
|
@@ -1702,22 +1770,22 @@ var genShake = (suffix, blockLen, outputLen) => wrapXOFConstructorWithOpts((opts
|
|
|
1702
1770
|
var shake128 = /* @__PURE__ */ genShake(31, 168, 128 / 8);
|
|
1703
1771
|
var shake256 = /* @__PURE__ */ genShake(31, 136, 256 / 8);
|
|
1704
1772
|
|
|
1705
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1773
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/keccak256.js
|
|
1706
1774
|
function keccak256(value, to_) {
|
|
1707
1775
|
const to = to_ || "hex";
|
|
1708
|
-
const
|
|
1776
|
+
const bytes = keccak_256(isHex(value, { strict: false }) ? toBytes(value) : value);
|
|
1709
1777
|
if (to === "bytes")
|
|
1710
|
-
return
|
|
1711
|
-
return toHex(
|
|
1778
|
+
return bytes;
|
|
1779
|
+
return toHex(bytes);
|
|
1712
1780
|
}
|
|
1713
1781
|
|
|
1714
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1715
|
-
var hash = (value) => keccak256(
|
|
1782
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/hashSignature.js
|
|
1783
|
+
var hash = (value) => keccak256(toBytes(value));
|
|
1716
1784
|
function hashSignature(sig) {
|
|
1717
1785
|
return hash(sig);
|
|
1718
1786
|
}
|
|
1719
1787
|
|
|
1720
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1788
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/normalizeSignature.js
|
|
1721
1789
|
function normalizeSignature(signature) {
|
|
1722
1790
|
let active = true;
|
|
1723
1791
|
let current = "";
|
|
@@ -1761,7 +1829,7 @@ function normalizeSignature(signature) {
|
|
|
1761
1829
|
return result;
|
|
1762
1830
|
}
|
|
1763
1831
|
|
|
1764
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1832
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toSignature.js
|
|
1765
1833
|
var toSignature = (def) => {
|
|
1766
1834
|
const def_ = (() => {
|
|
1767
1835
|
if (typeof def === "string")
|
|
@@ -1771,15 +1839,15 @@ var toSignature = (def) => {
|
|
|
1771
1839
|
return normalizeSignature(def_);
|
|
1772
1840
|
};
|
|
1773
1841
|
|
|
1774
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1842
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toSignatureHash.js
|
|
1775
1843
|
function toSignatureHash(fn) {
|
|
1776
1844
|
return hashSignature(toSignature(fn));
|
|
1777
1845
|
}
|
|
1778
1846
|
|
|
1779
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1847
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toFunctionSelector.js
|
|
1780
1848
|
var toFunctionSelector = (fn) => slice(toSignatureHash(fn), 0, 4);
|
|
1781
1849
|
|
|
1782
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1850
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/address.js
|
|
1783
1851
|
var InvalidAddressError = class extends BaseError2 {
|
|
1784
1852
|
constructor({ address }) {
|
|
1785
1853
|
super(`Address "${address}" is invalid.`, {
|
|
@@ -1792,7 +1860,7 @@ var InvalidAddressError = class extends BaseError2 {
|
|
|
1792
1860
|
}
|
|
1793
1861
|
};
|
|
1794
1862
|
|
|
1795
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1863
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/lru.js
|
|
1796
1864
|
var LruMap = class extends Map {
|
|
1797
1865
|
constructor(size2) {
|
|
1798
1866
|
super();
|
|
@@ -1823,7 +1891,7 @@ var LruMap = class extends Map {
|
|
|
1823
1891
|
}
|
|
1824
1892
|
};
|
|
1825
1893
|
|
|
1826
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1894
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/address/isAddress.js
|
|
1827
1895
|
var addressRegex = /^0x[a-fA-F0-9]{40}$/;
|
|
1828
1896
|
var isAddressCache = /* @__PURE__ */ new LruMap(8192);
|
|
1829
1897
|
function isAddress(address, options) {
|
|
@@ -1844,7 +1912,7 @@ function isAddress(address, options) {
|
|
|
1844
1912
|
return result;
|
|
1845
1913
|
}
|
|
1846
1914
|
|
|
1847
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1915
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/address/getAddress.js
|
|
1848
1916
|
var checksumAddressCache = /* @__PURE__ */ new LruMap(8192);
|
|
1849
1917
|
function checksumAddress(address_, chainId) {
|
|
1850
1918
|
if (checksumAddressCache.has(`${address_}.${chainId}`))
|
|
@@ -1865,7 +1933,7 @@ function checksumAddress(address_, chainId) {
|
|
|
1865
1933
|
return result;
|
|
1866
1934
|
}
|
|
1867
1935
|
|
|
1868
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1936
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/cursor.js
|
|
1869
1937
|
var NegativeOffsetError = class extends BaseError2 {
|
|
1870
1938
|
constructor({ offset }) {
|
|
1871
1939
|
super(`Offset \`${offset}\` cannot be negative.`, {
|
|
@@ -1884,7 +1952,7 @@ var RecursiveReadLimitExceededError = class extends BaseError2 {
|
|
|
1884
1952
|
}
|
|
1885
1953
|
};
|
|
1886
1954
|
|
|
1887
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1955
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/cursor.js
|
|
1888
1956
|
var staticCursor = {
|
|
1889
1957
|
bytes: new Uint8Array(),
|
|
1890
1958
|
dataView: new DataView(new ArrayBuffer(0)),
|
|
@@ -1958,10 +2026,10 @@ var staticCursor = {
|
|
|
1958
2026
|
this.bytes[this.position] = byte;
|
|
1959
2027
|
this.position++;
|
|
1960
2028
|
},
|
|
1961
|
-
pushBytes(
|
|
1962
|
-
this.assertPosition(this.position +
|
|
1963
|
-
this.bytes.set(
|
|
1964
|
-
this.position +=
|
|
2029
|
+
pushBytes(bytes) {
|
|
2030
|
+
this.assertPosition(this.position + bytes.length - 1);
|
|
2031
|
+
this.bytes.set(bytes, this.position);
|
|
2032
|
+
this.position += bytes.length;
|
|
1965
2033
|
},
|
|
1966
2034
|
pushUint8(value) {
|
|
1967
2035
|
this.assertPosition(this.position);
|
|
@@ -2044,48 +2112,48 @@ var staticCursor = {
|
|
|
2044
2112
|
this.recursiveReadCount++;
|
|
2045
2113
|
}
|
|
2046
2114
|
};
|
|
2047
|
-
function createCursor(
|
|
2115
|
+
function createCursor(bytes, { recursiveReadLimit = 8192 } = {}) {
|
|
2048
2116
|
const cursor = Object.create(staticCursor);
|
|
2049
|
-
cursor.bytes =
|
|
2050
|
-
cursor.dataView = new DataView(
|
|
2117
|
+
cursor.bytes = bytes;
|
|
2118
|
+
cursor.dataView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
2051
2119
|
cursor.positionReadCount = /* @__PURE__ */ new Map();
|
|
2052
2120
|
cursor.recursiveReadLimit = recursiveReadLimit;
|
|
2053
2121
|
return cursor;
|
|
2054
2122
|
}
|
|
2055
2123
|
|
|
2056
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2057
|
-
function bytesToBigInt(
|
|
2124
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/encoding/fromBytes.js
|
|
2125
|
+
function bytesToBigInt(bytes, opts = {}) {
|
|
2058
2126
|
if (typeof opts.size !== "undefined")
|
|
2059
|
-
assertSize(
|
|
2060
|
-
const hex = bytesToHex(
|
|
2127
|
+
assertSize(bytes, { size: opts.size });
|
|
2128
|
+
const hex = bytesToHex(bytes, opts);
|
|
2061
2129
|
return hexToBigInt(hex, opts);
|
|
2062
2130
|
}
|
|
2063
2131
|
function bytesToBool(bytes_, opts = {}) {
|
|
2064
|
-
let
|
|
2132
|
+
let bytes = bytes_;
|
|
2065
2133
|
if (typeof opts.size !== "undefined") {
|
|
2066
|
-
assertSize(
|
|
2067
|
-
|
|
2134
|
+
assertSize(bytes, { size: opts.size });
|
|
2135
|
+
bytes = trim(bytes);
|
|
2068
2136
|
}
|
|
2069
|
-
if (
|
|
2070
|
-
throw new InvalidBytesBooleanError(
|
|
2071
|
-
return Boolean(
|
|
2137
|
+
if (bytes.length > 1 || bytes[0] > 1)
|
|
2138
|
+
throw new InvalidBytesBooleanError(bytes);
|
|
2139
|
+
return Boolean(bytes[0]);
|
|
2072
2140
|
}
|
|
2073
|
-
function bytesToNumber(
|
|
2141
|
+
function bytesToNumber(bytes, opts = {}) {
|
|
2074
2142
|
if (typeof opts.size !== "undefined")
|
|
2075
|
-
assertSize(
|
|
2076
|
-
const hex = bytesToHex(
|
|
2143
|
+
assertSize(bytes, { size: opts.size });
|
|
2144
|
+
const hex = bytesToHex(bytes, opts);
|
|
2077
2145
|
return hexToNumber(hex, opts);
|
|
2078
2146
|
}
|
|
2079
2147
|
function bytesToString(bytes_, opts = {}) {
|
|
2080
|
-
let
|
|
2148
|
+
let bytes = bytes_;
|
|
2081
2149
|
if (typeof opts.size !== "undefined") {
|
|
2082
|
-
assertSize(
|
|
2083
|
-
|
|
2150
|
+
assertSize(bytes, { size: opts.size });
|
|
2151
|
+
bytes = trim(bytes, { dir: "right" });
|
|
2084
2152
|
}
|
|
2085
|
-
return new TextDecoder().decode(
|
|
2153
|
+
return new TextDecoder().decode(bytes);
|
|
2086
2154
|
}
|
|
2087
2155
|
|
|
2088
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2156
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/data/concat.js
|
|
2089
2157
|
function concat(values) {
|
|
2090
2158
|
if (typeof values[0] === "string")
|
|
2091
2159
|
return concatHex(values);
|
|
@@ -2108,7 +2176,10 @@ function concatHex(values) {
|
|
|
2108
2176
|
return `0x${values.reduce((acc, x) => acc + x.replace("0x", ""), "")}`;
|
|
2109
2177
|
}
|
|
2110
2178
|
|
|
2111
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2179
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/regex.js
|
|
2180
|
+
var integerRegex2 = /^(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)?$/;
|
|
2181
|
+
|
|
2182
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js
|
|
2112
2183
|
function encodeAbiParameters(params, values) {
|
|
2113
2184
|
if (params.length !== values.length)
|
|
2114
2185
|
throw new AbiEncodingLengthMismatchError({
|
|
@@ -2150,7 +2221,11 @@ function prepareParam({ param, value }) {
|
|
|
2150
2221
|
}
|
|
2151
2222
|
if (param.type.startsWith("uint") || param.type.startsWith("int")) {
|
|
2152
2223
|
const signed = param.type.startsWith("int");
|
|
2153
|
-
|
|
2224
|
+
const [, , size2 = "256"] = integerRegex2.exec(param.type) ?? [];
|
|
2225
|
+
return encodeNumber(value, {
|
|
2226
|
+
signed,
|
|
2227
|
+
size: Number(size2)
|
|
2228
|
+
});
|
|
2154
2229
|
}
|
|
2155
2230
|
if (param.type.startsWith("bytes")) {
|
|
2156
2231
|
return encodeBytes(value, { param });
|
|
@@ -2253,7 +2328,19 @@ function encodeBool(value) {
|
|
|
2253
2328
|
throw new BaseError2(`Invalid boolean value: "${value}" (type: ${typeof value}). Expected: \`true\` or \`false\`.`);
|
|
2254
2329
|
return { dynamic: false, encoded: padHex(boolToHex(value)) };
|
|
2255
2330
|
}
|
|
2256
|
-
function encodeNumber(value, { signed }) {
|
|
2331
|
+
function encodeNumber(value, { signed, size: size2 = 256 }) {
|
|
2332
|
+
if (typeof size2 === "number") {
|
|
2333
|
+
const max = 2n ** (BigInt(size2) - (signed ? 1n : 0n)) - 1n;
|
|
2334
|
+
const min = signed ? -max - 1n : 0n;
|
|
2335
|
+
if (value > max || value < min)
|
|
2336
|
+
throw new IntegerOutOfRangeError({
|
|
2337
|
+
max: max.toString(),
|
|
2338
|
+
min: min.toString(),
|
|
2339
|
+
signed,
|
|
2340
|
+
size: size2 / 8,
|
|
2341
|
+
value: value.toString()
|
|
2342
|
+
});
|
|
2343
|
+
}
|
|
2257
2344
|
return {
|
|
2258
2345
|
dynamic: false,
|
|
2259
2346
|
encoded: numberToHex(value, {
|
|
@@ -2306,11 +2393,11 @@ function getArrayComponents(type) {
|
|
|
2306
2393
|
) : void 0;
|
|
2307
2394
|
}
|
|
2308
2395
|
|
|
2309
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2396
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/decodeAbiParameters.js
|
|
2310
2397
|
function decodeAbiParameters(params, data) {
|
|
2311
|
-
const
|
|
2312
|
-
const cursor = createCursor(
|
|
2313
|
-
if (size(
|
|
2398
|
+
const bytes = typeof data === "string" ? hexToBytes(data) : data;
|
|
2399
|
+
const cursor = createCursor(bytes);
|
|
2400
|
+
if (size(bytes) === 0 && params.length > 0)
|
|
2314
2401
|
throw new AbiDecodingZeroDataError();
|
|
2315
2402
|
if (size(data) && size(data) < 32)
|
|
2316
2403
|
throw new AbiDecodingDataSizeTooSmallError({
|
|
@@ -2493,7 +2580,7 @@ function hasDynamicChild(param) {
|
|
|
2493
2580
|
return false;
|
|
2494
2581
|
}
|
|
2495
2582
|
|
|
2496
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2583
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/decodeErrorResult.js
|
|
2497
2584
|
function decodeErrorResult(parameters) {
|
|
2498
2585
|
const { abi, data } = parameters;
|
|
2499
2586
|
const signature = slice(data, 0, 4);
|
|
@@ -2512,16 +2599,16 @@ function decodeErrorResult(parameters) {
|
|
|
2512
2599
|
};
|
|
2513
2600
|
}
|
|
2514
2601
|
|
|
2515
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2602
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/stringify.js
|
|
2516
2603
|
var stringify = (value, replacer, space) => JSON.stringify(value, (key, value_) => {
|
|
2517
2604
|
const value2 = typeof value_ === "bigint" ? value_.toString() : value_;
|
|
2518
2605
|
return typeof replacer === "function" ? replacer(key, value2) : value2;
|
|
2519
2606
|
}, space);
|
|
2520
2607
|
|
|
2521
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2608
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/hash/toEventSelector.js
|
|
2522
2609
|
var toEventSelector = toSignatureHash;
|
|
2523
2610
|
|
|
2524
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2611
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/getAbiItem.js
|
|
2525
2612
|
function getAbiItem(parameters) {
|
|
2526
2613
|
const { abi, args = [], name } = parameters;
|
|
2527
2614
|
const isSelector = isHex(name, { strict: false });
|
|
@@ -2633,7 +2720,7 @@ function getAmbiguousTypes(sourceParameters, targetParameters, args) {
|
|
|
2633
2720
|
return;
|
|
2634
2721
|
}
|
|
2635
2722
|
|
|
2636
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2723
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/constants/unit.js
|
|
2637
2724
|
var etherUnits = {
|
|
2638
2725
|
gwei: 9,
|
|
2639
2726
|
wei: 18
|
|
@@ -2643,7 +2730,7 @@ var gweiUnits = {
|
|
|
2643
2730
|
wei: 9
|
|
2644
2731
|
};
|
|
2645
2732
|
|
|
2646
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2733
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/unit/formatUnits.js
|
|
2647
2734
|
function formatUnits(value, decimals) {
|
|
2648
2735
|
let display = value.toString();
|
|
2649
2736
|
const negative = display.startsWith("-");
|
|
@@ -2658,17 +2745,17 @@ function formatUnits(value, decimals) {
|
|
|
2658
2745
|
return `${negative ? "-" : ""}${integer || "0"}${fraction ? `.${fraction}` : ""}`;
|
|
2659
2746
|
}
|
|
2660
2747
|
|
|
2661
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2748
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/unit/formatEther.js
|
|
2662
2749
|
function formatEther(wei, unit = "wei") {
|
|
2663
2750
|
return formatUnits(wei, etherUnits[unit]);
|
|
2664
2751
|
}
|
|
2665
2752
|
|
|
2666
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2753
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/unit/formatGwei.js
|
|
2667
2754
|
function formatGwei(wei, unit = "wei") {
|
|
2668
2755
|
return formatUnits(wei, gweiUnits[unit]);
|
|
2669
2756
|
}
|
|
2670
2757
|
|
|
2671
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2758
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/stateOverride.js
|
|
2672
2759
|
var AccountStateConflictError = class extends BaseError2 {
|
|
2673
2760
|
constructor({ address }) {
|
|
2674
2761
|
super(`State for account "${address}" is set multiple times.`, {
|
|
@@ -2714,7 +2801,7 @@ function prettyStateOverride(stateOverride) {
|
|
|
2714
2801
|
}, " State Override:\n").slice(0, -1);
|
|
2715
2802
|
}
|
|
2716
2803
|
|
|
2717
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2804
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/transaction.js
|
|
2718
2805
|
function prettyPrint(args) {
|
|
2719
2806
|
const entries = Object.entries(args).map(([key, value]) => {
|
|
2720
2807
|
if (value === void 0 || value === false)
|
|
@@ -2733,10 +2820,10 @@ var FeeConflictError = class extends BaseError2 {
|
|
|
2733
2820
|
}
|
|
2734
2821
|
};
|
|
2735
2822
|
|
|
2736
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2823
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/utils.js
|
|
2737
2824
|
var getUrl = (url) => url;
|
|
2738
2825
|
|
|
2739
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2826
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/contract.js
|
|
2740
2827
|
var CallExecutionError = class extends BaseError2 {
|
|
2741
2828
|
constructor(cause, { account: account_, docsPath: docsPath4, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride }) {
|
|
2742
2829
|
const account = account_ ? parseAccount(account_) : void 0;
|
|
@@ -2805,7 +2892,7 @@ var RawContractError = class extends BaseError2 {
|
|
|
2805
2892
|
}
|
|
2806
2893
|
};
|
|
2807
2894
|
|
|
2808
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2895
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/decodeFunctionResult.js
|
|
2809
2896
|
var docsPath = "/docs/contract/decodeFunctionResult";
|
|
2810
2897
|
function decodeFunctionResult(parameters) {
|
|
2811
2898
|
const { abi, args, functionName, data } = parameters;
|
|
@@ -2828,7 +2915,7 @@ function decodeFunctionResult(parameters) {
|
|
|
2828
2915
|
return void 0;
|
|
2829
2916
|
}
|
|
2830
2917
|
|
|
2831
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2918
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/encodeDeployData.js
|
|
2832
2919
|
var docsPath2 = "/docs/contract/encodeDeployData";
|
|
2833
2920
|
function encodeDeployData(parameters) {
|
|
2834
2921
|
const { abi, args, bytecode } = parameters;
|
|
@@ -2845,7 +2932,7 @@ function encodeDeployData(parameters) {
|
|
|
2845
2932
|
return concatHex([bytecode, data]);
|
|
2846
2933
|
}
|
|
2847
2934
|
|
|
2848
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2935
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js
|
|
2849
2936
|
var docsPath3 = "/docs/contract/encodeFunctionData";
|
|
2850
2937
|
function prepareEncodeFunctionData(parameters) {
|
|
2851
2938
|
const { abi, args, functionName } = parameters;
|
|
@@ -2868,7 +2955,7 @@ function prepareEncodeFunctionData(parameters) {
|
|
|
2868
2955
|
};
|
|
2869
2956
|
}
|
|
2870
2957
|
|
|
2871
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2958
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/abi/encodeFunctionData.js
|
|
2872
2959
|
function encodeFunctionData(parameters) {
|
|
2873
2960
|
const { args } = parameters;
|
|
2874
2961
|
const { abi, functionName } = (() => {
|
|
@@ -2882,7 +2969,7 @@ function encodeFunctionData(parameters) {
|
|
|
2882
2969
|
return concatHex([signature, data ?? "0x"]);
|
|
2883
2970
|
}
|
|
2884
2971
|
|
|
2885
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2972
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/chain/getChainContractAddress.js
|
|
2886
2973
|
function getChainContractAddress({ blockNumber, chain, contract: name }) {
|
|
2887
2974
|
const contract = chain?.contracts?.[name];
|
|
2888
2975
|
if (!contract)
|
|
@@ -2902,7 +2989,7 @@ function getChainContractAddress({ blockNumber, chain, contract: name }) {
|
|
|
2902
2989
|
return contract.address;
|
|
2903
2990
|
}
|
|
2904
2991
|
|
|
2905
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2992
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/node.js
|
|
2906
2993
|
var ExecutionRevertedError = class extends BaseError2 {
|
|
2907
2994
|
constructor({ cause, message } = {}) {
|
|
2908
2995
|
const reason = message?.replace("execution reverted: ", "")?.replace("execution reverted", "");
|
|
@@ -3081,7 +3168,7 @@ var UnknownNodeError = class extends BaseError2 {
|
|
|
3081
3168
|
}
|
|
3082
3169
|
};
|
|
3083
3170
|
|
|
3084
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3171
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/request.js
|
|
3085
3172
|
var HttpRequestError = class extends BaseError2 {
|
|
3086
3173
|
constructor({ body, cause, details, headers, status, url }) {
|
|
3087
3174
|
super("HTTP request failed.", {
|
|
@@ -3125,7 +3212,7 @@ var HttpRequestError = class extends BaseError2 {
|
|
|
3125
3212
|
}
|
|
3126
3213
|
};
|
|
3127
3214
|
|
|
3128
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3215
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/errors/getNodeError.js
|
|
3129
3216
|
function getNodeError(err, args) {
|
|
3130
3217
|
const message = (err.details || "").toLowerCase();
|
|
3131
3218
|
const executionRevertedError = err instanceof BaseError2 ? err.walk((e) => e?.code === ExecutionRevertedError.code) : err;
|
|
@@ -3174,7 +3261,7 @@ function getNodeError(err, args) {
|
|
|
3174
3261
|
});
|
|
3175
3262
|
}
|
|
3176
3263
|
|
|
3177
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3264
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/errors/getCallError.js
|
|
3178
3265
|
function getCallError(err, { docsPath: docsPath4, ...args }) {
|
|
3179
3266
|
const cause = (() => {
|
|
3180
3267
|
const cause2 = getNodeError(err, args);
|
|
@@ -3188,7 +3275,7 @@ function getCallError(err, { docsPath: docsPath4, ...args }) {
|
|
|
3188
3275
|
});
|
|
3189
3276
|
}
|
|
3190
3277
|
|
|
3191
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3278
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/formatters/extract.js
|
|
3192
3279
|
function extract(value_, { format }) {
|
|
3193
3280
|
if (!format)
|
|
3194
3281
|
return {};
|
|
@@ -3207,7 +3294,7 @@ function extract(value_, { format }) {
|
|
|
3207
3294
|
return value;
|
|
3208
3295
|
}
|
|
3209
3296
|
|
|
3210
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3297
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/formatters/transactionRequest.js
|
|
3211
3298
|
var rpcTransactionType = {
|
|
3212
3299
|
legacy: "0x0",
|
|
3213
3300
|
eip2930: "0x1",
|
|
@@ -3265,7 +3352,18 @@ function formatAuthorizationList(authorizationList) {
|
|
|
3265
3352
|
}));
|
|
3266
3353
|
}
|
|
3267
3354
|
|
|
3268
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3355
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/promise/withResolvers.js
|
|
3356
|
+
function withResolvers() {
|
|
3357
|
+
let resolve = () => void 0;
|
|
3358
|
+
let reject = () => void 0;
|
|
3359
|
+
const promise = new Promise((resolve_, reject_) => {
|
|
3360
|
+
resolve = resolve_;
|
|
3361
|
+
reject = reject_;
|
|
3362
|
+
});
|
|
3363
|
+
return { promise, resolve, reject };
|
|
3364
|
+
}
|
|
3365
|
+
|
|
3366
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/promise/createBatchScheduler.js
|
|
3269
3367
|
var schedulerCache = /* @__PURE__ */ new Map();
|
|
3270
3368
|
function createBatchScheduler({ fn, id, shouldSplitBatch, wait = 0, sort }) {
|
|
3271
3369
|
const exec = async () => {
|
|
@@ -3278,13 +3376,13 @@ function createBatchScheduler({ fn, id, shouldSplitBatch, wait = 0, sort }) {
|
|
|
3278
3376
|
if (sort && Array.isArray(data))
|
|
3279
3377
|
data.sort(sort);
|
|
3280
3378
|
for (let i = 0; i < scheduler.length; i++) {
|
|
3281
|
-
const {
|
|
3282
|
-
|
|
3379
|
+
const { resolve } = scheduler[i];
|
|
3380
|
+
resolve?.([data[i], data]);
|
|
3283
3381
|
}
|
|
3284
3382
|
}).catch((err) => {
|
|
3285
3383
|
for (let i = 0; i < scheduler.length; i++) {
|
|
3286
|
-
const {
|
|
3287
|
-
|
|
3384
|
+
const { reject } = scheduler[i];
|
|
3385
|
+
reject?.(err);
|
|
3288
3386
|
}
|
|
3289
3387
|
});
|
|
3290
3388
|
};
|
|
@@ -3295,27 +3393,23 @@ function createBatchScheduler({ fn, id, shouldSplitBatch, wait = 0, sort }) {
|
|
|
3295
3393
|
return {
|
|
3296
3394
|
flush,
|
|
3297
3395
|
async schedule(args) {
|
|
3298
|
-
const
|
|
3299
|
-
const promise = new Promise((resolve, reject) => {
|
|
3300
|
-
pendingPromise.resolve = resolve;
|
|
3301
|
-
pendingPromise.reject = reject;
|
|
3302
|
-
});
|
|
3396
|
+
const { promise, resolve, reject } = withResolvers();
|
|
3303
3397
|
const split2 = shouldSplitBatch?.([...getBatchedArgs(), args]);
|
|
3304
3398
|
if (split2)
|
|
3305
3399
|
exec();
|
|
3306
3400
|
const hasActiveScheduler = getScheduler().length > 0;
|
|
3307
3401
|
if (hasActiveScheduler) {
|
|
3308
|
-
setScheduler({ args,
|
|
3402
|
+
setScheduler({ args, resolve, reject });
|
|
3309
3403
|
return promise;
|
|
3310
3404
|
}
|
|
3311
|
-
setScheduler({ args,
|
|
3405
|
+
setScheduler({ args, resolve, reject });
|
|
3312
3406
|
setTimeout(exec, wait);
|
|
3313
3407
|
return promise;
|
|
3314
3408
|
}
|
|
3315
3409
|
};
|
|
3316
3410
|
}
|
|
3317
3411
|
|
|
3318
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3412
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/stateOverride.js
|
|
3319
3413
|
function serializeStateMapping(stateMapping) {
|
|
3320
3414
|
if (!stateMapping || stateMapping.length === 0)
|
|
3321
3415
|
return void 0;
|
|
@@ -3368,7 +3462,7 @@ function serializeStateOverride(parameters) {
|
|
|
3368
3462
|
return rpcStateOverride;
|
|
3369
3463
|
}
|
|
3370
3464
|
|
|
3371
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3465
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/constants/number.js
|
|
3372
3466
|
var maxInt8 = 2n ** (8n - 1n) - 1n;
|
|
3373
3467
|
var maxInt16 = 2n ** (16n - 1n) - 1n;
|
|
3374
3468
|
var maxInt24 = 2n ** (24n - 1n) - 1n;
|
|
@@ -3466,7 +3560,7 @@ var maxUint240 = 2n ** 240n - 1n;
|
|
|
3466
3560
|
var maxUint248 = 2n ** 248n - 1n;
|
|
3467
3561
|
var maxUint256 = 2n ** 256n - 1n;
|
|
3468
3562
|
|
|
3469
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3563
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/transaction/assertRequest.js
|
|
3470
3564
|
function assertRequest(args) {
|
|
3471
3565
|
const { account: account_, gasPrice, maxFeePerGas, maxPriorityFeePerGas, to } = args;
|
|
3472
3566
|
const account = account_ ? parseAccount(account_) : void 0;
|
|
@@ -3482,7 +3576,7 @@ function assertRequest(args) {
|
|
|
3482
3576
|
throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });
|
|
3483
3577
|
}
|
|
3484
3578
|
|
|
3485
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3579
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/actions/public/call.js
|
|
3486
3580
|
async function call(client, args) {
|
|
3487
3581
|
const { account: account_ = client.account, batch = Boolean(client.batch?.multicall), blockNumber, blockTag = "latest", accessList, blobs, code, data: data_, factory, factoryData, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride, ...rest } = args;
|
|
3488
3582
|
const account = account_ ? parseAccount(account_) : void 0;
|
|
@@ -3556,7 +3650,7 @@ async function call(client, args) {
|
|
|
3556
3650
|
return { data: response };
|
|
3557
3651
|
} catch (err) {
|
|
3558
3652
|
const data2 = getRevertErrorData(err);
|
|
3559
|
-
const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-
|
|
3653
|
+
const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-OTD7W43P.js");
|
|
3560
3654
|
if (client.ccipRead !== false && data2?.slice(0, 10) === offchainLookupSignature2 && to)
|
|
3561
3655
|
return { data: await offchainLookup2(client, { data: data2, to }) };
|
|
3562
3656
|
if (deploylessCall && data2?.slice(0, 10) === "0x101bb98d")
|
|
@@ -3661,7 +3755,7 @@ function getRevertErrorData(err) {
|
|
|
3661
3755
|
return typeof error?.data === "object" ? error.data?.data : error.data;
|
|
3662
3756
|
}
|
|
3663
3757
|
|
|
3664
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3758
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/ccip.js
|
|
3665
3759
|
var OffchainLookupError = class extends BaseError2 {
|
|
3666
3760
|
constructor({ callbackSelector, cause, data, extraData, sender, urls }) {
|
|
3667
3761
|
super(cause.shortMessage || "An error occurred while fetching for an offchain result.", {
|
|
@@ -3706,7 +3800,7 @@ var OffchainLookupSenderMismatchError = class extends BaseError2 {
|
|
|
3706
3800
|
}
|
|
3707
3801
|
};
|
|
3708
3802
|
|
|
3709
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3803
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/address/isAddressEqual.js
|
|
3710
3804
|
function isAddressEqual(a, b) {
|
|
3711
3805
|
if (!isAddress(a, { strict: false }))
|
|
3712
3806
|
throw new InvalidAddressError({ address: a });
|
|
@@ -3715,7 +3809,7 @@ function isAddressEqual(a, b) {
|
|
|
3715
3809
|
return a.toLowerCase() === b.toLowerCase();
|
|
3716
3810
|
}
|
|
3717
3811
|
|
|
3718
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3812
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.7.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/ccip.js
|
|
3719
3813
|
var offchainLookupSignature = "0x556f1830";
|
|
3720
3814
|
var offchainLookupAbiItem = {
|
|
3721
3815
|
name: "OffchainLookup",
|
|
@@ -3782,9 +3876,11 @@ async function ccipRequest({ data, sender, urls }) {
|
|
|
3782
3876
|
const url = urls[i];
|
|
3783
3877
|
const method = url.includes("{data}") ? "GET" : "POST";
|
|
3784
3878
|
const body = method === "POST" ? { data, sender } : void 0;
|
|
3879
|
+
const headers = method === "POST" ? { "Content-Type": "application/json" } : {};
|
|
3785
3880
|
try {
|
|
3786
3881
|
const response = await fetch(url.replace("{sender}", sender).replace("{data}", data), {
|
|
3787
3882
|
body: JSON.stringify(body),
|
|
3883
|
+
headers,
|
|
3788
3884
|
method
|
|
3789
3885
|
});
|
|
3790
3886
|
let result;
|
|
@@ -3834,4 +3930,9 @@ export {
|
|
|
3834
3930
|
offchainLookup,
|
|
3835
3931
|
ccipRequest
|
|
3836
3932
|
};
|
|
3837
|
-
|
|
3933
|
+
/*! Bundled license information:
|
|
3934
|
+
|
|
3935
|
+
@noble/hashes/esm/utils.js:
|
|
3936
|
+
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
3937
|
+
*/
|
|
3938
|
+
//# sourceMappingURL=chunk-ETO2D44V.js.map
|