@super-protocol/sdk-js 0.13.0-beta.9 → 0.13.0
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/build/contracts/app.json +297 -220
- package/build/models/Order.js +11 -4
- package/build/staticModels/Orders.d.ts +1 -1
- package/build/staticModels/Orders.js +12 -10
- package/build/types/Order.d.ts +25 -12
- package/build/types/Order.js +8 -5
- package/package.json +1 -1
package/build/contracts/app.json
CHANGED
|
@@ -4222,30 +4222,37 @@
|
|
|
4222
4222
|
"name": "args",
|
|
4223
4223
|
"type": "tuple"
|
|
4224
4224
|
},
|
|
4225
|
+
{
|
|
4226
|
+
"components": [
|
|
4227
|
+
{
|
|
4228
|
+
"internalType": "uint256",
|
|
4229
|
+
"name": "slotId",
|
|
4230
|
+
"type": "uint256"
|
|
4231
|
+
},
|
|
4232
|
+
{
|
|
4233
|
+
"internalType": "uint32",
|
|
4234
|
+
"name": "slotCount",
|
|
4235
|
+
"type": "uint32"
|
|
4236
|
+
},
|
|
4237
|
+
{
|
|
4238
|
+
"internalType": "uint256[]",
|
|
4239
|
+
"name": "optionsIds",
|
|
4240
|
+
"type": "uint256[]"
|
|
4241
|
+
},
|
|
4242
|
+
{
|
|
4243
|
+
"internalType": "uint32[]",
|
|
4244
|
+
"name": "optionsCount",
|
|
4245
|
+
"type": "uint32[]"
|
|
4246
|
+
}
|
|
4247
|
+
],
|
|
4248
|
+
"internalType": "struct OrderSlots",
|
|
4249
|
+
"name": "slots",
|
|
4250
|
+
"type": "tuple"
|
|
4251
|
+
},
|
|
4225
4252
|
{
|
|
4226
4253
|
"internalType": "bytes32",
|
|
4227
4254
|
"name": "externalId",
|
|
4228
4255
|
"type": "bytes32"
|
|
4229
|
-
},
|
|
4230
|
-
{
|
|
4231
|
-
"internalType": "uint256",
|
|
4232
|
-
"name": "slotId",
|
|
4233
|
-
"type": "uint256"
|
|
4234
|
-
},
|
|
4235
|
-
{
|
|
4236
|
-
"internalType": "uint32",
|
|
4237
|
-
"name": "slotCount",
|
|
4238
|
-
"type": "uint32"
|
|
4239
|
-
},
|
|
4240
|
-
{
|
|
4241
|
-
"internalType": "uint256[]",
|
|
4242
|
-
"name": "optionsIds",
|
|
4243
|
-
"type": "uint256[]"
|
|
4244
|
-
},
|
|
4245
|
-
{
|
|
4246
|
-
"internalType": "uint32[]",
|
|
4247
|
-
"name": "optionsCount",
|
|
4248
|
-
"type": "uint32[]"
|
|
4249
4256
|
}
|
|
4250
4257
|
],
|
|
4251
4258
|
"internalType": "struct OrderInfo",
|
|
@@ -4325,30 +4332,37 @@
|
|
|
4325
4332
|
"name": "args",
|
|
4326
4333
|
"type": "tuple"
|
|
4327
4334
|
},
|
|
4335
|
+
{
|
|
4336
|
+
"components": [
|
|
4337
|
+
{
|
|
4338
|
+
"internalType": "uint256",
|
|
4339
|
+
"name": "slotId",
|
|
4340
|
+
"type": "uint256"
|
|
4341
|
+
},
|
|
4342
|
+
{
|
|
4343
|
+
"internalType": "uint32",
|
|
4344
|
+
"name": "slotCount",
|
|
4345
|
+
"type": "uint32"
|
|
4346
|
+
},
|
|
4347
|
+
{
|
|
4348
|
+
"internalType": "uint256[]",
|
|
4349
|
+
"name": "optionsIds",
|
|
4350
|
+
"type": "uint256[]"
|
|
4351
|
+
},
|
|
4352
|
+
{
|
|
4353
|
+
"internalType": "uint32[]",
|
|
4354
|
+
"name": "optionsCount",
|
|
4355
|
+
"type": "uint32[]"
|
|
4356
|
+
}
|
|
4357
|
+
],
|
|
4358
|
+
"internalType": "struct OrderSlots",
|
|
4359
|
+
"name": "slots",
|
|
4360
|
+
"type": "tuple"
|
|
4361
|
+
},
|
|
4328
4362
|
{
|
|
4329
4363
|
"internalType": "bytes32",
|
|
4330
4364
|
"name": "externalId",
|
|
4331
4365
|
"type": "bytes32"
|
|
4332
|
-
},
|
|
4333
|
-
{
|
|
4334
|
-
"internalType": "uint256",
|
|
4335
|
-
"name": "slotId",
|
|
4336
|
-
"type": "uint256"
|
|
4337
|
-
},
|
|
4338
|
-
{
|
|
4339
|
-
"internalType": "uint32",
|
|
4340
|
-
"name": "slotCount",
|
|
4341
|
-
"type": "uint32"
|
|
4342
|
-
},
|
|
4343
|
-
{
|
|
4344
|
-
"internalType": "uint256[]",
|
|
4345
|
-
"name": "optionsIds",
|
|
4346
|
-
"type": "uint256[]"
|
|
4347
|
-
},
|
|
4348
|
-
{
|
|
4349
|
-
"internalType": "uint32[]",
|
|
4350
|
-
"name": "optionsCount",
|
|
4351
|
-
"type": "uint32[]"
|
|
4352
4366
|
}
|
|
4353
4367
|
],
|
|
4354
4368
|
"internalType": "struct OrderInfo",
|
|
@@ -4428,30 +4442,37 @@
|
|
|
4428
4442
|
"name": "args",
|
|
4429
4443
|
"type": "tuple"
|
|
4430
4444
|
},
|
|
4445
|
+
{
|
|
4446
|
+
"components": [
|
|
4447
|
+
{
|
|
4448
|
+
"internalType": "uint256",
|
|
4449
|
+
"name": "slotId",
|
|
4450
|
+
"type": "uint256"
|
|
4451
|
+
},
|
|
4452
|
+
{
|
|
4453
|
+
"internalType": "uint32",
|
|
4454
|
+
"name": "slotCount",
|
|
4455
|
+
"type": "uint32"
|
|
4456
|
+
},
|
|
4457
|
+
{
|
|
4458
|
+
"internalType": "uint256[]",
|
|
4459
|
+
"name": "optionsIds",
|
|
4460
|
+
"type": "uint256[]"
|
|
4461
|
+
},
|
|
4462
|
+
{
|
|
4463
|
+
"internalType": "uint32[]",
|
|
4464
|
+
"name": "optionsCount",
|
|
4465
|
+
"type": "uint32[]"
|
|
4466
|
+
}
|
|
4467
|
+
],
|
|
4468
|
+
"internalType": "struct OrderSlots",
|
|
4469
|
+
"name": "slots",
|
|
4470
|
+
"type": "tuple"
|
|
4471
|
+
},
|
|
4431
4472
|
{
|
|
4432
4473
|
"internalType": "bytes32",
|
|
4433
4474
|
"name": "externalId",
|
|
4434
4475
|
"type": "bytes32"
|
|
4435
|
-
},
|
|
4436
|
-
{
|
|
4437
|
-
"internalType": "uint256",
|
|
4438
|
-
"name": "slotId",
|
|
4439
|
-
"type": "uint256"
|
|
4440
|
-
},
|
|
4441
|
-
{
|
|
4442
|
-
"internalType": "uint32",
|
|
4443
|
-
"name": "slotCount",
|
|
4444
|
-
"type": "uint32"
|
|
4445
|
-
},
|
|
4446
|
-
{
|
|
4447
|
-
"internalType": "uint256[]",
|
|
4448
|
-
"name": "optionsIds",
|
|
4449
|
-
"type": "uint256[]"
|
|
4450
|
-
},
|
|
4451
|
-
{
|
|
4452
|
-
"internalType": "uint32[]",
|
|
4453
|
-
"name": "optionsCount",
|
|
4454
|
-
"type": "uint32[]"
|
|
4455
4476
|
}
|
|
4456
4477
|
],
|
|
4457
4478
|
"internalType": "struct OrderInfo",
|
|
@@ -4543,30 +4564,37 @@
|
|
|
4543
4564
|
"name": "args",
|
|
4544
4565
|
"type": "tuple"
|
|
4545
4566
|
},
|
|
4567
|
+
{
|
|
4568
|
+
"components": [
|
|
4569
|
+
{
|
|
4570
|
+
"internalType": "uint256",
|
|
4571
|
+
"name": "slotId",
|
|
4572
|
+
"type": "uint256"
|
|
4573
|
+
},
|
|
4574
|
+
{
|
|
4575
|
+
"internalType": "uint32",
|
|
4576
|
+
"name": "slotCount",
|
|
4577
|
+
"type": "uint32"
|
|
4578
|
+
},
|
|
4579
|
+
{
|
|
4580
|
+
"internalType": "uint256[]",
|
|
4581
|
+
"name": "optionsIds",
|
|
4582
|
+
"type": "uint256[]"
|
|
4583
|
+
},
|
|
4584
|
+
{
|
|
4585
|
+
"internalType": "uint32[]",
|
|
4586
|
+
"name": "optionsCount",
|
|
4587
|
+
"type": "uint32[]"
|
|
4588
|
+
}
|
|
4589
|
+
],
|
|
4590
|
+
"internalType": "struct OrderSlots",
|
|
4591
|
+
"name": "slots",
|
|
4592
|
+
"type": "tuple"
|
|
4593
|
+
},
|
|
4546
4594
|
{
|
|
4547
4595
|
"internalType": "bytes32",
|
|
4548
4596
|
"name": "externalId",
|
|
4549
4597
|
"type": "bytes32"
|
|
4550
|
-
},
|
|
4551
|
-
{
|
|
4552
|
-
"internalType": "uint256",
|
|
4553
|
-
"name": "slotId",
|
|
4554
|
-
"type": "uint256"
|
|
4555
|
-
},
|
|
4556
|
-
{
|
|
4557
|
-
"internalType": "uint32",
|
|
4558
|
-
"name": "slotCount",
|
|
4559
|
-
"type": "uint32"
|
|
4560
|
-
},
|
|
4561
|
-
{
|
|
4562
|
-
"internalType": "uint256[]",
|
|
4563
|
-
"name": "optionsIds",
|
|
4564
|
-
"type": "uint256[]"
|
|
4565
|
-
},
|
|
4566
|
-
{
|
|
4567
|
-
"internalType": "uint32[]",
|
|
4568
|
-
"name": "optionsCount",
|
|
4569
|
-
"type": "uint32[]"
|
|
4570
4598
|
}
|
|
4571
4599
|
],
|
|
4572
4600
|
"internalType": "struct OrderInfo",
|
|
@@ -5255,30 +5283,37 @@
|
|
|
5255
5283
|
"name": "args",
|
|
5256
5284
|
"type": "tuple"
|
|
5257
5285
|
},
|
|
5286
|
+
{
|
|
5287
|
+
"components": [
|
|
5288
|
+
{
|
|
5289
|
+
"internalType": "uint256",
|
|
5290
|
+
"name": "slotId",
|
|
5291
|
+
"type": "uint256"
|
|
5292
|
+
},
|
|
5293
|
+
{
|
|
5294
|
+
"internalType": "uint32",
|
|
5295
|
+
"name": "slotCount",
|
|
5296
|
+
"type": "uint32"
|
|
5297
|
+
},
|
|
5298
|
+
{
|
|
5299
|
+
"internalType": "uint256[]",
|
|
5300
|
+
"name": "optionsIds",
|
|
5301
|
+
"type": "uint256[]"
|
|
5302
|
+
},
|
|
5303
|
+
{
|
|
5304
|
+
"internalType": "uint32[]",
|
|
5305
|
+
"name": "optionsCount",
|
|
5306
|
+
"type": "uint32[]"
|
|
5307
|
+
}
|
|
5308
|
+
],
|
|
5309
|
+
"internalType": "struct OrderSlots",
|
|
5310
|
+
"name": "slots",
|
|
5311
|
+
"type": "tuple"
|
|
5312
|
+
},
|
|
5258
5313
|
{
|
|
5259
5314
|
"internalType": "bytes32",
|
|
5260
5315
|
"name": "externalId",
|
|
5261
5316
|
"type": "bytes32"
|
|
5262
|
-
},
|
|
5263
|
-
{
|
|
5264
|
-
"internalType": "uint256",
|
|
5265
|
-
"name": "slotId",
|
|
5266
|
-
"type": "uint256"
|
|
5267
|
-
},
|
|
5268
|
-
{
|
|
5269
|
-
"internalType": "uint32",
|
|
5270
|
-
"name": "slotCount",
|
|
5271
|
-
"type": "uint32"
|
|
5272
|
-
},
|
|
5273
|
-
{
|
|
5274
|
-
"internalType": "uint256[]",
|
|
5275
|
-
"name": "optionsIds",
|
|
5276
|
-
"type": "uint256[]"
|
|
5277
|
-
},
|
|
5278
|
-
{
|
|
5279
|
-
"internalType": "uint32[]",
|
|
5280
|
-
"name": "optionsCount",
|
|
5281
|
-
"type": "uint32[]"
|
|
5282
5317
|
}
|
|
5283
5318
|
],
|
|
5284
5319
|
"internalType": "struct OrderInfo",
|
|
@@ -8259,30 +8294,37 @@
|
|
|
8259
8294
|
"name": "args",
|
|
8260
8295
|
"type": "tuple"
|
|
8261
8296
|
},
|
|
8297
|
+
{
|
|
8298
|
+
"components": [
|
|
8299
|
+
{
|
|
8300
|
+
"internalType": "uint256",
|
|
8301
|
+
"name": "slotId",
|
|
8302
|
+
"type": "uint256"
|
|
8303
|
+
},
|
|
8304
|
+
{
|
|
8305
|
+
"internalType": "uint32",
|
|
8306
|
+
"name": "slotCount",
|
|
8307
|
+
"type": "uint32"
|
|
8308
|
+
},
|
|
8309
|
+
{
|
|
8310
|
+
"internalType": "uint256[]",
|
|
8311
|
+
"name": "optionsIds",
|
|
8312
|
+
"type": "uint256[]"
|
|
8313
|
+
},
|
|
8314
|
+
{
|
|
8315
|
+
"internalType": "uint32[]",
|
|
8316
|
+
"name": "optionsCount",
|
|
8317
|
+
"type": "uint32[]"
|
|
8318
|
+
}
|
|
8319
|
+
],
|
|
8320
|
+
"internalType": "struct OrderSlots",
|
|
8321
|
+
"name": "slots",
|
|
8322
|
+
"type": "tuple"
|
|
8323
|
+
},
|
|
8262
8324
|
{
|
|
8263
8325
|
"internalType": "bytes32",
|
|
8264
8326
|
"name": "externalId",
|
|
8265
8327
|
"type": "bytes32"
|
|
8266
|
-
},
|
|
8267
|
-
{
|
|
8268
|
-
"internalType": "uint256",
|
|
8269
|
-
"name": "slotId",
|
|
8270
|
-
"type": "uint256"
|
|
8271
|
-
},
|
|
8272
|
-
{
|
|
8273
|
-
"internalType": "uint32",
|
|
8274
|
-
"name": "slotCount",
|
|
8275
|
-
"type": "uint32"
|
|
8276
|
-
},
|
|
8277
|
-
{
|
|
8278
|
-
"internalType": "uint256[]",
|
|
8279
|
-
"name": "optionsIds",
|
|
8280
|
-
"type": "uint256[]"
|
|
8281
|
-
},
|
|
8282
|
-
{
|
|
8283
|
-
"internalType": "uint32[]",
|
|
8284
|
-
"name": "optionsCount",
|
|
8285
|
-
"type": "uint32[]"
|
|
8286
8328
|
}
|
|
8287
8329
|
],
|
|
8288
8330
|
"internalType": "struct OrderInfo",
|
|
@@ -8338,30 +8380,37 @@
|
|
|
8338
8380
|
"name": "args",
|
|
8339
8381
|
"type": "tuple"
|
|
8340
8382
|
},
|
|
8383
|
+
{
|
|
8384
|
+
"components": [
|
|
8385
|
+
{
|
|
8386
|
+
"internalType": "uint256",
|
|
8387
|
+
"name": "slotId",
|
|
8388
|
+
"type": "uint256"
|
|
8389
|
+
},
|
|
8390
|
+
{
|
|
8391
|
+
"internalType": "uint32",
|
|
8392
|
+
"name": "slotCount",
|
|
8393
|
+
"type": "uint32"
|
|
8394
|
+
},
|
|
8395
|
+
{
|
|
8396
|
+
"internalType": "uint256[]",
|
|
8397
|
+
"name": "optionsIds",
|
|
8398
|
+
"type": "uint256[]"
|
|
8399
|
+
},
|
|
8400
|
+
{
|
|
8401
|
+
"internalType": "uint32[]",
|
|
8402
|
+
"name": "optionsCount",
|
|
8403
|
+
"type": "uint32[]"
|
|
8404
|
+
}
|
|
8405
|
+
],
|
|
8406
|
+
"internalType": "struct OrderSlots",
|
|
8407
|
+
"name": "slots",
|
|
8408
|
+
"type": "tuple"
|
|
8409
|
+
},
|
|
8341
8410
|
{
|
|
8342
8411
|
"internalType": "bytes32",
|
|
8343
8412
|
"name": "externalId",
|
|
8344
8413
|
"type": "bytes32"
|
|
8345
|
-
},
|
|
8346
|
-
{
|
|
8347
|
-
"internalType": "uint256",
|
|
8348
|
-
"name": "slotId",
|
|
8349
|
-
"type": "uint256"
|
|
8350
|
-
},
|
|
8351
|
-
{
|
|
8352
|
-
"internalType": "uint32",
|
|
8353
|
-
"name": "slotCount",
|
|
8354
|
-
"type": "uint32"
|
|
8355
|
-
},
|
|
8356
|
-
{
|
|
8357
|
-
"internalType": "uint256[]",
|
|
8358
|
-
"name": "optionsIds",
|
|
8359
|
-
"type": "uint256[]"
|
|
8360
|
-
},
|
|
8361
|
-
{
|
|
8362
|
-
"internalType": "uint32[]",
|
|
8363
|
-
"name": "optionsCount",
|
|
8364
|
-
"type": "uint32[]"
|
|
8365
8414
|
}
|
|
8366
8415
|
],
|
|
8367
8416
|
"internalType": "struct OrderInfo[]",
|
|
@@ -10238,30 +10287,37 @@
|
|
|
10238
10287
|
"name": "args",
|
|
10239
10288
|
"type": "tuple"
|
|
10240
10289
|
},
|
|
10290
|
+
{
|
|
10291
|
+
"components": [
|
|
10292
|
+
{
|
|
10293
|
+
"internalType": "uint256",
|
|
10294
|
+
"name": "slotId",
|
|
10295
|
+
"type": "uint256"
|
|
10296
|
+
},
|
|
10297
|
+
{
|
|
10298
|
+
"internalType": "uint32",
|
|
10299
|
+
"name": "slotCount",
|
|
10300
|
+
"type": "uint32"
|
|
10301
|
+
},
|
|
10302
|
+
{
|
|
10303
|
+
"internalType": "uint256[]",
|
|
10304
|
+
"name": "optionsIds",
|
|
10305
|
+
"type": "uint256[]"
|
|
10306
|
+
},
|
|
10307
|
+
{
|
|
10308
|
+
"internalType": "uint32[]",
|
|
10309
|
+
"name": "optionsCount",
|
|
10310
|
+
"type": "uint32[]"
|
|
10311
|
+
}
|
|
10312
|
+
],
|
|
10313
|
+
"internalType": "struct OrderSlots",
|
|
10314
|
+
"name": "slots",
|
|
10315
|
+
"type": "tuple"
|
|
10316
|
+
},
|
|
10241
10317
|
{
|
|
10242
10318
|
"internalType": "bytes32",
|
|
10243
10319
|
"name": "externalId",
|
|
10244
10320
|
"type": "bytes32"
|
|
10245
|
-
},
|
|
10246
|
-
{
|
|
10247
|
-
"internalType": "uint256",
|
|
10248
|
-
"name": "slotId",
|
|
10249
|
-
"type": "uint256"
|
|
10250
|
-
},
|
|
10251
|
-
{
|
|
10252
|
-
"internalType": "uint32",
|
|
10253
|
-
"name": "slotCount",
|
|
10254
|
-
"type": "uint32"
|
|
10255
|
-
},
|
|
10256
|
-
{
|
|
10257
|
-
"internalType": "uint256[]",
|
|
10258
|
-
"name": "optionsIds",
|
|
10259
|
-
"type": "uint256[]"
|
|
10260
|
-
},
|
|
10261
|
-
{
|
|
10262
|
-
"internalType": "uint32[]",
|
|
10263
|
-
"name": "optionsCount",
|
|
10264
|
-
"type": "uint32[]"
|
|
10265
10321
|
}
|
|
10266
10322
|
],
|
|
10267
10323
|
"internalType": "struct OrderInfo",
|
|
@@ -10346,30 +10402,37 @@
|
|
|
10346
10402
|
"name": "args",
|
|
10347
10403
|
"type": "tuple"
|
|
10348
10404
|
},
|
|
10405
|
+
{
|
|
10406
|
+
"components": [
|
|
10407
|
+
{
|
|
10408
|
+
"internalType": "uint256",
|
|
10409
|
+
"name": "slotId",
|
|
10410
|
+
"type": "uint256"
|
|
10411
|
+
},
|
|
10412
|
+
{
|
|
10413
|
+
"internalType": "uint32",
|
|
10414
|
+
"name": "slotCount",
|
|
10415
|
+
"type": "uint32"
|
|
10416
|
+
},
|
|
10417
|
+
{
|
|
10418
|
+
"internalType": "uint256[]",
|
|
10419
|
+
"name": "optionsIds",
|
|
10420
|
+
"type": "uint256[]"
|
|
10421
|
+
},
|
|
10422
|
+
{
|
|
10423
|
+
"internalType": "uint32[]",
|
|
10424
|
+
"name": "optionsCount",
|
|
10425
|
+
"type": "uint32[]"
|
|
10426
|
+
}
|
|
10427
|
+
],
|
|
10428
|
+
"internalType": "struct OrderSlots",
|
|
10429
|
+
"name": "slots",
|
|
10430
|
+
"type": "tuple"
|
|
10431
|
+
},
|
|
10349
10432
|
{
|
|
10350
10433
|
"internalType": "bytes32",
|
|
10351
10434
|
"name": "externalId",
|
|
10352
10435
|
"type": "bytes32"
|
|
10353
|
-
},
|
|
10354
|
-
{
|
|
10355
|
-
"internalType": "uint256",
|
|
10356
|
-
"name": "slotId",
|
|
10357
|
-
"type": "uint256"
|
|
10358
|
-
},
|
|
10359
|
-
{
|
|
10360
|
-
"internalType": "uint32",
|
|
10361
|
-
"name": "slotCount",
|
|
10362
|
-
"type": "uint32"
|
|
10363
|
-
},
|
|
10364
|
-
{
|
|
10365
|
-
"internalType": "uint256[]",
|
|
10366
|
-
"name": "optionsIds",
|
|
10367
|
-
"type": "uint256[]"
|
|
10368
|
-
},
|
|
10369
|
-
{
|
|
10370
|
-
"internalType": "uint32[]",
|
|
10371
|
-
"name": "optionsCount",
|
|
10372
|
-
"type": "uint32[]"
|
|
10373
10436
|
}
|
|
10374
10437
|
],
|
|
10375
10438
|
"internalType": "struct OrderInfo",
|
|
@@ -10464,30 +10527,37 @@
|
|
|
10464
10527
|
"name": "args",
|
|
10465
10528
|
"type": "tuple"
|
|
10466
10529
|
},
|
|
10530
|
+
{
|
|
10531
|
+
"components": [
|
|
10532
|
+
{
|
|
10533
|
+
"internalType": "uint256",
|
|
10534
|
+
"name": "slotId",
|
|
10535
|
+
"type": "uint256"
|
|
10536
|
+
},
|
|
10537
|
+
{
|
|
10538
|
+
"internalType": "uint32",
|
|
10539
|
+
"name": "slotCount",
|
|
10540
|
+
"type": "uint32"
|
|
10541
|
+
},
|
|
10542
|
+
{
|
|
10543
|
+
"internalType": "uint256[]",
|
|
10544
|
+
"name": "optionsIds",
|
|
10545
|
+
"type": "uint256[]"
|
|
10546
|
+
},
|
|
10547
|
+
{
|
|
10548
|
+
"internalType": "uint32[]",
|
|
10549
|
+
"name": "optionsCount",
|
|
10550
|
+
"type": "uint32[]"
|
|
10551
|
+
}
|
|
10552
|
+
],
|
|
10553
|
+
"internalType": "struct OrderSlots",
|
|
10554
|
+
"name": "slots",
|
|
10555
|
+
"type": "tuple"
|
|
10556
|
+
},
|
|
10467
10557
|
{
|
|
10468
10558
|
"internalType": "bytes32",
|
|
10469
10559
|
"name": "externalId",
|
|
10470
10560
|
"type": "bytes32"
|
|
10471
|
-
},
|
|
10472
|
-
{
|
|
10473
|
-
"internalType": "uint256",
|
|
10474
|
-
"name": "slotId",
|
|
10475
|
-
"type": "uint256"
|
|
10476
|
-
},
|
|
10477
|
-
{
|
|
10478
|
-
"internalType": "uint32",
|
|
10479
|
-
"name": "slotCount",
|
|
10480
|
-
"type": "uint32"
|
|
10481
|
-
},
|
|
10482
|
-
{
|
|
10483
|
-
"internalType": "uint256[]",
|
|
10484
|
-
"name": "optionsIds",
|
|
10485
|
-
"type": "uint256[]"
|
|
10486
|
-
},
|
|
10487
|
-
{
|
|
10488
|
-
"internalType": "uint32[]",
|
|
10489
|
-
"name": "optionsCount",
|
|
10490
|
-
"type": "uint32[]"
|
|
10491
10561
|
}
|
|
10492
10562
|
],
|
|
10493
10563
|
"internalType": "struct OrderInfo",
|
|
@@ -10713,30 +10783,37 @@
|
|
|
10713
10783
|
"name": "args",
|
|
10714
10784
|
"type": "tuple"
|
|
10715
10785
|
},
|
|
10786
|
+
{
|
|
10787
|
+
"components": [
|
|
10788
|
+
{
|
|
10789
|
+
"internalType": "uint256",
|
|
10790
|
+
"name": "slotId",
|
|
10791
|
+
"type": "uint256"
|
|
10792
|
+
},
|
|
10793
|
+
{
|
|
10794
|
+
"internalType": "uint32",
|
|
10795
|
+
"name": "slotCount",
|
|
10796
|
+
"type": "uint32"
|
|
10797
|
+
},
|
|
10798
|
+
{
|
|
10799
|
+
"internalType": "uint256[]",
|
|
10800
|
+
"name": "optionsIds",
|
|
10801
|
+
"type": "uint256[]"
|
|
10802
|
+
},
|
|
10803
|
+
{
|
|
10804
|
+
"internalType": "uint32[]",
|
|
10805
|
+
"name": "optionsCount",
|
|
10806
|
+
"type": "uint32[]"
|
|
10807
|
+
}
|
|
10808
|
+
],
|
|
10809
|
+
"internalType": "struct OrderSlots",
|
|
10810
|
+
"name": "slots",
|
|
10811
|
+
"type": "tuple"
|
|
10812
|
+
},
|
|
10716
10813
|
{
|
|
10717
10814
|
"internalType": "bytes32",
|
|
10718
10815
|
"name": "externalId",
|
|
10719
10816
|
"type": "bytes32"
|
|
10720
|
-
},
|
|
10721
|
-
{
|
|
10722
|
-
"internalType": "uint256",
|
|
10723
|
-
"name": "slotId",
|
|
10724
|
-
"type": "uint256"
|
|
10725
|
-
},
|
|
10726
|
-
{
|
|
10727
|
-
"internalType": "uint32",
|
|
10728
|
-
"name": "slotCount",
|
|
10729
|
-
"type": "uint32"
|
|
10730
|
-
},
|
|
10731
|
-
{
|
|
10732
|
-
"internalType": "uint256[]",
|
|
10733
|
-
"name": "optionsIds",
|
|
10734
|
-
"type": "uint256[]"
|
|
10735
|
-
},
|
|
10736
|
-
{
|
|
10737
|
-
"internalType": "uint32[]",
|
|
10738
|
-
"name": "optionsCount",
|
|
10739
|
-
"type": "uint32[]"
|
|
10740
10817
|
}
|
|
10741
10818
|
],
|
|
10742
10819
|
"internalType": "struct OrderInfo",
|
package/build/models/Order.js
CHANGED
|
@@ -67,6 +67,7 @@ var BlockchainConnector_1 = __importDefault(require("../connectors/BlockchainCon
|
|
|
67
67
|
var Superpro_1 = __importDefault(require("../staticModels/Superpro"));
|
|
68
68
|
var TxManager_1 = __importDefault(require("../utils/TxManager"));
|
|
69
69
|
var BlockchainEventsListener_1 = __importDefault(require("../connectors/BlockchainEventsListener"));
|
|
70
|
+
var TeeOffers_1 = __importDefault(require("../staticModels/TeeOffers"));
|
|
70
71
|
var Order = /** @class */ (function () {
|
|
71
72
|
function Order(orderId) {
|
|
72
73
|
this.id = orderId;
|
|
@@ -224,16 +225,22 @@ var Order = /** @class */ (function () {
|
|
|
224
225
|
*/
|
|
225
226
|
Order.prototype.getSelectedUsage = function () {
|
|
226
227
|
return __awaiter(this, void 0, void 0, function () {
|
|
227
|
-
var _a, _b;
|
|
228
|
-
return __generator(this, function (
|
|
229
|
-
switch (
|
|
228
|
+
var _a, _b, _c, _d, _e;
|
|
229
|
+
return __generator(this, function (_f) {
|
|
230
|
+
switch (_f.label) {
|
|
230
231
|
case 0:
|
|
231
232
|
_a = this;
|
|
232
233
|
_b = utils_1.tupleToObject;
|
|
233
234
|
return [4 /*yield*/, Order.contract.methods.getOrderSelectedUsage(this.id).call()];
|
|
234
235
|
case 1:
|
|
235
|
-
_a.selectedUsage = _b.apply(void 0, [
|
|
236
|
+
_a.selectedUsage = _b.apply(void 0, [_f.sent(), Order_1.OrderUsageStructure]);
|
|
236
237
|
this.selectedUsage.optionsCount = this.selectedUsage.optionsCount.map(function (item) { return +item; });
|
|
238
|
+
_c = this.selectedUsage;
|
|
239
|
+
_d = utils_1.unpackSlotInfo;
|
|
240
|
+
_e = [this.selectedUsage.slotInfo];
|
|
241
|
+
return [4 /*yield*/, TeeOffers_1.default.getDenominator()];
|
|
242
|
+
case 2:
|
|
243
|
+
_c.slotInfo = _d.apply(void 0, _e.concat([_f.sent()]));
|
|
237
244
|
return [2 /*return*/, this.selectedUsage];
|
|
238
245
|
}
|
|
239
246
|
});
|
|
@@ -22,7 +22,7 @@ declare class Orders {
|
|
|
22
22
|
* @returns {Promise<void>} - Does not return id of created order!
|
|
23
23
|
*/
|
|
24
24
|
static createOrder(orderInfo: OrderInfo, deposit?: string, suspended?: boolean, transactionOptions?: TransactionOptions): Promise<void>;
|
|
25
|
-
static getByExternalId(consumer
|
|
25
|
+
static getByExternalId(consumer?: string, externalId?: string, fromBlock?: number | string, toBlock?: number | string): Promise<OrderCreatedEvent>;
|
|
26
26
|
/**
|
|
27
27
|
* Function for create workflow
|
|
28
28
|
* @param parentOrderInfo - order info for new order
|
|
@@ -144,9 +144,11 @@ var Orders = /** @class */ (function () {
|
|
|
144
144
|
});
|
|
145
145
|
});
|
|
146
146
|
};
|
|
147
|
-
Orders.getByExternalId = function (consumer, externalId) {
|
|
147
|
+
Orders.getByExternalId = function (consumer, externalId, fromBlock, toBlock) {
|
|
148
|
+
if (consumer === void 0) { consumer = ""; }
|
|
149
|
+
if (externalId === void 0) { externalId = ""; }
|
|
148
150
|
return __awaiter(this, void 0, void 0, function () {
|
|
149
|
-
var contract, filter, foundIds, notFound, response;
|
|
151
|
+
var contract, filter, options, foundIds, notFound, response;
|
|
150
152
|
return __generator(this, function (_a) {
|
|
151
153
|
switch (_a.label) {
|
|
152
154
|
case 0:
|
|
@@ -155,17 +157,17 @@ var Orders = /** @class */ (function () {
|
|
|
155
157
|
consumer: consumer,
|
|
156
158
|
externalId: (0, utils_1.formatBytes32String)(externalId),
|
|
157
159
|
};
|
|
158
|
-
|
|
160
|
+
options = { filter: filter };
|
|
161
|
+
if (fromBlock)
|
|
162
|
+
options.fromBlock = fromBlock;
|
|
163
|
+
if (toBlock)
|
|
164
|
+
options.toBlock = toBlock;
|
|
165
|
+
return [4 /*yield*/, contract.getPastEvents("OrderCreated", options)];
|
|
159
166
|
case 1:
|
|
160
167
|
foundIds = _a.sent();
|
|
161
|
-
notFound = {
|
|
162
|
-
consumer: consumer,
|
|
163
|
-
externalId: externalId,
|
|
164
|
-
offerId: "-1",
|
|
165
|
-
parentOrderId: "-1",
|
|
166
|
-
orderId: "-1",
|
|
167
|
-
};
|
|
168
|
+
notFound = __assign(__assign({}, filter), { offerId: "-1", parentOrderId: "-1", orderId: "-1" });
|
|
168
169
|
response = foundIds.length > 0 ? foundIds[0].returnValues : notFound;
|
|
170
|
+
response.externalId = (0, utils_1.parseBytes32String)(response.externalId);
|
|
169
171
|
return [2 /*return*/, response];
|
|
170
172
|
}
|
|
171
173
|
});
|
package/build/types/Order.d.ts
CHANGED
|
@@ -20,6 +20,12 @@ export type OrderArgs = {
|
|
|
20
20
|
inputOffers: string[];
|
|
21
21
|
outputOffer: string;
|
|
22
22
|
};
|
|
23
|
+
export declare const OrderSlotsStructure: {
|
|
24
|
+
slotId: StringConstructor;
|
|
25
|
+
slotCount: StringConstructor;
|
|
26
|
+
optionsIds: StringConstructor[];
|
|
27
|
+
optionsCount: StringConstructor[];
|
|
28
|
+
};
|
|
23
29
|
export declare const OrderInfoStructure: {
|
|
24
30
|
offerId: StringConstructor;
|
|
25
31
|
resultPublicKey: StringConstructor;
|
|
@@ -30,11 +36,13 @@ export declare const OrderInfoStructure: {
|
|
|
30
36
|
inputOffers: StringConstructor[];
|
|
31
37
|
outputOffer: StringConstructor;
|
|
32
38
|
};
|
|
39
|
+
slots: {
|
|
40
|
+
slotId: StringConstructor;
|
|
41
|
+
slotCount: StringConstructor;
|
|
42
|
+
optionsIds: StringConstructor[];
|
|
43
|
+
optionsCount: StringConstructor[];
|
|
44
|
+
};
|
|
33
45
|
externalId: typeof parseBytes32String;
|
|
34
|
-
slotId: StringConstructor;
|
|
35
|
-
slotCount: StringConstructor;
|
|
36
|
-
optionsIds: StringConstructor[];
|
|
37
|
-
optionsCount: StringConstructor[];
|
|
38
46
|
};
|
|
39
47
|
export declare const OrderInfoStructureArray: {
|
|
40
48
|
offerId: StringConstructor;
|
|
@@ -46,12 +54,20 @@ export declare const OrderInfoStructureArray: {
|
|
|
46
54
|
inputOffers: StringConstructor[];
|
|
47
55
|
outputOffer: StringConstructor;
|
|
48
56
|
};
|
|
57
|
+
slots: {
|
|
58
|
+
slotId: StringConstructor;
|
|
59
|
+
slotCount: StringConstructor;
|
|
60
|
+
optionsIds: StringConstructor[];
|
|
61
|
+
optionsCount: StringConstructor[];
|
|
62
|
+
};
|
|
49
63
|
externalId: typeof parseBytes32String;
|
|
50
|
-
slotId: StringConstructor;
|
|
51
|
-
slotCount: StringConstructor;
|
|
52
|
-
optionsIds: StringConstructor[];
|
|
53
|
-
optionsCount: StringConstructor[];
|
|
54
64
|
}[];
|
|
65
|
+
export type OrderSlots = {
|
|
66
|
+
slotId: string;
|
|
67
|
+
slotCount: string;
|
|
68
|
+
optionsIds: string[];
|
|
69
|
+
optionsCount: string[];
|
|
70
|
+
};
|
|
55
71
|
export type OrderInfo = {
|
|
56
72
|
offerId: string;
|
|
57
73
|
resultPublicKey: string;
|
|
@@ -59,11 +75,8 @@ export type OrderInfo = {
|
|
|
59
75
|
encryptedArgs: string;
|
|
60
76
|
status: OrderStatus;
|
|
61
77
|
args: OrderArgs;
|
|
78
|
+
slots: OrderSlots;
|
|
62
79
|
externalId: string;
|
|
63
|
-
slotId: string;
|
|
64
|
-
slotCount: string;
|
|
65
|
-
optionsIds: string[];
|
|
66
|
-
optionsCount: string[];
|
|
67
80
|
};
|
|
68
81
|
export type ExtendedOrderInfo = OrderInfo & {
|
|
69
82
|
blocking: boolean;
|
package/build/types/Order.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OrderUsageStructure = exports.OrderResultStructure = exports.OrderInfoStructureArray = exports.OrderInfoStructure = exports.OrderArgsStructure = exports.OrderStatus = void 0;
|
|
3
|
+
exports.OrderUsageStructure = exports.OrderResultStructure = exports.OrderInfoStructureArray = exports.OrderInfoStructure = exports.OrderSlotsStructure = exports.OrderArgsStructure = exports.OrderStatus = void 0;
|
|
4
4
|
var utils_1 = require("ethers/lib/utils");
|
|
5
5
|
var SlotUsage_1 = require("./SlotUsage");
|
|
6
6
|
var SlotInfo_1 = require("./SlotInfo");
|
|
@@ -21,6 +21,12 @@ exports.OrderArgsStructure = {
|
|
|
21
21
|
inputOffers: [String],
|
|
22
22
|
outputOffer: String,
|
|
23
23
|
};
|
|
24
|
+
exports.OrderSlotsStructure = {
|
|
25
|
+
slotId: String,
|
|
26
|
+
slotCount: String,
|
|
27
|
+
optionsIds: [String],
|
|
28
|
+
optionsCount: [String],
|
|
29
|
+
};
|
|
24
30
|
// Order of keys and type conversion functions for this object in blockchain contract
|
|
25
31
|
exports.OrderInfoStructure = {
|
|
26
32
|
offerId: String,
|
|
@@ -29,11 +35,8 @@ exports.OrderInfoStructure = {
|
|
|
29
35
|
encryptedArgs: String,
|
|
30
36
|
status: OrderStatus,
|
|
31
37
|
args: exports.OrderArgsStructure,
|
|
38
|
+
slots: exports.OrderSlotsStructure,
|
|
32
39
|
externalId: utils_1.parseBytes32String,
|
|
33
|
-
slotId: String,
|
|
34
|
-
slotCount: String,
|
|
35
|
-
optionsIds: [String],
|
|
36
|
-
optionsCount: [String],
|
|
37
40
|
};
|
|
38
41
|
// Array of order info structures
|
|
39
42
|
exports.OrderInfoStructureArray = [exports.OrderInfoStructure];
|