@zoralabs/protocol-deployments 0.3.5-COMMENTS.1 → 0.3.5-COMMENTS.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 +48 -48
- package/CHANGELOG.md +6 -0
- package/dist/generated/wagmi.d.ts +58 -5
- package/dist/generated/wagmi.d.ts.map +1 -1
- package/dist/index.cjs +25 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +25 -5
- package/dist/index.js.map +1 -1
- package/dist/typedData.d.ts +11 -2
- package/dist/typedData.d.ts.map +1 -1
- package/json/1155.json +212 -0
- package/json/mints.json +46 -0
- package/package/.turbo/turbo-build.log +48 -0
- package/package/dist/_esm-KB2T7G46.js +3923 -0
- package/package/dist/_esm-KB2T7G46.js.map +1 -0
- package/package/dist/ccip-42FQPB7J.js +15 -0
- package/package/dist/ccip-42FQPB7J.js.map +1 -0
- package/package/dist/chunk-3EJPJMEH.js +44 -0
- package/package/dist/chunk-3EJPJMEH.js.map +1 -0
- package/package/dist/chunk-5JV63AHR.js +129 -0
- package/package/dist/chunk-5JV63AHR.js.map +1 -0
- package/package/dist/chunk-YMRS2KON.js +3956 -0
- package/package/dist/chunk-YMRS2KON.js.map +1 -0
- package/package/dist/encoding.d.ts +15 -0
- package/package/dist/encoding.d.ts.map +1 -0
- package/package/dist/generated/1155.d.ts +232 -0
- package/package/dist/generated/1155.d.ts.map +1 -0
- package/package/dist/generated/sparks.d.ts +85 -0
- package/package/dist/generated/sparks.d.ts.map +1 -0
- package/package/dist/generated/wagmi.d.ts +27548 -0
- package/package/dist/generated/wagmi.d.ts.map +1 -0
- package/package/dist/index.cjs +12957 -0
- package/package/dist/index.cjs.map +1 -0
- package/package/dist/index.d.ts +7 -0
- package/package/dist/index.d.ts.map +1 -0
- package/package/dist/index.js +11268 -0
- package/package/dist/index.js.map +1 -0
- package/package/dist/secp256k1-5CEPNAX3.js +2244 -0
- package/package/dist/secp256k1-5CEPNAX3.js.map +1 -0
- package/package/dist/typedData.d.ts +234 -0
- package/package/dist/typedData.d.ts.map +1 -0
- package/package/dist/types.d.ts +45 -0
- package/package/dist/types.d.ts.map +1 -0
- package/package/package/.turbo/turbo-build.log +48 -0
- package/package/package/dist/_esm-KB2T7G46.js +3923 -0
- package/package/package/dist/_esm-KB2T7G46.js.map +1 -0
- package/package/package/dist/ccip-42FQPB7J.js +15 -0
- package/package/package/dist/ccip-42FQPB7J.js.map +1 -0
- package/package/package/dist/chunk-3EJPJMEH.js +44 -0
- package/package/package/dist/chunk-3EJPJMEH.js.map +1 -0
- package/package/package/dist/chunk-5JV63AHR.js +129 -0
- package/package/package/dist/chunk-5JV63AHR.js.map +1 -0
- package/package/package/dist/chunk-YMRS2KON.js +3956 -0
- package/package/package/dist/chunk-YMRS2KON.js.map +1 -0
- package/package/package/dist/encoding.d.ts +15 -0
- package/package/package/dist/encoding.d.ts.map +1 -0
- package/package/package/dist/generated/1155.d.ts +232 -0
- package/package/package/dist/generated/1155.d.ts.map +1 -0
- package/package/package/dist/generated/sparks.d.ts +85 -0
- package/package/package/dist/generated/sparks.d.ts.map +1 -0
- package/package/package/dist/generated/wagmi.d.ts +27548 -0
- package/package/package/dist/generated/wagmi.d.ts.map +1 -0
- package/package/package/dist/index.cjs +12957 -0
- package/package/package/dist/index.cjs.map +1 -0
- package/package/package/dist/index.d.ts +7 -0
- package/package/package/dist/index.d.ts.map +1 -0
- package/package/package/dist/index.js +11268 -0
- package/package/package/dist/index.js.map +1 -0
- package/package/package/dist/secp256k1-5CEPNAX3.js +2244 -0
- package/package/package/dist/secp256k1-5CEPNAX3.js.map +1 -0
- package/package/package/dist/typedData.d.ts +234 -0
- package/package/package/dist/typedData.d.ts.map +1 -0
- package/package/package/dist/types.d.ts +45 -0
- package/package/package/dist/types.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/generated/wagmi.ts +26 -4
- package/src/typedData.ts +11 -2
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { Address, TypedDataToPrimitiveTypes } from "abitype";
|
|
2
|
+
import { TypedDataDefinition } from "viem";
|
|
3
|
+
import { zoraMints1155Address, sponsoredSparksSpenderAddress } from "./generated/wagmi";
|
|
4
|
+
import { PremintConfigEncoded, PremintConfigV1, PremintConfigV2, PremintConfigVersion, PremintConfigWithVersion } from "./types";
|
|
5
|
+
declare const premintV1TypedDataType: {
|
|
6
|
+
readonly CreatorAttribution: readonly [{
|
|
7
|
+
readonly name: "tokenConfig";
|
|
8
|
+
readonly type: "TokenCreationConfig";
|
|
9
|
+
}, {
|
|
10
|
+
readonly name: "uid";
|
|
11
|
+
readonly type: "uint32";
|
|
12
|
+
}, {
|
|
13
|
+
readonly name: "version";
|
|
14
|
+
readonly type: "uint32";
|
|
15
|
+
}, {
|
|
16
|
+
readonly name: "deleted";
|
|
17
|
+
readonly type: "bool";
|
|
18
|
+
}];
|
|
19
|
+
readonly TokenCreationConfig: readonly [{
|
|
20
|
+
readonly name: "tokenURI";
|
|
21
|
+
readonly type: "string";
|
|
22
|
+
}, {
|
|
23
|
+
readonly name: "maxSupply";
|
|
24
|
+
readonly type: "uint256";
|
|
25
|
+
}, {
|
|
26
|
+
readonly name: "maxTokensPerAddress";
|
|
27
|
+
readonly type: "uint64";
|
|
28
|
+
}, {
|
|
29
|
+
readonly name: "pricePerToken";
|
|
30
|
+
readonly type: "uint96";
|
|
31
|
+
}, {
|
|
32
|
+
readonly name: "mintStart";
|
|
33
|
+
readonly type: "uint64";
|
|
34
|
+
}, {
|
|
35
|
+
readonly name: "mintDuration";
|
|
36
|
+
readonly type: "uint64";
|
|
37
|
+
}, {
|
|
38
|
+
readonly name: "royaltyMintSchedule";
|
|
39
|
+
readonly type: "uint32";
|
|
40
|
+
}, {
|
|
41
|
+
readonly name: "royaltyBPS";
|
|
42
|
+
readonly type: "uint32";
|
|
43
|
+
}, {
|
|
44
|
+
readonly name: "royaltyRecipient";
|
|
45
|
+
readonly type: "address";
|
|
46
|
+
}, {
|
|
47
|
+
readonly name: "fixedPriceMinter";
|
|
48
|
+
readonly type: "address";
|
|
49
|
+
}];
|
|
50
|
+
};
|
|
51
|
+
export declare const encodePremintConfig: <T extends PremintConfigVersion>({ premintConfig, premintConfigVersion, }: PremintConfigWithVersion<T>) => PremintConfigEncoded;
|
|
52
|
+
/**
|
|
53
|
+
* Builds a typed data definition for a PremintConfigV1 to be signed
|
|
54
|
+
* @returns
|
|
55
|
+
*/
|
|
56
|
+
export declare const premintV1TypedDataDefinition: ({ chainId, creator1155Contract, message, }: {
|
|
57
|
+
chainId: number;
|
|
58
|
+
creator1155Contract: Address;
|
|
59
|
+
message: PremintConfigV1;
|
|
60
|
+
}) => TypedDataDefinition<typeof premintV1TypedDataType, "CreatorAttribution">;
|
|
61
|
+
declare const premintV2TypedDataType: {
|
|
62
|
+
readonly CreatorAttribution: readonly [{
|
|
63
|
+
readonly name: "tokenConfig";
|
|
64
|
+
readonly type: "TokenCreationConfig";
|
|
65
|
+
}, {
|
|
66
|
+
readonly name: "uid";
|
|
67
|
+
readonly type: "uint32";
|
|
68
|
+
}, {
|
|
69
|
+
readonly name: "version";
|
|
70
|
+
readonly type: "uint32";
|
|
71
|
+
}, {
|
|
72
|
+
readonly name: "deleted";
|
|
73
|
+
readonly type: "bool";
|
|
74
|
+
}];
|
|
75
|
+
readonly TokenCreationConfig: readonly [{
|
|
76
|
+
readonly name: "tokenURI";
|
|
77
|
+
readonly type: "string";
|
|
78
|
+
}, {
|
|
79
|
+
readonly name: "maxSupply";
|
|
80
|
+
readonly type: "uint256";
|
|
81
|
+
}, {
|
|
82
|
+
readonly name: "maxTokensPerAddress";
|
|
83
|
+
readonly type: "uint64";
|
|
84
|
+
}, {
|
|
85
|
+
readonly name: "pricePerToken";
|
|
86
|
+
readonly type: "uint96";
|
|
87
|
+
}, {
|
|
88
|
+
readonly name: "mintStart";
|
|
89
|
+
readonly type: "uint64";
|
|
90
|
+
}, {
|
|
91
|
+
readonly name: "mintDuration";
|
|
92
|
+
readonly type: "uint64";
|
|
93
|
+
}, {
|
|
94
|
+
readonly name: "royaltyBPS";
|
|
95
|
+
readonly type: "uint32";
|
|
96
|
+
}, {
|
|
97
|
+
readonly name: "payoutRecipient";
|
|
98
|
+
readonly type: "address";
|
|
99
|
+
}, {
|
|
100
|
+
readonly name: "fixedPriceMinter";
|
|
101
|
+
readonly type: "address";
|
|
102
|
+
}, {
|
|
103
|
+
readonly name: "createReferral";
|
|
104
|
+
readonly type: "address";
|
|
105
|
+
}];
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Builds a typed data definition for a PremintConfigV2 to be signed
|
|
109
|
+
*/
|
|
110
|
+
export declare const premintV2TypedDataDefinition: ({ chainId, creator1155Contract, message, }: {
|
|
111
|
+
chainId: number;
|
|
112
|
+
creator1155Contract: Address;
|
|
113
|
+
message: PremintConfigV2;
|
|
114
|
+
}) => TypedDataDefinition<typeof premintV2TypedDataType, "CreatorAttribution">;
|
|
115
|
+
export type PremintTypeDataDefinitionParams<T extends PremintConfigVersion> = {
|
|
116
|
+
verifyingContract: Address;
|
|
117
|
+
chainId: number;
|
|
118
|
+
} & PremintConfigWithVersion<T>;
|
|
119
|
+
/**
|
|
120
|
+
* Creates a typed data definition for a premint config. Works for all versions of the premint config by specifying the premintConfigVersion.
|
|
121
|
+
*
|
|
122
|
+
* @param params.verifyingContract the address of the 1155 contract
|
|
123
|
+
* @param params.chainId the chain id the premint is signed for
|
|
124
|
+
* @param params.premintConfigVersion the version of the premint config
|
|
125
|
+
* @param params.premintConfig the premint config
|
|
126
|
+
* @returns
|
|
127
|
+
*/
|
|
128
|
+
export declare const premintTypedDataDefinition: <T extends PremintConfigVersion>({ verifyingContract, chainId, premintConfigVersion: version, premintConfig, }: PremintTypeDataDefinitionParams<T>) => TypedDataDefinition;
|
|
129
|
+
declare const permitSafeTransferTypedDataType: {
|
|
130
|
+
readonly PermitSafeTransfer: readonly [{
|
|
131
|
+
readonly name: "owner";
|
|
132
|
+
readonly type: "address";
|
|
133
|
+
}, {
|
|
134
|
+
readonly name: "to";
|
|
135
|
+
readonly type: "address";
|
|
136
|
+
}, {
|
|
137
|
+
readonly name: "tokenId";
|
|
138
|
+
readonly type: "uint256";
|
|
139
|
+
}, {
|
|
140
|
+
readonly name: "quantity";
|
|
141
|
+
readonly type: "uint256";
|
|
142
|
+
}, {
|
|
143
|
+
readonly name: "safeTransferData";
|
|
144
|
+
readonly type: "bytes";
|
|
145
|
+
}, {
|
|
146
|
+
readonly name: "nonce";
|
|
147
|
+
readonly type: "uint256";
|
|
148
|
+
}, {
|
|
149
|
+
readonly name: "deadline";
|
|
150
|
+
readonly type: "uint256";
|
|
151
|
+
}];
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* Builds a typed data definition for a PermitSafeTransfer on the Mints1155 contract to be signed
|
|
155
|
+
*/
|
|
156
|
+
export declare const mintsSafeTransferTypedDataDefinition: ({ chainId, message, }: {
|
|
157
|
+
chainId: keyof typeof zoraMints1155Address;
|
|
158
|
+
message: TypedDataToPrimitiveTypes<typeof permitSafeTransferTypedDataType>["PermitSafeTransfer"];
|
|
159
|
+
}) => TypedDataDefinition<typeof permitSafeTransferTypedDataType, "PermitSafeTransfer">;
|
|
160
|
+
declare const permitSafeBatchTransferTypedDataType: {
|
|
161
|
+
readonly Permit: readonly [{
|
|
162
|
+
readonly name: "owner";
|
|
163
|
+
readonly type: "address";
|
|
164
|
+
}, {
|
|
165
|
+
readonly name: "to";
|
|
166
|
+
readonly type: "address";
|
|
167
|
+
}, {
|
|
168
|
+
readonly name: "tokenIds";
|
|
169
|
+
readonly type: "uint256[]";
|
|
170
|
+
}, {
|
|
171
|
+
readonly name: "quantities";
|
|
172
|
+
readonly type: "uint256[]";
|
|
173
|
+
}, {
|
|
174
|
+
readonly name: "safeTransferData";
|
|
175
|
+
readonly type: "bytes";
|
|
176
|
+
}, {
|
|
177
|
+
readonly name: "nonce";
|
|
178
|
+
readonly type: "uint256";
|
|
179
|
+
}, {
|
|
180
|
+
readonly name: "deadline";
|
|
181
|
+
readonly type: "uint256";
|
|
182
|
+
}];
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* Builds a typed data definition for a PermitSafeTransferBatch on the Mints1155 contract to be signed
|
|
186
|
+
* @returns
|
|
187
|
+
*/
|
|
188
|
+
export declare const mintsSafeTransferBatchTypedDataDefinition: ({ chainId, message, }: {
|
|
189
|
+
chainId: keyof typeof zoraMints1155Address;
|
|
190
|
+
message: TypedDataToPrimitiveTypes<typeof permitSafeBatchTransferTypedDataType>["Permit"];
|
|
191
|
+
}) => TypedDataDefinition<typeof permitSafeBatchTransferTypedDataType, "Permit">;
|
|
192
|
+
export declare const sponsoredSparksBatchTransferTypedDataType: {
|
|
193
|
+
readonly SponsoredMintBatch: readonly [{
|
|
194
|
+
readonly name: "verifier";
|
|
195
|
+
readonly type: "address";
|
|
196
|
+
}, {
|
|
197
|
+
readonly name: "from";
|
|
198
|
+
readonly type: "address";
|
|
199
|
+
}, {
|
|
200
|
+
readonly name: "destination";
|
|
201
|
+
readonly type: "address";
|
|
202
|
+
}, {
|
|
203
|
+
readonly name: "data";
|
|
204
|
+
readonly type: "bytes";
|
|
205
|
+
}, {
|
|
206
|
+
readonly name: "expectedRedeemAmount";
|
|
207
|
+
readonly type: "uint256";
|
|
208
|
+
}, {
|
|
209
|
+
readonly name: "totalAmount";
|
|
210
|
+
readonly type: "uint256";
|
|
211
|
+
}, {
|
|
212
|
+
readonly name: "ids";
|
|
213
|
+
readonly type: "uint256[]";
|
|
214
|
+
}, {
|
|
215
|
+
readonly name: "quantities";
|
|
216
|
+
readonly type: "uint256[]";
|
|
217
|
+
}, {
|
|
218
|
+
readonly name: "nonce";
|
|
219
|
+
readonly type: "uint256";
|
|
220
|
+
}, {
|
|
221
|
+
readonly name: "deadline";
|
|
222
|
+
readonly type: "uint256";
|
|
223
|
+
}];
|
|
224
|
+
};
|
|
225
|
+
/**
|
|
226
|
+
* Builds a typed data definition for a PermitSafeTransferBatch on the Mints1155 contract to be signed
|
|
227
|
+
* @returns
|
|
228
|
+
*/
|
|
229
|
+
export declare const sponsoredSparksBatchTypedDataDefinition: ({ chainId, message, }: {
|
|
230
|
+
chainId: keyof typeof sponsoredSparksSpenderAddress;
|
|
231
|
+
message: TypedDataToPrimitiveTypes<typeof sponsoredSparksBatchTransferTypedDataType>["SponsoredMintBatch"];
|
|
232
|
+
}) => TypedDataDefinition<typeof sponsoredSparksBatchTransferTypedDataType, "SponsoredMintBatch">;
|
|
233
|
+
export {};
|
|
234
|
+
//# sourceMappingURL=typedData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typedData.d.ts","sourceRoot":"","sources":["../src/typedData.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAGP,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AACjB,OAAO,EAEL,mBAAmB,EAKpB,MAAM,MAAM,CAAC;AACd,OAAO,EACL,oBAAoB,EAEpB,6BAA6B,EAC9B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,wBAAwB,EAKzB,MAAM,SAAS,CAAC;AAiBjB,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuBE,CAAC;AA8C/B,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,oBAAoB,4CAG/D,wBAAwB,CAAC,CAAC,CAAC,KAAG,oBAahC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,+CAItC;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,OAAO,EAAE,eAAe,CAAC;CAC1B,KAAG,mBAAmB,CACrB,OAAO,sBAAsB,EAC7B,oBAAoB,CAUpB,CAAC;AAEH,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;GAGG;AACH,eAAO,MAAM,uCAAuC,0BAGjD;IACD,OAAO,EAAE,MAAM,OAAO,6BAA6B,CAAC;IACpD,OAAO,EAAE,yBAAyB,CAChC,OAAO,yCAAyC,CACjD,CAAC,oBAAoB,CAAC,CAAC;CACzB,KAAG,mBAAmB,CACrB,OAAO,yCAAyC,EAChD,oBAAoB,CAWpB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ExtractAbiFunction, AbiParametersToPrimitiveTypes } from "abitype";
|
|
2
|
+
import { zoraCreator1155PremintExecutorImplABI, iPremintDefinitionsABI, sponsoredSparksSpenderABI } from "./generated/wagmi";
|
|
3
|
+
import { Address } from "viem";
|
|
4
|
+
export declare enum PremintConfigVersion {
|
|
5
|
+
V1 = "1",
|
|
6
|
+
V2 = "2",
|
|
7
|
+
V3 = "3"
|
|
8
|
+
}
|
|
9
|
+
export type ContractCreationConfig = Omit<AbiParametersToPrimitiveTypes<ExtractAbiFunction<typeof zoraCreator1155PremintExecutorImplABI, "premint">["inputs"]>[0], "additionalAdmins"> & {
|
|
10
|
+
additionalAdmins: Address[];
|
|
11
|
+
};
|
|
12
|
+
export type TokenCreationConfigV1 = AbiParametersToPrimitiveTypes<ExtractAbiFunction<typeof iPremintDefinitionsABI, "tokenConfigV1Definition">["inputs"]>[0];
|
|
13
|
+
export type TokenCreationConfigV2 = AbiParametersToPrimitiveTypes<ExtractAbiFunction<typeof iPremintDefinitionsABI, "tokenConfigV2Definition">["inputs"]>[0];
|
|
14
|
+
export type TokenCreationConfigV3 = AbiParametersToPrimitiveTypes<ExtractAbiFunction<typeof iPremintDefinitionsABI, "tokenConfigV3Definition">["inputs"]>[0];
|
|
15
|
+
export type PremintConfigEncoded = AbiParametersToPrimitiveTypes<ExtractAbiFunction<typeof zoraCreator1155PremintExecutorImplABI, "premint">["inputs"]>[2];
|
|
16
|
+
type PremintConfigCommon = Pick<PremintConfigEncoded, "deleted" | "uid" | "version">;
|
|
17
|
+
export type PremintConfigV1 = PremintConfigCommon & {
|
|
18
|
+
tokenConfig: TokenCreationConfigV1;
|
|
19
|
+
};
|
|
20
|
+
export type PremintConfigV2 = PremintConfigCommon & {
|
|
21
|
+
tokenConfig: TokenCreationConfigV2;
|
|
22
|
+
};
|
|
23
|
+
export type PremintConfigV3 = PremintConfigCommon & {
|
|
24
|
+
tokenConfig: TokenCreationConfigV3;
|
|
25
|
+
};
|
|
26
|
+
export type PremintMintArguments = AbiParametersToPrimitiveTypes<ExtractAbiFunction<typeof zoraCreator1155PremintExecutorImplABI, "premint">["inputs"]>[5];
|
|
27
|
+
export type PremintConfigForVersion<T extends PremintConfigVersion> = T extends PremintConfigVersion.V1 ? PremintConfigV1 : T extends PremintConfigVersion.V2 ? PremintConfigV2 : PremintConfigV3;
|
|
28
|
+
export type PremintConfigWithVersion<T extends PremintConfigVersion> = {
|
|
29
|
+
/** Premint Config */
|
|
30
|
+
premintConfig: PremintConfigForVersion<T>;
|
|
31
|
+
/** PremintConfigVersion of the premint */
|
|
32
|
+
premintConfigVersion: T;
|
|
33
|
+
};
|
|
34
|
+
export type PremintConfigAndVersion = PremintConfigWithVersion<PremintConfigVersion.V1> | PremintConfigWithVersion<PremintConfigVersion.V2> | PremintConfigWithVersion<PremintConfigVersion.V3>;
|
|
35
|
+
export type PremintConfig = PremintConfigV1 | PremintConfigV2;
|
|
36
|
+
export type TokenCreationConfig = TokenCreationConfigV1 | TokenCreationConfigV2 | TokenCreationConfigV3;
|
|
37
|
+
export type PremintConfigForTokenCreationConfig<T extends TokenCreationConfig> = T extends TokenCreationConfigV1 ? PremintConfigV1 : T extends TokenCreationConfigV2 ? PremintConfigV2 : PremintConfigV3;
|
|
38
|
+
export type TokenConfigForVersion<T extends PremintConfigVersion> = PremintConfigForVersion<T>["tokenConfig"];
|
|
39
|
+
export type TokenConfigWithVersion<T extends PremintConfigVersion> = {
|
|
40
|
+
tokenConfig: TokenConfigForVersion<T>;
|
|
41
|
+
premintConfigVersion: T;
|
|
42
|
+
};
|
|
43
|
+
export type SponsoredSparksBatch = AbiParametersToPrimitiveTypes<ExtractAbiFunction<typeof sponsoredSparksSpenderABI, "hashSponsoredMint">["inputs"]>[0];
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAE5E,OAAO,EACL,qCAAqC,EACrC,sBAAsB,EACtB,yBAAyB,EAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,oBAAY,oBAAoB;IAC9B,EAAE,MAAM;IACR,EAAE,MAAM;IACR,EAAE,MAAM;CACT;AAED,MAAM,MAAM,sBAAsB,GAAG,IAAI,CACvC,6BAA6B,CAC3B,kBAAkB,CAChB,OAAO,qCAAqC,EAC5C,SAAS,CACV,CAAC,QAAQ,CAAC,CACZ,CAAC,CAAC,CAAC,EACJ,kBAAkB,CACnB,GAAG;IACF,gBAAgB,EAAE,OAAO,EAAE,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,6BAA6B,CAC/D,kBAAkB,CAChB,OAAO,sBAAsB,EAC7B,yBAAyB,CAC1B,CAAC,QAAQ,CAAC,CACZ,CAAC,CAAC,CAAC,CAAC;AAEL,MAAM,MAAM,qBAAqB,GAAG,6BAA6B,CAC/D,kBAAkB,CAChB,OAAO,sBAAsB,EAC7B,yBAAyB,CAC1B,CAAC,QAAQ,CAAC,CACZ,CAAC,CAAC,CAAC,CAAC;AAEL,MAAM,MAAM,qBAAqB,GAAG,6BAA6B,CAC/D,kBAAkB,CAChB,OAAO,sBAAsB,EAC7B,yBAAyB,CAC1B,CAAC,QAAQ,CAAC,CACZ,CAAC,CAAC,CAAC,CAAC;AAEL,MAAM,MA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AM,MAAM,mBAAmB,GAC3B,qBAAqB,GACrB,qBAAqB,GACrB,qBAAqB,CAAC;AAE1B,MAAM,MAAM,mCAAmC,CAAC,CAAC,SAAS,mBAAmB,IAC3E,CAAC,SAAS,qBAAqB,GAC3B,eAAe,GACf,CAAC,SAAS,qBAAqB,GAC7B,eAAe,GACf,eAAe,CAAC;AAExB,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,oBAAoB,IAC9D,uBAAuB,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;AAE5C,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,oBAAoB,IAAI;IACnE,WAAW,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC;IACtC,oBAAoB,EAAE,CAAC,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,6BAA6B,CAC9D,kBAAkB,CAChB,OAAO,yBAAyB,EAChC,mBAAmB,CACpB,CAAC,QAAQ,CAAC,CACZ,CAAC,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
package/src/generated/wagmi.ts
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* [__View Contract on Zora
|
|
6
|
+
* - [__View Contract on Zora Explorer__](https://explorer.zora.energy/address/0x8C0757EFfD2Cc68F00810d2d144F729F6ed5CdA3)
|
|
7
|
+
* - [__View Contract on Zora Sepolia Zora Sepolia Explorer__](https://sepolia.explorer.zora.energy//address/0x7777777C2B3132e03a65721a41745C07170a5877)
|
|
7
8
|
*/
|
|
8
9
|
export const commentsABI = [
|
|
9
10
|
{
|
|
@@ -129,6 +130,11 @@ export const commentsABI = [
|
|
|
129
130
|
{ name: 'nonce', internalType: 'bytes32', type: 'bytes32' },
|
|
130
131
|
],
|
|
131
132
|
},
|
|
133
|
+
{
|
|
134
|
+
name: 'commenterSmartWallet',
|
|
135
|
+
internalType: 'address',
|
|
136
|
+
type: 'address',
|
|
137
|
+
},
|
|
132
138
|
{ name: 'referrer', internalType: 'address', type: 'address' },
|
|
133
139
|
],
|
|
134
140
|
name: 'comment',
|
|
@@ -353,6 +359,11 @@ export const commentsABI = [
|
|
|
353
359
|
internalType: 'uint32',
|
|
354
360
|
type: 'uint32',
|
|
355
361
|
},
|
|
362
|
+
{
|
|
363
|
+
name: 'commenterSmartWallet',
|
|
364
|
+
internalType: 'address',
|
|
365
|
+
type: 'address',
|
|
366
|
+
},
|
|
356
367
|
],
|
|
357
368
|
},
|
|
358
369
|
],
|
|
@@ -477,6 +488,11 @@ export const commentsABI = [
|
|
|
477
488
|
internalType: 'uint32',
|
|
478
489
|
type: 'uint32',
|
|
479
490
|
},
|
|
491
|
+
{
|
|
492
|
+
name: 'commenterSmartWallet',
|
|
493
|
+
internalType: 'address',
|
|
494
|
+
type: 'address',
|
|
495
|
+
},
|
|
480
496
|
],
|
|
481
497
|
},
|
|
482
498
|
{ name: 'signature', internalType: 'bytes', type: 'bytes' },
|
|
@@ -922,7 +938,10 @@ export const commentsABI = [
|
|
|
922
938
|
{ type: 'error', inputs: [], name: 'InvalidInitialization' },
|
|
923
939
|
{ type: 'error', inputs: [], name: 'InvalidSignature' },
|
|
924
940
|
{ type: 'error', inputs: [], name: 'MustSendAtLeastOneSpark' },
|
|
941
|
+
{ type: 'error', inputs: [], name: 'NoFundsRecipient' },
|
|
925
942
|
{ type: 'error', inputs: [], name: 'NotInitializing' },
|
|
943
|
+
{ type: 'error', inputs: [], name: 'NotSmartWallet' },
|
|
944
|
+
{ type: 'error', inputs: [], name: 'NotSmartWalletOwner' },
|
|
926
945
|
{ type: 'error', inputs: [], name: 'NotTokenHolderOrAdmin' },
|
|
927
946
|
{ type: 'error', inputs: [], name: 'OnlySparksContract' },
|
|
928
947
|
{ type: 'error', inputs: [], name: 'TransferFailed' },
|
|
@@ -943,14 +962,17 @@ export const commentsABI = [
|
|
|
943
962
|
] as const
|
|
944
963
|
|
|
945
964
|
/**
|
|
946
|
-
* [__View Contract on Zora
|
|
965
|
+
* - [__View Contract on Zora Explorer__](https://explorer.zora.energy/address/0x8C0757EFfD2Cc68F00810d2d144F729F6ed5CdA3)
|
|
966
|
+
* - [__View Contract on Zora Sepolia Zora Sepolia Explorer__](https://sepolia.explorer.zora.energy//address/0x7777777C2B3132e03a65721a41745C07170a5877)
|
|
947
967
|
*/
|
|
948
968
|
export const commentsAddress = {
|
|
949
|
-
|
|
969
|
+
7777777: '0x8C0757EFfD2Cc68F00810d2d144F729F6ed5CdA3',
|
|
970
|
+
999999999: '0x7777777C2B3132e03a65721a41745C07170a5877',
|
|
950
971
|
} as const
|
|
951
972
|
|
|
952
973
|
/**
|
|
953
|
-
* [__View Contract on Zora
|
|
974
|
+
* - [__View Contract on Zora Explorer__](https://explorer.zora.energy/address/0x8C0757EFfD2Cc68F00810d2d144F729F6ed5CdA3)
|
|
975
|
+
* - [__View Contract on Zora Sepolia Zora Sepolia Explorer__](https://sepolia.explorer.zora.energy//address/0x7777777C2B3132e03a65721a41745C07170a5877)
|
|
954
976
|
*/
|
|
955
977
|
export const commentsConfig = {
|
|
956
978
|
address: commentsAddress,
|
package/src/typedData.ts
CHANGED
|
@@ -434,6 +434,7 @@ const permitCommentTypedDataType = {
|
|
|
434
434
|
{ name: "text", type: "string" },
|
|
435
435
|
{ name: "deadline", type: "uint256" },
|
|
436
436
|
{ name: "nonce", type: "bytes32" },
|
|
437
|
+
{ name: "commenterSmartWallet", type: "address" },
|
|
437
438
|
{ name: "referrer", type: "address" },
|
|
438
439
|
{ name: "sourceChainId", type: "uint32" },
|
|
439
440
|
{ name: "destinationChainId", type: "uint32" },
|
|
@@ -481,12 +482,16 @@ const commentsDomain = ({
|
|
|
481
482
|
* but be valid to be executed on the destination chain.
|
|
482
483
|
*
|
|
483
484
|
* @param message - The {@link PermitComment} containing the details of the comment permit.
|
|
485
|
+
* @param signingAccount - (optional) The account that is signing the message, if different thatn the commentor.
|
|
486
|
+
* Only needed if the commentor is a smart wallet; in this case the signing account should be an account
|
|
487
|
+
* that is one of the smart wallet owners.
|
|
484
488
|
* @returns A {@link TypedDataDefinition} object compatible with EIP-712 for structured data hashing and signing,
|
|
485
489
|
* including types, message, primary type, domain, and the signer's account address, which is
|
|
486
490
|
* the commenter's address.
|
|
487
491
|
*/
|
|
488
492
|
export const permitCommentTypedDataDefinition = (
|
|
489
493
|
message: PermitComment,
|
|
494
|
+
signingAccount?: Address,
|
|
490
495
|
): TypedDataDefinition<typeof permitCommentTypedDataType, "PermitComment"> & {
|
|
491
496
|
account: Address;
|
|
492
497
|
} => ({
|
|
@@ -498,7 +503,7 @@ export const permitCommentTypedDataDefinition = (
|
|
|
498
503
|
destinationChainId:
|
|
499
504
|
message.destinationChainId as keyof typeof commentsAddress,
|
|
500
505
|
}),
|
|
501
|
-
account: message.commenter,
|
|
506
|
+
account: signingAccount || message.commenter,
|
|
502
507
|
});
|
|
503
508
|
|
|
504
509
|
/**
|
|
@@ -514,12 +519,16 @@ export const permitCommentTypedDataDefinition = (
|
|
|
514
519
|
* but be valid to be executed on the destination chain.
|
|
515
520
|
*
|
|
516
521
|
* @param message - The {@link PermitSparkComment} containing the details of the spark comment permit.
|
|
522
|
+
* @param signingAccount - (optional) The account that is signing the message, if different than the commenter.
|
|
523
|
+
* Only needed if the commenter is a smart wallet; in this case the signing account should be an account
|
|
524
|
+
* that is one of the smart wallet owners.
|
|
517
525
|
* @returns A {@link TypedDataDefinition} object compatible with EIP-712 for structured data hashing and signing,
|
|
518
526
|
* including types, message, primary type, domain, and the signer's account address, which is
|
|
519
527
|
* the sparker's address.
|
|
520
528
|
*/
|
|
521
529
|
export const permitSparkCommentTypedDataDefinition = (
|
|
522
530
|
message: PermitSparkComment,
|
|
531
|
+
signingAccount?: Address,
|
|
523
532
|
): TypedDataDefinition<
|
|
524
533
|
typeof permitSparkCommentTypedDataType,
|
|
525
534
|
"PermitSparkComment"
|
|
@@ -532,7 +541,7 @@ export const permitSparkCommentTypedDataDefinition = (
|
|
|
532
541
|
destinationChainId:
|
|
533
542
|
message.destinationChainId as keyof typeof commentsAddress,
|
|
534
543
|
}),
|
|
535
|
-
account: message.sparker,
|
|
544
|
+
account: signingAccount || message.sparker,
|
|
536
545
|
});
|
|
537
546
|
|
|
538
547
|
// todo: explain
|