@zoralabs/protocol-deployments 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +43 -34
- package/CHANGELOG.md +13 -0
- package/LICENSE +21 -0
- package/dist/{_esm-ZN7ZVJVO.js → _esm-PPK7XFKN.js} +278 -382
- package/dist/_esm-PPK7XFKN.js.map +1 -0
- package/dist/{ccip-IGMHQQR7.js → ccip-6BNOCQCH.js} +3 -3
- package/dist/{chunk-2FDPSBOH.js → chunk-5JV63AHR.js} +58 -47
- package/dist/chunk-5JV63AHR.js.map +1 -0
- package/dist/{chunk-KIPP2F4J.js → chunk-6M375I5V.js} +956 -216
- package/dist/chunk-6M375I5V.js.map +1 -0
- package/dist/generated/wagmi.d.ts +1350 -73
- package/dist/generated/wagmi.d.ts.map +1 -1
- package/dist/index.cjs +672 -106
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +564 -16
- package/dist/index.js.map +1 -1
- package/dist/{secp256k1-R7PEGLZR.js → secp256k1-5CEPNAX3.js} +109 -87
- package/dist/secp256k1-5CEPNAX3.js.map +1 -0
- package/dist/typedData.d.ts +42 -1
- package/dist/typedData.d.ts.map +1 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/generated/1155.ts +14 -14
- package/src/generated/wagmi.ts +529 -24
- package/src/index.ts +1 -1
- package/src/typedData.ts +73 -0
- package/src/types.ts +8 -0
- package/tsconfig.build.json +1 -1
- package/tsconfig.json +1 -1
- package/dist/_esm-ZN7ZVJVO.js.map +0 -1
- package/dist/chunk-2FDPSBOH.js.map +0 -1
- package/dist/chunk-KIPP2F4J.js.map +0 -1
- package/dist/secp256k1-R7PEGLZR.js.map +0 -1
- /package/dist/{ccip-IGMHQQR7.js.map → ccip-6BNOCQCH.js.map} +0 -0
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// the below files are auto-generated and will be
|
|
2
2
|
// built at build time. They are not checked in to git.
|
|
3
|
-
// The can be generated by running `
|
|
3
|
+
// The can be generated by running `pnpm run prepack` in the root
|
|
4
4
|
export * from "./generated/wagmi";
|
|
5
5
|
export * from "./typedData";
|
|
6
6
|
export * from "./types";
|
package/src/typedData.ts
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
zoraMints1155Address,
|
|
17
17
|
iPremintDefinitionsABI,
|
|
18
|
+
sponsoredSparksSpenderAddress,
|
|
18
19
|
} from "./generated/wagmi";
|
|
19
20
|
import {
|
|
20
21
|
PremintConfigEncoded,
|
|
@@ -340,3 +341,75 @@ export const mintsSafeTransferBatchTypedDataDefinition = ({
|
|
|
340
341
|
verifyingContract: zoraMints1155Address[chainId],
|
|
341
342
|
},
|
|
342
343
|
});
|
|
344
|
+
|
|
345
|
+
export const sponsoredSparksBatchTransferTypedDataType = {
|
|
346
|
+
SponsoredMintBatch: [
|
|
347
|
+
{
|
|
348
|
+
name: "verifier",
|
|
349
|
+
type: "address",
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
name: "from",
|
|
353
|
+
type: "address",
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
name: "destination",
|
|
357
|
+
type: "address",
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
name: "data",
|
|
361
|
+
type: "bytes",
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
name: "expectedRedeemAmount",
|
|
365
|
+
type: "uint256",
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
name: "totalAmount",
|
|
369
|
+
type: "uint256",
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
name: "ids",
|
|
373
|
+
type: "uint256[]",
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
name: "quantities",
|
|
377
|
+
type: "uint256[]",
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
name: "nonce",
|
|
381
|
+
type: "uint256",
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
name: "deadline",
|
|
385
|
+
type: "uint256",
|
|
386
|
+
},
|
|
387
|
+
],
|
|
388
|
+
} as const;
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Builds a typed data definition for a PermitSafeTransferBatch on the Mints1155 contract to be signed
|
|
392
|
+
* @returns
|
|
393
|
+
*/
|
|
394
|
+
export const sponsoredSparksBatchTypedDataDefinition = ({
|
|
395
|
+
chainId,
|
|
396
|
+
message,
|
|
397
|
+
}: {
|
|
398
|
+
chainId: keyof typeof sponsoredSparksSpenderAddress;
|
|
399
|
+
message: TypedDataToPrimitiveTypes<
|
|
400
|
+
typeof sponsoredSparksBatchTransferTypedDataType
|
|
401
|
+
>["SponsoredMintBatch"];
|
|
402
|
+
}): TypedDataDefinition<
|
|
403
|
+
typeof sponsoredSparksBatchTransferTypedDataType,
|
|
404
|
+
"SponsoredMintBatch"
|
|
405
|
+
> => ({
|
|
406
|
+
types: sponsoredSparksBatchTransferTypedDataType,
|
|
407
|
+
message,
|
|
408
|
+
primaryType: "SponsoredMintBatch",
|
|
409
|
+
domain: {
|
|
410
|
+
chainId,
|
|
411
|
+
name: "SponsoredSparksSpender",
|
|
412
|
+
version: "1",
|
|
413
|
+
verifyingContract: sponsoredSparksSpenderAddress[chainId],
|
|
414
|
+
},
|
|
415
|
+
});
|
package/src/types.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { ExtractAbiFunction, AbiParametersToPrimitiveTypes } from "abitype";
|
|
|
3
3
|
import {
|
|
4
4
|
zoraCreator1155PremintExecutorImplABI,
|
|
5
5
|
iPremintDefinitionsABI,
|
|
6
|
+
sponsoredSparksSpenderABI,
|
|
6
7
|
} from "./generated/wagmi";
|
|
7
8
|
import { Address } from "viem";
|
|
8
9
|
|
|
@@ -113,3 +114,10 @@ export type TokenConfigWithVersion<T extends PremintConfigVersion> = {
|
|
|
113
114
|
tokenConfig: TokenConfigForVersion<T>;
|
|
114
115
|
premintConfigVersion: T;
|
|
115
116
|
};
|
|
117
|
+
|
|
118
|
+
export type SponsoredSparksBatch = AbiParametersToPrimitiveTypes<
|
|
119
|
+
ExtractAbiFunction<
|
|
120
|
+
typeof sponsoredSparksSpenderABI,
|
|
121
|
+
"hashSponsoredMint"
|
|
122
|
+
>["inputs"]
|
|
123
|
+
>[0];
|
package/tsconfig.build.json
CHANGED
package/tsconfig.json
CHANGED