File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
routes/contract/extensions/erc1155/read Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ const requestBodySchemaV5 = Type.Intersect([
55
55
currency : Type . Optional ( Type . String ( ) ) ,
56
56
validityStartTimestamp : Type . Integer ( { minimum : 0 } ) ,
57
57
validityEndTimestamp : Type . Optional ( Type . Integer ( { minimum : 0 } ) ) ,
58
+ tokenId : Type . Optional ( Type . String ( ) ) ,
58
59
uid : Type . Optional ( Type . String ( ) ) ,
59
60
} ) ,
60
61
Type . Union ( [
@@ -145,6 +146,7 @@ export async function erc1155SignatureGenerate(fastify: FastifyInstance) {
145
146
currency,
146
147
validityStartTimestamp,
147
148
validityEndTimestamp,
149
+ tokenId,
148
150
uid,
149
151
} = args ;
150
152
@@ -183,6 +185,7 @@ export async function erc1155SignatureGenerate(fastify: FastifyInstance) {
183
185
royaltyBps,
184
186
primarySaleRecipient,
185
187
pricePerToken,
188
+ tokenId : maybeBigInt ( tokenId ) ,
186
189
pricePerTokenWei : maybeBigInt ( pricePerTokenWei ) ,
187
190
currency,
188
191
validityStartTimestamp : new Date ( validityStartTimestamp * 1000 ) ,
@@ -223,6 +226,7 @@ export async function erc1155SignatureGenerate(fastify: FastifyInstance) {
223
226
royaltyBps,
224
227
royaltyRecipient,
225
228
uid,
229
+ tokenId,
226
230
} = request . body as Static < typeof requestBodySchemaV4 > ;
227
231
228
232
const contract = await getContractV4 ( {
@@ -247,6 +251,7 @@ export async function erc1155SignatureGenerate(fastify: FastifyInstance) {
247
251
royaltyBps,
248
252
royaltyRecipient,
249
253
uid,
254
+ tokenId,
250
255
} ) ;
251
256
252
257
const signedPayload = await contract . erc1155 . signature . generate ( payload ) ;
Original file line number Diff line number Diff line change @@ -302,6 +302,12 @@ export const signature1155InputSchema = Type.Object({
302
302
Type . Integer ( { minimum : 0 } ) ,
303
303
] ) ,
304
304
) ,
305
+ tokenId : Type . Optional (
306
+ Type . String ( {
307
+ description :
308
+ "The token id to mint. If not provided, a new token id will be generated." ,
309
+ } ) ,
310
+ ) ,
305
311
} ) ;
306
312
307
313
export const signature1155OutputSchema = Type . Object ( {
You can’t perform that action at this time.
0 commit comments