@zoralabs/protocol-deployments 0.1.10 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +24 -11
- package/CHANGELOG.md +12 -0
- package/dist/_esm-ZN7ZVJVO.js +4027 -0
- package/dist/_esm-ZN7ZVJVO.js.map +1 -0
- package/dist/ccip-IGMHQQR7.js +15 -0
- package/dist/ccip-IGMHQQR7.js.map +1 -0
- package/dist/chunk-2FDPSBOH.js +118 -0
- package/dist/chunk-2FDPSBOH.js.map +1 -0
- package/dist/chunk-3EJPJMEH.js +44 -0
- package/dist/chunk-3EJPJMEH.js.map +1 -0
- package/dist/chunk-KIPP2F4J.js +3217 -0
- package/dist/chunk-KIPP2F4J.js.map +1 -0
- package/dist/generated/1155.d.ts +2 -2
- package/dist/generated/mints.d.ts +46 -11
- package/dist/generated/mints.d.ts.map +1 -1
- package/dist/generated/wagmi.d.ts +1627 -556
- package/dist/generated/wagmi.d.ts.map +1 -1
- package/dist/index.cjs +2474 -325
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +761 -205
- package/dist/index.js.map +1 -1
- package/dist/secp256k1-R7PEGLZR.js +2222 -0
- package/dist/secp256k1-R7PEGLZR.js.map +1 -0
- package/dist/typedData.d.ts +18 -2
- package/dist/typedData.d.ts.map +1 -1
- package/dist/types.d.ts +41 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/generated/1155.ts +25 -25
- package/src/generated/mints.ts +48 -30
- package/src/generated/wagmi.ts +696 -145
- package/src/index.ts +1 -0
- package/src/typedData.ts +127 -11
- package/src/types.ts +109 -0
package/dist/index.cjs
CHANGED
|
@@ -3,6 +3,9 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __esm = (fn, res) => function __init() {
|
|
7
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
8
|
+
};
|
|
6
9
|
var __export = (target, all) => {
|
|
7
10
|
for (var name in all)
|
|
8
11
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -17,13 +20,1593 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
20
|
};
|
|
18
21
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
22
|
|
|
23
|
+
// ../../node_modules/abitype/dist/esm/regex.js
|
|
24
|
+
function execTyped(regex, string) {
|
|
25
|
+
const match = regex.exec(string);
|
|
26
|
+
return match?.groups;
|
|
27
|
+
}
|
|
28
|
+
var init_regex = __esm({
|
|
29
|
+
"../../node_modules/abitype/dist/esm/regex.js"() {
|
|
30
|
+
"use strict";
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
// ../../node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js
|
|
35
|
+
function formatAbiParameter(abiParameter) {
|
|
36
|
+
let type = abiParameter.type;
|
|
37
|
+
if (tupleRegex.test(abiParameter.type) && "components" in abiParameter) {
|
|
38
|
+
type = "(";
|
|
39
|
+
const length = abiParameter.components.length;
|
|
40
|
+
for (let i = 0; i < length; i++) {
|
|
41
|
+
const component = abiParameter.components[i];
|
|
42
|
+
type += formatAbiParameter(component);
|
|
43
|
+
if (i < length - 1)
|
|
44
|
+
type += ", ";
|
|
45
|
+
}
|
|
46
|
+
const result = execTyped(tupleRegex, abiParameter.type);
|
|
47
|
+
type += `)${result?.array ?? ""}`;
|
|
48
|
+
return formatAbiParameter({
|
|
49
|
+
...abiParameter,
|
|
50
|
+
type
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
if ("indexed" in abiParameter && abiParameter.indexed)
|
|
54
|
+
type = `${type} indexed`;
|
|
55
|
+
if (abiParameter.name)
|
|
56
|
+
return `${type} ${abiParameter.name}`;
|
|
57
|
+
return type;
|
|
58
|
+
}
|
|
59
|
+
var tupleRegex;
|
|
60
|
+
var init_formatAbiParameter = __esm({
|
|
61
|
+
"../../node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js"() {
|
|
62
|
+
"use strict";
|
|
63
|
+
init_regex();
|
|
64
|
+
tupleRegex = /^tuple(?<array>(\[(\d*)\])*)$/;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
// ../../node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js
|
|
69
|
+
function formatAbiParameters(abiParameters) {
|
|
70
|
+
let params = "";
|
|
71
|
+
const length = abiParameters.length;
|
|
72
|
+
for (let i = 0; i < length; i++) {
|
|
73
|
+
const abiParameter = abiParameters[i];
|
|
74
|
+
params += formatAbiParameter(abiParameter);
|
|
75
|
+
if (i !== length - 1)
|
|
76
|
+
params += ", ";
|
|
77
|
+
}
|
|
78
|
+
return params;
|
|
79
|
+
}
|
|
80
|
+
var init_formatAbiParameters = __esm({
|
|
81
|
+
"../../node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js"() {
|
|
82
|
+
"use strict";
|
|
83
|
+
init_formatAbiParameter();
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
// ../../node_modules/abitype/dist/esm/human-readable/formatAbiItem.js
|
|
88
|
+
function formatAbiItem(abiItem) {
|
|
89
|
+
if (abiItem.type === "function")
|
|
90
|
+
return `function ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability && abiItem.stateMutability !== "nonpayable" ? ` ${abiItem.stateMutability}` : ""}${abiItem.outputs.length ? ` returns (${formatAbiParameters(abiItem.outputs)})` : ""}`;
|
|
91
|
+
else if (abiItem.type === "event")
|
|
92
|
+
return `event ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;
|
|
93
|
+
else if (abiItem.type === "error")
|
|
94
|
+
return `error ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;
|
|
95
|
+
else if (abiItem.type === "constructor")
|
|
96
|
+
return `constructor(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability === "payable" ? " payable" : ""}`;
|
|
97
|
+
else if (abiItem.type === "fallback")
|
|
98
|
+
return "fallback()";
|
|
99
|
+
return "receive() external payable";
|
|
100
|
+
}
|
|
101
|
+
var init_formatAbiItem = __esm({
|
|
102
|
+
"../../node_modules/abitype/dist/esm/human-readable/formatAbiItem.js"() {
|
|
103
|
+
"use strict";
|
|
104
|
+
init_formatAbiParameters();
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
// ../../node_modules/abitype/dist/esm/exports/index.js
|
|
109
|
+
var init_exports = __esm({
|
|
110
|
+
"../../node_modules/abitype/dist/esm/exports/index.js"() {
|
|
111
|
+
"use strict";
|
|
112
|
+
init_formatAbiItem();
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
// ../../node_modules/viem/_esm/utils/abi/formatAbiItem.js
|
|
117
|
+
function formatAbiItem2(abiItem, { includeName = false } = {}) {
|
|
118
|
+
if (abiItem.type !== "function" && abiItem.type !== "event" && abiItem.type !== "error")
|
|
119
|
+
throw new InvalidDefinitionTypeError(abiItem.type);
|
|
120
|
+
return `${abiItem.name}(${formatAbiParams(abiItem.inputs, { includeName })})`;
|
|
121
|
+
}
|
|
122
|
+
function formatAbiParams(params, { includeName = false } = {}) {
|
|
123
|
+
if (!params)
|
|
124
|
+
return "";
|
|
125
|
+
return params.map((param) => formatAbiParam(param, { includeName })).join(includeName ? ", " : ",");
|
|
126
|
+
}
|
|
127
|
+
function formatAbiParam(param, { includeName }) {
|
|
128
|
+
if (param.type.startsWith("tuple")) {
|
|
129
|
+
return `(${formatAbiParams(param.components, { includeName })})${param.type.slice("tuple".length)}`;
|
|
130
|
+
}
|
|
131
|
+
return param.type + (includeName && param.name ? ` ${param.name}` : "");
|
|
132
|
+
}
|
|
133
|
+
var init_formatAbiItem2 = __esm({
|
|
134
|
+
"../../node_modules/viem/_esm/utils/abi/formatAbiItem.js"() {
|
|
135
|
+
"use strict";
|
|
136
|
+
init_abi();
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
// ../../node_modules/viem/_esm/utils/data/isHex.js
|
|
141
|
+
function isHex(value, { strict = true } = {}) {
|
|
142
|
+
if (!value)
|
|
143
|
+
return false;
|
|
144
|
+
if (typeof value !== "string")
|
|
145
|
+
return false;
|
|
146
|
+
return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith("0x");
|
|
147
|
+
}
|
|
148
|
+
var init_isHex = __esm({
|
|
149
|
+
"../../node_modules/viem/_esm/utils/data/isHex.js"() {
|
|
150
|
+
"use strict";
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
// ../../node_modules/viem/_esm/utils/data/size.js
|
|
155
|
+
function size(value) {
|
|
156
|
+
if (isHex(value, { strict: false }))
|
|
157
|
+
return Math.ceil((value.length - 2) / 2);
|
|
158
|
+
return value.length;
|
|
159
|
+
}
|
|
160
|
+
var init_size = __esm({
|
|
161
|
+
"../../node_modules/viem/_esm/utils/data/size.js"() {
|
|
162
|
+
"use strict";
|
|
163
|
+
init_isHex();
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
// ../../node_modules/viem/_esm/errors/version.js
|
|
168
|
+
var version;
|
|
169
|
+
var init_version = __esm({
|
|
170
|
+
"../../node_modules/viem/_esm/errors/version.js"() {
|
|
171
|
+
"use strict";
|
|
172
|
+
version = "2.12.1";
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
// ../../node_modules/viem/_esm/errors/utils.js
|
|
177
|
+
var getVersion;
|
|
178
|
+
var init_utils = __esm({
|
|
179
|
+
"../../node_modules/viem/_esm/errors/utils.js"() {
|
|
180
|
+
"use strict";
|
|
181
|
+
init_version();
|
|
182
|
+
getVersion = () => `viem@${version}`;
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
// ../../node_modules/viem/_esm/errors/base.js
|
|
187
|
+
function walk(err, fn) {
|
|
188
|
+
if (fn?.(err))
|
|
189
|
+
return err;
|
|
190
|
+
if (err && typeof err === "object" && "cause" in err)
|
|
191
|
+
return walk(err.cause, fn);
|
|
192
|
+
return fn ? null : err;
|
|
193
|
+
}
|
|
194
|
+
var BaseError;
|
|
195
|
+
var init_base = __esm({
|
|
196
|
+
"../../node_modules/viem/_esm/errors/base.js"() {
|
|
197
|
+
"use strict";
|
|
198
|
+
init_utils();
|
|
199
|
+
BaseError = class _BaseError extends Error {
|
|
200
|
+
constructor(shortMessage, args = {}) {
|
|
201
|
+
super();
|
|
202
|
+
Object.defineProperty(this, "details", {
|
|
203
|
+
enumerable: true,
|
|
204
|
+
configurable: true,
|
|
205
|
+
writable: true,
|
|
206
|
+
value: void 0
|
|
207
|
+
});
|
|
208
|
+
Object.defineProperty(this, "docsPath", {
|
|
209
|
+
enumerable: true,
|
|
210
|
+
configurable: true,
|
|
211
|
+
writable: true,
|
|
212
|
+
value: void 0
|
|
213
|
+
});
|
|
214
|
+
Object.defineProperty(this, "metaMessages", {
|
|
215
|
+
enumerable: true,
|
|
216
|
+
configurable: true,
|
|
217
|
+
writable: true,
|
|
218
|
+
value: void 0
|
|
219
|
+
});
|
|
220
|
+
Object.defineProperty(this, "shortMessage", {
|
|
221
|
+
enumerable: true,
|
|
222
|
+
configurable: true,
|
|
223
|
+
writable: true,
|
|
224
|
+
value: void 0
|
|
225
|
+
});
|
|
226
|
+
Object.defineProperty(this, "name", {
|
|
227
|
+
enumerable: true,
|
|
228
|
+
configurable: true,
|
|
229
|
+
writable: true,
|
|
230
|
+
value: "ViemError"
|
|
231
|
+
});
|
|
232
|
+
Object.defineProperty(this, "version", {
|
|
233
|
+
enumerable: true,
|
|
234
|
+
configurable: true,
|
|
235
|
+
writable: true,
|
|
236
|
+
value: getVersion()
|
|
237
|
+
});
|
|
238
|
+
const details = args.cause instanceof _BaseError ? args.cause.details : args.cause?.message ? args.cause.message : args.details;
|
|
239
|
+
const docsPath = args.cause instanceof _BaseError ? args.cause.docsPath || args.docsPath : args.docsPath;
|
|
240
|
+
this.message = [
|
|
241
|
+
shortMessage || "An error occurred.",
|
|
242
|
+
"",
|
|
243
|
+
...args.metaMessages ? [...args.metaMessages, ""] : [],
|
|
244
|
+
...docsPath ? [
|
|
245
|
+
`Docs: https://viem.sh${docsPath}${args.docsSlug ? `#${args.docsSlug}` : ""}`
|
|
246
|
+
] : [],
|
|
247
|
+
...details ? [`Details: ${details}`] : [],
|
|
248
|
+
`Version: ${this.version}`
|
|
249
|
+
].join("\n");
|
|
250
|
+
if (args.cause)
|
|
251
|
+
this.cause = args.cause;
|
|
252
|
+
this.details = details;
|
|
253
|
+
this.docsPath = docsPath;
|
|
254
|
+
this.metaMessages = args.metaMessages;
|
|
255
|
+
this.shortMessage = shortMessage;
|
|
256
|
+
}
|
|
257
|
+
walk(fn) {
|
|
258
|
+
return walk(this, fn);
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
// ../../node_modules/viem/_esm/errors/abi.js
|
|
265
|
+
var AbiEncodingArrayLengthMismatchError, AbiEncodingBytesSizeMismatchError, AbiEncodingLengthMismatchError, AbiItemAmbiguityError, InvalidAbiEncodingTypeError, InvalidArrayError, InvalidDefinitionTypeError;
|
|
266
|
+
var init_abi = __esm({
|
|
267
|
+
"../../node_modules/viem/_esm/errors/abi.js"() {
|
|
268
|
+
"use strict";
|
|
269
|
+
init_formatAbiItem2();
|
|
270
|
+
init_size();
|
|
271
|
+
init_base();
|
|
272
|
+
AbiEncodingArrayLengthMismatchError = class extends BaseError {
|
|
273
|
+
constructor({ expectedLength, givenLength, type }) {
|
|
274
|
+
super([
|
|
275
|
+
`ABI encoding array length mismatch for type ${type}.`,
|
|
276
|
+
`Expected length: ${expectedLength}`,
|
|
277
|
+
`Given length: ${givenLength}`
|
|
278
|
+
].join("\n"));
|
|
279
|
+
Object.defineProperty(this, "name", {
|
|
280
|
+
enumerable: true,
|
|
281
|
+
configurable: true,
|
|
282
|
+
writable: true,
|
|
283
|
+
value: "AbiEncodingArrayLengthMismatchError"
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
AbiEncodingBytesSizeMismatchError = class extends BaseError {
|
|
288
|
+
constructor({ expectedSize, value }) {
|
|
289
|
+
super(`Size of bytes "${value}" (bytes${size(value)}) does not match expected size (bytes${expectedSize}).`);
|
|
290
|
+
Object.defineProperty(this, "name", {
|
|
291
|
+
enumerable: true,
|
|
292
|
+
configurable: true,
|
|
293
|
+
writable: true,
|
|
294
|
+
value: "AbiEncodingBytesSizeMismatchError"
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
AbiEncodingLengthMismatchError = class extends BaseError {
|
|
299
|
+
constructor({ expectedLength, givenLength }) {
|
|
300
|
+
super([
|
|
301
|
+
"ABI encoding params/values length mismatch.",
|
|
302
|
+
`Expected length (params): ${expectedLength}`,
|
|
303
|
+
`Given length (values): ${givenLength}`
|
|
304
|
+
].join("\n"));
|
|
305
|
+
Object.defineProperty(this, "name", {
|
|
306
|
+
enumerable: true,
|
|
307
|
+
configurable: true,
|
|
308
|
+
writable: true,
|
|
309
|
+
value: "AbiEncodingLengthMismatchError"
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
AbiItemAmbiguityError = class extends BaseError {
|
|
314
|
+
constructor(x, y) {
|
|
315
|
+
super("Found ambiguous types in overloaded ABI items.", {
|
|
316
|
+
metaMessages: [
|
|
317
|
+
`\`${x.type}\` in \`${formatAbiItem2(x.abiItem)}\`, and`,
|
|
318
|
+
`\`${y.type}\` in \`${formatAbiItem2(y.abiItem)}\``,
|
|
319
|
+
"",
|
|
320
|
+
"These types encode differently and cannot be distinguished at runtime.",
|
|
321
|
+
"Remove one of the ambiguous items in the ABI."
|
|
322
|
+
]
|
|
323
|
+
});
|
|
324
|
+
Object.defineProperty(this, "name", {
|
|
325
|
+
enumerable: true,
|
|
326
|
+
configurable: true,
|
|
327
|
+
writable: true,
|
|
328
|
+
value: "AbiItemAmbiguityError"
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
InvalidAbiEncodingTypeError = class extends BaseError {
|
|
333
|
+
constructor(type, { docsPath }) {
|
|
334
|
+
super([
|
|
335
|
+
`Type "${type}" is not a valid encoding type.`,
|
|
336
|
+
"Please provide a valid ABI type."
|
|
337
|
+
].join("\n"), { docsPath });
|
|
338
|
+
Object.defineProperty(this, "name", {
|
|
339
|
+
enumerable: true,
|
|
340
|
+
configurable: true,
|
|
341
|
+
writable: true,
|
|
342
|
+
value: "InvalidAbiEncodingType"
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
};
|
|
346
|
+
InvalidArrayError = class extends BaseError {
|
|
347
|
+
constructor(value) {
|
|
348
|
+
super([`Value "${value}" is not a valid array.`].join("\n"));
|
|
349
|
+
Object.defineProperty(this, "name", {
|
|
350
|
+
enumerable: true,
|
|
351
|
+
configurable: true,
|
|
352
|
+
writable: true,
|
|
353
|
+
value: "InvalidArrayError"
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
InvalidDefinitionTypeError = class extends BaseError {
|
|
358
|
+
constructor(type) {
|
|
359
|
+
super([
|
|
360
|
+
`"${type}" is not a valid definition type.`,
|
|
361
|
+
'Valid types: "function", "event", "error"'
|
|
362
|
+
].join("\n"));
|
|
363
|
+
Object.defineProperty(this, "name", {
|
|
364
|
+
enumerable: true,
|
|
365
|
+
configurable: true,
|
|
366
|
+
writable: true,
|
|
367
|
+
value: "InvalidDefinitionTypeError"
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
|
|
374
|
+
// ../../node_modules/viem/_esm/errors/data.js
|
|
375
|
+
var SliceOffsetOutOfBoundsError, SizeExceedsPaddingSizeError;
|
|
376
|
+
var init_data = __esm({
|
|
377
|
+
"../../node_modules/viem/_esm/errors/data.js"() {
|
|
378
|
+
"use strict";
|
|
379
|
+
init_base();
|
|
380
|
+
SliceOffsetOutOfBoundsError = class extends BaseError {
|
|
381
|
+
constructor({ offset, position, size: size2 }) {
|
|
382
|
+
super(`Slice ${position === "start" ? "starting" : "ending"} at offset "${offset}" is out-of-bounds (size: ${size2}).`);
|
|
383
|
+
Object.defineProperty(this, "name", {
|
|
384
|
+
enumerable: true,
|
|
385
|
+
configurable: true,
|
|
386
|
+
writable: true,
|
|
387
|
+
value: "SliceOffsetOutOfBoundsError"
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
};
|
|
391
|
+
SizeExceedsPaddingSizeError = class extends BaseError {
|
|
392
|
+
constructor({ size: size2, targetSize, type }) {
|
|
393
|
+
super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (${size2}) exceeds padding size (${targetSize}).`);
|
|
394
|
+
Object.defineProperty(this, "name", {
|
|
395
|
+
enumerable: true,
|
|
396
|
+
configurable: true,
|
|
397
|
+
writable: true,
|
|
398
|
+
value: "SizeExceedsPaddingSizeError"
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
|
|
405
|
+
// ../../node_modules/viem/_esm/utils/data/pad.js
|
|
406
|
+
function pad(hexOrBytes, { dir, size: size2 = 32 } = {}) {
|
|
407
|
+
if (typeof hexOrBytes === "string")
|
|
408
|
+
return padHex(hexOrBytes, { dir, size: size2 });
|
|
409
|
+
return padBytes(hexOrBytes, { dir, size: size2 });
|
|
410
|
+
}
|
|
411
|
+
function padHex(hex_, { dir, size: size2 = 32 } = {}) {
|
|
412
|
+
if (size2 === null)
|
|
413
|
+
return hex_;
|
|
414
|
+
const hex = hex_.replace("0x", "");
|
|
415
|
+
if (hex.length > size2 * 2)
|
|
416
|
+
throw new SizeExceedsPaddingSizeError({
|
|
417
|
+
size: Math.ceil(hex.length / 2),
|
|
418
|
+
targetSize: size2,
|
|
419
|
+
type: "hex"
|
|
420
|
+
});
|
|
421
|
+
return `0x${hex[dir === "right" ? "padEnd" : "padStart"](size2 * 2, "0")}`;
|
|
422
|
+
}
|
|
423
|
+
function padBytes(bytes2, { dir, size: size2 = 32 } = {}) {
|
|
424
|
+
if (size2 === null)
|
|
425
|
+
return bytes2;
|
|
426
|
+
if (bytes2.length > size2)
|
|
427
|
+
throw new SizeExceedsPaddingSizeError({
|
|
428
|
+
size: bytes2.length,
|
|
429
|
+
targetSize: size2,
|
|
430
|
+
type: "bytes"
|
|
431
|
+
});
|
|
432
|
+
const paddedBytes = new Uint8Array(size2);
|
|
433
|
+
for (let i = 0; i < size2; i++) {
|
|
434
|
+
const padEnd = dir === "right";
|
|
435
|
+
paddedBytes[padEnd ? i : size2 - i - 1] = bytes2[padEnd ? i : bytes2.length - i - 1];
|
|
436
|
+
}
|
|
437
|
+
return paddedBytes;
|
|
438
|
+
}
|
|
439
|
+
var init_pad = __esm({
|
|
440
|
+
"../../node_modules/viem/_esm/utils/data/pad.js"() {
|
|
441
|
+
"use strict";
|
|
442
|
+
init_data();
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
|
|
446
|
+
// ../../node_modules/viem/_esm/errors/encoding.js
|
|
447
|
+
var IntegerOutOfRangeError, SizeOverflowError;
|
|
448
|
+
var init_encoding = __esm({
|
|
449
|
+
"../../node_modules/viem/_esm/errors/encoding.js"() {
|
|
450
|
+
"use strict";
|
|
451
|
+
init_base();
|
|
452
|
+
IntegerOutOfRangeError = class extends BaseError {
|
|
453
|
+
constructor({ max, min, signed, size: size2, value }) {
|
|
454
|
+
super(`Number "${value}" is not in safe ${size2 ? `${size2 * 8}-bit ${signed ? "signed" : "unsigned"} ` : ""}integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`);
|
|
455
|
+
Object.defineProperty(this, "name", {
|
|
456
|
+
enumerable: true,
|
|
457
|
+
configurable: true,
|
|
458
|
+
writable: true,
|
|
459
|
+
value: "IntegerOutOfRangeError"
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
SizeOverflowError = class extends BaseError {
|
|
464
|
+
constructor({ givenSize, maxSize }) {
|
|
465
|
+
super(`Size cannot exceed ${maxSize} bytes. Given size: ${givenSize} bytes.`);
|
|
466
|
+
Object.defineProperty(this, "name", {
|
|
467
|
+
enumerable: true,
|
|
468
|
+
configurable: true,
|
|
469
|
+
writable: true,
|
|
470
|
+
value: "SizeOverflowError"
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
};
|
|
474
|
+
}
|
|
475
|
+
});
|
|
476
|
+
|
|
477
|
+
// ../../node_modules/viem/_esm/utils/encoding/fromHex.js
|
|
478
|
+
function assertSize(hexOrBytes, { size: size2 }) {
|
|
479
|
+
if (size(hexOrBytes) > size2)
|
|
480
|
+
throw new SizeOverflowError({
|
|
481
|
+
givenSize: size(hexOrBytes),
|
|
482
|
+
maxSize: size2
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
var init_fromHex = __esm({
|
|
486
|
+
"../../node_modules/viem/_esm/utils/encoding/fromHex.js"() {
|
|
487
|
+
"use strict";
|
|
488
|
+
init_encoding();
|
|
489
|
+
init_size();
|
|
490
|
+
}
|
|
491
|
+
});
|
|
492
|
+
|
|
493
|
+
// ../../node_modules/viem/_esm/utils/encoding/toHex.js
|
|
494
|
+
function toHex(value, opts = {}) {
|
|
495
|
+
if (typeof value === "number" || typeof value === "bigint")
|
|
496
|
+
return numberToHex(value, opts);
|
|
497
|
+
if (typeof value === "string") {
|
|
498
|
+
return stringToHex(value, opts);
|
|
499
|
+
}
|
|
500
|
+
if (typeof value === "boolean")
|
|
501
|
+
return boolToHex(value, opts);
|
|
502
|
+
return bytesToHex(value, opts);
|
|
503
|
+
}
|
|
504
|
+
function boolToHex(value, opts = {}) {
|
|
505
|
+
const hex = `0x${Number(value)}`;
|
|
506
|
+
if (typeof opts.size === "number") {
|
|
507
|
+
assertSize(hex, { size: opts.size });
|
|
508
|
+
return pad(hex, { size: opts.size });
|
|
509
|
+
}
|
|
510
|
+
return hex;
|
|
511
|
+
}
|
|
512
|
+
function bytesToHex(value, opts = {}) {
|
|
513
|
+
let string = "";
|
|
514
|
+
for (let i = 0; i < value.length; i++) {
|
|
515
|
+
string += hexes[value[i]];
|
|
516
|
+
}
|
|
517
|
+
const hex = `0x${string}`;
|
|
518
|
+
if (typeof opts.size === "number") {
|
|
519
|
+
assertSize(hex, { size: opts.size });
|
|
520
|
+
return pad(hex, { dir: "right", size: opts.size });
|
|
521
|
+
}
|
|
522
|
+
return hex;
|
|
523
|
+
}
|
|
524
|
+
function numberToHex(value_, opts = {}) {
|
|
525
|
+
const { signed, size: size2 } = opts;
|
|
526
|
+
const value = BigInt(value_);
|
|
527
|
+
let maxValue;
|
|
528
|
+
if (size2) {
|
|
529
|
+
if (signed)
|
|
530
|
+
maxValue = (1n << BigInt(size2) * 8n - 1n) - 1n;
|
|
531
|
+
else
|
|
532
|
+
maxValue = 2n ** (BigInt(size2) * 8n) - 1n;
|
|
533
|
+
} else if (typeof value_ === "number") {
|
|
534
|
+
maxValue = BigInt(Number.MAX_SAFE_INTEGER);
|
|
535
|
+
}
|
|
536
|
+
const minValue = typeof maxValue === "bigint" && signed ? -maxValue - 1n : 0;
|
|
537
|
+
if (maxValue && value > maxValue || value < minValue) {
|
|
538
|
+
const suffix = typeof value_ === "bigint" ? "n" : "";
|
|
539
|
+
throw new IntegerOutOfRangeError({
|
|
540
|
+
max: maxValue ? `${maxValue}${suffix}` : void 0,
|
|
541
|
+
min: `${minValue}${suffix}`,
|
|
542
|
+
signed,
|
|
543
|
+
size: size2,
|
|
544
|
+
value: `${value_}${suffix}`
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
const hex = `0x${(signed && value < 0 ? (1n << BigInt(size2 * 8)) + BigInt(value) : value).toString(16)}`;
|
|
548
|
+
if (size2)
|
|
549
|
+
return pad(hex, { size: size2 });
|
|
550
|
+
return hex;
|
|
551
|
+
}
|
|
552
|
+
function stringToHex(value_, opts = {}) {
|
|
553
|
+
const value = encoder.encode(value_);
|
|
554
|
+
return bytesToHex(value, opts);
|
|
555
|
+
}
|
|
556
|
+
var hexes, encoder;
|
|
557
|
+
var init_toHex = __esm({
|
|
558
|
+
"../../node_modules/viem/_esm/utils/encoding/toHex.js"() {
|
|
559
|
+
"use strict";
|
|
560
|
+
init_encoding();
|
|
561
|
+
init_pad();
|
|
562
|
+
init_fromHex();
|
|
563
|
+
hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i) => i.toString(16).padStart(2, "0"));
|
|
564
|
+
encoder = /* @__PURE__ */ new TextEncoder();
|
|
565
|
+
}
|
|
566
|
+
});
|
|
567
|
+
|
|
568
|
+
// ../../node_modules/viem/_esm/utils/encoding/toBytes.js
|
|
569
|
+
function toBytes(value, opts = {}) {
|
|
570
|
+
if (typeof value === "number" || typeof value === "bigint")
|
|
571
|
+
return numberToBytes(value, opts);
|
|
572
|
+
if (typeof value === "boolean")
|
|
573
|
+
return boolToBytes(value, opts);
|
|
574
|
+
if (isHex(value))
|
|
575
|
+
return hexToBytes(value, opts);
|
|
576
|
+
return stringToBytes(value, opts);
|
|
577
|
+
}
|
|
578
|
+
function boolToBytes(value, opts = {}) {
|
|
579
|
+
const bytes2 = new Uint8Array(1);
|
|
580
|
+
bytes2[0] = Number(value);
|
|
581
|
+
if (typeof opts.size === "number") {
|
|
582
|
+
assertSize(bytes2, { size: opts.size });
|
|
583
|
+
return pad(bytes2, { size: opts.size });
|
|
584
|
+
}
|
|
585
|
+
return bytes2;
|
|
586
|
+
}
|
|
587
|
+
function charCodeToBase16(char) {
|
|
588
|
+
if (char >= charCodeMap.zero && char <= charCodeMap.nine)
|
|
589
|
+
return char - charCodeMap.zero;
|
|
590
|
+
if (char >= charCodeMap.A && char <= charCodeMap.F)
|
|
591
|
+
return char - (charCodeMap.A - 10);
|
|
592
|
+
if (char >= charCodeMap.a && char <= charCodeMap.f)
|
|
593
|
+
return char - (charCodeMap.a - 10);
|
|
594
|
+
return void 0;
|
|
595
|
+
}
|
|
596
|
+
function hexToBytes(hex_, opts = {}) {
|
|
597
|
+
let hex = hex_;
|
|
598
|
+
if (opts.size) {
|
|
599
|
+
assertSize(hex, { size: opts.size });
|
|
600
|
+
hex = pad(hex, { dir: "right", size: opts.size });
|
|
601
|
+
}
|
|
602
|
+
let hexString = hex.slice(2);
|
|
603
|
+
if (hexString.length % 2)
|
|
604
|
+
hexString = `0${hexString}`;
|
|
605
|
+
const length = hexString.length / 2;
|
|
606
|
+
const bytes2 = new Uint8Array(length);
|
|
607
|
+
for (let index = 0, j = 0; index < length; index++) {
|
|
608
|
+
const nibbleLeft = charCodeToBase16(hexString.charCodeAt(j++));
|
|
609
|
+
const nibbleRight = charCodeToBase16(hexString.charCodeAt(j++));
|
|
610
|
+
if (nibbleLeft === void 0 || nibbleRight === void 0) {
|
|
611
|
+
throw new BaseError(`Invalid byte sequence ("${hexString[j - 2]}${hexString[j - 1]}" in "${hexString}").`);
|
|
612
|
+
}
|
|
613
|
+
bytes2[index] = nibbleLeft * 16 + nibbleRight;
|
|
614
|
+
}
|
|
615
|
+
return bytes2;
|
|
616
|
+
}
|
|
617
|
+
function numberToBytes(value, opts) {
|
|
618
|
+
const hex = numberToHex(value, opts);
|
|
619
|
+
return hexToBytes(hex);
|
|
620
|
+
}
|
|
621
|
+
function stringToBytes(value, opts = {}) {
|
|
622
|
+
const bytes2 = encoder2.encode(value);
|
|
623
|
+
if (typeof opts.size === "number") {
|
|
624
|
+
assertSize(bytes2, { size: opts.size });
|
|
625
|
+
return pad(bytes2, { dir: "right", size: opts.size });
|
|
626
|
+
}
|
|
627
|
+
return bytes2;
|
|
628
|
+
}
|
|
629
|
+
var encoder2, charCodeMap;
|
|
630
|
+
var init_toBytes = __esm({
|
|
631
|
+
"../../node_modules/viem/_esm/utils/encoding/toBytes.js"() {
|
|
632
|
+
"use strict";
|
|
633
|
+
init_base();
|
|
634
|
+
init_isHex();
|
|
635
|
+
init_pad();
|
|
636
|
+
init_fromHex();
|
|
637
|
+
init_toHex();
|
|
638
|
+
encoder2 = /* @__PURE__ */ new TextEncoder();
|
|
639
|
+
charCodeMap = {
|
|
640
|
+
zero: 48,
|
|
641
|
+
nine: 57,
|
|
642
|
+
A: 65,
|
|
643
|
+
F: 70,
|
|
644
|
+
a: 97,
|
|
645
|
+
f: 102
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
});
|
|
649
|
+
|
|
650
|
+
// ../../node_modules/@noble/hashes/esm/_assert.js
|
|
651
|
+
function number(n) {
|
|
652
|
+
if (!Number.isSafeInteger(n) || n < 0)
|
|
653
|
+
throw new Error(`Wrong positive integer: ${n}`);
|
|
654
|
+
}
|
|
655
|
+
function bytes(b, ...lengths) {
|
|
656
|
+
if (!(b instanceof Uint8Array))
|
|
657
|
+
throw new Error("Expected Uint8Array");
|
|
658
|
+
if (lengths.length > 0 && !lengths.includes(b.length))
|
|
659
|
+
throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);
|
|
660
|
+
}
|
|
661
|
+
function exists(instance, checkFinished = true) {
|
|
662
|
+
if (instance.destroyed)
|
|
663
|
+
throw new Error("Hash instance has been destroyed");
|
|
664
|
+
if (checkFinished && instance.finished)
|
|
665
|
+
throw new Error("Hash#digest() has already been called");
|
|
666
|
+
}
|
|
667
|
+
function output(out, instance) {
|
|
668
|
+
bytes(out);
|
|
669
|
+
const min = instance.outputLen;
|
|
670
|
+
if (out.length < min) {
|
|
671
|
+
throw new Error(`digestInto() expects output buffer of length at least ${min}`);
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
var init_assert = __esm({
|
|
675
|
+
"../../node_modules/@noble/hashes/esm/_assert.js"() {
|
|
676
|
+
"use strict";
|
|
677
|
+
}
|
|
678
|
+
});
|
|
679
|
+
|
|
680
|
+
// ../../node_modules/@noble/hashes/esm/_u64.js
|
|
681
|
+
function fromBig(n, le = false) {
|
|
682
|
+
if (le)
|
|
683
|
+
return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
|
|
684
|
+
return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
|
|
685
|
+
}
|
|
686
|
+
function split(lst, le = false) {
|
|
687
|
+
let Ah = new Uint32Array(lst.length);
|
|
688
|
+
let Al = new Uint32Array(lst.length);
|
|
689
|
+
for (let i = 0; i < lst.length; i++) {
|
|
690
|
+
const { h, l } = fromBig(lst[i], le);
|
|
691
|
+
[Ah[i], Al[i]] = [h, l];
|
|
692
|
+
}
|
|
693
|
+
return [Ah, Al];
|
|
694
|
+
}
|
|
695
|
+
var U32_MASK64, _32n, rotlSH, rotlSL, rotlBH, rotlBL;
|
|
696
|
+
var init_u64 = __esm({
|
|
697
|
+
"../../node_modules/@noble/hashes/esm/_u64.js"() {
|
|
698
|
+
"use strict";
|
|
699
|
+
U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
|
|
700
|
+
_32n = /* @__PURE__ */ BigInt(32);
|
|
701
|
+
rotlSH = (h, l, s) => h << s | l >>> 32 - s;
|
|
702
|
+
rotlSL = (h, l, s) => l << s | h >>> 32 - s;
|
|
703
|
+
rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
|
|
704
|
+
rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
|
|
705
|
+
}
|
|
706
|
+
});
|
|
707
|
+
|
|
708
|
+
// ../../node_modules/@noble/hashes/esm/utils.js
|
|
709
|
+
function utf8ToBytes(str) {
|
|
710
|
+
if (typeof str !== "string")
|
|
711
|
+
throw new Error(`utf8ToBytes expected string, got ${typeof str}`);
|
|
712
|
+
return new Uint8Array(new TextEncoder().encode(str));
|
|
713
|
+
}
|
|
714
|
+
function toBytes2(data) {
|
|
715
|
+
if (typeof data === "string")
|
|
716
|
+
data = utf8ToBytes(data);
|
|
717
|
+
if (!u8a(data))
|
|
718
|
+
throw new Error(`expected Uint8Array, got ${typeof data}`);
|
|
719
|
+
return data;
|
|
720
|
+
}
|
|
721
|
+
function wrapConstructor(hashCons) {
|
|
722
|
+
const hashC = (msg) => hashCons().update(toBytes2(msg)).digest();
|
|
723
|
+
const tmp = hashCons();
|
|
724
|
+
hashC.outputLen = tmp.outputLen;
|
|
725
|
+
hashC.blockLen = tmp.blockLen;
|
|
726
|
+
hashC.create = () => hashCons();
|
|
727
|
+
return hashC;
|
|
728
|
+
}
|
|
729
|
+
function wrapXOFConstructorWithOpts(hashCons) {
|
|
730
|
+
const hashC = (msg, opts) => hashCons(opts).update(toBytes2(msg)).digest();
|
|
731
|
+
const tmp = hashCons({});
|
|
732
|
+
hashC.outputLen = tmp.outputLen;
|
|
733
|
+
hashC.blockLen = tmp.blockLen;
|
|
734
|
+
hashC.create = (opts) => hashCons(opts);
|
|
735
|
+
return hashC;
|
|
736
|
+
}
|
|
737
|
+
var u8a, u32, isLE, Hash, toStr;
|
|
738
|
+
var init_utils2 = __esm({
|
|
739
|
+
"../../node_modules/@noble/hashes/esm/utils.js"() {
|
|
740
|
+
"use strict";
|
|
741
|
+
u8a = (a) => a instanceof Uint8Array;
|
|
742
|
+
u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
|
|
743
|
+
isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
744
|
+
if (!isLE)
|
|
745
|
+
throw new Error("Non little-endian hardware is not supported");
|
|
746
|
+
Hash = class {
|
|
747
|
+
// Safe version that clones internal state
|
|
748
|
+
clone() {
|
|
749
|
+
return this._cloneInto();
|
|
750
|
+
}
|
|
751
|
+
};
|
|
752
|
+
toStr = {}.toString;
|
|
753
|
+
}
|
|
754
|
+
});
|
|
755
|
+
|
|
756
|
+
// ../../node_modules/@noble/hashes/esm/sha3.js
|
|
757
|
+
function keccakP(s, rounds = 24) {
|
|
758
|
+
const B = new Uint32Array(5 * 2);
|
|
759
|
+
for (let round = 24 - rounds; round < 24; round++) {
|
|
760
|
+
for (let x = 0; x < 10; x++)
|
|
761
|
+
B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];
|
|
762
|
+
for (let x = 0; x < 10; x += 2) {
|
|
763
|
+
const idx1 = (x + 8) % 10;
|
|
764
|
+
const idx0 = (x + 2) % 10;
|
|
765
|
+
const B0 = B[idx0];
|
|
766
|
+
const B1 = B[idx0 + 1];
|
|
767
|
+
const Th = rotlH(B0, B1, 1) ^ B[idx1];
|
|
768
|
+
const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];
|
|
769
|
+
for (let y = 0; y < 50; y += 10) {
|
|
770
|
+
s[x + y] ^= Th;
|
|
771
|
+
s[x + y + 1] ^= Tl;
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
let curH = s[2];
|
|
775
|
+
let curL = s[3];
|
|
776
|
+
for (let t = 0; t < 24; t++) {
|
|
777
|
+
const shift = SHA3_ROTL[t];
|
|
778
|
+
const Th = rotlH(curH, curL, shift);
|
|
779
|
+
const Tl = rotlL(curH, curL, shift);
|
|
780
|
+
const PI = SHA3_PI[t];
|
|
781
|
+
curH = s[PI];
|
|
782
|
+
curL = s[PI + 1];
|
|
783
|
+
s[PI] = Th;
|
|
784
|
+
s[PI + 1] = Tl;
|
|
785
|
+
}
|
|
786
|
+
for (let y = 0; y < 50; y += 10) {
|
|
787
|
+
for (let x = 0; x < 10; x++)
|
|
788
|
+
B[x] = s[y + x];
|
|
789
|
+
for (let x = 0; x < 10; x++)
|
|
790
|
+
s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];
|
|
791
|
+
}
|
|
792
|
+
s[0] ^= SHA3_IOTA_H[round];
|
|
793
|
+
s[1] ^= SHA3_IOTA_L[round];
|
|
794
|
+
}
|
|
795
|
+
B.fill(0);
|
|
796
|
+
}
|
|
797
|
+
var SHA3_PI, SHA3_ROTL, _SHA3_IOTA, _0n, _1n, _2n, _7n, _256n, _0x71n, SHA3_IOTA_H, SHA3_IOTA_L, rotlH, rotlL, Keccak, gen, sha3_224, sha3_256, sha3_384, sha3_512, keccak_224, keccak_256, keccak_384, keccak_512, genShake, shake128, shake256;
|
|
798
|
+
var init_sha3 = __esm({
|
|
799
|
+
"../../node_modules/@noble/hashes/esm/sha3.js"() {
|
|
800
|
+
"use strict";
|
|
801
|
+
init_assert();
|
|
802
|
+
init_u64();
|
|
803
|
+
init_utils2();
|
|
804
|
+
[SHA3_PI, SHA3_ROTL, _SHA3_IOTA] = [[], [], []];
|
|
805
|
+
_0n = /* @__PURE__ */ BigInt(0);
|
|
806
|
+
_1n = /* @__PURE__ */ BigInt(1);
|
|
807
|
+
_2n = /* @__PURE__ */ BigInt(2);
|
|
808
|
+
_7n = /* @__PURE__ */ BigInt(7);
|
|
809
|
+
_256n = /* @__PURE__ */ BigInt(256);
|
|
810
|
+
_0x71n = /* @__PURE__ */ BigInt(113);
|
|
811
|
+
for (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {
|
|
812
|
+
[x, y] = [y, (2 * x + 3 * y) % 5];
|
|
813
|
+
SHA3_PI.push(2 * (5 * y + x));
|
|
814
|
+
SHA3_ROTL.push((round + 1) * (round + 2) / 2 % 64);
|
|
815
|
+
let t = _0n;
|
|
816
|
+
for (let j = 0; j < 7; j++) {
|
|
817
|
+
R = (R << _1n ^ (R >> _7n) * _0x71n) % _256n;
|
|
818
|
+
if (R & _2n)
|
|
819
|
+
t ^= _1n << (_1n << /* @__PURE__ */ BigInt(j)) - _1n;
|
|
820
|
+
}
|
|
821
|
+
_SHA3_IOTA.push(t);
|
|
822
|
+
}
|
|
823
|
+
[SHA3_IOTA_H, SHA3_IOTA_L] = /* @__PURE__ */ split(_SHA3_IOTA, true);
|
|
824
|
+
rotlH = (h, l, s) => s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s);
|
|
825
|
+
rotlL = (h, l, s) => s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s);
|
|
826
|
+
Keccak = class _Keccak extends Hash {
|
|
827
|
+
// NOTE: we accept arguments in bytes instead of bits here.
|
|
828
|
+
constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {
|
|
829
|
+
super();
|
|
830
|
+
this.blockLen = blockLen;
|
|
831
|
+
this.suffix = suffix;
|
|
832
|
+
this.outputLen = outputLen;
|
|
833
|
+
this.enableXOF = enableXOF;
|
|
834
|
+
this.rounds = rounds;
|
|
835
|
+
this.pos = 0;
|
|
836
|
+
this.posOut = 0;
|
|
837
|
+
this.finished = false;
|
|
838
|
+
this.destroyed = false;
|
|
839
|
+
number(outputLen);
|
|
840
|
+
if (0 >= this.blockLen || this.blockLen >= 200)
|
|
841
|
+
throw new Error("Sha3 supports only keccak-f1600 function");
|
|
842
|
+
this.state = new Uint8Array(200);
|
|
843
|
+
this.state32 = u32(this.state);
|
|
844
|
+
}
|
|
845
|
+
keccak() {
|
|
846
|
+
keccakP(this.state32, this.rounds);
|
|
847
|
+
this.posOut = 0;
|
|
848
|
+
this.pos = 0;
|
|
849
|
+
}
|
|
850
|
+
update(data) {
|
|
851
|
+
exists(this);
|
|
852
|
+
const { blockLen, state } = this;
|
|
853
|
+
data = toBytes2(data);
|
|
854
|
+
const len = data.length;
|
|
855
|
+
for (let pos = 0; pos < len; ) {
|
|
856
|
+
const take = Math.min(blockLen - this.pos, len - pos);
|
|
857
|
+
for (let i = 0; i < take; i++)
|
|
858
|
+
state[this.pos++] ^= data[pos++];
|
|
859
|
+
if (this.pos === blockLen)
|
|
860
|
+
this.keccak();
|
|
861
|
+
}
|
|
862
|
+
return this;
|
|
863
|
+
}
|
|
864
|
+
finish() {
|
|
865
|
+
if (this.finished)
|
|
866
|
+
return;
|
|
867
|
+
this.finished = true;
|
|
868
|
+
const { state, suffix, pos, blockLen } = this;
|
|
869
|
+
state[pos] ^= suffix;
|
|
870
|
+
if ((suffix & 128) !== 0 && pos === blockLen - 1)
|
|
871
|
+
this.keccak();
|
|
872
|
+
state[blockLen - 1] ^= 128;
|
|
873
|
+
this.keccak();
|
|
874
|
+
}
|
|
875
|
+
writeInto(out) {
|
|
876
|
+
exists(this, false);
|
|
877
|
+
bytes(out);
|
|
878
|
+
this.finish();
|
|
879
|
+
const bufferOut = this.state;
|
|
880
|
+
const { blockLen } = this;
|
|
881
|
+
for (let pos = 0, len = out.length; pos < len; ) {
|
|
882
|
+
if (this.posOut >= blockLen)
|
|
883
|
+
this.keccak();
|
|
884
|
+
const take = Math.min(blockLen - this.posOut, len - pos);
|
|
885
|
+
out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);
|
|
886
|
+
this.posOut += take;
|
|
887
|
+
pos += take;
|
|
888
|
+
}
|
|
889
|
+
return out;
|
|
890
|
+
}
|
|
891
|
+
xofInto(out) {
|
|
892
|
+
if (!this.enableXOF)
|
|
893
|
+
throw new Error("XOF is not possible for this instance");
|
|
894
|
+
return this.writeInto(out);
|
|
895
|
+
}
|
|
896
|
+
xof(bytes2) {
|
|
897
|
+
number(bytes2);
|
|
898
|
+
return this.xofInto(new Uint8Array(bytes2));
|
|
899
|
+
}
|
|
900
|
+
digestInto(out) {
|
|
901
|
+
output(out, this);
|
|
902
|
+
if (this.finished)
|
|
903
|
+
throw new Error("digest() was already called");
|
|
904
|
+
this.writeInto(out);
|
|
905
|
+
this.destroy();
|
|
906
|
+
return out;
|
|
907
|
+
}
|
|
908
|
+
digest() {
|
|
909
|
+
return this.digestInto(new Uint8Array(this.outputLen));
|
|
910
|
+
}
|
|
911
|
+
destroy() {
|
|
912
|
+
this.destroyed = true;
|
|
913
|
+
this.state.fill(0);
|
|
914
|
+
}
|
|
915
|
+
_cloneInto(to) {
|
|
916
|
+
const { blockLen, suffix, outputLen, rounds, enableXOF } = this;
|
|
917
|
+
to || (to = new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds));
|
|
918
|
+
to.state32.set(this.state32);
|
|
919
|
+
to.pos = this.pos;
|
|
920
|
+
to.posOut = this.posOut;
|
|
921
|
+
to.finished = this.finished;
|
|
922
|
+
to.rounds = rounds;
|
|
923
|
+
to.suffix = suffix;
|
|
924
|
+
to.outputLen = outputLen;
|
|
925
|
+
to.enableXOF = enableXOF;
|
|
926
|
+
to.destroyed = this.destroyed;
|
|
927
|
+
return to;
|
|
928
|
+
}
|
|
929
|
+
};
|
|
930
|
+
gen = (suffix, blockLen, outputLen) => wrapConstructor(() => new Keccak(blockLen, suffix, outputLen));
|
|
931
|
+
sha3_224 = /* @__PURE__ */ gen(6, 144, 224 / 8);
|
|
932
|
+
sha3_256 = /* @__PURE__ */ gen(6, 136, 256 / 8);
|
|
933
|
+
sha3_384 = /* @__PURE__ */ gen(6, 104, 384 / 8);
|
|
934
|
+
sha3_512 = /* @__PURE__ */ gen(6, 72, 512 / 8);
|
|
935
|
+
keccak_224 = /* @__PURE__ */ gen(1, 144, 224 / 8);
|
|
936
|
+
keccak_256 = /* @__PURE__ */ gen(1, 136, 256 / 8);
|
|
937
|
+
keccak_384 = /* @__PURE__ */ gen(1, 104, 384 / 8);
|
|
938
|
+
keccak_512 = /* @__PURE__ */ gen(1, 72, 512 / 8);
|
|
939
|
+
genShake = (suffix, blockLen, outputLen) => wrapXOFConstructorWithOpts((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === void 0 ? outputLen : opts.dkLen, true));
|
|
940
|
+
shake128 = /* @__PURE__ */ genShake(31, 168, 128 / 8);
|
|
941
|
+
shake256 = /* @__PURE__ */ genShake(31, 136, 256 / 8);
|
|
942
|
+
}
|
|
943
|
+
});
|
|
944
|
+
|
|
945
|
+
// ../../node_modules/viem/_esm/utils/hash/keccak256.js
|
|
946
|
+
function keccak256(value, to_) {
|
|
947
|
+
const to = to_ || "hex";
|
|
948
|
+
const bytes2 = keccak_256(isHex(value, { strict: false }) ? toBytes(value) : value);
|
|
949
|
+
if (to === "bytes")
|
|
950
|
+
return bytes2;
|
|
951
|
+
return toHex(bytes2);
|
|
952
|
+
}
|
|
953
|
+
var init_keccak256 = __esm({
|
|
954
|
+
"../../node_modules/viem/_esm/utils/hash/keccak256.js"() {
|
|
955
|
+
"use strict";
|
|
956
|
+
init_sha3();
|
|
957
|
+
init_isHex();
|
|
958
|
+
init_toBytes();
|
|
959
|
+
init_toHex();
|
|
960
|
+
}
|
|
961
|
+
});
|
|
962
|
+
|
|
963
|
+
// ../../node_modules/viem/_esm/utils/hash/hashSignature.js
|
|
964
|
+
function hashSignature(sig) {
|
|
965
|
+
return hash(sig);
|
|
966
|
+
}
|
|
967
|
+
var hash;
|
|
968
|
+
var init_hashSignature = __esm({
|
|
969
|
+
"../../node_modules/viem/_esm/utils/hash/hashSignature.js"() {
|
|
970
|
+
"use strict";
|
|
971
|
+
init_toBytes();
|
|
972
|
+
init_keccak256();
|
|
973
|
+
hash = (value) => keccak256(toBytes(value));
|
|
974
|
+
}
|
|
975
|
+
});
|
|
976
|
+
|
|
977
|
+
// ../../node_modules/viem/_esm/utils/hash/normalizeSignature.js
|
|
978
|
+
function normalizeSignature(signature) {
|
|
979
|
+
let active = true;
|
|
980
|
+
let current = "";
|
|
981
|
+
let level = 0;
|
|
982
|
+
let result = "";
|
|
983
|
+
let valid = false;
|
|
984
|
+
for (let i = 0; i < signature.length; i++) {
|
|
985
|
+
const char = signature[i];
|
|
986
|
+
if (["(", ")", ","].includes(char))
|
|
987
|
+
active = true;
|
|
988
|
+
if (char === "(")
|
|
989
|
+
level++;
|
|
990
|
+
if (char === ")")
|
|
991
|
+
level--;
|
|
992
|
+
if (!active)
|
|
993
|
+
continue;
|
|
994
|
+
if (level === 0) {
|
|
995
|
+
if (char === " " && ["event", "function", ""].includes(result))
|
|
996
|
+
result = "";
|
|
997
|
+
else {
|
|
998
|
+
result += char;
|
|
999
|
+
if (char === ")") {
|
|
1000
|
+
valid = true;
|
|
1001
|
+
break;
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
continue;
|
|
1005
|
+
}
|
|
1006
|
+
if (char === " ") {
|
|
1007
|
+
if (signature[i - 1] !== "," && current !== "," && current !== ",(") {
|
|
1008
|
+
current = "";
|
|
1009
|
+
active = false;
|
|
1010
|
+
}
|
|
1011
|
+
continue;
|
|
1012
|
+
}
|
|
1013
|
+
result += char;
|
|
1014
|
+
current += char;
|
|
1015
|
+
}
|
|
1016
|
+
if (!valid)
|
|
1017
|
+
throw new BaseError("Unable to normalize signature.");
|
|
1018
|
+
return result;
|
|
1019
|
+
}
|
|
1020
|
+
var init_normalizeSignature = __esm({
|
|
1021
|
+
"../../node_modules/viem/_esm/utils/hash/normalizeSignature.js"() {
|
|
1022
|
+
"use strict";
|
|
1023
|
+
init_base();
|
|
1024
|
+
}
|
|
1025
|
+
});
|
|
1026
|
+
|
|
1027
|
+
// ../../node_modules/viem/_esm/utils/hash/toSignature.js
|
|
1028
|
+
var toSignature;
|
|
1029
|
+
var init_toSignature = __esm({
|
|
1030
|
+
"../../node_modules/viem/_esm/utils/hash/toSignature.js"() {
|
|
1031
|
+
"use strict";
|
|
1032
|
+
init_exports();
|
|
1033
|
+
init_normalizeSignature();
|
|
1034
|
+
toSignature = (def) => {
|
|
1035
|
+
const def_ = (() => {
|
|
1036
|
+
if (typeof def === "string")
|
|
1037
|
+
return def;
|
|
1038
|
+
return formatAbiItem(def);
|
|
1039
|
+
})();
|
|
1040
|
+
return normalizeSignature(def_);
|
|
1041
|
+
};
|
|
1042
|
+
}
|
|
1043
|
+
});
|
|
1044
|
+
|
|
1045
|
+
// ../../node_modules/viem/_esm/utils/hash/toSignatureHash.js
|
|
1046
|
+
function toSignatureHash(fn) {
|
|
1047
|
+
return hashSignature(toSignature(fn));
|
|
1048
|
+
}
|
|
1049
|
+
var init_toSignatureHash = __esm({
|
|
1050
|
+
"../../node_modules/viem/_esm/utils/hash/toSignatureHash.js"() {
|
|
1051
|
+
"use strict";
|
|
1052
|
+
init_hashSignature();
|
|
1053
|
+
init_toSignature();
|
|
1054
|
+
}
|
|
1055
|
+
});
|
|
1056
|
+
|
|
1057
|
+
// ../../node_modules/viem/_esm/utils/hash/toEventSelector.js
|
|
1058
|
+
var toEventSelector;
|
|
1059
|
+
var init_toEventSelector = __esm({
|
|
1060
|
+
"../../node_modules/viem/_esm/utils/hash/toEventSelector.js"() {
|
|
1061
|
+
"use strict";
|
|
1062
|
+
init_toSignatureHash();
|
|
1063
|
+
toEventSelector = toSignatureHash;
|
|
1064
|
+
}
|
|
1065
|
+
});
|
|
1066
|
+
|
|
1067
|
+
// ../../node_modules/viem/_esm/errors/address.js
|
|
1068
|
+
var InvalidAddressError;
|
|
1069
|
+
var init_address = __esm({
|
|
1070
|
+
"../../node_modules/viem/_esm/errors/address.js"() {
|
|
1071
|
+
"use strict";
|
|
1072
|
+
init_base();
|
|
1073
|
+
InvalidAddressError = class extends BaseError {
|
|
1074
|
+
constructor({ address }) {
|
|
1075
|
+
super(`Address "${address}" is invalid.`, {
|
|
1076
|
+
metaMessages: [
|
|
1077
|
+
"- Address must be a hex value of 20 bytes (40 hex characters).",
|
|
1078
|
+
"- Address must match its checksum counterpart."
|
|
1079
|
+
]
|
|
1080
|
+
});
|
|
1081
|
+
Object.defineProperty(this, "name", {
|
|
1082
|
+
enumerable: true,
|
|
1083
|
+
configurable: true,
|
|
1084
|
+
writable: true,
|
|
1085
|
+
value: "InvalidAddressError"
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
1088
|
+
};
|
|
1089
|
+
}
|
|
1090
|
+
});
|
|
1091
|
+
|
|
1092
|
+
// ../../node_modules/viem/_esm/utils/lru.js
|
|
1093
|
+
var LruMap;
|
|
1094
|
+
var init_lru = __esm({
|
|
1095
|
+
"../../node_modules/viem/_esm/utils/lru.js"() {
|
|
1096
|
+
"use strict";
|
|
1097
|
+
LruMap = class extends Map {
|
|
1098
|
+
constructor(size2) {
|
|
1099
|
+
super();
|
|
1100
|
+
Object.defineProperty(this, "maxSize", {
|
|
1101
|
+
enumerable: true,
|
|
1102
|
+
configurable: true,
|
|
1103
|
+
writable: true,
|
|
1104
|
+
value: void 0
|
|
1105
|
+
});
|
|
1106
|
+
this.maxSize = size2;
|
|
1107
|
+
}
|
|
1108
|
+
set(key, value) {
|
|
1109
|
+
super.set(key, value);
|
|
1110
|
+
if (this.maxSize && this.size > this.maxSize)
|
|
1111
|
+
this.delete(this.keys().next().value);
|
|
1112
|
+
return this;
|
|
1113
|
+
}
|
|
1114
|
+
};
|
|
1115
|
+
}
|
|
1116
|
+
});
|
|
1117
|
+
|
|
1118
|
+
// ../../node_modules/viem/_esm/utils/address/getAddress.js
|
|
1119
|
+
function checksumAddress(address_, chainId) {
|
|
1120
|
+
if (checksumAddressCache.has(`${address_}.${chainId}`))
|
|
1121
|
+
return checksumAddressCache.get(`${address_}.${chainId}`);
|
|
1122
|
+
const hexAddress = chainId ? `${chainId}${address_.toLowerCase()}` : address_.substring(2).toLowerCase();
|
|
1123
|
+
const hash2 = keccak256(stringToBytes(hexAddress), "bytes");
|
|
1124
|
+
const address = (chainId ? hexAddress.substring(`${chainId}0x`.length) : hexAddress).split("");
|
|
1125
|
+
for (let i = 0; i < 40; i += 2) {
|
|
1126
|
+
if (hash2[i >> 1] >> 4 >= 8 && address[i]) {
|
|
1127
|
+
address[i] = address[i].toUpperCase();
|
|
1128
|
+
}
|
|
1129
|
+
if ((hash2[i >> 1] & 15) >= 8 && address[i + 1]) {
|
|
1130
|
+
address[i + 1] = address[i + 1].toUpperCase();
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
const result = `0x${address.join("")}`;
|
|
1134
|
+
checksumAddressCache.set(`${address_}.${chainId}`, result);
|
|
1135
|
+
return result;
|
|
1136
|
+
}
|
|
1137
|
+
var checksumAddressCache;
|
|
1138
|
+
var init_getAddress = __esm({
|
|
1139
|
+
"../../node_modules/viem/_esm/utils/address/getAddress.js"() {
|
|
1140
|
+
"use strict";
|
|
1141
|
+
init_toBytes();
|
|
1142
|
+
init_keccak256();
|
|
1143
|
+
init_lru();
|
|
1144
|
+
checksumAddressCache = /* @__PURE__ */ new LruMap(8192);
|
|
1145
|
+
}
|
|
1146
|
+
});
|
|
1147
|
+
|
|
1148
|
+
// ../../node_modules/viem/_esm/utils/address/isAddress.js
|
|
1149
|
+
function isAddress(address, options) {
|
|
1150
|
+
const { strict = true } = options ?? {};
|
|
1151
|
+
const cacheKey = `${address}.${strict}`;
|
|
1152
|
+
if (isAddressCache.has(cacheKey))
|
|
1153
|
+
return isAddressCache.get(cacheKey);
|
|
1154
|
+
const result = (() => {
|
|
1155
|
+
if (!addressRegex.test(address))
|
|
1156
|
+
return false;
|
|
1157
|
+
if (address.toLowerCase() === address)
|
|
1158
|
+
return true;
|
|
1159
|
+
if (strict)
|
|
1160
|
+
return checksumAddress(address) === address;
|
|
1161
|
+
return true;
|
|
1162
|
+
})();
|
|
1163
|
+
isAddressCache.set(cacheKey, result);
|
|
1164
|
+
return result;
|
|
1165
|
+
}
|
|
1166
|
+
var addressRegex, isAddressCache;
|
|
1167
|
+
var init_isAddress = __esm({
|
|
1168
|
+
"../../node_modules/viem/_esm/utils/address/isAddress.js"() {
|
|
1169
|
+
"use strict";
|
|
1170
|
+
init_lru();
|
|
1171
|
+
init_getAddress();
|
|
1172
|
+
addressRegex = /^0x[a-fA-F0-9]{40}$/;
|
|
1173
|
+
isAddressCache = /* @__PURE__ */ new LruMap(8192);
|
|
1174
|
+
}
|
|
1175
|
+
});
|
|
1176
|
+
|
|
1177
|
+
// ../../node_modules/viem/_esm/utils/data/concat.js
|
|
1178
|
+
function concat(values) {
|
|
1179
|
+
if (typeof values[0] === "string")
|
|
1180
|
+
return concatHex(values);
|
|
1181
|
+
return concatBytes(values);
|
|
1182
|
+
}
|
|
1183
|
+
function concatBytes(values) {
|
|
1184
|
+
let length = 0;
|
|
1185
|
+
for (const arr of values) {
|
|
1186
|
+
length += arr.length;
|
|
1187
|
+
}
|
|
1188
|
+
const result = new Uint8Array(length);
|
|
1189
|
+
let offset = 0;
|
|
1190
|
+
for (const arr of values) {
|
|
1191
|
+
result.set(arr, offset);
|
|
1192
|
+
offset += arr.length;
|
|
1193
|
+
}
|
|
1194
|
+
return result;
|
|
1195
|
+
}
|
|
1196
|
+
function concatHex(values) {
|
|
1197
|
+
return `0x${values.reduce((acc, x) => acc + x.replace("0x", ""), "")}`;
|
|
1198
|
+
}
|
|
1199
|
+
var init_concat = __esm({
|
|
1200
|
+
"../../node_modules/viem/_esm/utils/data/concat.js"() {
|
|
1201
|
+
"use strict";
|
|
1202
|
+
}
|
|
1203
|
+
});
|
|
1204
|
+
|
|
1205
|
+
// ../../node_modules/viem/_esm/utils/data/slice.js
|
|
1206
|
+
function slice(value, start, end, { strict } = {}) {
|
|
1207
|
+
if (isHex(value, { strict: false }))
|
|
1208
|
+
return sliceHex(value, start, end, {
|
|
1209
|
+
strict
|
|
1210
|
+
});
|
|
1211
|
+
return sliceBytes(value, start, end, {
|
|
1212
|
+
strict
|
|
1213
|
+
});
|
|
1214
|
+
}
|
|
1215
|
+
function assertStartOffset(value, start) {
|
|
1216
|
+
if (typeof start === "number" && start > 0 && start > size(value) - 1)
|
|
1217
|
+
throw new SliceOffsetOutOfBoundsError({
|
|
1218
|
+
offset: start,
|
|
1219
|
+
position: "start",
|
|
1220
|
+
size: size(value)
|
|
1221
|
+
});
|
|
1222
|
+
}
|
|
1223
|
+
function assertEndOffset(value, start, end) {
|
|
1224
|
+
if (typeof start === "number" && typeof end === "number" && size(value) !== end - start) {
|
|
1225
|
+
throw new SliceOffsetOutOfBoundsError({
|
|
1226
|
+
offset: end,
|
|
1227
|
+
position: "end",
|
|
1228
|
+
size: size(value)
|
|
1229
|
+
});
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
function sliceBytes(value_, start, end, { strict } = {}) {
|
|
1233
|
+
assertStartOffset(value_, start);
|
|
1234
|
+
const value = value_.slice(start, end);
|
|
1235
|
+
if (strict)
|
|
1236
|
+
assertEndOffset(value, start, end);
|
|
1237
|
+
return value;
|
|
1238
|
+
}
|
|
1239
|
+
function sliceHex(value_, start, end, { strict } = {}) {
|
|
1240
|
+
assertStartOffset(value_, start);
|
|
1241
|
+
const value = `0x${value_.replace("0x", "").slice((start ?? 0) * 2, (end ?? value_.length) * 2)}`;
|
|
1242
|
+
if (strict)
|
|
1243
|
+
assertEndOffset(value, start, end);
|
|
1244
|
+
return value;
|
|
1245
|
+
}
|
|
1246
|
+
var init_slice = __esm({
|
|
1247
|
+
"../../node_modules/viem/_esm/utils/data/slice.js"() {
|
|
1248
|
+
"use strict";
|
|
1249
|
+
init_data();
|
|
1250
|
+
init_isHex();
|
|
1251
|
+
init_size();
|
|
1252
|
+
}
|
|
1253
|
+
});
|
|
1254
|
+
|
|
1255
|
+
// ../../node_modules/viem/_esm/utils/abi/encodeAbiParameters.js
|
|
1256
|
+
function encodeAbiParameters(params, values) {
|
|
1257
|
+
if (params.length !== values.length)
|
|
1258
|
+
throw new AbiEncodingLengthMismatchError({
|
|
1259
|
+
expectedLength: params.length,
|
|
1260
|
+
givenLength: values.length
|
|
1261
|
+
});
|
|
1262
|
+
const preparedParams = prepareParams({
|
|
1263
|
+
params,
|
|
1264
|
+
values
|
|
1265
|
+
});
|
|
1266
|
+
const data = encodeParams(preparedParams);
|
|
1267
|
+
if (data.length === 0)
|
|
1268
|
+
return "0x";
|
|
1269
|
+
return data;
|
|
1270
|
+
}
|
|
1271
|
+
function prepareParams({ params, values }) {
|
|
1272
|
+
const preparedParams = [];
|
|
1273
|
+
for (let i = 0; i < params.length; i++) {
|
|
1274
|
+
preparedParams.push(prepareParam({ param: params[i], value: values[i] }));
|
|
1275
|
+
}
|
|
1276
|
+
return preparedParams;
|
|
1277
|
+
}
|
|
1278
|
+
function prepareParam({ param, value }) {
|
|
1279
|
+
const arrayComponents = getArrayComponents(param.type);
|
|
1280
|
+
if (arrayComponents) {
|
|
1281
|
+
const [length, type] = arrayComponents;
|
|
1282
|
+
return encodeArray(value, { length, param: { ...param, type } });
|
|
1283
|
+
}
|
|
1284
|
+
if (param.type === "tuple") {
|
|
1285
|
+
return encodeTuple(value, {
|
|
1286
|
+
param
|
|
1287
|
+
});
|
|
1288
|
+
}
|
|
1289
|
+
if (param.type === "address") {
|
|
1290
|
+
return encodeAddress(value);
|
|
1291
|
+
}
|
|
1292
|
+
if (param.type === "bool") {
|
|
1293
|
+
return encodeBool(value);
|
|
1294
|
+
}
|
|
1295
|
+
if (param.type.startsWith("uint") || param.type.startsWith("int")) {
|
|
1296
|
+
const signed = param.type.startsWith("int");
|
|
1297
|
+
return encodeNumber(value, { signed });
|
|
1298
|
+
}
|
|
1299
|
+
if (param.type.startsWith("bytes")) {
|
|
1300
|
+
return encodeBytes(value, { param });
|
|
1301
|
+
}
|
|
1302
|
+
if (param.type === "string") {
|
|
1303
|
+
return encodeString(value);
|
|
1304
|
+
}
|
|
1305
|
+
throw new InvalidAbiEncodingTypeError(param.type, {
|
|
1306
|
+
docsPath: "/docs/contract/encodeAbiParameters"
|
|
1307
|
+
});
|
|
1308
|
+
}
|
|
1309
|
+
function encodeParams(preparedParams) {
|
|
1310
|
+
let staticSize = 0;
|
|
1311
|
+
for (let i = 0; i < preparedParams.length; i++) {
|
|
1312
|
+
const { dynamic, encoded } = preparedParams[i];
|
|
1313
|
+
if (dynamic)
|
|
1314
|
+
staticSize += 32;
|
|
1315
|
+
else
|
|
1316
|
+
staticSize += size(encoded);
|
|
1317
|
+
}
|
|
1318
|
+
const staticParams = [];
|
|
1319
|
+
const dynamicParams = [];
|
|
1320
|
+
let dynamicSize = 0;
|
|
1321
|
+
for (let i = 0; i < preparedParams.length; i++) {
|
|
1322
|
+
const { dynamic, encoded } = preparedParams[i];
|
|
1323
|
+
if (dynamic) {
|
|
1324
|
+
staticParams.push(numberToHex(staticSize + dynamicSize, { size: 32 }));
|
|
1325
|
+
dynamicParams.push(encoded);
|
|
1326
|
+
dynamicSize += size(encoded);
|
|
1327
|
+
} else {
|
|
1328
|
+
staticParams.push(encoded);
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
return concat([...staticParams, ...dynamicParams]);
|
|
1332
|
+
}
|
|
1333
|
+
function encodeAddress(value) {
|
|
1334
|
+
if (!isAddress(value))
|
|
1335
|
+
throw new InvalidAddressError({ address: value });
|
|
1336
|
+
return { dynamic: false, encoded: padHex(value.toLowerCase()) };
|
|
1337
|
+
}
|
|
1338
|
+
function encodeArray(value, { length, param }) {
|
|
1339
|
+
const dynamic = length === null;
|
|
1340
|
+
if (!Array.isArray(value))
|
|
1341
|
+
throw new InvalidArrayError(value);
|
|
1342
|
+
if (!dynamic && value.length !== length)
|
|
1343
|
+
throw new AbiEncodingArrayLengthMismatchError({
|
|
1344
|
+
expectedLength: length,
|
|
1345
|
+
givenLength: value.length,
|
|
1346
|
+
type: `${param.type}[${length}]`
|
|
1347
|
+
});
|
|
1348
|
+
let dynamicChild = false;
|
|
1349
|
+
const preparedParams = [];
|
|
1350
|
+
for (let i = 0; i < value.length; i++) {
|
|
1351
|
+
const preparedParam = prepareParam({ param, value: value[i] });
|
|
1352
|
+
if (preparedParam.dynamic)
|
|
1353
|
+
dynamicChild = true;
|
|
1354
|
+
preparedParams.push(preparedParam);
|
|
1355
|
+
}
|
|
1356
|
+
if (dynamic || dynamicChild) {
|
|
1357
|
+
const data = encodeParams(preparedParams);
|
|
1358
|
+
if (dynamic) {
|
|
1359
|
+
const length2 = numberToHex(preparedParams.length, { size: 32 });
|
|
1360
|
+
return {
|
|
1361
|
+
dynamic: true,
|
|
1362
|
+
encoded: preparedParams.length > 0 ? concat([length2, data]) : length2
|
|
1363
|
+
};
|
|
1364
|
+
}
|
|
1365
|
+
if (dynamicChild)
|
|
1366
|
+
return { dynamic: true, encoded: data };
|
|
1367
|
+
}
|
|
1368
|
+
return {
|
|
1369
|
+
dynamic: false,
|
|
1370
|
+
encoded: concat(preparedParams.map(({ encoded }) => encoded))
|
|
1371
|
+
};
|
|
1372
|
+
}
|
|
1373
|
+
function encodeBytes(value, { param }) {
|
|
1374
|
+
const [, paramSize] = param.type.split("bytes");
|
|
1375
|
+
const bytesSize = size(value);
|
|
1376
|
+
if (!paramSize) {
|
|
1377
|
+
let value_ = value;
|
|
1378
|
+
if (bytesSize % 32 !== 0)
|
|
1379
|
+
value_ = padHex(value_, {
|
|
1380
|
+
dir: "right",
|
|
1381
|
+
size: Math.ceil((value.length - 2) / 2 / 32) * 32
|
|
1382
|
+
});
|
|
1383
|
+
return {
|
|
1384
|
+
dynamic: true,
|
|
1385
|
+
encoded: concat([padHex(numberToHex(bytesSize, { size: 32 })), value_])
|
|
1386
|
+
};
|
|
1387
|
+
}
|
|
1388
|
+
if (bytesSize !== Number.parseInt(paramSize))
|
|
1389
|
+
throw new AbiEncodingBytesSizeMismatchError({
|
|
1390
|
+
expectedSize: Number.parseInt(paramSize),
|
|
1391
|
+
value
|
|
1392
|
+
});
|
|
1393
|
+
return { dynamic: false, encoded: padHex(value, { dir: "right" }) };
|
|
1394
|
+
}
|
|
1395
|
+
function encodeBool(value) {
|
|
1396
|
+
if (typeof value !== "boolean")
|
|
1397
|
+
throw new BaseError(`Invalid boolean value: "${value}" (type: ${typeof value}). Expected: \`true\` or \`false\`.`);
|
|
1398
|
+
return { dynamic: false, encoded: padHex(boolToHex(value)) };
|
|
1399
|
+
}
|
|
1400
|
+
function encodeNumber(value, { signed }) {
|
|
1401
|
+
return {
|
|
1402
|
+
dynamic: false,
|
|
1403
|
+
encoded: numberToHex(value, {
|
|
1404
|
+
size: 32,
|
|
1405
|
+
signed
|
|
1406
|
+
})
|
|
1407
|
+
};
|
|
1408
|
+
}
|
|
1409
|
+
function encodeString(value) {
|
|
1410
|
+
const hexValue = stringToHex(value);
|
|
1411
|
+
const partsLength = Math.ceil(size(hexValue) / 32);
|
|
1412
|
+
const parts = [];
|
|
1413
|
+
for (let i = 0; i < partsLength; i++) {
|
|
1414
|
+
parts.push(padHex(slice(hexValue, i * 32, (i + 1) * 32), {
|
|
1415
|
+
dir: "right"
|
|
1416
|
+
}));
|
|
1417
|
+
}
|
|
1418
|
+
return {
|
|
1419
|
+
dynamic: true,
|
|
1420
|
+
encoded: concat([
|
|
1421
|
+
padHex(numberToHex(size(hexValue), { size: 32 })),
|
|
1422
|
+
...parts
|
|
1423
|
+
])
|
|
1424
|
+
};
|
|
1425
|
+
}
|
|
1426
|
+
function encodeTuple(value, { param }) {
|
|
1427
|
+
let dynamic = false;
|
|
1428
|
+
const preparedParams = [];
|
|
1429
|
+
for (let i = 0; i < param.components.length; i++) {
|
|
1430
|
+
const param_ = param.components[i];
|
|
1431
|
+
const index = Array.isArray(value) ? i : param_.name;
|
|
1432
|
+
const preparedParam = prepareParam({
|
|
1433
|
+
param: param_,
|
|
1434
|
+
value: value[index]
|
|
1435
|
+
});
|
|
1436
|
+
preparedParams.push(preparedParam);
|
|
1437
|
+
if (preparedParam.dynamic)
|
|
1438
|
+
dynamic = true;
|
|
1439
|
+
}
|
|
1440
|
+
return {
|
|
1441
|
+
dynamic,
|
|
1442
|
+
encoded: dynamic ? encodeParams(preparedParams) : concat(preparedParams.map(({ encoded }) => encoded))
|
|
1443
|
+
};
|
|
1444
|
+
}
|
|
1445
|
+
function getArrayComponents(type) {
|
|
1446
|
+
const matches = type.match(/^(.*)\[(\d+)?\]$/);
|
|
1447
|
+
return matches ? (
|
|
1448
|
+
// Return `null` if the array is dynamic.
|
|
1449
|
+
[matches[2] ? Number(matches[2]) : null, matches[1]]
|
|
1450
|
+
) : void 0;
|
|
1451
|
+
}
|
|
1452
|
+
var init_encodeAbiParameters = __esm({
|
|
1453
|
+
"../../node_modules/viem/_esm/utils/abi/encodeAbiParameters.js"() {
|
|
1454
|
+
"use strict";
|
|
1455
|
+
init_abi();
|
|
1456
|
+
init_address();
|
|
1457
|
+
init_base();
|
|
1458
|
+
init_isAddress();
|
|
1459
|
+
init_concat();
|
|
1460
|
+
init_pad();
|
|
1461
|
+
init_size();
|
|
1462
|
+
init_slice();
|
|
1463
|
+
init_toHex();
|
|
1464
|
+
}
|
|
1465
|
+
});
|
|
1466
|
+
|
|
1467
|
+
// ../../node_modules/viem/_esm/utils/hash/toFunctionSelector.js
|
|
1468
|
+
var toFunctionSelector;
|
|
1469
|
+
var init_toFunctionSelector = __esm({
|
|
1470
|
+
"../../node_modules/viem/_esm/utils/hash/toFunctionSelector.js"() {
|
|
1471
|
+
"use strict";
|
|
1472
|
+
init_slice();
|
|
1473
|
+
init_toSignatureHash();
|
|
1474
|
+
toFunctionSelector = (fn) => slice(toSignatureHash(fn), 0, 4);
|
|
1475
|
+
}
|
|
1476
|
+
});
|
|
1477
|
+
|
|
1478
|
+
// ../../node_modules/viem/_esm/utils/abi/getAbiItem.js
|
|
1479
|
+
function getAbiItem(parameters) {
|
|
1480
|
+
const { abi, args = [], name } = parameters;
|
|
1481
|
+
const isSelector = isHex(name, { strict: false });
|
|
1482
|
+
const abiItems = abi.filter((abiItem) => {
|
|
1483
|
+
if (isSelector) {
|
|
1484
|
+
if (abiItem.type === "function")
|
|
1485
|
+
return toFunctionSelector(abiItem) === name;
|
|
1486
|
+
if (abiItem.type === "event")
|
|
1487
|
+
return toEventSelector(abiItem) === name;
|
|
1488
|
+
return false;
|
|
1489
|
+
}
|
|
1490
|
+
return "name" in abiItem && abiItem.name === name;
|
|
1491
|
+
});
|
|
1492
|
+
if (abiItems.length === 0)
|
|
1493
|
+
return void 0;
|
|
1494
|
+
if (abiItems.length === 1)
|
|
1495
|
+
return abiItems[0];
|
|
1496
|
+
let matchedAbiItem = void 0;
|
|
1497
|
+
for (const abiItem of abiItems) {
|
|
1498
|
+
if (!("inputs" in abiItem))
|
|
1499
|
+
continue;
|
|
1500
|
+
if (!args || args.length === 0) {
|
|
1501
|
+
if (!abiItem.inputs || abiItem.inputs.length === 0)
|
|
1502
|
+
return abiItem;
|
|
1503
|
+
continue;
|
|
1504
|
+
}
|
|
1505
|
+
if (!abiItem.inputs)
|
|
1506
|
+
continue;
|
|
1507
|
+
if (abiItem.inputs.length === 0)
|
|
1508
|
+
continue;
|
|
1509
|
+
if (abiItem.inputs.length !== args.length)
|
|
1510
|
+
continue;
|
|
1511
|
+
const matched = args.every((arg, index) => {
|
|
1512
|
+
const abiParameter = "inputs" in abiItem && abiItem.inputs[index];
|
|
1513
|
+
if (!abiParameter)
|
|
1514
|
+
return false;
|
|
1515
|
+
return isArgOfType(arg, abiParameter);
|
|
1516
|
+
});
|
|
1517
|
+
if (matched) {
|
|
1518
|
+
if (matchedAbiItem && "inputs" in matchedAbiItem && matchedAbiItem.inputs) {
|
|
1519
|
+
const ambiguousTypes = getAmbiguousTypes(abiItem.inputs, matchedAbiItem.inputs, args);
|
|
1520
|
+
if (ambiguousTypes)
|
|
1521
|
+
throw new AbiItemAmbiguityError({
|
|
1522
|
+
abiItem,
|
|
1523
|
+
type: ambiguousTypes[0]
|
|
1524
|
+
}, {
|
|
1525
|
+
abiItem: matchedAbiItem,
|
|
1526
|
+
type: ambiguousTypes[1]
|
|
1527
|
+
});
|
|
1528
|
+
}
|
|
1529
|
+
matchedAbiItem = abiItem;
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
if (matchedAbiItem)
|
|
1533
|
+
return matchedAbiItem;
|
|
1534
|
+
return abiItems[0];
|
|
1535
|
+
}
|
|
1536
|
+
function isArgOfType(arg, abiParameter) {
|
|
1537
|
+
const argType = typeof arg;
|
|
1538
|
+
const abiParameterType = abiParameter.type;
|
|
1539
|
+
switch (abiParameterType) {
|
|
1540
|
+
case "address":
|
|
1541
|
+
return isAddress(arg, { strict: false });
|
|
1542
|
+
case "bool":
|
|
1543
|
+
return argType === "boolean";
|
|
1544
|
+
case "function":
|
|
1545
|
+
return argType === "string";
|
|
1546
|
+
case "string":
|
|
1547
|
+
return argType === "string";
|
|
1548
|
+
default: {
|
|
1549
|
+
if (abiParameterType === "tuple" && "components" in abiParameter)
|
|
1550
|
+
return Object.values(abiParameter.components).every((component, index) => {
|
|
1551
|
+
return isArgOfType(Object.values(arg)[index], component);
|
|
1552
|
+
});
|
|
1553
|
+
if (/^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)?$/.test(abiParameterType))
|
|
1554
|
+
return argType === "number" || argType === "bigint";
|
|
1555
|
+
if (/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(abiParameterType))
|
|
1556
|
+
return argType === "string" || arg instanceof Uint8Array;
|
|
1557
|
+
if (/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(abiParameterType)) {
|
|
1558
|
+
return Array.isArray(arg) && arg.every((x) => isArgOfType(x, {
|
|
1559
|
+
...abiParameter,
|
|
1560
|
+
// Pop off `[]` or `[M]` from end of type
|
|
1561
|
+
type: abiParameterType.replace(/(\[[0-9]{0,}\])$/, "")
|
|
1562
|
+
}));
|
|
1563
|
+
}
|
|
1564
|
+
return false;
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
function getAmbiguousTypes(sourceParameters, targetParameters, args) {
|
|
1569
|
+
for (const parameterIndex in sourceParameters) {
|
|
1570
|
+
const sourceParameter = sourceParameters[parameterIndex];
|
|
1571
|
+
const targetParameter = targetParameters[parameterIndex];
|
|
1572
|
+
if (sourceParameter.type === "tuple" && targetParameter.type === "tuple" && "components" in sourceParameter && "components" in targetParameter)
|
|
1573
|
+
return getAmbiguousTypes(sourceParameter.components, targetParameter.components, args[parameterIndex]);
|
|
1574
|
+
const types = [sourceParameter.type, targetParameter.type];
|
|
1575
|
+
const ambiguous = (() => {
|
|
1576
|
+
if (types.includes("address") && types.includes("bytes20"))
|
|
1577
|
+
return true;
|
|
1578
|
+
if (types.includes("address") && types.includes("string"))
|
|
1579
|
+
return isAddress(args[parameterIndex], { strict: false });
|
|
1580
|
+
if (types.includes("address") && types.includes("bytes"))
|
|
1581
|
+
return isAddress(args[parameterIndex], { strict: false });
|
|
1582
|
+
return false;
|
|
1583
|
+
})();
|
|
1584
|
+
if (ambiguous)
|
|
1585
|
+
return types;
|
|
1586
|
+
}
|
|
1587
|
+
return;
|
|
1588
|
+
}
|
|
1589
|
+
var init_getAbiItem = __esm({
|
|
1590
|
+
"../../node_modules/viem/_esm/utils/abi/getAbiItem.js"() {
|
|
1591
|
+
"use strict";
|
|
1592
|
+
init_abi();
|
|
1593
|
+
init_isHex();
|
|
1594
|
+
init_isAddress();
|
|
1595
|
+
init_toEventSelector();
|
|
1596
|
+
init_toFunctionSelector();
|
|
1597
|
+
}
|
|
1598
|
+
});
|
|
1599
|
+
|
|
20
1600
|
// src/index.ts
|
|
21
1601
|
var src_exports = {};
|
|
22
1602
|
__export(src_exports, {
|
|
1603
|
+
PremintConfigVersion: () => PremintConfigVersion,
|
|
23
1604
|
contracts1155: () => __exports,
|
|
1605
|
+
encodePremintConfig: () => encodePremintConfig,
|
|
24
1606
|
erc20MinterABI: () => erc20MinterABI,
|
|
25
1607
|
erc20MinterAddress: () => erc20MinterAddress,
|
|
26
1608
|
erc20MinterConfig: () => erc20MinterConfig,
|
|
1609
|
+
iPremintDefinitionsABI: () => iPremintDefinitionsABI,
|
|
27
1610
|
iUnwrapAndForwardActionABI: () => iUnwrapAndForwardActionABI,
|
|
28
1611
|
mints: () => mints_exports,
|
|
29
1612
|
mintsEthUnwrapperAndCallerABI: () => mintsEthUnwrapperAndCallerABI,
|
|
@@ -31,11 +1614,15 @@ __export(src_exports, {
|
|
|
31
1614
|
mintsEthUnwrapperAndCallerConfig: () => mintsEthUnwrapperAndCallerConfig,
|
|
32
1615
|
mintsSafeTransferBatchTypedDataDefinition: () => mintsSafeTransferBatchTypedDataDefinition,
|
|
33
1616
|
mintsSafeTransferTypedDataDefinition: () => mintsSafeTransferTypedDataDefinition,
|
|
1617
|
+
premintTypedDataDefinition: () => premintTypedDataDefinition,
|
|
34
1618
|
premintV1TypedDataDefinition: () => premintV1TypedDataDefinition,
|
|
35
1619
|
premintV2TypedDataDefinition: () => premintV2TypedDataDefinition,
|
|
36
1620
|
protocolRewardsABI: () => protocolRewardsABI,
|
|
37
1621
|
protocolRewardsAddress: () => protocolRewardsAddress,
|
|
38
1622
|
protocolRewardsConfig: () => protocolRewardsConfig,
|
|
1623
|
+
upgradeGateABI: () => upgradeGateABI,
|
|
1624
|
+
upgradeGateAddress: () => upgradeGateAddress,
|
|
1625
|
+
upgradeGateConfig: () => upgradeGateConfig,
|
|
39
1626
|
zoraCreator1155FactoryImplABI: () => zoraCreator1155FactoryImplABI,
|
|
40
1627
|
zoraCreator1155FactoryImplAddress: () => zoraCreator1155FactoryImplAddress,
|
|
41
1628
|
zoraCreator1155FactoryImplConfig: () => zoraCreator1155FactoryImplConfig,
|
|
@@ -70,6 +1657,48 @@ var erc20MinterABI = [
|
|
|
70
1657
|
name: "acceptOwnership",
|
|
71
1658
|
outputs: []
|
|
72
1659
|
},
|
|
1660
|
+
{
|
|
1661
|
+
stateMutability: "view",
|
|
1662
|
+
type: "function",
|
|
1663
|
+
inputs: [
|
|
1664
|
+
{
|
|
1665
|
+
name: "config",
|
|
1666
|
+
internalType: "struct IERC20Minter.PremintSalesConfig",
|
|
1667
|
+
type: "tuple",
|
|
1668
|
+
components: [
|
|
1669
|
+
{ name: "duration", internalType: "uint64", type: "uint64" },
|
|
1670
|
+
{
|
|
1671
|
+
name: "maxTokensPerAddress",
|
|
1672
|
+
internalType: "uint64",
|
|
1673
|
+
type: "uint64"
|
|
1674
|
+
},
|
|
1675
|
+
{ name: "pricePerToken", internalType: "uint256", type: "uint256" },
|
|
1676
|
+
{ name: "fundsRecipient", internalType: "address", type: "address" },
|
|
1677
|
+
{ name: "currency", internalType: "address", type: "address" }
|
|
1678
|
+
]
|
|
1679
|
+
}
|
|
1680
|
+
],
|
|
1681
|
+
name: "buildSalesConfigForPremint",
|
|
1682
|
+
outputs: [
|
|
1683
|
+
{
|
|
1684
|
+
name: "",
|
|
1685
|
+
internalType: "struct IERC20Minter.SalesConfig",
|
|
1686
|
+
type: "tuple",
|
|
1687
|
+
components: [
|
|
1688
|
+
{ name: "saleStart", internalType: "uint64", type: "uint64" },
|
|
1689
|
+
{ name: "saleEnd", internalType: "uint64", type: "uint64" },
|
|
1690
|
+
{
|
|
1691
|
+
name: "maxTokensPerAddress",
|
|
1692
|
+
internalType: "uint64",
|
|
1693
|
+
type: "uint64"
|
|
1694
|
+
},
|
|
1695
|
+
{ name: "pricePerToken", internalType: "uint256", type: "uint256" },
|
|
1696
|
+
{ name: "fundsRecipient", internalType: "address", type: "address" },
|
|
1697
|
+
{ name: "currency", internalType: "address", type: "address" }
|
|
1698
|
+
]
|
|
1699
|
+
}
|
|
1700
|
+
]
|
|
1701
|
+
},
|
|
73
1702
|
{
|
|
74
1703
|
stateMutability: "nonpayable",
|
|
75
1704
|
type: "function",
|
|
@@ -223,7 +1852,7 @@ var erc20MinterABI = [
|
|
|
223
1852
|
internalType: "address",
|
|
224
1853
|
type: "address"
|
|
225
1854
|
},
|
|
226
|
-
{ name: "
|
|
1855
|
+
{ name: "_owner", internalType: "address", type: "address" },
|
|
227
1856
|
{ name: "_rewardPct", internalType: "uint256", type: "uint256" },
|
|
228
1857
|
{ name: "_ethReward", internalType: "uint256", type: "uint256" }
|
|
229
1858
|
],
|
|
@@ -389,6 +2018,20 @@ var erc20MinterABI = [
|
|
|
389
2018
|
name: "setERC20MinterConfig",
|
|
390
2019
|
outputs: []
|
|
391
2020
|
},
|
|
2021
|
+
{
|
|
2022
|
+
stateMutability: "nonpayable",
|
|
2023
|
+
type: "function",
|
|
2024
|
+
inputs: [
|
|
2025
|
+
{ name: "tokenId", internalType: "uint256", type: "uint256" },
|
|
2026
|
+
{
|
|
2027
|
+
name: "encodedPremintSalesConfig",
|
|
2028
|
+
internalType: "bytes",
|
|
2029
|
+
type: "bytes"
|
|
2030
|
+
}
|
|
2031
|
+
],
|
|
2032
|
+
name: "setPremintSale",
|
|
2033
|
+
outputs: []
|
|
2034
|
+
},
|
|
392
2035
|
{
|
|
393
2036
|
stateMutability: "nonpayable",
|
|
394
2037
|
type: "function",
|
|
@@ -688,8 +2331,16 @@ var erc20MinterABI = [
|
|
|
688
2331
|
name: "INITIALIZABLE_CONTRACT_IS_NOT_INITIALIZING"
|
|
689
2332
|
},
|
|
690
2333
|
{ type: "error", inputs: [], name: "InvalidCurrency" },
|
|
691
|
-
{
|
|
692
|
-
|
|
2334
|
+
{
|
|
2335
|
+
type: "error",
|
|
2336
|
+
inputs: [
|
|
2337
|
+
{ name: "expectedValue", internalType: "uint256", type: "uint256" },
|
|
2338
|
+
{ name: "actualValue", internalType: "uint256", type: "uint256" }
|
|
2339
|
+
],
|
|
2340
|
+
name: "InvalidETHValue"
|
|
2341
|
+
},
|
|
2342
|
+
{ type: "error", inputs: [], name: "InvalidValue" },
|
|
2343
|
+
{ type: "error", inputs: [], name: "ONLY_OWNER" },
|
|
693
2344
|
{ type: "error", inputs: [], name: "ONLY_PENDING_OWNER" },
|
|
694
2345
|
{ type: "error", inputs: [], name: "OWNER_CANNOT_BE_ZERO_ADDRESS" },
|
|
695
2346
|
{ type: "error", inputs: [], name: "PricePerTokenTooLow" },
|
|
@@ -717,12 +2368,111 @@ var erc20MinterAddress = {
|
|
|
717
2368
|
421614: "0x777777E8850d8D6d98De2B5f64fae401F96eFF31",
|
|
718
2369
|
7777777: "0x777777E8850d8D6d98De2B5f64fae401F96eFF31",
|
|
719
2370
|
11155111: "0x777777E8850d8D6d98De2B5f64fae401F96eFF31",
|
|
720
|
-
999999999: "
|
|
2371
|
+
999999999: "0x8Ec7f068A77fa5FC1925110f82381374BA054Ff2"
|
|
721
2372
|
};
|
|
722
2373
|
var erc20MinterConfig = {
|
|
723
2374
|
address: erc20MinterAddress,
|
|
724
2375
|
abi: erc20MinterABI
|
|
725
2376
|
};
|
|
2377
|
+
var iPremintDefinitionsABI = [
|
|
2378
|
+
{
|
|
2379
|
+
stateMutability: "nonpayable",
|
|
2380
|
+
type: "function",
|
|
2381
|
+
inputs: [
|
|
2382
|
+
{
|
|
2383
|
+
name: "",
|
|
2384
|
+
internalType: "struct TokenCreationConfig",
|
|
2385
|
+
type: "tuple",
|
|
2386
|
+
components: [
|
|
2387
|
+
{ name: "tokenURI", internalType: "string", type: "string" },
|
|
2388
|
+
{ name: "maxSupply", internalType: "uint256", type: "uint256" },
|
|
2389
|
+
{
|
|
2390
|
+
name: "maxTokensPerAddress",
|
|
2391
|
+
internalType: "uint64",
|
|
2392
|
+
type: "uint64"
|
|
2393
|
+
},
|
|
2394
|
+
{ name: "pricePerToken", internalType: "uint96", type: "uint96" },
|
|
2395
|
+
{ name: "mintStart", internalType: "uint64", type: "uint64" },
|
|
2396
|
+
{ name: "mintDuration", internalType: "uint64", type: "uint64" },
|
|
2397
|
+
{
|
|
2398
|
+
name: "royaltyMintSchedule",
|
|
2399
|
+
internalType: "uint32",
|
|
2400
|
+
type: "uint32"
|
|
2401
|
+
},
|
|
2402
|
+
{ name: "royaltyBPS", internalType: "uint32", type: "uint32" },
|
|
2403
|
+
{
|
|
2404
|
+
name: "royaltyRecipient",
|
|
2405
|
+
internalType: "address",
|
|
2406
|
+
type: "address"
|
|
2407
|
+
},
|
|
2408
|
+
{
|
|
2409
|
+
name: "fixedPriceMinter",
|
|
2410
|
+
internalType: "address",
|
|
2411
|
+
type: "address"
|
|
2412
|
+
}
|
|
2413
|
+
]
|
|
2414
|
+
}
|
|
2415
|
+
],
|
|
2416
|
+
name: "tokenConfigV1Definition",
|
|
2417
|
+
outputs: []
|
|
2418
|
+
},
|
|
2419
|
+
{
|
|
2420
|
+
stateMutability: "nonpayable",
|
|
2421
|
+
type: "function",
|
|
2422
|
+
inputs: [
|
|
2423
|
+
{
|
|
2424
|
+
name: "",
|
|
2425
|
+
internalType: "struct TokenCreationConfigV2",
|
|
2426
|
+
type: "tuple",
|
|
2427
|
+
components: [
|
|
2428
|
+
{ name: "tokenURI", internalType: "string", type: "string" },
|
|
2429
|
+
{ name: "maxSupply", internalType: "uint256", type: "uint256" },
|
|
2430
|
+
{
|
|
2431
|
+
name: "maxTokensPerAddress",
|
|
2432
|
+
internalType: "uint64",
|
|
2433
|
+
type: "uint64"
|
|
2434
|
+
},
|
|
2435
|
+
{ name: "pricePerToken", internalType: "uint96", type: "uint96" },
|
|
2436
|
+
{ name: "mintStart", internalType: "uint64", type: "uint64" },
|
|
2437
|
+
{ name: "mintDuration", internalType: "uint64", type: "uint64" },
|
|
2438
|
+
{ name: "royaltyBPS", internalType: "uint32", type: "uint32" },
|
|
2439
|
+
{ name: "payoutRecipient", internalType: "address", type: "address" },
|
|
2440
|
+
{
|
|
2441
|
+
name: "fixedPriceMinter",
|
|
2442
|
+
internalType: "address",
|
|
2443
|
+
type: "address"
|
|
2444
|
+
},
|
|
2445
|
+
{ name: "createReferral", internalType: "address", type: "address" }
|
|
2446
|
+
]
|
|
2447
|
+
}
|
|
2448
|
+
],
|
|
2449
|
+
name: "tokenConfigV2Definition",
|
|
2450
|
+
outputs: []
|
|
2451
|
+
},
|
|
2452
|
+
{
|
|
2453
|
+
stateMutability: "nonpayable",
|
|
2454
|
+
type: "function",
|
|
2455
|
+
inputs: [
|
|
2456
|
+
{
|
|
2457
|
+
name: "",
|
|
2458
|
+
internalType: "struct TokenCreationConfigV3",
|
|
2459
|
+
type: "tuple",
|
|
2460
|
+
components: [
|
|
2461
|
+
{ name: "tokenURI", internalType: "string", type: "string" },
|
|
2462
|
+
{ name: "maxSupply", internalType: "uint256", type: "uint256" },
|
|
2463
|
+
{ name: "royaltyBPS", internalType: "uint32", type: "uint32" },
|
|
2464
|
+
{ name: "payoutRecipient", internalType: "address", type: "address" },
|
|
2465
|
+
{ name: "createReferral", internalType: "address", type: "address" },
|
|
2466
|
+
{ name: "mintStart", internalType: "uint64", type: "uint64" },
|
|
2467
|
+
{ name: "minter", internalType: "address", type: "address" },
|
|
2468
|
+
{ name: "premintSalesConfig", internalType: "bytes", type: "bytes" }
|
|
2469
|
+
]
|
|
2470
|
+
}
|
|
2471
|
+
],
|
|
2472
|
+
name: "tokenConfigV3Definition",
|
|
2473
|
+
outputs: []
|
|
2474
|
+
}
|
|
2475
|
+
];
|
|
726
2476
|
var iUnwrapAndForwardActionABI = [
|
|
727
2477
|
{
|
|
728
2478
|
stateMutability: "payable",
|
|
@@ -824,6 +2574,13 @@ var mintsEthUnwrapperAndCallerABI = [
|
|
|
824
2574
|
{ type: "error", inputs: [], name: "UnknownUserAction" }
|
|
825
2575
|
];
|
|
826
2576
|
var mintsEthUnwrapperAndCallerAddress = {
|
|
2577
|
+
1: "0xb0994EB9520C98C97e1F3953a5964535C2bd271A",
|
|
2578
|
+
10: "0xb0994EB9520C98C97e1F3953a5964535C2bd271A",
|
|
2579
|
+
8453: "0xb0994EB9520C98C97e1F3953a5964535C2bd271A",
|
|
2580
|
+
42161: "0xb0994EB9520C98C97e1F3953a5964535C2bd271A",
|
|
2581
|
+
81457: "0xb0994EB9520C98C97e1F3953a5964535C2bd271A",
|
|
2582
|
+
84532: "0xb0994EB9520C98C97e1F3953a5964535C2bd271A",
|
|
2583
|
+
421614: "0xb0994EB9520C98C97e1F3953a5964535C2bd271A",
|
|
827
2584
|
7777777: "0xb0994EB9520C98C97e1F3953a5964535C2bd271A",
|
|
828
2585
|
999999999: "0xb0994EB9520C98C97e1F3953a5964535C2bd271A"
|
|
829
2586
|
};
|
|
@@ -889,215 +2646,463 @@ var protocolRewardsABI = [
|
|
|
889
2646
|
{ name: "zora", internalType: "address", type: "address" },
|
|
890
2647
|
{ name: "zoraReward", internalType: "uint256", type: "uint256" }
|
|
891
2648
|
],
|
|
892
|
-
name: "depositRewards",
|
|
893
|
-
outputs: []
|
|
2649
|
+
name: "depositRewards",
|
|
2650
|
+
outputs: []
|
|
2651
|
+
},
|
|
2652
|
+
{
|
|
2653
|
+
stateMutability: "view",
|
|
2654
|
+
type: "function",
|
|
2655
|
+
inputs: [],
|
|
2656
|
+
name: "eip712Domain",
|
|
2657
|
+
outputs: [
|
|
2658
|
+
{ name: "fields", internalType: "bytes1", type: "bytes1" },
|
|
2659
|
+
{ name: "name", internalType: "string", type: "string" },
|
|
2660
|
+
{ name: "version", internalType: "string", type: "string" },
|
|
2661
|
+
{ name: "chainId", internalType: "uint256", type: "uint256" },
|
|
2662
|
+
{ name: "verifyingContract", internalType: "address", type: "address" },
|
|
2663
|
+
{ name: "salt", internalType: "bytes32", type: "bytes32" },
|
|
2664
|
+
{ name: "extensions", internalType: "uint256[]", type: "uint256[]" }
|
|
2665
|
+
]
|
|
2666
|
+
},
|
|
2667
|
+
{
|
|
2668
|
+
stateMutability: "view",
|
|
2669
|
+
type: "function",
|
|
2670
|
+
inputs: [{ name: "", internalType: "address", type: "address" }],
|
|
2671
|
+
name: "nonces",
|
|
2672
|
+
outputs: [{ name: "", internalType: "uint256", type: "uint256" }]
|
|
2673
|
+
},
|
|
2674
|
+
{
|
|
2675
|
+
stateMutability: "view",
|
|
2676
|
+
type: "function",
|
|
2677
|
+
inputs: [],
|
|
2678
|
+
name: "totalSupply",
|
|
2679
|
+
outputs: [{ name: "", internalType: "uint256", type: "uint256" }]
|
|
2680
|
+
},
|
|
2681
|
+
{
|
|
2682
|
+
stateMutability: "nonpayable",
|
|
2683
|
+
type: "function",
|
|
2684
|
+
inputs: [
|
|
2685
|
+
{ name: "to", internalType: "address", type: "address" },
|
|
2686
|
+
{ name: "amount", internalType: "uint256", type: "uint256" }
|
|
2687
|
+
],
|
|
2688
|
+
name: "withdraw",
|
|
2689
|
+
outputs: []
|
|
2690
|
+
},
|
|
2691
|
+
{
|
|
2692
|
+
stateMutability: "nonpayable",
|
|
2693
|
+
type: "function",
|
|
2694
|
+
inputs: [
|
|
2695
|
+
{ name: "to", internalType: "address", type: "address" },
|
|
2696
|
+
{ name: "amount", internalType: "uint256", type: "uint256" }
|
|
2697
|
+
],
|
|
2698
|
+
name: "withdrawFor",
|
|
2699
|
+
outputs: []
|
|
2700
|
+
},
|
|
2701
|
+
{
|
|
2702
|
+
stateMutability: "nonpayable",
|
|
2703
|
+
type: "function",
|
|
2704
|
+
inputs: [
|
|
2705
|
+
{ name: "from", internalType: "address", type: "address" },
|
|
2706
|
+
{ name: "to", internalType: "address", type: "address" },
|
|
2707
|
+
{ name: "amount", internalType: "uint256", type: "uint256" },
|
|
2708
|
+
{ name: "deadline", internalType: "uint256", type: "uint256" },
|
|
2709
|
+
{ name: "v", internalType: "uint8", type: "uint8" },
|
|
2710
|
+
{ name: "r", internalType: "bytes32", type: "bytes32" },
|
|
2711
|
+
{ name: "s", internalType: "bytes32", type: "bytes32" }
|
|
2712
|
+
],
|
|
2713
|
+
name: "withdrawWithSig",
|
|
2714
|
+
outputs: []
|
|
2715
|
+
},
|
|
2716
|
+
{
|
|
2717
|
+
type: "event",
|
|
2718
|
+
anonymous: false,
|
|
2719
|
+
inputs: [
|
|
2720
|
+
{ name: "from", internalType: "address", type: "address", indexed: true },
|
|
2721
|
+
{ name: "to", internalType: "address", type: "address", indexed: true },
|
|
2722
|
+
{ name: "reason", internalType: "bytes4", type: "bytes4", indexed: true },
|
|
2723
|
+
{
|
|
2724
|
+
name: "amount",
|
|
2725
|
+
internalType: "uint256",
|
|
2726
|
+
type: "uint256",
|
|
2727
|
+
indexed: false
|
|
2728
|
+
},
|
|
2729
|
+
{
|
|
2730
|
+
name: "comment",
|
|
2731
|
+
internalType: "string",
|
|
2732
|
+
type: "string",
|
|
2733
|
+
indexed: false
|
|
2734
|
+
}
|
|
2735
|
+
],
|
|
2736
|
+
name: "Deposit"
|
|
2737
|
+
},
|
|
2738
|
+
{ type: "event", anonymous: false, inputs: [], name: "EIP712DomainChanged" },
|
|
2739
|
+
{
|
|
2740
|
+
type: "event",
|
|
2741
|
+
anonymous: false,
|
|
2742
|
+
inputs: [
|
|
2743
|
+
{
|
|
2744
|
+
name: "creator",
|
|
2745
|
+
internalType: "address",
|
|
2746
|
+
type: "address",
|
|
2747
|
+
indexed: true
|
|
2748
|
+
},
|
|
2749
|
+
{
|
|
2750
|
+
name: "createReferral",
|
|
2751
|
+
internalType: "address",
|
|
2752
|
+
type: "address",
|
|
2753
|
+
indexed: true
|
|
2754
|
+
},
|
|
2755
|
+
{
|
|
2756
|
+
name: "mintReferral",
|
|
2757
|
+
internalType: "address",
|
|
2758
|
+
type: "address",
|
|
2759
|
+
indexed: true
|
|
2760
|
+
},
|
|
2761
|
+
{
|
|
2762
|
+
name: "firstMinter",
|
|
2763
|
+
internalType: "address",
|
|
2764
|
+
type: "address",
|
|
2765
|
+
indexed: false
|
|
2766
|
+
},
|
|
2767
|
+
{
|
|
2768
|
+
name: "zora",
|
|
2769
|
+
internalType: "address",
|
|
2770
|
+
type: "address",
|
|
2771
|
+
indexed: false
|
|
2772
|
+
},
|
|
2773
|
+
{
|
|
2774
|
+
name: "from",
|
|
2775
|
+
internalType: "address",
|
|
2776
|
+
type: "address",
|
|
2777
|
+
indexed: false
|
|
2778
|
+
},
|
|
2779
|
+
{
|
|
2780
|
+
name: "creatorReward",
|
|
2781
|
+
internalType: "uint256",
|
|
2782
|
+
type: "uint256",
|
|
2783
|
+
indexed: false
|
|
2784
|
+
},
|
|
2785
|
+
{
|
|
2786
|
+
name: "createReferralReward",
|
|
2787
|
+
internalType: "uint256",
|
|
2788
|
+
type: "uint256",
|
|
2789
|
+
indexed: false
|
|
2790
|
+
},
|
|
2791
|
+
{
|
|
2792
|
+
name: "mintReferralReward",
|
|
2793
|
+
internalType: "uint256",
|
|
2794
|
+
type: "uint256",
|
|
2795
|
+
indexed: false
|
|
2796
|
+
},
|
|
2797
|
+
{
|
|
2798
|
+
name: "firstMinterReward",
|
|
2799
|
+
internalType: "uint256",
|
|
2800
|
+
type: "uint256",
|
|
2801
|
+
indexed: false
|
|
2802
|
+
},
|
|
2803
|
+
{
|
|
2804
|
+
name: "zoraReward",
|
|
2805
|
+
internalType: "uint256",
|
|
2806
|
+
type: "uint256",
|
|
2807
|
+
indexed: false
|
|
2808
|
+
}
|
|
2809
|
+
],
|
|
2810
|
+
name: "RewardsDeposit"
|
|
2811
|
+
},
|
|
2812
|
+
{
|
|
2813
|
+
type: "event",
|
|
2814
|
+
anonymous: false,
|
|
2815
|
+
inputs: [
|
|
2816
|
+
{ name: "from", internalType: "address", type: "address", indexed: true },
|
|
2817
|
+
{ name: "to", internalType: "address", type: "address", indexed: true },
|
|
2818
|
+
{
|
|
2819
|
+
name: "amount",
|
|
2820
|
+
internalType: "uint256",
|
|
2821
|
+
type: "uint256",
|
|
2822
|
+
indexed: false
|
|
2823
|
+
}
|
|
2824
|
+
],
|
|
2825
|
+
name: "Withdraw"
|
|
2826
|
+
},
|
|
2827
|
+
{ type: "error", inputs: [], name: "ADDRESS_ZERO" },
|
|
2828
|
+
{ type: "error", inputs: [], name: "ARRAY_LENGTH_MISMATCH" },
|
|
2829
|
+
{ type: "error", inputs: [], name: "INVALID_DEPOSIT" },
|
|
2830
|
+
{ type: "error", inputs: [], name: "INVALID_SIGNATURE" },
|
|
2831
|
+
{ type: "error", inputs: [], name: "INVALID_WITHDRAW" },
|
|
2832
|
+
{ type: "error", inputs: [], name: "InvalidShortString" },
|
|
2833
|
+
{ type: "error", inputs: [], name: "SIGNATURE_DEADLINE_EXPIRED" },
|
|
2834
|
+
{
|
|
2835
|
+
type: "error",
|
|
2836
|
+
inputs: [{ name: "str", internalType: "string", type: "string" }],
|
|
2837
|
+
name: "StringTooLong"
|
|
2838
|
+
},
|
|
2839
|
+
{ type: "error", inputs: [], name: "TRANSFER_FAILED" }
|
|
2840
|
+
];
|
|
2841
|
+
var protocolRewardsAddress = {
|
|
2842
|
+
1: "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B",
|
|
2843
|
+
10: "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B",
|
|
2844
|
+
999: "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B",
|
|
2845
|
+
8453: "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B",
|
|
2846
|
+
42161: "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B",
|
|
2847
|
+
81457: "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B",
|
|
2848
|
+
84532: "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B",
|
|
2849
|
+
421614: "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B",
|
|
2850
|
+
7777777: "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B",
|
|
2851
|
+
11155111: "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B",
|
|
2852
|
+
168587773: "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B",
|
|
2853
|
+
999999999: "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
|
|
2854
|
+
};
|
|
2855
|
+
var protocolRewardsConfig = {
|
|
2856
|
+
address: protocolRewardsAddress,
|
|
2857
|
+
abi: protocolRewardsABI
|
|
2858
|
+
};
|
|
2859
|
+
var upgradeGateABI = [
|
|
2860
|
+
{ stateMutability: "nonpayable", type: "constructor", inputs: [] },
|
|
2861
|
+
{
|
|
2862
|
+
stateMutability: "nonpayable",
|
|
2863
|
+
type: "function",
|
|
2864
|
+
inputs: [],
|
|
2865
|
+
name: "acceptOwnership",
|
|
2866
|
+
outputs: []
|
|
2867
|
+
},
|
|
2868
|
+
{
|
|
2869
|
+
stateMutability: "nonpayable",
|
|
2870
|
+
type: "function",
|
|
2871
|
+
inputs: [],
|
|
2872
|
+
name: "cancelOwnershipTransfer",
|
|
2873
|
+
outputs: []
|
|
2874
|
+
},
|
|
2875
|
+
{
|
|
2876
|
+
stateMutability: "pure",
|
|
2877
|
+
type: "function",
|
|
2878
|
+
inputs: [],
|
|
2879
|
+
name: "contractName",
|
|
2880
|
+
outputs: [{ name: "", internalType: "string", type: "string" }]
|
|
2881
|
+
},
|
|
2882
|
+
{
|
|
2883
|
+
stateMutability: "pure",
|
|
2884
|
+
type: "function",
|
|
2885
|
+
inputs: [],
|
|
2886
|
+
name: "contractURI",
|
|
2887
|
+
outputs: [{ name: "", internalType: "string", type: "string" }]
|
|
2888
|
+
},
|
|
2889
|
+
{
|
|
2890
|
+
stateMutability: "nonpayable",
|
|
2891
|
+
type: "function",
|
|
2892
|
+
inputs: [
|
|
2893
|
+
{ name: "_initialOwner", internalType: "address", type: "address" }
|
|
2894
|
+
],
|
|
2895
|
+
name: "initialize",
|
|
2896
|
+
outputs: []
|
|
2897
|
+
},
|
|
2898
|
+
{
|
|
2899
|
+
stateMutability: "view",
|
|
2900
|
+
type: "function",
|
|
2901
|
+
inputs: [
|
|
2902
|
+
{ name: "", internalType: "address", type: "address" },
|
|
2903
|
+
{ name: "", internalType: "address", type: "address" }
|
|
2904
|
+
],
|
|
2905
|
+
name: "isAllowedUpgrade",
|
|
2906
|
+
outputs: [{ name: "", internalType: "bool", type: "bool" }]
|
|
894
2907
|
},
|
|
895
2908
|
{
|
|
896
2909
|
stateMutability: "view",
|
|
897
2910
|
type: "function",
|
|
898
|
-
inputs: [
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
{ name: "chainId", internalType: "uint256", type: "uint256" },
|
|
905
|
-
{ name: "verifyingContract", internalType: "address", type: "address" },
|
|
906
|
-
{ name: "salt", internalType: "bytes32", type: "bytes32" },
|
|
907
|
-
{ name: "extensions", internalType: "uint256[]", type: "uint256[]" }
|
|
908
|
-
]
|
|
2911
|
+
inputs: [
|
|
2912
|
+
{ name: "baseImpl", internalType: "address", type: "address" },
|
|
2913
|
+
{ name: "upgradeImpl", internalType: "address", type: "address" }
|
|
2914
|
+
],
|
|
2915
|
+
name: "isRegisteredUpgradePath",
|
|
2916
|
+
outputs: [{ name: "", internalType: "bool", type: "bool" }]
|
|
909
2917
|
},
|
|
910
2918
|
{
|
|
911
2919
|
stateMutability: "view",
|
|
912
2920
|
type: "function",
|
|
913
|
-
inputs: [
|
|
914
|
-
name: "
|
|
915
|
-
outputs: [{ name: "", internalType: "
|
|
2921
|
+
inputs: [],
|
|
2922
|
+
name: "owner",
|
|
2923
|
+
outputs: [{ name: "", internalType: "address", type: "address" }]
|
|
916
2924
|
},
|
|
917
2925
|
{
|
|
918
2926
|
stateMutability: "view",
|
|
919
2927
|
type: "function",
|
|
920
2928
|
inputs: [],
|
|
921
|
-
name: "
|
|
922
|
-
outputs: [{ name: "", internalType: "
|
|
2929
|
+
name: "pendingOwner",
|
|
2930
|
+
outputs: [{ name: "", internalType: "address", type: "address" }]
|
|
923
2931
|
},
|
|
924
2932
|
{
|
|
925
2933
|
stateMutability: "nonpayable",
|
|
926
2934
|
type: "function",
|
|
927
2935
|
inputs: [
|
|
928
|
-
{ name: "
|
|
929
|
-
{ name: "
|
|
2936
|
+
{ name: "baseImpls", internalType: "address[]", type: "address[]" },
|
|
2937
|
+
{ name: "upgradeImpl", internalType: "address", type: "address" }
|
|
930
2938
|
],
|
|
931
|
-
name: "
|
|
2939
|
+
name: "registerUpgradePath",
|
|
932
2940
|
outputs: []
|
|
933
2941
|
},
|
|
934
2942
|
{
|
|
935
2943
|
stateMutability: "nonpayable",
|
|
936
2944
|
type: "function",
|
|
937
2945
|
inputs: [
|
|
938
|
-
{ name: "
|
|
939
|
-
{ name: "
|
|
2946
|
+
{ name: "baseImpl", internalType: "address", type: "address" },
|
|
2947
|
+
{ name: "upgradeImpl", internalType: "address", type: "address" }
|
|
940
2948
|
],
|
|
941
|
-
name: "
|
|
2949
|
+
name: "removeUpgradePath",
|
|
2950
|
+
outputs: []
|
|
2951
|
+
},
|
|
2952
|
+
{
|
|
2953
|
+
stateMutability: "nonpayable",
|
|
2954
|
+
type: "function",
|
|
2955
|
+
inputs: [],
|
|
2956
|
+
name: "resignOwnership",
|
|
2957
|
+
outputs: []
|
|
2958
|
+
},
|
|
2959
|
+
{
|
|
2960
|
+
stateMutability: "nonpayable",
|
|
2961
|
+
type: "function",
|
|
2962
|
+
inputs: [{ name: "_newOwner", internalType: "address", type: "address" }],
|
|
2963
|
+
name: "safeTransferOwnership",
|
|
942
2964
|
outputs: []
|
|
943
2965
|
},
|
|
944
2966
|
{
|
|
945
2967
|
stateMutability: "nonpayable",
|
|
946
2968
|
type: "function",
|
|
2969
|
+
inputs: [{ name: "_newOwner", internalType: "address", type: "address" }],
|
|
2970
|
+
name: "transferOwnership",
|
|
2971
|
+
outputs: []
|
|
2972
|
+
},
|
|
2973
|
+
{
|
|
2974
|
+
type: "event",
|
|
2975
|
+
anonymous: false,
|
|
947
2976
|
inputs: [
|
|
948
|
-
{ name: "
|
|
949
|
-
{ name: "to", internalType: "address", type: "address" },
|
|
950
|
-
{ name: "amount", internalType: "uint256", type: "uint256" },
|
|
951
|
-
{ name: "deadline", internalType: "uint256", type: "uint256" },
|
|
952
|
-
{ name: "v", internalType: "uint8", type: "uint8" },
|
|
953
|
-
{ name: "r", internalType: "bytes32", type: "bytes32" },
|
|
954
|
-
{ name: "s", internalType: "bytes32", type: "bytes32" }
|
|
2977
|
+
{ name: "version", internalType: "uint8", type: "uint8", indexed: false }
|
|
955
2978
|
],
|
|
956
|
-
name: "
|
|
957
|
-
outputs: []
|
|
2979
|
+
name: "Initialized"
|
|
958
2980
|
},
|
|
959
2981
|
{
|
|
960
2982
|
type: "event",
|
|
961
2983
|
anonymous: false,
|
|
962
2984
|
inputs: [
|
|
963
|
-
{ name: "from", internalType: "address", type: "address", indexed: true },
|
|
964
|
-
{ name: "to", internalType: "address", type: "address", indexed: true },
|
|
965
|
-
{ name: "reason", internalType: "bytes4", type: "bytes4", indexed: true },
|
|
966
2985
|
{
|
|
967
|
-
name: "
|
|
968
|
-
internalType: "
|
|
969
|
-
type: "
|
|
970
|
-
indexed:
|
|
2986
|
+
name: "owner",
|
|
2987
|
+
internalType: "address",
|
|
2988
|
+
type: "address",
|
|
2989
|
+
indexed: true
|
|
971
2990
|
},
|
|
972
2991
|
{
|
|
973
|
-
name: "
|
|
974
|
-
internalType: "
|
|
975
|
-
type: "
|
|
976
|
-
indexed:
|
|
2992
|
+
name: "canceledOwner",
|
|
2993
|
+
internalType: "address",
|
|
2994
|
+
type: "address",
|
|
2995
|
+
indexed: true
|
|
977
2996
|
}
|
|
978
2997
|
],
|
|
979
|
-
name: "
|
|
2998
|
+
name: "OwnerCanceled"
|
|
980
2999
|
},
|
|
981
|
-
{ type: "event", anonymous: false, inputs: [], name: "EIP712DomainChanged" },
|
|
982
3000
|
{
|
|
983
3001
|
type: "event",
|
|
984
3002
|
anonymous: false,
|
|
985
3003
|
inputs: [
|
|
986
3004
|
{
|
|
987
|
-
name: "
|
|
3005
|
+
name: "owner",
|
|
988
3006
|
internalType: "address",
|
|
989
3007
|
type: "address",
|
|
990
3008
|
indexed: true
|
|
991
3009
|
},
|
|
992
3010
|
{
|
|
993
|
-
name: "
|
|
3011
|
+
name: "pendingOwner",
|
|
994
3012
|
internalType: "address",
|
|
995
3013
|
type: "address",
|
|
996
3014
|
indexed: true
|
|
997
|
-
}
|
|
3015
|
+
}
|
|
3016
|
+
],
|
|
3017
|
+
name: "OwnerPending"
|
|
3018
|
+
},
|
|
3019
|
+
{
|
|
3020
|
+
type: "event",
|
|
3021
|
+
anonymous: false,
|
|
3022
|
+
inputs: [
|
|
998
3023
|
{
|
|
999
|
-
name: "
|
|
3024
|
+
name: "prevOwner",
|
|
1000
3025
|
internalType: "address",
|
|
1001
3026
|
type: "address",
|
|
1002
3027
|
indexed: true
|
|
1003
3028
|
},
|
|
1004
3029
|
{
|
|
1005
|
-
name: "
|
|
3030
|
+
name: "newOwner",
|
|
1006
3031
|
internalType: "address",
|
|
1007
3032
|
type: "address",
|
|
1008
|
-
indexed:
|
|
1009
|
-
}
|
|
3033
|
+
indexed: true
|
|
3034
|
+
}
|
|
3035
|
+
],
|
|
3036
|
+
name: "OwnerUpdated"
|
|
3037
|
+
},
|
|
3038
|
+
{ type: "event", anonymous: false, inputs: [], name: "UpgradeGateSetup" },
|
|
3039
|
+
{
|
|
3040
|
+
type: "event",
|
|
3041
|
+
anonymous: false,
|
|
3042
|
+
inputs: [
|
|
1010
3043
|
{
|
|
1011
|
-
name: "
|
|
3044
|
+
name: "baseImpl",
|
|
1012
3045
|
internalType: "address",
|
|
1013
3046
|
type: "address",
|
|
1014
|
-
indexed:
|
|
3047
|
+
indexed: true
|
|
1015
3048
|
},
|
|
1016
3049
|
{
|
|
1017
|
-
name: "
|
|
3050
|
+
name: "upgradeImpl",
|
|
1018
3051
|
internalType: "address",
|
|
1019
3052
|
type: "address",
|
|
1020
|
-
indexed:
|
|
1021
|
-
},
|
|
1022
|
-
{
|
|
1023
|
-
name: "creatorReward",
|
|
1024
|
-
internalType: "uint256",
|
|
1025
|
-
type: "uint256",
|
|
1026
|
-
indexed: false
|
|
1027
|
-
},
|
|
1028
|
-
{
|
|
1029
|
-
name: "createReferralReward",
|
|
1030
|
-
internalType: "uint256",
|
|
1031
|
-
type: "uint256",
|
|
1032
|
-
indexed: false
|
|
1033
|
-
},
|
|
1034
|
-
{
|
|
1035
|
-
name: "mintReferralReward",
|
|
1036
|
-
internalType: "uint256",
|
|
1037
|
-
type: "uint256",
|
|
1038
|
-
indexed: false
|
|
1039
|
-
},
|
|
1040
|
-
{
|
|
1041
|
-
name: "firstMinterReward",
|
|
1042
|
-
internalType: "uint256",
|
|
1043
|
-
type: "uint256",
|
|
1044
|
-
indexed: false
|
|
1045
|
-
},
|
|
1046
|
-
{
|
|
1047
|
-
name: "zoraReward",
|
|
1048
|
-
internalType: "uint256",
|
|
1049
|
-
type: "uint256",
|
|
1050
|
-
indexed: false
|
|
3053
|
+
indexed: true
|
|
1051
3054
|
}
|
|
1052
3055
|
],
|
|
1053
|
-
name: "
|
|
3056
|
+
name: "UpgradeRegistered"
|
|
1054
3057
|
},
|
|
1055
3058
|
{
|
|
1056
3059
|
type: "event",
|
|
1057
3060
|
anonymous: false,
|
|
1058
3061
|
inputs: [
|
|
1059
|
-
{ name: "from", internalType: "address", type: "address", indexed: true },
|
|
1060
|
-
{ name: "to", internalType: "address", type: "address", indexed: true },
|
|
1061
3062
|
{
|
|
1062
|
-
name: "
|
|
1063
|
-
internalType: "
|
|
1064
|
-
type: "
|
|
1065
|
-
indexed:
|
|
3063
|
+
name: "baseImpl",
|
|
3064
|
+
internalType: "address",
|
|
3065
|
+
type: "address",
|
|
3066
|
+
indexed: true
|
|
3067
|
+
},
|
|
3068
|
+
{
|
|
3069
|
+
name: "upgradeImpl",
|
|
3070
|
+
internalType: "address",
|
|
3071
|
+
type: "address",
|
|
3072
|
+
indexed: true
|
|
1066
3073
|
}
|
|
1067
3074
|
],
|
|
1068
|
-
name: "
|
|
3075
|
+
name: "UpgradeRemoved"
|
|
1069
3076
|
},
|
|
1070
|
-
{ type: "error", inputs: [], name: "ADDRESS_ZERO" },
|
|
1071
|
-
{ type: "error", inputs: [], name: "ARRAY_LENGTH_MISMATCH" },
|
|
1072
|
-
{ type: "error", inputs: [], name: "INVALID_DEPOSIT" },
|
|
1073
|
-
{ type: "error", inputs: [], name: "INVALID_SIGNATURE" },
|
|
1074
|
-
{ type: "error", inputs: [], name: "INVALID_WITHDRAW" },
|
|
1075
|
-
{ type: "error", inputs: [], name: "InvalidShortString" },
|
|
1076
|
-
{ type: "error", inputs: [], name: "SIGNATURE_DEADLINE_EXPIRED" },
|
|
1077
3077
|
{
|
|
1078
3078
|
type: "error",
|
|
1079
|
-
inputs: [
|
|
1080
|
-
name: "
|
|
3079
|
+
inputs: [],
|
|
3080
|
+
name: "INITIALIZABLE_CONTRACT_ALREADY_INITIALIZED"
|
|
1081
3081
|
},
|
|
1082
|
-
{
|
|
3082
|
+
{
|
|
3083
|
+
type: "error",
|
|
3084
|
+
inputs: [],
|
|
3085
|
+
name: "INITIALIZABLE_CONTRACT_IS_NOT_INITIALIZING"
|
|
3086
|
+
},
|
|
3087
|
+
{ type: "error", inputs: [], name: "ONLY_OWNER" },
|
|
3088
|
+
{ type: "error", inputs: [], name: "ONLY_PENDING_OWNER" },
|
|
3089
|
+
{ type: "error", inputs: [], name: "OWNER_CANNOT_BE_ZERO_ADDRESS" }
|
|
1083
3090
|
];
|
|
1084
|
-
var
|
|
1085
|
-
1: "
|
|
1086
|
-
10: "
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
168587773: "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B",
|
|
1096
|
-
999999999: "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
|
|
3091
|
+
var upgradeGateAddress = {
|
|
3092
|
+
1: "0xbC50029836A59A4E5e1Bb8988272F46ebA0F9900",
|
|
3093
|
+
10: "0xbC50029836A59A4E5e1Bb8988272F46ebA0F9900",
|
|
3094
|
+
8453: "0xbC50029836A59A4E5e1Bb8988272F46ebA0F9900",
|
|
3095
|
+
42161: "0xbC50029836A59A4E5e1Bb8988272F46ebA0F9900",
|
|
3096
|
+
81457: "0xbC50029836A59A4E5e1Bb8988272F46ebA0F9900",
|
|
3097
|
+
84532: "0xbC50029836A59A4E5e1Bb8988272F46ebA0F9900",
|
|
3098
|
+
421614: "0xbC50029836A59A4E5e1Bb8988272F46ebA0F9900",
|
|
3099
|
+
7777777: "0xbC50029836A59A4E5e1Bb8988272F46ebA0F9900",
|
|
3100
|
+
11155111: "0xbC50029836A59A4E5e1Bb8988272F46ebA0F9900",
|
|
3101
|
+
168587773: "0xbC50029836A59A4E5e1Bb8988272F46ebA0F9900"
|
|
1097
3102
|
};
|
|
1098
|
-
var
|
|
1099
|
-
address:
|
|
1100
|
-
abi:
|
|
3103
|
+
var upgradeGateConfig = {
|
|
3104
|
+
address: upgradeGateAddress,
|
|
3105
|
+
abi: upgradeGateABI
|
|
1101
3106
|
};
|
|
1102
3107
|
var zoraCreator1155FactoryImplABI = [
|
|
1103
3108
|
{
|
|
@@ -1254,6 +3259,19 @@ var zoraCreator1155FactoryImplABI = [
|
|
|
1254
3259
|
name: "deterministicContractAddress",
|
|
1255
3260
|
outputs: [{ name: "", internalType: "address", type: "address" }]
|
|
1256
3261
|
},
|
|
3262
|
+
{
|
|
3263
|
+
stateMutability: "view",
|
|
3264
|
+
type: "function",
|
|
3265
|
+
inputs: [
|
|
3266
|
+
{ name: "msgSender", internalType: "address", type: "address" },
|
|
3267
|
+
{ name: "newContractURI", internalType: "string", type: "string" },
|
|
3268
|
+
{ name: "name", internalType: "string", type: "string" },
|
|
3269
|
+
{ name: "contractAdmin", internalType: "address", type: "address" },
|
|
3270
|
+
{ name: "setupActions", internalType: "bytes[]", type: "bytes[]" }
|
|
3271
|
+
],
|
|
3272
|
+
name: "deterministicContractAddressWithSetupActions",
|
|
3273
|
+
outputs: [{ name: "", internalType: "address", type: "address" }]
|
|
3274
|
+
},
|
|
1257
3275
|
{
|
|
1258
3276
|
stateMutability: "view",
|
|
1259
3277
|
type: "function",
|
|
@@ -1579,7 +3597,7 @@ var zoraCreator1155FactoryImplAddress = {
|
|
|
1579
3597
|
8453: "0x777777C338d93e2C7adf08D102d45CA7CC4Ed021",
|
|
1580
3598
|
42161: "0x777777C338d93e2C7adf08D102d45CA7CC4Ed021",
|
|
1581
3599
|
81457: "0x777777C338d93e2C7adf08D102d45CA7CC4Ed021",
|
|
1582
|
-
84532: "
|
|
3600
|
+
84532: "0x777777C338d93e2C7adf08D102d45CA7CC4Ed021",
|
|
1583
3601
|
421614: "0x777777C338d93e2C7adf08D102d45CA7CC4Ed021",
|
|
1584
3602
|
7777777: "0x777777C338d93e2C7adf08D102d45CA7CC4Ed021",
|
|
1585
3603
|
11155111: "0x777777C338d93e2C7adf08D102d45CA7CC4Ed021",
|
|
@@ -3010,6 +5028,13 @@ var zoraCreator1155PremintExecutorImplABI = [
|
|
|
3010
5028
|
name: "contractName",
|
|
3011
5029
|
outputs: [{ name: "", internalType: "string", type: "string" }]
|
|
3012
5030
|
},
|
|
5031
|
+
{
|
|
5032
|
+
stateMutability: "pure",
|
|
5033
|
+
type: "function",
|
|
5034
|
+
inputs: [],
|
|
5035
|
+
name: "contractVersion",
|
|
5036
|
+
outputs: [{ name: "", internalType: "string", type: "string" }]
|
|
5037
|
+
},
|
|
3013
5038
|
{
|
|
3014
5039
|
stateMutability: "view",
|
|
3015
5040
|
type: "function",
|
|
@@ -3028,6 +5053,29 @@ var zoraCreator1155PremintExecutorImplABI = [
|
|
|
3028
5053
|
name: "getContractAddress",
|
|
3029
5054
|
outputs: [{ name: "", internalType: "address", type: "address" }]
|
|
3030
5055
|
},
|
|
5056
|
+
{
|
|
5057
|
+
stateMutability: "view",
|
|
5058
|
+
type: "function",
|
|
5059
|
+
inputs: [
|
|
5060
|
+
{
|
|
5061
|
+
name: "contractConfig",
|
|
5062
|
+
internalType: "struct ContractWithAdditionalAdminsCreationConfig",
|
|
5063
|
+
type: "tuple",
|
|
5064
|
+
components: [
|
|
5065
|
+
{ name: "contractAdmin", internalType: "address", type: "address" },
|
|
5066
|
+
{ name: "contractURI", internalType: "string", type: "string" },
|
|
5067
|
+
{ name: "contractName", internalType: "string", type: "string" },
|
|
5068
|
+
{
|
|
5069
|
+
name: "additionalAdmins",
|
|
5070
|
+
internalType: "address[]",
|
|
5071
|
+
type: "address[]"
|
|
5072
|
+
}
|
|
5073
|
+
]
|
|
5074
|
+
}
|
|
5075
|
+
],
|
|
5076
|
+
name: "getContractWithAdditionalAdminsAddress",
|
|
5077
|
+
outputs: [{ name: "", internalType: "address", type: "address" }]
|
|
5078
|
+
},
|
|
3031
5079
|
{
|
|
3032
5080
|
stateMutability: "view",
|
|
3033
5081
|
type: "function",
|
|
@@ -3041,8 +5089,23 @@ var zoraCreator1155PremintExecutorImplABI = [
|
|
|
3041
5089
|
inputs: [
|
|
3042
5090
|
{ name: "_initialOwner", internalType: "address", type: "address" }
|
|
3043
5091
|
],
|
|
3044
|
-
name: "initialize",
|
|
3045
|
-
outputs: []
|
|
5092
|
+
name: "initialize",
|
|
5093
|
+
outputs: []
|
|
5094
|
+
},
|
|
5095
|
+
{
|
|
5096
|
+
stateMutability: "view",
|
|
5097
|
+
type: "function",
|
|
5098
|
+
inputs: [
|
|
5099
|
+
{ name: "signer", internalType: "address", type: "address" },
|
|
5100
|
+
{
|
|
5101
|
+
name: "premintContractConfigContractAdmin",
|
|
5102
|
+
internalType: "address",
|
|
5103
|
+
type: "address"
|
|
5104
|
+
},
|
|
5105
|
+
{ name: "contractAddress", internalType: "address", type: "address" }
|
|
5106
|
+
],
|
|
5107
|
+
name: "isAuthorizedToCreatePremint",
|
|
5108
|
+
outputs: [{ name: "isAuthorized", internalType: "bool", type: "bool" }]
|
|
3046
5109
|
},
|
|
3047
5110
|
{
|
|
3048
5111
|
stateMutability: "view",
|
|
@@ -3054,9 +5117,14 @@ var zoraCreator1155PremintExecutorImplABI = [
|
|
|
3054
5117
|
internalType: "address",
|
|
3055
5118
|
type: "address"
|
|
3056
5119
|
},
|
|
3057
|
-
{ name: "contractAddress", internalType: "address", type: "address" }
|
|
5120
|
+
{ name: "contractAddress", internalType: "address", type: "address" },
|
|
5121
|
+
{
|
|
5122
|
+
name: "additionalAdmins",
|
|
5123
|
+
internalType: "address[]",
|
|
5124
|
+
type: "address[]"
|
|
5125
|
+
}
|
|
3058
5126
|
],
|
|
3059
|
-
name: "
|
|
5127
|
+
name: "isAuthorizedToCreatePremintWithAdditionalAdmins",
|
|
3060
5128
|
outputs: [{ name: "isAuthorized", internalType: "bool", type: "bool" }]
|
|
3061
5129
|
},
|
|
3062
5130
|
{
|
|
@@ -3149,61 +5217,39 @@ var zoraCreator1155PremintExecutorImplABI = [
|
|
|
3149
5217
|
outputs: [{ name: "", internalType: "address", type: "address" }]
|
|
3150
5218
|
},
|
|
3151
5219
|
{
|
|
3152
|
-
stateMutability: "
|
|
5220
|
+
stateMutability: "payable",
|
|
3153
5221
|
type: "function",
|
|
3154
5222
|
inputs: [
|
|
3155
5223
|
{
|
|
3156
5224
|
name: "contractConfig",
|
|
3157
|
-
internalType: "struct
|
|
5225
|
+
internalType: "struct ContractWithAdditionalAdminsCreationConfig",
|
|
3158
5226
|
type: "tuple",
|
|
3159
5227
|
components: [
|
|
3160
5228
|
{ name: "contractAdmin", internalType: "address", type: "address" },
|
|
3161
5229
|
{ name: "contractURI", internalType: "string", type: "string" },
|
|
3162
|
-
{ name: "contractName", internalType: "string", type: "string" }
|
|
5230
|
+
{ name: "contractName", internalType: "string", type: "string" },
|
|
5231
|
+
{
|
|
5232
|
+
name: "additionalAdmins",
|
|
5233
|
+
internalType: "address[]",
|
|
5234
|
+
type: "address[]"
|
|
5235
|
+
}
|
|
3163
5236
|
]
|
|
3164
5237
|
},
|
|
5238
|
+
{ name: "premintCollection", internalType: "address", type: "address" },
|
|
3165
5239
|
{
|
|
3166
|
-
name: "
|
|
3167
|
-
internalType: "struct
|
|
5240
|
+
name: "encodedPremintConfig",
|
|
5241
|
+
internalType: "struct PremintConfigEncoded",
|
|
3168
5242
|
type: "tuple",
|
|
3169
5243
|
components: [
|
|
3170
|
-
{
|
|
3171
|
-
name: "tokenConfig",
|
|
3172
|
-
internalType: "struct Erc20TokenCreationConfigV1",
|
|
3173
|
-
type: "tuple",
|
|
3174
|
-
components: [
|
|
3175
|
-
{ name: "tokenURI", internalType: "string", type: "string" },
|
|
3176
|
-
{ name: "maxSupply", internalType: "uint256", type: "uint256" },
|
|
3177
|
-
{ name: "royaltyBPS", internalType: "uint32", type: "uint32" },
|
|
3178
|
-
{
|
|
3179
|
-
name: "payoutRecipient",
|
|
3180
|
-
internalType: "address",
|
|
3181
|
-
type: "address"
|
|
3182
|
-
},
|
|
3183
|
-
{
|
|
3184
|
-
name: "createReferral",
|
|
3185
|
-
internalType: "address",
|
|
3186
|
-
type: "address"
|
|
3187
|
-
},
|
|
3188
|
-
{ name: "erc20Minter", internalType: "address", type: "address" },
|
|
3189
|
-
{ name: "mintStart", internalType: "uint64", type: "uint64" },
|
|
3190
|
-
{ name: "mintDuration", internalType: "uint64", type: "uint64" },
|
|
3191
|
-
{
|
|
3192
|
-
name: "maxTokensPerAddress",
|
|
3193
|
-
internalType: "uint64",
|
|
3194
|
-
type: "uint64"
|
|
3195
|
-
},
|
|
3196
|
-
{ name: "currency", internalType: "address", type: "address" },
|
|
3197
|
-
{
|
|
3198
|
-
name: "pricePerToken",
|
|
3199
|
-
internalType: "uint256",
|
|
3200
|
-
type: "uint256"
|
|
3201
|
-
}
|
|
3202
|
-
]
|
|
3203
|
-
},
|
|
3204
5244
|
{ name: "uid", internalType: "uint32", type: "uint32" },
|
|
3205
5245
|
{ name: "version", internalType: "uint32", type: "uint32" },
|
|
3206
|
-
{ name: "deleted", internalType: "bool", type: "bool" }
|
|
5246
|
+
{ name: "deleted", internalType: "bool", type: "bool" },
|
|
5247
|
+
{ name: "tokenConfig", internalType: "bytes", type: "bytes" },
|
|
5248
|
+
{
|
|
5249
|
+
name: "premintConfigVersion",
|
|
5250
|
+
internalType: "bytes32",
|
|
5251
|
+
type: "bytes32"
|
|
5252
|
+
}
|
|
3207
5253
|
]
|
|
3208
5254
|
},
|
|
3209
5255
|
{ name: "signature", internalType: "bytes", type: "bytes" },
|
|
@@ -3225,10 +5271,10 @@ var zoraCreator1155PremintExecutorImplABI = [
|
|
|
3225
5271
|
{ name: "firstMinter", internalType: "address", type: "address" },
|
|
3226
5272
|
{ name: "signerContract", internalType: "address", type: "address" }
|
|
3227
5273
|
],
|
|
3228
|
-
name: "
|
|
5274
|
+
name: "premint",
|
|
3229
5275
|
outputs: [
|
|
3230
5276
|
{
|
|
3231
|
-
name: "
|
|
5277
|
+
name: "premintResult",
|
|
3232
5278
|
internalType: "struct PremintResult",
|
|
3233
5279
|
type: "tuple",
|
|
3234
5280
|
components: [
|
|
@@ -3329,7 +5375,7 @@ var zoraCreator1155PremintExecutorImplABI = [
|
|
|
3329
5375
|
name: "premintV1",
|
|
3330
5376
|
outputs: [
|
|
3331
5377
|
{
|
|
3332
|
-
name: "
|
|
5378
|
+
name: "",
|
|
3333
5379
|
internalType: "struct PremintResult",
|
|
3334
5380
|
type: "tuple",
|
|
3335
5381
|
components: [
|
|
@@ -3417,97 +5463,7 @@ var zoraCreator1155PremintExecutorImplABI = [
|
|
|
3417
5463
|
name: "premintV2",
|
|
3418
5464
|
outputs: [
|
|
3419
5465
|
{
|
|
3420
|
-
name: "
|
|
3421
|
-
internalType: "struct PremintResult",
|
|
3422
|
-
type: "tuple",
|
|
3423
|
-
components: [
|
|
3424
|
-
{ name: "contractAddress", internalType: "address", type: "address" },
|
|
3425
|
-
{ name: "tokenId", internalType: "uint256", type: "uint256" },
|
|
3426
|
-
{ name: "createdNewContract", internalType: "bool", type: "bool" }
|
|
3427
|
-
]
|
|
3428
|
-
}
|
|
3429
|
-
]
|
|
3430
|
-
},
|
|
3431
|
-
{
|
|
3432
|
-
stateMutability: "payable",
|
|
3433
|
-
type: "function",
|
|
3434
|
-
inputs: [
|
|
3435
|
-
{
|
|
3436
|
-
name: "contractConfig",
|
|
3437
|
-
internalType: "struct ContractCreationConfig",
|
|
3438
|
-
type: "tuple",
|
|
3439
|
-
components: [
|
|
3440
|
-
{ name: "contractAdmin", internalType: "address", type: "address" },
|
|
3441
|
-
{ name: "contractURI", internalType: "string", type: "string" },
|
|
3442
|
-
{ name: "contractName", internalType: "string", type: "string" }
|
|
3443
|
-
]
|
|
3444
|
-
},
|
|
3445
|
-
{
|
|
3446
|
-
name: "premintConfig",
|
|
3447
|
-
internalType: "struct PremintConfigV2",
|
|
3448
|
-
type: "tuple",
|
|
3449
|
-
components: [
|
|
3450
|
-
{
|
|
3451
|
-
name: "tokenConfig",
|
|
3452
|
-
internalType: "struct TokenCreationConfigV2",
|
|
3453
|
-
type: "tuple",
|
|
3454
|
-
components: [
|
|
3455
|
-
{ name: "tokenURI", internalType: "string", type: "string" },
|
|
3456
|
-
{ name: "maxSupply", internalType: "uint256", type: "uint256" },
|
|
3457
|
-
{
|
|
3458
|
-
name: "maxTokensPerAddress",
|
|
3459
|
-
internalType: "uint64",
|
|
3460
|
-
type: "uint64"
|
|
3461
|
-
},
|
|
3462
|
-
{ name: "pricePerToken", internalType: "uint96", type: "uint96" },
|
|
3463
|
-
{ name: "mintStart", internalType: "uint64", type: "uint64" },
|
|
3464
|
-
{ name: "mintDuration", internalType: "uint64", type: "uint64" },
|
|
3465
|
-
{ name: "royaltyBPS", internalType: "uint32", type: "uint32" },
|
|
3466
|
-
{
|
|
3467
|
-
name: "payoutRecipient",
|
|
3468
|
-
internalType: "address",
|
|
3469
|
-
type: "address"
|
|
3470
|
-
},
|
|
3471
|
-
{
|
|
3472
|
-
name: "fixedPriceMinter",
|
|
3473
|
-
internalType: "address",
|
|
3474
|
-
type: "address"
|
|
3475
|
-
},
|
|
3476
|
-
{
|
|
3477
|
-
name: "createReferral",
|
|
3478
|
-
internalType: "address",
|
|
3479
|
-
type: "address"
|
|
3480
|
-
}
|
|
3481
|
-
]
|
|
3482
|
-
},
|
|
3483
|
-
{ name: "uid", internalType: "uint32", type: "uint32" },
|
|
3484
|
-
{ name: "version", internalType: "uint32", type: "uint32" },
|
|
3485
|
-
{ name: "deleted", internalType: "bool", type: "bool" }
|
|
3486
|
-
]
|
|
3487
|
-
},
|
|
3488
|
-
{ name: "signature", internalType: "bytes", type: "bytes" },
|
|
3489
|
-
{ name: "quantityToMint", internalType: "uint256", type: "uint256" },
|
|
3490
|
-
{
|
|
3491
|
-
name: "mintArguments",
|
|
3492
|
-
internalType: "struct MintArguments",
|
|
3493
|
-
type: "tuple",
|
|
3494
|
-
components: [
|
|
3495
|
-
{ name: "mintRecipient", internalType: "address", type: "address" },
|
|
3496
|
-
{ name: "mintComment", internalType: "string", type: "string" },
|
|
3497
|
-
{
|
|
3498
|
-
name: "mintRewardsRecipients",
|
|
3499
|
-
internalType: "address[]",
|
|
3500
|
-
type: "address[]"
|
|
3501
|
-
}
|
|
3502
|
-
]
|
|
3503
|
-
},
|
|
3504
|
-
{ name: "firstMinter", internalType: "address", type: "address" },
|
|
3505
|
-
{ name: "signerContract", internalType: "address", type: "address" }
|
|
3506
|
-
],
|
|
3507
|
-
name: "premintV2WithSignerContract",
|
|
3508
|
-
outputs: [
|
|
3509
|
-
{
|
|
3510
|
-
name: "result",
|
|
5466
|
+
name: "",
|
|
3511
5467
|
internalType: "struct PremintResult",
|
|
3512
5468
|
type: "tuple",
|
|
3513
5469
|
components: [
|
|
@@ -4005,6 +5961,7 @@ var zoraCreator1155PremintExecutorImplAddress = {
|
|
|
4005
5961
|
8453: "0x7777773606e7e46C8Ba8B98C08f5cD218e31d340",
|
|
4006
5962
|
42161: "0x7777773606e7e46C8Ba8B98C08f5cD218e31d340",
|
|
4007
5963
|
81457: "0x7777773606e7e46C8Ba8B98C08f5cD218e31d340",
|
|
5964
|
+
84532: "0x7777773606e7e46C8Ba8B98C08f5cD218e31d340",
|
|
4008
5965
|
421614: "0x7777773606e7e46C8Ba8B98C08f5cD218e31d340",
|
|
4009
5966
|
7777777: "0x7777773606e7e46C8Ba8B98C08f5cD218e31d340",
|
|
4010
5967
|
11155111: "0x7777773606e7e46C8Ba8B98C08f5cD218e31d340",
|
|
@@ -5408,6 +7365,13 @@ var zoraMints1155ABI = [
|
|
|
5408
7365
|
{ type: "error", inputs: [], name: "TokenNotMintable" }
|
|
5409
7366
|
];
|
|
5410
7367
|
var zoraMints1155Address = {
|
|
7368
|
+
1: "0x7777777d57c1C6e472fa379b7b3B6c6ba3835073",
|
|
7369
|
+
10: "0x7777777d57c1C6e472fa379b7b3B6c6ba3835073",
|
|
7370
|
+
8453: "0x7777777d57c1C6e472fa379b7b3B6c6ba3835073",
|
|
7371
|
+
42161: "0x7777777d57c1C6e472fa379b7b3B6c6ba3835073",
|
|
7372
|
+
81457: "0x7777777d57c1C6e472fa379b7b3B6c6ba3835073",
|
|
7373
|
+
84532: "0x7777777d57c1C6e472fa379b7b3B6c6ba3835073",
|
|
7374
|
+
421614: "0x7777777d57c1C6e472fa379b7b3B6c6ba3835073",
|
|
5411
7375
|
7777777: "0x7777777d57c1C6e472fa379b7b3B6c6ba3835073",
|
|
5412
7376
|
999999999: "0x7777777d57c1C6e472fa379b7b3B6c6ba3835073"
|
|
5413
7377
|
};
|
|
@@ -5422,7 +7386,7 @@ var zoraMintsManagerImplABI = [
|
|
|
5422
7386
|
inputs: [
|
|
5423
7387
|
{
|
|
5424
7388
|
name: "_premintExecutor",
|
|
5425
|
-
internalType: "contract
|
|
7389
|
+
internalType: "contract IZoraCreator1155PremintExecutorAllVersions",
|
|
5426
7390
|
type: "address"
|
|
5427
7391
|
}
|
|
5428
7392
|
]
|
|
@@ -5500,6 +7464,74 @@ var zoraMintsManagerImplABI = [
|
|
|
5500
7464
|
name: "collect",
|
|
5501
7465
|
outputs: []
|
|
5502
7466
|
},
|
|
7467
|
+
{
|
|
7468
|
+
stateMutability: "payable",
|
|
7469
|
+
type: "function",
|
|
7470
|
+
inputs: [
|
|
7471
|
+
{
|
|
7472
|
+
name: "contractConfig",
|
|
7473
|
+
internalType: "struct ContractWithAdditionalAdminsCreationConfig",
|
|
7474
|
+
type: "tuple",
|
|
7475
|
+
components: [
|
|
7476
|
+
{ name: "contractAdmin", internalType: "address", type: "address" },
|
|
7477
|
+
{ name: "contractURI", internalType: "string", type: "string" },
|
|
7478
|
+
{ name: "contractName", internalType: "string", type: "string" },
|
|
7479
|
+
{
|
|
7480
|
+
name: "additionalAdmins",
|
|
7481
|
+
internalType: "address[]",
|
|
7482
|
+
type: "address[]"
|
|
7483
|
+
}
|
|
7484
|
+
]
|
|
7485
|
+
},
|
|
7486
|
+
{ name: "tokenContract", internalType: "address", type: "address" },
|
|
7487
|
+
{
|
|
7488
|
+
name: "premintConfig",
|
|
7489
|
+
internalType: "struct PremintConfigEncoded",
|
|
7490
|
+
type: "tuple",
|
|
7491
|
+
components: [
|
|
7492
|
+
{ name: "uid", internalType: "uint32", type: "uint32" },
|
|
7493
|
+
{ name: "version", internalType: "uint32", type: "uint32" },
|
|
7494
|
+
{ name: "deleted", internalType: "bool", type: "bool" },
|
|
7495
|
+
{ name: "tokenConfig", internalType: "bytes", type: "bytes" },
|
|
7496
|
+
{
|
|
7497
|
+
name: "premintConfigVersion",
|
|
7498
|
+
internalType: "bytes32",
|
|
7499
|
+
type: "bytes32"
|
|
7500
|
+
}
|
|
7501
|
+
]
|
|
7502
|
+
},
|
|
7503
|
+
{ name: "signature", internalType: "bytes", type: "bytes" },
|
|
7504
|
+
{
|
|
7505
|
+
name: "mintArguments",
|
|
7506
|
+
internalType: "struct MintArguments",
|
|
7507
|
+
type: "tuple",
|
|
7508
|
+
components: [
|
|
7509
|
+
{ name: "mintRecipient", internalType: "address", type: "address" },
|
|
7510
|
+
{ name: "mintComment", internalType: "string", type: "string" },
|
|
7511
|
+
{
|
|
7512
|
+
name: "mintRewardsRecipients",
|
|
7513
|
+
internalType: "address[]",
|
|
7514
|
+
type: "address[]"
|
|
7515
|
+
}
|
|
7516
|
+
]
|
|
7517
|
+
},
|
|
7518
|
+
{ name: "firstMinter", internalType: "address", type: "address" },
|
|
7519
|
+
{ name: "signerContract", internalType: "address", type: "address" }
|
|
7520
|
+
],
|
|
7521
|
+
name: "collectPremint",
|
|
7522
|
+
outputs: [
|
|
7523
|
+
{
|
|
7524
|
+
name: "result",
|
|
7525
|
+
internalType: "struct PremintResult",
|
|
7526
|
+
type: "tuple",
|
|
7527
|
+
components: [
|
|
7528
|
+
{ name: "contractAddress", internalType: "address", type: "address" },
|
|
7529
|
+
{ name: "tokenId", internalType: "uint256", type: "uint256" },
|
|
7530
|
+
{ name: "createdNewContract", internalType: "bool", type: "bool" }
|
|
7531
|
+
]
|
|
7532
|
+
}
|
|
7533
|
+
]
|
|
7534
|
+
},
|
|
5503
7535
|
{
|
|
5504
7536
|
stateMutability: "payable",
|
|
5505
7537
|
type: "function",
|
|
@@ -6235,6 +8267,13 @@ var zoraMintsManagerImplABI = [
|
|
|
6235
8267
|
{ type: "error", inputs: [], name: "premintSignerContractNotAContract" }
|
|
6236
8268
|
];
|
|
6237
8269
|
var zoraMintsManagerImplAddress = {
|
|
8270
|
+
1: "0x77777770cA269366c7208aFcF36FE2C6F7f7608B",
|
|
8271
|
+
10: "0x77777770cA269366c7208aFcF36FE2C6F7f7608B",
|
|
8272
|
+
8453: "0x77777770cA269366c7208aFcF36FE2C6F7f7608B",
|
|
8273
|
+
42161: "0x77777770cA269366c7208aFcF36FE2C6F7f7608B",
|
|
8274
|
+
81457: "0x77777770cA269366c7208aFcF36FE2C6F7f7608B",
|
|
8275
|
+
84532: "0x77777770cA269366c7208aFcF36FE2C6F7f7608B",
|
|
8276
|
+
421614: "0x77777770cA269366c7208aFcF36FE2C6F7f7608B",
|
|
6238
8277
|
7777777: "0x77777770cA269366c7208aFcF36FE2C6F7f7608B",
|
|
6239
8278
|
999999999: "0x77777770cA269366c7208aFcF36FE2C6F7f7608B"
|
|
6240
8279
|
};
|
|
@@ -6243,15 +8282,29 @@ var zoraMintsManagerImplConfig = {
|
|
|
6243
8282
|
abi: zoraMintsManagerImplABI
|
|
6244
8283
|
};
|
|
6245
8284
|
|
|
8285
|
+
// ../../node_modules/viem/_esm/index.js
|
|
8286
|
+
init_encodeAbiParameters();
|
|
8287
|
+
init_getAbiItem();
|
|
8288
|
+
init_toHex();
|
|
8289
|
+
init_keccak256();
|
|
8290
|
+
|
|
8291
|
+
// src/types.ts
|
|
8292
|
+
var PremintConfigVersion = /* @__PURE__ */ ((PremintConfigVersion2) => {
|
|
8293
|
+
PremintConfigVersion2["V1"] = "1";
|
|
8294
|
+
PremintConfigVersion2["V2"] = "2";
|
|
8295
|
+
PremintConfigVersion2["V3"] = "3";
|
|
8296
|
+
return PremintConfigVersion2;
|
|
8297
|
+
})(PremintConfigVersion || {});
|
|
8298
|
+
|
|
6246
8299
|
// src/typedData.ts
|
|
6247
8300
|
var premintTypedDataDomain = ({
|
|
6248
8301
|
chainId,
|
|
6249
|
-
version,
|
|
8302
|
+
version: version2,
|
|
6250
8303
|
creator1155Contract: verifyingContract
|
|
6251
8304
|
}) => ({
|
|
6252
8305
|
chainId,
|
|
6253
8306
|
name: "Preminter",
|
|
6254
|
-
version,
|
|
8307
|
+
version: version2,
|
|
6255
8308
|
verifyingContract
|
|
6256
8309
|
});
|
|
6257
8310
|
var premintV1TypedDataType = {
|
|
@@ -6278,6 +8331,58 @@ var premintV1TypedDataType = {
|
|
|
6278
8331
|
{ name: "fixedPriceMinter", type: "address" }
|
|
6279
8332
|
]
|
|
6280
8333
|
};
|
|
8334
|
+
var encodeTokenConfigV1 = (config) => {
|
|
8335
|
+
const abiItem = getAbiItem({
|
|
8336
|
+
abi: iPremintDefinitionsABI,
|
|
8337
|
+
name: "tokenConfigV1Definition"
|
|
8338
|
+
});
|
|
8339
|
+
return encodeAbiParameters(abiItem.inputs, [config]);
|
|
8340
|
+
};
|
|
8341
|
+
var encodeTokenConfigV2 = (config) => {
|
|
8342
|
+
const abiItem = getAbiItem({
|
|
8343
|
+
abi: iPremintDefinitionsABI,
|
|
8344
|
+
name: "tokenConfigV2Definition"
|
|
8345
|
+
});
|
|
8346
|
+
return encodeAbiParameters(abiItem.inputs, [config]);
|
|
8347
|
+
};
|
|
8348
|
+
var encodeTokenConfigV3 = (config) => {
|
|
8349
|
+
const abiItem = getAbiItem({
|
|
8350
|
+
abi: iPremintDefinitionsABI,
|
|
8351
|
+
name: "tokenConfigV3Definition"
|
|
8352
|
+
});
|
|
8353
|
+
return encodeAbiParameters(abiItem.inputs, [config]);
|
|
8354
|
+
};
|
|
8355
|
+
var encodeTokenConfig = ({
|
|
8356
|
+
tokenConfig,
|
|
8357
|
+
premintConfigVersion
|
|
8358
|
+
}) => {
|
|
8359
|
+
if (premintConfigVersion === "1" /* V1 */) {
|
|
8360
|
+
return encodeTokenConfigV1(tokenConfig);
|
|
8361
|
+
}
|
|
8362
|
+
if (premintConfigVersion === "2" /* V2 */) {
|
|
8363
|
+
return encodeTokenConfigV2(tokenConfig);
|
|
8364
|
+
}
|
|
8365
|
+
if (premintConfigVersion === "3" /* V3 */) {
|
|
8366
|
+
return encodeTokenConfigV3(tokenConfig);
|
|
8367
|
+
}
|
|
8368
|
+
throw new Error("Invalid PremintConfigVersion: " + premintConfigVersion);
|
|
8369
|
+
};
|
|
8370
|
+
var encodePremintConfig = ({
|
|
8371
|
+
premintConfig,
|
|
8372
|
+
premintConfigVersion
|
|
8373
|
+
}) => {
|
|
8374
|
+
const encodedTokenConfig = encodeTokenConfig({
|
|
8375
|
+
premintConfigVersion,
|
|
8376
|
+
tokenConfig: premintConfig.tokenConfig
|
|
8377
|
+
});
|
|
8378
|
+
return {
|
|
8379
|
+
deleted: premintConfig.deleted,
|
|
8380
|
+
uid: premintConfig.uid,
|
|
8381
|
+
version: premintConfig.version,
|
|
8382
|
+
premintConfigVersion: keccak256(toHex(premintConfigVersion)),
|
|
8383
|
+
tokenConfig: encodedTokenConfig
|
|
8384
|
+
};
|
|
8385
|
+
};
|
|
6281
8386
|
var premintV1TypedDataDefinition = ({
|
|
6282
8387
|
chainId,
|
|
6283
8388
|
creator1155Contract,
|
|
@@ -6287,7 +8392,7 @@ var premintV1TypedDataDefinition = ({
|
|
|
6287
8392
|
primaryType: "CreatorAttribution",
|
|
6288
8393
|
domain: premintTypedDataDomain({
|
|
6289
8394
|
chainId,
|
|
6290
|
-
version: "1"
|
|
8395
|
+
version: "1" /* V1 */,
|
|
6291
8396
|
creator1155Contract
|
|
6292
8397
|
}),
|
|
6293
8398
|
message
|
|
@@ -6325,11 +8430,32 @@ var premintV2TypedDataDefinition = ({
|
|
|
6325
8430
|
primaryType: "CreatorAttribution",
|
|
6326
8431
|
domain: premintTypedDataDomain({
|
|
6327
8432
|
chainId,
|
|
6328
|
-
version: "2"
|
|
8433
|
+
version: "2" /* V2 */,
|
|
6329
8434
|
creator1155Contract
|
|
6330
8435
|
}),
|
|
6331
8436
|
message
|
|
6332
8437
|
});
|
|
8438
|
+
var premintTypedDataDefinition = ({
|
|
8439
|
+
verifyingContract,
|
|
8440
|
+
chainId,
|
|
8441
|
+
premintConfigVersion: version2,
|
|
8442
|
+
premintConfig
|
|
8443
|
+
}) => {
|
|
8444
|
+
if (version2 === "1" /* V1 */)
|
|
8445
|
+
return premintV1TypedDataDefinition({
|
|
8446
|
+
chainId,
|
|
8447
|
+
creator1155Contract: verifyingContract,
|
|
8448
|
+
message: premintConfig
|
|
8449
|
+
});
|
|
8450
|
+
if (version2 === "2" /* V2 */) {
|
|
8451
|
+
return premintV2TypedDataDefinition({
|
|
8452
|
+
chainId,
|
|
8453
|
+
creator1155Contract: verifyingContract,
|
|
8454
|
+
message: premintConfig
|
|
8455
|
+
});
|
|
8456
|
+
}
|
|
8457
|
+
throw new Error(`Invalid version ${version2}`);
|
|
8458
|
+
};
|
|
6333
8459
|
var permitSafeTransferTypedDataType = {
|
|
6334
8460
|
PermitSafeTransfer: [
|
|
6335
8461
|
{ name: "owner", type: "address" },
|
|
@@ -6440,8 +8566,8 @@ var chainConfigs = {
|
|
|
6440
8566
|
PROTOCOL_REWARDS: "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
|
|
6441
8567
|
},
|
|
6442
8568
|
84532: {
|
|
6443
|
-
FACTORY_OWNER: "
|
|
6444
|
-
MINT_FEE_RECIPIENT: "
|
|
8569
|
+
FACTORY_OWNER: "0x5F14C23983c9e0840Dc60dA880349622f0785420",
|
|
8570
|
+
MINT_FEE_RECIPIENT: "0x5F14C23983c9e0840Dc60dA880349622f0785420",
|
|
6445
8571
|
PROTOCOL_REWARDS: "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
|
|
6446
8572
|
},
|
|
6447
8573
|
421614: {
|
|
@@ -6472,18 +8598,18 @@ var chainConfigs = {
|
|
|
6472
8598
|
};
|
|
6473
8599
|
var addresses = {
|
|
6474
8600
|
1: {
|
|
6475
|
-
CONTRACT_1155_IMPL: "
|
|
6476
|
-
CONTRACT_1155_IMPL_VERSION: "2.
|
|
6477
|
-
|
|
8601
|
+
CONTRACT_1155_IMPL: "0xAeAA622E522130676A8d5a4D04e28aC9Afb84536",
|
|
8602
|
+
CONTRACT_1155_IMPL_VERSION: "2.9.0",
|
|
8603
|
+
ERC20_MINTER: "0x777777E8850d8D6d98De2B5f64fae401F96eFF31",
|
|
8604
|
+
FACTORY_IMPL: "0x8f5B2dd6160D96B48a35F0619BC32b4b997cA37F",
|
|
6478
8605
|
FACTORY_PROXY: "0x777777C338d93e2C7adf08D102d45CA7CC4Ed021",
|
|
6479
8606
|
FIXED_PRICE_SALE_STRATEGY: "0x04E2516A2c207E84a1839755675dfd8eF6302F0a",
|
|
6480
8607
|
MERKLE_MINT_SALE_STRATEGY: "0xf48172CA3B6068B20eE4917Eb27b5472f1f272C7",
|
|
6481
|
-
PREMINTER_IMPL: "
|
|
8608
|
+
PREMINTER_IMPL: "0xD754417BDABFCc3a3997B9A15E9F6922a8131Ac1",
|
|
6482
8609
|
PREMINTER_PROXY: "0x7777773606e7e46C8Ba8B98C08f5cD218e31d340",
|
|
6483
8610
|
REDEEM_MINTER_FACTORY: "0x78964965cF77850224513a367f899435C5B69174",
|
|
6484
8611
|
UPGRADE_GATE: "0xbC50029836A59A4E5e1Bb8988272F46ebA0F9900",
|
|
6485
|
-
|
|
6486
|
-
timestamp: 1706664239
|
|
8612
|
+
timestamp: 1713899416
|
|
6487
8613
|
},
|
|
6488
8614
|
10: {
|
|
6489
8615
|
CONTRACT_1155_IMPL: "0xECfbCf718E17B6e76A675dDB936a9249C69DD2aA",
|
|
@@ -6555,32 +8681,32 @@ var addresses = {
|
|
|
6555
8681
|
timestamp: 1709235955
|
|
6556
8682
|
},
|
|
6557
8683
|
84532: {
|
|
6558
|
-
CONTRACT_1155_IMPL: "
|
|
6559
|
-
CONTRACT_1155_IMPL_VERSION: "2.
|
|
6560
|
-
FACTORY_IMPL: "
|
|
6561
|
-
FACTORY_PROXY: "
|
|
8684
|
+
CONTRACT_1155_IMPL: "0x2C49E95303734eE3826307783d5fDD180B2131D3",
|
|
8685
|
+
CONTRACT_1155_IMPL_VERSION: "2.9.0",
|
|
8686
|
+
FACTORY_IMPL: "0xB2696570215c3158eB1D218FB1a3DF92a418B034",
|
|
8687
|
+
FACTORY_PROXY: "0x777777C338d93e2C7adf08D102d45CA7CC4Ed021",
|
|
6562
8688
|
FIXED_PRICE_SALE_STRATEGY: "0xd34872BE0cdb6b09d45FCa067B07f04a1A9aE1aE",
|
|
6563
8689
|
MERKLE_MINT_SALE_STRATEGY: "0x3E8524770adD176bE381a0529E09f1c6c3502A5a",
|
|
6564
|
-
PREMINTER_IMPL: "",
|
|
6565
|
-
PREMINTER_PROXY: "",
|
|
8690
|
+
PREMINTER_IMPL: "0xD754417BDABFCc3a3997B9A15E9F6922a8131Ac1",
|
|
8691
|
+
PREMINTER_PROXY: "0x7777773606e7e46C8Ba8B98C08f5cD218e31d340",
|
|
6566
8692
|
REDEEM_MINTER_FACTORY: "0x805E0a08dE70f85C01F7848370d5e3fc08aAd0ea",
|
|
6567
|
-
UPGRADE_GATE: "
|
|
8693
|
+
UPGRADE_GATE: "0xbC50029836A59A4E5e1Bb8988272F46ebA0F9900",
|
|
6568
8694
|
ERC20_MINTER: "0x777777E8850d8D6d98De2B5f64fae401F96eFF31",
|
|
6569
|
-
timestamp:
|
|
8695
|
+
timestamp: 1713468185
|
|
6570
8696
|
},
|
|
6571
8697
|
421614: {
|
|
6572
|
-
CONTRACT_1155_IMPL: "
|
|
6573
|
-
CONTRACT_1155_IMPL_VERSION: "2.
|
|
6574
|
-
FACTORY_IMPL: "
|
|
8698
|
+
CONTRACT_1155_IMPL: "0x857B5c291519Cff6D2090a87C3bC2eCe676ad057",
|
|
8699
|
+
CONTRACT_1155_IMPL_VERSION: "2.9.0",
|
|
8700
|
+
FACTORY_IMPL: "0x777d8FcB0336FfF689b2Ab17Db5b755F54C8776a",
|
|
6575
8701
|
FACTORY_PROXY: "0x777777C338d93e2C7adf08D102d45CA7CC4Ed021",
|
|
6576
8702
|
FIXED_PRICE_SALE_STRATEGY: "0x1Cd1C1f3b8B779B50Db23155F2Cb244FCcA06B21",
|
|
6577
8703
|
MERKLE_MINT_SALE_STRATEGY: "0xe770E6f19aecF8ef3145A50087999b5556aB3610",
|
|
6578
|
-
PREMINTER_IMPL: "
|
|
8704
|
+
PREMINTER_IMPL: "0xD754417BDABFCc3a3997B9A15E9F6922a8131Ac1",
|
|
6579
8705
|
PREMINTER_PROXY: "0x7777773606e7e46C8Ba8B98C08f5cD218e31d340",
|
|
6580
8706
|
REDEEM_MINTER_FACTORY: "0x69bB4A24EBD8b1B87AF4538E0Ca3075b7E398c3D",
|
|
6581
8707
|
UPGRADE_GATE: "0xbC50029836A59A4E5e1Bb8988272F46ebA0F9900",
|
|
6582
8708
|
ERC20_MINTER: "0x777777E8850d8D6d98De2B5f64fae401F96eFF31",
|
|
6583
|
-
timestamp:
|
|
8709
|
+
timestamp: 1712779746
|
|
6584
8710
|
},
|
|
6585
8711
|
7777777: {
|
|
6586
8712
|
CONTRACT_1155_IMPL: "0x2C49E95303734eE3826307783d5fDD180B2131D3",
|
|
@@ -6626,16 +8752,16 @@ var addresses = {
|
|
|
6626
8752
|
999999999: {
|
|
6627
8753
|
CONTRACT_1155_IMPL: "0xaDf7F654d8E416aaD85d4f06fDf4cA3D05BDA1A1",
|
|
6628
8754
|
CONTRACT_1155_IMPL_VERSION: "2.9.0",
|
|
6629
|
-
|
|
8755
|
+
ERC20_MINTER: "0x8Ec7f068A77fa5FC1925110f82381374BA054Ff2",
|
|
8756
|
+
FACTORY_IMPL: "0x7228C5BE6093cf57BC085aaFFB18D0b7886f0651",
|
|
6630
8757
|
FACTORY_PROXY: "0x777777C338d93e2C7adf08D102d45CA7CC4Ed021",
|
|
6631
8758
|
FIXED_PRICE_SALE_STRATEGY: "0x6d28164C3CE04A190D5F9f0f8881fc807EAD975A",
|
|
6632
8759
|
MERKLE_MINT_SALE_STRATEGY: "0x5e5fD4b758076BAD940db0284b711A67E8a3B88c",
|
|
6633
|
-
PREMINTER_IMPL: "
|
|
8760
|
+
PREMINTER_IMPL: "0xdABa152A152a14844E627444B55a543beF7c4365",
|
|
6634
8761
|
PREMINTER_PROXY: "0x7777773606e7e46C8Ba8B98C08f5cD218e31d340",
|
|
6635
8762
|
REDEEM_MINTER_FACTORY: "0x25cFb6dd9cDE8425e781d6718a29Ccbca3F038d6",
|
|
6636
8763
|
UPGRADE_GATE: "0x0000000000000000000000000000000000000000",
|
|
6637
|
-
|
|
6638
|
-
timestamp: 1712339316
|
|
8764
|
+
timestamp: 1715977010
|
|
6639
8765
|
}
|
|
6640
8766
|
};
|
|
6641
8767
|
|
|
@@ -6646,44 +8772,55 @@ __export(mints_exports, {
|
|
|
6646
8772
|
chainConfigs: () => chainConfigs2
|
|
6647
8773
|
});
|
|
6648
8774
|
var chainConfigs2 = {
|
|
8775
|
+
1: { PROXY_ADMIN: "0xDB392f4391462d60B8B4413ef72018Ab595Af9D0" },
|
|
8776
|
+
10: { PROXY_ADMIN: "0x4c7f7b6067fac9a737ecf2ca1a733fc85dd65a2b" },
|
|
8777
|
+
420: { PROXY_ADMIN: "0xbb45052B2260707655Dfd916a416264f5981192c" },
|
|
8778
|
+
8453: { PROXY_ADMIN: "0x004d6611884B4A661749B64b2ADc78505c3e1AB3" },
|
|
8779
|
+
42161: { PROXY_ADMIN: "0xF7DafC329C93D84267c0E7B146C0bD68807f6A03" },
|
|
8780
|
+
81457: { PROXY_ADMIN: "0x5b297B1b87f8De28C9fA7AFe183Db9F9e6295523" },
|
|
8781
|
+
84531: { PROXY_ADMIN: "0x02539E813cA450C2c7334e885423f4A899a063Fe" },
|
|
8782
|
+
84532: { PROXY_ADMIN: "0x5F14C23983c9e0840Dc60dA880349622f0785420" },
|
|
8783
|
+
421614: { PROXY_ADMIN: "0x256537b56007b32BabEB44E868EC8AA5cBF03D30" },
|
|
8784
|
+
7777777: { PROXY_ADMIN: "0xdEA20c96253dc2d64897D2b8d27A8d935dE74955" },
|
|
8785
|
+
11155111: { PROXY_ADMIN: "0xCE9F2e8EaFa11637F8A1CB60AE8AaC601Ae30f2D" },
|
|
8786
|
+
999999999: { PROXY_ADMIN: "0xdae22ce69Afcb7f4bc37D32E267645722949DE0E" }
|
|
8787
|
+
};
|
|
8788
|
+
var addresses2 = {
|
|
6649
8789
|
1: {
|
|
6650
|
-
|
|
6651
|
-
|
|
8790
|
+
MINTS_ETH_UNWRAPPER_AND_CALLER: "0x0000000000000000000000000000000000000000",
|
|
8791
|
+
MINTS_MANAGER_IMPL: "0x32C49770cC95F6A606Ae5a22A0a70e8F8ff64C75",
|
|
8792
|
+
MINTS_MANAGER_IMPL_VERSION: "0.1.3"
|
|
6652
8793
|
},
|
|
6653
8794
|
10: {
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
420: {
|
|
6658
|
-
PROXY_ADMIN: "0xbb45052B2260707655Dfd916a416264f5981192c",
|
|
6659
|
-
MINTS_OWNER: "0x5dEe21327CD7CD6725C2578DA1c3E5bb2D2D34b2"
|
|
6660
|
-
},
|
|
6661
|
-
999: {
|
|
6662
|
-
PROXY_ADMIN: "0xE84DBB2B25F761751231a9D0DAfbdD4dC3aa8252",
|
|
6663
|
-
MINTS_OWNER: "0xE84DBB2B25F761751231a9D0DAfbdD4dC3aa8252"
|
|
8795
|
+
MINTS_ETH_UNWRAPPER_AND_CALLER: "0x0000000000000000000000000000000000000000",
|
|
8796
|
+
MINTS_MANAGER_IMPL: "0x169eB969c4A10d248C33b471D7F4966E13311E67",
|
|
8797
|
+
MINTS_MANAGER_IMPL_VERSION: "0.1.1"
|
|
6664
8798
|
},
|
|
6665
8799
|
8453: {
|
|
6666
|
-
|
|
6667
|
-
|
|
8800
|
+
MINTS_ETH_UNWRAPPER_AND_CALLER: "0x0000000000000000000000000000000000000000",
|
|
8801
|
+
MINTS_MANAGER_IMPL: "0x169eB969c4A10d248C33b471D7F4966E13311E67",
|
|
8802
|
+
MINTS_MANAGER_IMPL_VERSION: "0.1.1"
|
|
6668
8803
|
},
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
8804
|
+
42161: {
|
|
8805
|
+
MINTS_ETH_UNWRAPPER_AND_CALLER: "0x0000000000000000000000000000000000000000",
|
|
8806
|
+
MINTS_MANAGER_IMPL: "0x169eB969c4A10d248C33b471D7F4966E13311E67",
|
|
8807
|
+
MINTS_MANAGER_IMPL_VERSION: "0.1.1"
|
|
6672
8808
|
},
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
8809
|
+
81457: {
|
|
8810
|
+
MINTS_ETH_UNWRAPPER_AND_CALLER: "0x0000000000000000000000000000000000000000",
|
|
8811
|
+
MINTS_MANAGER_IMPL: "0x32C49770cC95F6A606Ae5a22A0a70e8F8ff64C75",
|
|
8812
|
+
MINTS_MANAGER_IMPL_VERSION: "0.1.3"
|
|
6676
8813
|
},
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
8814
|
+
84532: {
|
|
8815
|
+
MINTS_ETH_UNWRAPPER_AND_CALLER: "0x0000000000000000000000000000000000000000",
|
|
8816
|
+
MINTS_MANAGER_IMPL: "0x32C49770cC95F6A606Ae5a22A0a70e8F8ff64C75",
|
|
8817
|
+
MINTS_MANAGER_IMPL_VERSION: "0.1.3"
|
|
8818
|
+
},
|
|
8819
|
+
421614: {
|
|
8820
|
+
MINTS_ETH_UNWRAPPER_AND_CALLER: "0x0000000000000000000000000000000000000000",
|
|
8821
|
+
MINTS_MANAGER_IMPL: "0x169eB969c4A10d248C33b471D7F4966E13311E67",
|
|
8822
|
+
MINTS_MANAGER_IMPL_VERSION: "0.1.1"
|
|
6680
8823
|
},
|
|
6681
|
-
999999999: {
|
|
6682
|
-
PROXY_ADMIN: "0xdae22ce69Afcb7f4bc37D32E267645722949DE0E",
|
|
6683
|
-
MINTS_OWNER: "0xdae22ce69Afcb7f4bc37D32E267645722949DE0E"
|
|
6684
|
-
}
|
|
6685
|
-
};
|
|
6686
|
-
var addresses2 = {
|
|
6687
8824
|
7777777: {
|
|
6688
8825
|
MINTS_ETH_UNWRAPPER_AND_CALLER: "0xb0994EB9520C98C97e1F3953a5964535C2bd271A",
|
|
6689
8826
|
MINTS_MANAGER_IMPL: "0x978685ad10B829F17e6c2C6E8EeABd7dFDdC1678",
|
|
@@ -6691,16 +8828,19 @@ var addresses2 = {
|
|
|
6691
8828
|
},
|
|
6692
8829
|
999999999: {
|
|
6693
8830
|
MINTS_ETH_UNWRAPPER_AND_CALLER: "0xb0994EB9520C98C97e1F3953a5964535C2bd271A",
|
|
6694
|
-
MINTS_MANAGER_IMPL: "
|
|
6695
|
-
MINTS_MANAGER_IMPL_VERSION: "0.1.
|
|
8831
|
+
MINTS_MANAGER_IMPL: "0x65690B699591aDE72b30aa10B0c34BB78cAc61c0",
|
|
8832
|
+
MINTS_MANAGER_IMPL_VERSION: "0.1.3"
|
|
6696
8833
|
}
|
|
6697
8834
|
};
|
|
6698
8835
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6699
8836
|
0 && (module.exports = {
|
|
8837
|
+
PremintConfigVersion,
|
|
6700
8838
|
contracts1155,
|
|
8839
|
+
encodePremintConfig,
|
|
6701
8840
|
erc20MinterABI,
|
|
6702
8841
|
erc20MinterAddress,
|
|
6703
8842
|
erc20MinterConfig,
|
|
8843
|
+
iPremintDefinitionsABI,
|
|
6704
8844
|
iUnwrapAndForwardActionABI,
|
|
6705
8845
|
mints,
|
|
6706
8846
|
mintsEthUnwrapperAndCallerABI,
|
|
@@ -6708,11 +8848,15 @@ var addresses2 = {
|
|
|
6708
8848
|
mintsEthUnwrapperAndCallerConfig,
|
|
6709
8849
|
mintsSafeTransferBatchTypedDataDefinition,
|
|
6710
8850
|
mintsSafeTransferTypedDataDefinition,
|
|
8851
|
+
premintTypedDataDefinition,
|
|
6711
8852
|
premintV1TypedDataDefinition,
|
|
6712
8853
|
premintV2TypedDataDefinition,
|
|
6713
8854
|
protocolRewardsABI,
|
|
6714
8855
|
protocolRewardsAddress,
|
|
6715
8856
|
protocolRewardsConfig,
|
|
8857
|
+
upgradeGateABI,
|
|
8858
|
+
upgradeGateAddress,
|
|
8859
|
+
upgradeGateConfig,
|
|
6716
8860
|
zoraCreator1155FactoryImplABI,
|
|
6717
8861
|
zoraCreator1155FactoryImplAddress,
|
|
6718
8862
|
zoraCreator1155FactoryImplConfig,
|
|
@@ -6736,4 +8880,9 @@ var addresses2 = {
|
|
|
6736
8880
|
zoraMintsManagerImplAddress,
|
|
6737
8881
|
zoraMintsManagerImplConfig
|
|
6738
8882
|
});
|
|
8883
|
+
/*! Bundled license information:
|
|
8884
|
+
|
|
8885
|
+
@noble/hashes/esm/utils.js:
|
|
8886
|
+
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
8887
|
+
*/
|
|
6739
8888
|
//# sourceMappingURL=index.cjs.map
|