@o2exchange/contracts 0.2.3-rc → 0.2.3

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.
@@ -18,28 +18,6 @@ export var AccessErrorOutput;
18
18
  AccessErrorOutput["NotOwner"] = "NotOwner";
19
19
  })(AccessErrorOutput || (AccessErrorOutput = {}));
20
20
  ;
21
- export var EjectionReasonInput;
22
- (function (EjectionReasonInput) {
23
- EjectionReasonInput["Activated"] = "Activated";
24
- EjectionReasonInput["CanceledByTheUser"] = "CanceledByTheUser";
25
- EjectionReasonInput["ForceCanceled"] = "ForceCanceled";
26
- EjectionReasonInput["SiblingOrderActivated"] = "SiblingOrderActivated";
27
- EjectionReasonInput["NotEnoughFunds"] = "NotEnoughFunds";
28
- EjectionReasonInput["EjectedByAdmin"] = "EjectedByAdmin";
29
- EjectionReasonInput["ParentOrderCanceled"] = "ParentOrderCanceled";
30
- })(EjectionReasonInput || (EjectionReasonInput = {}));
31
- ;
32
- export var EjectionReasonOutput;
33
- (function (EjectionReasonOutput) {
34
- EjectionReasonOutput["Activated"] = "Activated";
35
- EjectionReasonOutput["CanceledByTheUser"] = "CanceledByTheUser";
36
- EjectionReasonOutput["ForceCanceled"] = "ForceCanceled";
37
- EjectionReasonOutput["SiblingOrderActivated"] = "SiblingOrderActivated";
38
- EjectionReasonOutput["NotEnoughFunds"] = "NotEnoughFunds";
39
- EjectionReasonOutput["EjectedByAdmin"] = "EjectedByAdmin";
40
- EjectionReasonOutput["ParentOrderCanceled"] = "ParentOrderCanceled";
41
- })(EjectionReasonOutput || (EjectionReasonOutput = {}));
42
- ;
43
21
  export var FeeErrorInput;
44
22
  (function (FeeErrorInput) {
45
23
  FeeErrorInput["NoFeesAvailable"] = "NoFeesAvailable";
@@ -68,7 +46,6 @@ export var OrderBookInitializationErrorInput;
68
46
  OrderBookInitializationErrorInput["InvalidPricePrecision"] = "InvalidPricePrecision";
69
47
  OrderBookInitializationErrorInput["OwnerNotSet"] = "OwnerNotSet";
70
48
  OrderBookInitializationErrorInput["InvalidMinOrder"] = "InvalidMinOrder";
71
- OrderBookInitializationErrorInput["InvalidTriggerMaxSlippage"] = "InvalidTriggerMaxSlippage";
72
49
  })(OrderBookInitializationErrorInput || (OrderBookInitializationErrorInput = {}));
73
50
  ;
74
51
  export var OrderBookInitializationErrorOutput;
@@ -79,7 +56,6 @@ export var OrderBookInitializationErrorOutput;
79
56
  OrderBookInitializationErrorOutput["InvalidPricePrecision"] = "InvalidPricePrecision";
80
57
  OrderBookInitializationErrorOutput["OwnerNotSet"] = "OwnerNotSet";
81
58
  OrderBookInitializationErrorOutput["InvalidMinOrder"] = "InvalidMinOrder";
82
- OrderBookInitializationErrorOutput["InvalidTriggerMaxSlippage"] = "InvalidTriggerMaxSlippage";
83
59
  })(OrderBookInitializationErrorOutput || (OrderBookInitializationErrorOutput = {}));
84
60
  ;
85
61
  export var OrderCancelErrorInput;
@@ -120,80 +96,6 @@ export var SideOutput;
120
96
  SideOutput["Sell"] = "Sell";
121
97
  })(SideOutput || (SideOutput = {}));
122
98
  ;
123
- export var TriggerOrderCancelErrorInput;
124
- (function (TriggerOrderCancelErrorInput) {
125
- TriggerOrderCancelErrorInput["NotOrderOwner"] = "NotOrderOwner";
126
- TriggerOrderCancelErrorInput["TraderNotBlacklisted"] = "TraderNotBlacklisted";
127
- TriggerOrderCancelErrorInput["OrderDoesNotExist"] = "OrderDoesNotExist";
128
- })(TriggerOrderCancelErrorInput || (TriggerOrderCancelErrorInput = {}));
129
- ;
130
- export var TriggerOrderCancelErrorOutput;
131
- (function (TriggerOrderCancelErrorOutput) {
132
- TriggerOrderCancelErrorOutput["NotOrderOwner"] = "NotOrderOwner";
133
- TriggerOrderCancelErrorOutput["TraderNotBlacklisted"] = "TraderNotBlacklisted";
134
- TriggerOrderCancelErrorOutput["OrderDoesNotExist"] = "OrderDoesNotExist";
135
- })(TriggerOrderCancelErrorOutput || (TriggerOrderCancelErrorOutput = {}));
136
- ;
137
- export var TriggerOrderCreationErrorInput;
138
- (function (TriggerOrderCreationErrorInput) {
139
- TriggerOrderCreationErrorInput["InvalidArgs"] = "InvalidArgs";
140
- TriggerOrderCreationErrorInput["PricePrecision"] = "PricePrecision";
141
- TriggerOrderCreationErrorInput["InvalidOrderType"] = "InvalidOrderType";
142
- TriggerOrderCreationErrorInput["InvalidMarketOrderArgs"] = "InvalidMarketOrderArgs";
143
- TriggerOrderCreationErrorInput["FractionalPrice"] = "FractionalPrice";
144
- TriggerOrderCreationErrorInput["InvalidAsset"] = "InvalidAsset";
145
- TriggerOrderCreationErrorInput["InvalidInputAmount"] = "InvalidInputAmount";
146
- TriggerOrderCreationErrorInput["ZeroTriggerPrice"] = "ZeroTriggerPrice";
147
- TriggerOrderCreationErrorInput["ZeroLimitPrice"] = "ZeroLimitPrice";
148
- TriggerOrderCreationErrorInput["QuantityMustBeParentOrder"] = "QuantityMustBeParentOrder";
149
- TriggerOrderCreationErrorInput["ZeroResolvedQtyOrPrice"] = "ZeroResolvedQtyOrPrice";
150
- TriggerOrderCreationErrorInput["InvalidParentOrderId"] = "InvalidParentOrderId";
151
- TriggerOrderCreationErrorInput["ParentOrderIsNotSpot"] = "ParentOrderIsNotSpot";
152
- TriggerOrderCreationErrorInput["ParentOrderFilled"] = "ParentOrderFilled";
153
- TriggerOrderCreationErrorInput["ParentOrderNotFound"] = "ParentOrderNotFound";
154
- TriggerOrderCreationErrorInput["ParentTriggerSlotsExhausted"] = "ParentTriggerSlotsExhausted";
155
- TriggerOrderCreationErrorInput["ParentOrderOwnerMismatch"] = "ParentOrderOwnerMismatch";
156
- TriggerOrderCreationErrorInput["TriggerPriceSameAsParent"] = "TriggerPriceSameAsParent";
157
- TriggerOrderCreationErrorInput["TriggerSideSameAsParent"] = "TriggerSideSameAsParent";
158
- TriggerOrderCreationErrorInput["SlippageExceedsMax"] = "SlippageExceedsMax";
159
- TriggerOrderCreationErrorInput["OcoSameTriggerPrice"] = "OcoSameTriggerPrice";
160
- TriggerOrderCreationErrorInput["OcoNotStopAndTakeProfit"] = "OcoNotStopAndTakeProfit";
161
- TriggerOrderCreationErrorInput["LimitPriceCrossesParent"] = "LimitPriceCrossesParent";
162
- TriggerOrderCreationErrorInput["ParentQuantityMismatch"] = "ParentQuantityMismatch";
163
- TriggerOrderCreationErrorInput["TraderNotWhiteListed"] = "TraderNotWhiteListed";
164
- TriggerOrderCreationErrorInput["TraderBlackListed"] = "TraderBlackListed";
165
- })(TriggerOrderCreationErrorInput || (TriggerOrderCreationErrorInput = {}));
166
- ;
167
- export var TriggerOrderCreationErrorOutput;
168
- (function (TriggerOrderCreationErrorOutput) {
169
- TriggerOrderCreationErrorOutput["InvalidArgs"] = "InvalidArgs";
170
- TriggerOrderCreationErrorOutput["PricePrecision"] = "PricePrecision";
171
- TriggerOrderCreationErrorOutput["InvalidOrderType"] = "InvalidOrderType";
172
- TriggerOrderCreationErrorOutput["InvalidMarketOrderArgs"] = "InvalidMarketOrderArgs";
173
- TriggerOrderCreationErrorOutput["FractionalPrice"] = "FractionalPrice";
174
- TriggerOrderCreationErrorOutput["InvalidAsset"] = "InvalidAsset";
175
- TriggerOrderCreationErrorOutput["InvalidInputAmount"] = "InvalidInputAmount";
176
- TriggerOrderCreationErrorOutput["ZeroTriggerPrice"] = "ZeroTriggerPrice";
177
- TriggerOrderCreationErrorOutput["ZeroLimitPrice"] = "ZeroLimitPrice";
178
- TriggerOrderCreationErrorOutput["QuantityMustBeParentOrder"] = "QuantityMustBeParentOrder";
179
- TriggerOrderCreationErrorOutput["ZeroResolvedQtyOrPrice"] = "ZeroResolvedQtyOrPrice";
180
- TriggerOrderCreationErrorOutput["InvalidParentOrderId"] = "InvalidParentOrderId";
181
- TriggerOrderCreationErrorOutput["ParentOrderIsNotSpot"] = "ParentOrderIsNotSpot";
182
- TriggerOrderCreationErrorOutput["ParentOrderFilled"] = "ParentOrderFilled";
183
- TriggerOrderCreationErrorOutput["ParentOrderNotFound"] = "ParentOrderNotFound";
184
- TriggerOrderCreationErrorOutput["ParentTriggerSlotsExhausted"] = "ParentTriggerSlotsExhausted";
185
- TriggerOrderCreationErrorOutput["ParentOrderOwnerMismatch"] = "ParentOrderOwnerMismatch";
186
- TriggerOrderCreationErrorOutput["TriggerPriceSameAsParent"] = "TriggerPriceSameAsParent";
187
- TriggerOrderCreationErrorOutput["TriggerSideSameAsParent"] = "TriggerSideSameAsParent";
188
- TriggerOrderCreationErrorOutput["SlippageExceedsMax"] = "SlippageExceedsMax";
189
- TriggerOrderCreationErrorOutput["OcoSameTriggerPrice"] = "OcoSameTriggerPrice";
190
- TriggerOrderCreationErrorOutput["OcoNotStopAndTakeProfit"] = "OcoNotStopAndTakeProfit";
191
- TriggerOrderCreationErrorOutput["LimitPriceCrossesParent"] = "LimitPriceCrossesParent";
192
- TriggerOrderCreationErrorOutput["ParentQuantityMismatch"] = "ParentQuantityMismatch";
193
- TriggerOrderCreationErrorOutput["TraderNotWhiteListed"] = "TraderNotWhiteListed";
194
- TriggerOrderCreationErrorOutput["TraderBlackListed"] = "TraderBlackListed";
195
- })(TriggerOrderCreationErrorOutput || (TriggerOrderCreationErrorOutput = {}));
196
- ;
197
99
  const abi = {
198
100
  "programType": "contract",
199
101
  "specVersion": "1.2",
@@ -203,16 +105,6 @@ const abi = {
203
105
  "type": "()",
204
106
  "concreteTypeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
205
107
  },
206
- {
207
- "type": "(b256, b256)",
208
- "concreteTypeId": "bc42ec26f2a17c5b23fc007d96b96bf35f8949ee156afdd789064210d881f7e0",
209
- "metadataTypeId": 2
210
- },
211
- {
212
- "type": "(b256, b256, enum std::option::Option<b256>)",
213
- "concreteTypeId": "cdeacf58742dab0aa73fcb9b540d076dab5973f18c48cdd27818f72784feb6f2",
214
- "metadataTypeId": 3
215
- },
216
108
  {
217
109
  "type": "(u64, struct std::time::Time)",
218
110
  "concreteTypeId": "3639c0c1fb291a3e7e7ab4d9fe1d6762d6ff0fde0777d0ef8f3799d2f3d70a95",
@@ -234,99 +126,65 @@ const abi = {
234
126
  {
235
127
  "type": "enum contract_schema::order_book::FeeError",
236
128
  "concreteTypeId": "41ffdde08d41a5769627d4e77a60cbf9ef0a0e9194114652b57247e64a9ce7f0",
237
- "metadataTypeId": 5
129
+ "metadataTypeId": 2
238
130
  },
239
131
  {
240
132
  "type": "enum contract_schema::order_book::OrderBookInitializationError",
241
133
  "concreteTypeId": "7beea8d3e75df4e367b45e1567e03c81f969faef517cea9a4ff938fed6ee9f6a",
242
- "metadataTypeId": 6
134
+ "metadataTypeId": 3
243
135
  },
244
136
  {
245
137
  "type": "enum contract_schema::order_book::OrderCancelError",
246
138
  "concreteTypeId": "0e7d0742559c4d2c273298fdc0b9b7e9b07f7f944855ca3020dba8617515e2f0",
247
- "metadataTypeId": 7
139
+ "metadataTypeId": 4
248
140
  },
249
141
  {
250
142
  "type": "enum contract_schema::order_book::OrderCreationError",
251
143
  "concreteTypeId": "a700a0d30e8d2803040dc79b7b7b259d0c308ca5187f6c742da1df21c27bf24a",
252
- "metadataTypeId": 8
144
+ "metadataTypeId": 5
253
145
  },
254
146
  {
255
147
  "type": "enum contract_schema::order_book::Side",
256
148
  "concreteTypeId": "9a10e2c94a13825d2af23f4a4743379feba2acfcec8e2d775e945c5452e84708",
257
- "metadataTypeId": 10
258
- },
259
- {
260
- "type": "enum contract_schema::order_book::TriggerOrderCancelError",
261
- "concreteTypeId": "a4c1f16008f794e4bb5f1e3dee0e961b2c480dad11ea5b89fc2eacfe38631db5",
262
- "metadataTypeId": 11
263
- },
264
- {
265
- "type": "enum contract_schema::order_book::TriggerOrderCreationError",
266
- "concreteTypeId": "15a4dcc6afac3f5e9d69383292c88895475737c599b518309c34cf8c1104f8f5",
267
- "metadataTypeId": 12
149
+ "metadataTypeId": 7
268
150
  },
269
151
  {
270
152
  "type": "enum ownership::errors::InitializationError",
271
153
  "concreteTypeId": "b1fddf488ccb9e63d11888b2750bbd1280a1ae1c49f2d6637fd4cf1e930d1468",
272
- "metadataTypeId": 15
154
+ "metadataTypeId": 8
273
155
  },
274
156
  {
275
157
  "type": "enum pausable::errors::PauseError",
276
158
  "concreteTypeId": "455b46a49016f5c03c18ce54b969ea3d0d33c9b00263b3dcc36aa8da27558b8a",
277
- "metadataTypeId": 16
159
+ "metadataTypeId": 9
278
160
  },
279
161
  {
280
162
  "type": "enum src5::AccessError",
281
163
  "concreteTypeId": "f1247475d0d1466599267010f088190f8664dd31663a40c5d5e525d8e64b995d",
282
- "metadataTypeId": 17
164
+ "metadataTypeId": 10
283
165
  },
284
166
  {
285
167
  "type": "enum src5::State",
286
168
  "concreteTypeId": "287a382c1e0b1f11d12a422e77a248d27761327cd17515cc6e6369d528cf31ca",
287
- "metadataTypeId": 18
169
+ "metadataTypeId": 11
288
170
  },
289
171
  {
290
172
  "type": "enum std::identity::Identity",
291
173
  "concreteTypeId": "ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335",
292
- "metadataTypeId": 19
293
- },
294
- {
295
- "type": "enum std::option::Option<b256>",
296
- "concreteTypeId": "0c2beb9013490c4f753f2757dfe2d8340b22ce3827d596d81d249b7038033cb6",
297
- "metadataTypeId": 20,
298
- "typeArguments": [
299
- "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b"
300
- ]
174
+ "metadataTypeId": 12
301
175
  },
302
176
  {
303
177
  "type": "enum std::option::Option<struct contract_schema::order_book::Order>",
304
178
  "concreteTypeId": "6cbb9ddffc993ba68abb27bb88aae72e4d50123c3fc8f05d663246d7c9f70724",
305
- "metadataTypeId": 20,
179
+ "metadataTypeId": 13,
306
180
  "typeArguments": [
307
181
  "8269f147d8b1fed93590ca56380b11413a1bed10c13c00627a887a6a5e042cea"
308
182
  ]
309
183
  },
310
- {
311
- "type": "enum std::option::Option<struct contract_schema::order_book::TriggerOrder>",
312
- "concreteTypeId": "aa46988b96e71d9a5994f2807f743c9a360e72be8e9865141192345e539187f5",
313
- "metadataTypeId": 20,
314
- "typeArguments": [
315
- "4cf39a60821b204ac155fe0a818c69e2008c926cb1903b2215dc08bec937dd21"
316
- ]
317
- },
318
- {
319
- "type": "enum std::option::Option<struct contract_schema::order_book::TriggerOrderArgs>",
320
- "concreteTypeId": "020bfa2968cbf7600b3752287637e71587b0f46760ffdf0a977421343746b5c8",
321
- "metadataTypeId": 20,
322
- "typeArguments": [
323
- "e915e400fd7cca76151cd63ea4a84d70d906ea97663b011363db9271072cad74"
324
- ]
325
- },
326
184
  {
327
185
  "type": "enum std::option::Option<struct std::contract_id::ContractId>",
328
186
  "concreteTypeId": "0d79387ad3bacdc3b7aad9da3a96f4ce60d9a1b6002df254069ad95a3931d5c8",
329
- "metadataTypeId": 20,
187
+ "metadataTypeId": 13,
330
188
  "typeArguments": [
331
189
  "29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54"
332
190
  ]
@@ -334,7 +192,7 @@ const abi = {
334
192
  {
335
193
  "type": "enum std::option::Option<u64>",
336
194
  "concreteTypeId": "d852149004cc9ec0bbe7dc4e37bffea1d41469b759512b6136f2e865a4c06e7d",
337
- "metadataTypeId": 20,
195
+ "metadataTypeId": 13,
338
196
  "typeArguments": [
339
197
  "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0"
340
198
  ]
@@ -346,142 +204,117 @@ const abi = {
346
204
  {
347
205
  "type": "struct contract_schema::order_book::ExpireMakerEvent",
348
206
  "concreteTypeId": "937c43727e43c6ad683c47ad69885cf2783ecf73d59460fe1d7033a78ad5963c",
349
- "metadataTypeId": 23
207
+ "metadataTypeId": 16
350
208
  },
351
209
  {
352
210
  "type": "struct contract_schema::order_book::FeesClaimedEvent",
353
211
  "concreteTypeId": "2e0368c222981c3e3cbba54d7dafbda77dd2c48809b2fd989773b4ae092d8b47",
354
- "metadataTypeId": 24
212
+ "metadataTypeId": 17
355
213
  },
356
214
  {
357
215
  "type": "struct contract_schema::order_book::FeesCollectedEvent",
358
216
  "concreteTypeId": "814befd15e7d0ec83c54b78f1248f65890b6e4db618d7f067940385064ae00fa",
359
- "metadataTypeId": 25
217
+ "metadataTypeId": 18
360
218
  },
361
219
  {
362
220
  "type": "struct contract_schema::order_book::Order",
363
221
  "concreteTypeId": "8269f147d8b1fed93590ca56380b11413a1bed10c13c00627a887a6a5e042cea",
364
- "metadataTypeId": 27
222
+ "metadataTypeId": 20
365
223
  },
366
224
  {
367
225
  "type": "struct contract_schema::order_book::OrderArgs",
368
226
  "concreteTypeId": "027cfee5b9839be8e12b3b56eaf1315f269a86a23ae0a392f084185f7b54a410",
369
- "metadataTypeId": 28
227
+ "metadataTypeId": 21
370
228
  },
371
229
  {
372
230
  "type": "struct contract_schema::order_book::OrderBookBlacklistEvent",
373
231
  "concreteTypeId": "15e58f365af5d32c8a830ec43e70fce6cfbad16f88ed89b35bb7878f15f5b75d",
374
- "metadataTypeId": 29
232
+ "metadataTypeId": 22
375
233
  },
376
234
  {
377
235
  "type": "struct contract_schema::order_book::OrderBookConfigEvent",
378
236
  "concreteTypeId": "0959a811c54f76a36f4b1ca7a14729eba6801a5c03356f2cfb12233f574d0ce2",
379
- "metadataTypeId": 30
237
+ "metadataTypeId": 23
380
238
  },
381
239
  {
382
240
  "type": "struct contract_schema::order_book::OrderBookSymbolsEvent",
383
241
  "concreteTypeId": "99b332e010c1fe173601492be1e50767afba39d95f5aebb83f07fdf4c2103104",
384
- "metadataTypeId": 31
242
+ "metadataTypeId": 24
385
243
  },
386
244
  {
387
245
  "type": "struct contract_schema::order_book::OrderBookWhitelistEvent",
388
246
  "concreteTypeId": "39cbf43d52ecef8290e4f6e639a22b50f2ea8ce7d673930c83622422c7653026",
389
- "metadataTypeId": 32
247
+ "metadataTypeId": 25
390
248
  },
391
249
  {
392
250
  "type": "struct contract_schema::order_book::OrderCancelledEvent",
393
251
  "concreteTypeId": "82fb068ba8a0739f1b0a907ff1fbcbc8b1e5a31d5a2f1b46742e4c5fca967c18",
394
- "metadataTypeId": 33
252
+ "metadataTypeId": 26
395
253
  },
396
254
  {
397
255
  "type": "struct contract_schema::order_book::OrderCancelledInternalEvent",
398
256
  "concreteTypeId": "6e6744800e6fc84d4680e9492774bc9e0cab52bb665d518bdfd2ba21b3a4866c",
399
- "metadataTypeId": 34
257
+ "metadataTypeId": 27
400
258
  },
401
259
  {
402
260
  "type": "struct contract_schema::order_book::OrderCreatedEvent",
403
261
  "concreteTypeId": "df21162bb6a03b08040f043d238f4b5275e591737c8b5f068f7422be87168258",
404
- "metadataTypeId": 35
405
- },
406
- {
407
- "type": "struct contract_schema::order_book::OrderHaltedEvent",
408
- "concreteTypeId": "704d11e3abffc019b7c89fea24cbc379742ed0dc7ddc01c5425a143c1f0bc2b8",
409
- "metadataTypeId": 36
262
+ "metadataTypeId": 28
410
263
  },
411
264
  {
412
265
  "type": "struct contract_schema::order_book::OrderMatchedEvent",
413
266
  "concreteTypeId": "cd2ccf60c8a1d69c9f5a8c9d17ec658f09cd58dac7f0f991a3ce3161c494ea88",
414
- "metadataTypeId": 37
267
+ "metadataTypeId": 29
415
268
  },
416
269
  {
417
270
  "type": "struct contract_schema::order_book::OrderOutOfGasEvent",
418
271
  "concreteTypeId": "d7fc4e0e366f46285d7ebf08fe5d7a450b649532159d67ce60a329a2d468c5c1",
419
- "metadataTypeId": 38
272
+ "metadataTypeId": 30
420
273
  },
421
274
  {
422
275
  "type": "struct contract_schema::order_book::OrderTooSmallEvent",
423
276
  "concreteTypeId": "2fed5c339537969e7d6569d8f1607e8476b5829cc3ef3185c9c4ae8f3a4f5edd",
424
- "metadataTypeId": 39
425
- },
426
- {
427
- "type": "struct contract_schema::order_book::TriggerOrder",
428
- "concreteTypeId": "4cf39a60821b204ac155fe0a818c69e2008c926cb1903b2215dc08bec937dd21",
429
- "metadataTypeId": 40
430
- },
431
- {
432
- "type": "struct contract_schema::order_book::TriggerOrderArgs",
433
- "concreteTypeId": "e915e400fd7cca76151cd63ea4a84d70d906ea97663b011363db9271072cad74",
434
- "metadataTypeId": 41
435
- },
436
- {
437
- "type": "struct contract_schema::order_book::TriggerOrderCreatedEvent",
438
- "concreteTypeId": "e668619391f65f6ddbe3de3cfd8a1777035887bc8bbb31c7847131031159841a",
439
- "metadataTypeId": 42
440
- },
441
- {
442
- "type": "struct contract_schema::order_book::TriggerOrderEjectedEvent",
443
- "concreteTypeId": "962f5e9ef1b8222269128afe35ff4d3241c140c267d673365de624d353b563c8",
444
- "metadataTypeId": 43
277
+ "metadataTypeId": 31
445
278
  },
446
279
  {
447
280
  "type": "struct contract_schema::order_book::WithdrawSettledTradeEvent",
448
281
  "concreteTypeId": "b145f499e90557447a26156cda458d1c0284a487ef8b8a90646411a33ee5e241",
449
- "metadataTypeId": 44
282
+ "metadataTypeId": 32
450
283
  },
451
284
  {
452
285
  "type": "struct ownership::events::OwnershipSet",
453
286
  "concreteTypeId": "8c0d2488561c35a28ef795bb8bcc4c43999cdd1e3ecbd10c226e0a68660c54d4",
454
- "metadataTypeId": 45
287
+ "metadataTypeId": 33
455
288
  },
456
289
  {
457
290
  "type": "struct ownership::events::OwnershipTransferred",
458
291
  "concreteTypeId": "a2a2643e0252b510328c0323a0ea60724fb4cb3309a2322ab31b27566ff9a79d",
459
- "metadataTypeId": 46
292
+ "metadataTypeId": 34
460
293
  },
461
294
  {
462
295
  "type": "struct pausable::events::PauseEvent",
463
296
  "concreteTypeId": "692983a9aba767e36b5014d3eb842447c736e341cc3b30fcb051b1f5a3d5f80a",
464
- "metadataTypeId": 47
297
+ "metadataTypeId": 35
465
298
  },
466
299
  {
467
300
  "type": "struct pausable::events::UnpauseEvent",
468
301
  "concreteTypeId": "0026d386ad84e75b525bec3e7c8b6a63df3fcd108a8c4b26438c8a7a2e2c218b",
469
- "metadataTypeId": 48
302
+ "metadataTypeId": 36
470
303
  },
471
304
  {
472
305
  "type": "struct std::asset_id::AssetId",
473
306
  "concreteTypeId": "c0710b6731b1dd59799cf6bef33eee3b3b04a2e40e80a0724090215bbf2ca974",
474
- "metadataTypeId": 50
307
+ "metadataTypeId": 38
475
308
  },
476
309
  {
477
310
  "type": "struct std::contract_id::ContractId",
478
311
  "concreteTypeId": "29c10735d33b5159f0c71ee1dbd17b36a3e69e41f00fab0d42e1bd9f428d8a54",
479
- "metadataTypeId": 53
312
+ "metadataTypeId": 41
480
313
  },
481
314
  {
482
315
  "type": "struct std::vec::Vec<b256>",
483
316
  "concreteTypeId": "32559685d0c9845f059bf9d472a0a38cf77d36c23dfcffe5489e86a65cdd9198",
484
- "metadataTypeId": 57,
317
+ "metadataTypeId": 45,
485
318
  "typeArguments": [
486
319
  "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b"
487
320
  ]
@@ -489,7 +322,7 @@ const abi = {
489
322
  {
490
323
  "type": "struct std::vec::Vec<enum std::identity::Identity>",
491
324
  "concreteTypeId": "2f79033d0d3729398611309f48578b56cf5162ba85e50f4d8fb79c9d9d1abc7b",
492
- "metadataTypeId": 57,
325
+ "metadataTypeId": 45,
493
326
  "typeArguments": [
494
327
  "ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335"
495
328
  ]
@@ -497,19 +330,11 @@ const abi = {
497
330
  {
498
331
  "type": "struct std::vec::Vec<struct contract_schema::order_book::Order>",
499
332
  "concreteTypeId": "d390c7062efc85cc0e3e0a9339016565cda69d055c218f82d362776998f4e505",
500
- "metadataTypeId": 57,
333
+ "metadataTypeId": 45,
501
334
  "typeArguments": [
502
335
  "8269f147d8b1fed93590ca56380b11413a1bed10c13c00627a887a6a5e042cea"
503
336
  ]
504
337
  },
505
- {
506
- "type": "struct std::vec::Vec<struct contract_schema::order_book::TriggerOrder>",
507
- "concreteTypeId": "90bd4a53a7770f92afd12f9ceaea3e7f99a6c46d42d3ddedeef0874b7be6c92a",
508
- "metadataTypeId": 57,
509
- "typeArguments": [
510
- "4cf39a60821b204ac155fe0a818c69e2008c926cb1903b2215dc08bec937dd21"
511
- ]
512
- },
513
338
  {
514
339
  "type": "u256",
515
340
  "concreteTypeId": "1b5759d94094368cfd443019e7ca5ec4074300e544e5ea993a979f5da627261e"
@@ -530,7 +355,7 @@ const abi = {
530
355
  },
531
356
  {
532
357
  "name": "__tuple_element",
533
- "typeId": 55
358
+ "typeId": 43
534
359
  }
535
360
  ]
536
361
  },
@@ -548,81 +373,9 @@ const abi = {
548
373
  }
549
374
  ]
550
375
  },
551
- {
552
- "type": "(_, _)",
553
- "metadataTypeId": 2,
554
- "components": [
555
- {
556
- "name": "__tuple_element",
557
- "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b"
558
- },
559
- {
560
- "name": "__tuple_element",
561
- "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b"
562
- }
563
- ]
564
- },
565
- {
566
- "type": "(_, _, _)",
567
- "metadataTypeId": 3,
568
- "components": [
569
- {
570
- "name": "__tuple_element",
571
- "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b"
572
- },
573
- {
574
- "name": "__tuple_element",
575
- "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b"
576
- },
577
- {
578
- "name": "__tuple_element",
579
- "typeId": 20,
580
- "typeArguments": [
581
- {
582
- "name": "",
583
- "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b"
584
- }
585
- ]
586
- }
587
- ]
588
- },
589
- {
590
- "type": "enum contract_schema::order_book::EjectionReason",
591
- "metadataTypeId": 4,
592
- "components": [
593
- {
594
- "name": "Activated",
595
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
596
- },
597
- {
598
- "name": "CanceledByTheUser",
599
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
600
- },
601
- {
602
- "name": "ForceCanceled",
603
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
604
- },
605
- {
606
- "name": "SiblingOrderActivated",
607
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
608
- },
609
- {
610
- "name": "NotEnoughFunds",
611
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
612
- },
613
- {
614
- "name": "EjectedByAdmin",
615
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
616
- },
617
- {
618
- "name": "ParentOrderCanceled",
619
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
620
- }
621
- ]
622
- },
623
376
  {
624
377
  "type": "enum contract_schema::order_book::FeeError",
625
- "metadataTypeId": 5,
378
+ "metadataTypeId": 2,
626
379
  "components": [
627
380
  {
628
381
  "name": "NoFeesAvailable",
@@ -632,7 +385,7 @@ const abi = {
632
385
  },
633
386
  {
634
387
  "type": "enum contract_schema::order_book::OrderBookInitializationError",
635
- "metadataTypeId": 6,
388
+ "metadataTypeId": 3,
636
389
  "components": [
637
390
  {
638
391
  "name": "InvalidAsset",
@@ -657,16 +410,12 @@ const abi = {
657
410
  {
658
411
  "name": "InvalidMinOrder",
659
412
  "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
660
- },
661
- {
662
- "name": "InvalidTriggerMaxSlippage",
663
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
664
413
  }
665
414
  ]
666
415
  },
667
416
  {
668
417
  "type": "enum contract_schema::order_book::OrderCancelError",
669
- "metadataTypeId": 7,
418
+ "metadataTypeId": 4,
670
419
  "components": [
671
420
  {
672
421
  "name": "NotOrderOwner",
@@ -684,7 +433,7 @@ const abi = {
684
433
  },
685
434
  {
686
435
  "type": "enum contract_schema::order_book::OrderCreationError",
687
- "metadataTypeId": 8,
436
+ "metadataTypeId": 5,
688
437
  "components": [
689
438
  {
690
439
  "name": "InvalidOrderArgs",
@@ -742,7 +491,7 @@ const abi = {
742
491
  },
743
492
  {
744
493
  "type": "enum contract_schema::order_book::OrderType",
745
- "metadataTypeId": 9,
494
+ "metadataTypeId": 6,
746
495
  "components": [
747
496
  {
748
497
  "name": "Limit",
@@ -772,181 +521,21 @@ const abi = {
772
521
  },
773
522
  {
774
523
  "type": "enum contract_schema::order_book::Side",
775
- "metadataTypeId": 10,
524
+ "metadataTypeId": 7,
776
525
  "components": [
777
526
  {
778
527
  "name": "Buy",
779
528
  "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
780
529
  },
781
530
  {
782
- "name": "Sell",
783
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
784
- }
785
- ]
786
- },
787
- {
788
- "type": "enum contract_schema::order_book::TriggerOrderCancelError",
789
- "metadataTypeId": 11,
790
- "components": [
791
- {
792
- "name": "NotOrderOwner",
793
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
794
- },
795
- {
796
- "name": "TraderNotBlacklisted",
797
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
798
- },
799
- {
800
- "name": "OrderDoesNotExist",
801
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
802
- }
803
- ]
804
- },
805
- {
806
- "type": "enum contract_schema::order_book::TriggerOrderCreationError",
807
- "metadataTypeId": 12,
808
- "components": [
809
- {
810
- "name": "InvalidArgs",
811
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
812
- },
813
- {
814
- "name": "PricePrecision",
815
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
816
- },
817
- {
818
- "name": "InvalidOrderType",
819
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
820
- },
821
- {
822
- "name": "InvalidMarketOrderArgs",
823
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
824
- },
825
- {
826
- "name": "FractionalPrice",
827
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
828
- },
829
- {
830
- "name": "InvalidAsset",
831
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
832
- },
833
- {
834
- "name": "InvalidInputAmount",
835
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
836
- },
837
- {
838
- "name": "ZeroTriggerPrice",
839
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
840
- },
841
- {
842
- "name": "ZeroLimitPrice",
843
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
844
- },
845
- {
846
- "name": "QuantityMustBeParentOrder",
847
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
848
- },
849
- {
850
- "name": "ZeroResolvedQtyOrPrice",
851
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
852
- },
853
- {
854
- "name": "InvalidParentOrderId",
855
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
856
- },
857
- {
858
- "name": "ParentOrderIsNotSpot",
859
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
860
- },
861
- {
862
- "name": "ParentOrderFilled",
863
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
864
- },
865
- {
866
- "name": "ParentOrderNotFound",
867
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
868
- },
869
- {
870
- "name": "ParentTriggerSlotsExhausted",
871
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
872
- },
873
- {
874
- "name": "ParentOrderOwnerMismatch",
875
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
876
- },
877
- {
878
- "name": "TriggerPriceSameAsParent",
879
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
880
- },
881
- {
882
- "name": "TriggerSideSameAsParent",
883
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
884
- },
885
- {
886
- "name": "SlippageExceedsMax",
887
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
888
- },
889
- {
890
- "name": "OcoSameTriggerPrice",
891
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
892
- },
893
- {
894
- "name": "OcoNotStopAndTakeProfit",
895
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
896
- },
897
- {
898
- "name": "LimitPriceCrossesParent",
899
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
900
- },
901
- {
902
- "name": "ParentQuantityMismatch",
903
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
904
- },
905
- {
906
- "name": "TraderNotWhiteListed",
907
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
908
- },
909
- {
910
- "name": "TraderBlackListed",
911
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
912
- }
913
- ]
914
- },
915
- {
916
- "type": "enum contract_schema::order_book::TriggerOrderType",
917
- "metadataTypeId": 13,
918
- "components": [
919
- {
920
- "name": "Market",
921
- "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
922
- },
923
- {
924
- "name": "MarketBounded",
925
- "typeId": 1
926
- },
927
- {
928
- "name": "Spot",
929
- "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0"
930
- }
931
- ]
932
- },
933
- {
934
- "type": "enum contract_schema::order_book::TriggerQuantity",
935
- "metadataTypeId": 14,
936
- "components": [
937
- {
938
- "name": "Quantity",
939
- "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0"
940
- },
941
- {
942
- "name": "ParentOrder",
943
- "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b"
531
+ "name": "Sell",
532
+ "typeId": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d"
944
533
  }
945
534
  ]
946
535
  },
947
536
  {
948
537
  "type": "enum ownership::errors::InitializationError",
949
- "metadataTypeId": 15,
538
+ "metadataTypeId": 8,
950
539
  "components": [
951
540
  {
952
541
  "name": "CannotReinitialized",
@@ -956,7 +545,7 @@ const abi = {
956
545
  },
957
546
  {
958
547
  "type": "enum pausable::errors::PauseError",
959
- "metadataTypeId": 16,
548
+ "metadataTypeId": 9,
960
549
  "components": [
961
550
  {
962
551
  "name": "Paused",
@@ -970,7 +559,7 @@ const abi = {
970
559
  },
971
560
  {
972
561
  "type": "enum src5::AccessError",
973
- "metadataTypeId": 17,
562
+ "metadataTypeId": 10,
974
563
  "components": [
975
564
  {
976
565
  "name": "NotOwner",
@@ -980,7 +569,7 @@ const abi = {
980
569
  },
981
570
  {
982
571
  "type": "enum src5::State",
983
- "metadataTypeId": 18,
572
+ "metadataTypeId": 11,
984
573
  "components": [
985
574
  {
986
575
  "name": "Uninitialized",
@@ -988,7 +577,7 @@ const abi = {
988
577
  },
989
578
  {
990
579
  "name": "Initialized",
991
- "typeId": 19
580
+ "typeId": 12
992
581
  },
993
582
  {
994
583
  "name": "Revoked",
@@ -998,21 +587,21 @@ const abi = {
998
587
  },
999
588
  {
1000
589
  "type": "enum std::identity::Identity",
1001
- "metadataTypeId": 19,
590
+ "metadataTypeId": 12,
1002
591
  "components": [
1003
592
  {
1004
593
  "name": "Address",
1005
- "typeId": 49
594
+ "typeId": 37
1006
595
  },
1007
596
  {
1008
597
  "name": "ContractId",
1009
- "typeId": 53
598
+ "typeId": 41
1010
599
  }
1011
600
  ]
1012
601
  },
1013
602
  {
1014
603
  "type": "enum std::option::Option",
1015
- "metadataTypeId": 20,
604
+ "metadataTypeId": 13,
1016
605
  "components": [
1017
606
  {
1018
607
  "name": "None",
@@ -1020,24 +609,24 @@ const abi = {
1020
609
  },
1021
610
  {
1022
611
  "name": "Some",
1023
- "typeId": 21
612
+ "typeId": 14
1024
613
  }
1025
614
  ],
1026
615
  "typeParameters": [
1027
- 21
616
+ 14
1028
617
  ]
1029
618
  },
1030
619
  {
1031
620
  "type": "generic T",
1032
- "metadataTypeId": 21
621
+ "metadataTypeId": 14
1033
622
  },
1034
623
  {
1035
624
  "type": "raw untyped ptr",
1036
- "metadataTypeId": 22
625
+ "metadataTypeId": 15
1037
626
  },
1038
627
  {
1039
628
  "type": "struct contract_schema::order_book::ExpireMakerEvent",
1040
- "metadataTypeId": 23,
629
+ "metadataTypeId": 16,
1041
630
  "components": [
1042
631
  {
1043
632
  "name": "order_id",
@@ -1045,13 +634,13 @@ const abi = {
1045
634
  },
1046
635
  {
1047
636
  "name": "timestamp",
1048
- "typeId": 55
637
+ "typeId": 43
1049
638
  }
1050
639
  ]
1051
640
  },
1052
641
  {
1053
642
  "type": "struct contract_schema::order_book::FeesClaimedEvent",
1054
- "metadataTypeId": 24,
643
+ "metadataTypeId": 17,
1055
644
  "components": [
1056
645
  {
1057
646
  "name": "base_fees",
@@ -1065,7 +654,7 @@ const abi = {
1065
654
  },
1066
655
  {
1067
656
  "type": "struct contract_schema::order_book::FeesCollectedEvent",
1068
- "metadataTypeId": 25,
657
+ "metadataTypeId": 18,
1069
658
  "components": [
1070
659
  {
1071
660
  "name": "base_fees",
@@ -1079,7 +668,7 @@ const abi = {
1079
668
  },
1080
669
  {
1081
670
  "type": "struct contract_schema::order_book::MatchId",
1082
- "metadataTypeId": 26,
671
+ "metadataTypeId": 19,
1083
672
  "components": [
1084
673
  {
1085
674
  "name": "maker_id",
@@ -1093,7 +682,7 @@ const abi = {
1093
682
  },
1094
683
  {
1095
684
  "type": "struct contract_schema::order_book::Order",
1096
- "metadataTypeId": 27,
685
+ "metadataTypeId": 20,
1097
686
  "components": [
1098
687
  {
1099
688
  "name": "order_id",
@@ -1101,11 +690,11 @@ const abi = {
1101
690
  },
1102
691
  {
1103
692
  "name": "trader_id",
1104
- "typeId": 19
693
+ "typeId": 12
1105
694
  },
1106
695
  {
1107
696
  "name": "side",
1108
- "typeId": 10
697
+ "typeId": 7
1109
698
  },
1110
699
  {
1111
700
  "name": "price",
@@ -1117,13 +706,13 @@ const abi = {
1117
706
  },
1118
707
  {
1119
708
  "name": "order_type",
1120
- "typeId": 9
709
+ "typeId": 6
1121
710
  }
1122
711
  ]
1123
712
  },
1124
713
  {
1125
714
  "type": "struct contract_schema::order_book::OrderArgs",
1126
- "metadataTypeId": 28,
715
+ "metadataTypeId": 21,
1127
716
  "components": [
1128
717
  {
1129
718
  "name": "price",
@@ -1135,21 +724,21 @@ const abi = {
1135
724
  },
1136
725
  {
1137
726
  "name": "order_type",
1138
- "typeId": 9
727
+ "typeId": 6
1139
728
  }
1140
729
  ]
1141
730
  },
1142
731
  {
1143
732
  "type": "struct contract_schema::order_book::OrderBookBlacklistEvent",
1144
- "metadataTypeId": 29,
733
+ "metadataTypeId": 22,
1145
734
  "components": [
1146
735
  {
1147
736
  "name": "blacklist",
1148
- "typeId": 20,
737
+ "typeId": 13,
1149
738
  "typeArguments": [
1150
739
  {
1151
740
  "name": "",
1152
- "typeId": 53
741
+ "typeId": 41
1153
742
  }
1154
743
  ]
1155
744
  }
@@ -1157,15 +746,15 @@ const abi = {
1157
746
  },
1158
747
  {
1159
748
  "type": "struct contract_schema::order_book::OrderBookConfigEvent",
1160
- "metadataTypeId": 30,
749
+ "metadataTypeId": 23,
1161
750
  "components": [
1162
751
  {
1163
752
  "name": "base_asset",
1164
- "typeId": 50
753
+ "typeId": 38
1165
754
  },
1166
755
  {
1167
756
  "name": "quote_asset",
1168
- "typeId": 50
757
+ "typeId": 38
1169
758
  },
1170
759
  {
1171
760
  "name": "base_decimals",
@@ -1206,38 +795,34 @@ const abi = {
1206
795
  {
1207
796
  "name": "allow_fractional_price",
1208
797
  "typeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903"
1209
- },
1210
- {
1211
- "name": "trigger_max_slippage",
1212
- "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0"
1213
798
  }
1214
799
  ]
1215
800
  },
1216
801
  {
1217
802
  "type": "struct contract_schema::order_book::OrderBookSymbolsEvent",
1218
- "metadataTypeId": 31,
803
+ "metadataTypeId": 24,
1219
804
  "components": [
1220
805
  {
1221
806
  "name": "base_symbol",
1222
- "typeId": 54
807
+ "typeId": 42
1223
808
  },
1224
809
  {
1225
810
  "name": "quote_symbol",
1226
- "typeId": 54
811
+ "typeId": 42
1227
812
  }
1228
813
  ]
1229
814
  },
1230
815
  {
1231
816
  "type": "struct contract_schema::order_book::OrderBookWhitelistEvent",
1232
- "metadataTypeId": 32,
817
+ "metadataTypeId": 25,
1233
818
  "components": [
1234
819
  {
1235
820
  "name": "whitelist",
1236
- "typeId": 20,
821
+ "typeId": 13,
1237
822
  "typeArguments": [
1238
823
  {
1239
824
  "name": "",
1240
- "typeId": 53
825
+ "typeId": 41
1241
826
  }
1242
827
  ]
1243
828
  }
@@ -1245,7 +830,7 @@ const abi = {
1245
830
  },
1246
831
  {
1247
832
  "type": "struct contract_schema::order_book::OrderCancelledEvent",
1248
- "metadataTypeId": 33,
833
+ "metadataTypeId": 26,
1249
834
  "components": [
1250
835
  {
1251
836
  "name": "order_id",
@@ -1253,13 +838,13 @@ const abi = {
1253
838
  },
1254
839
  {
1255
840
  "name": "timestamp",
1256
- "typeId": 55
841
+ "typeId": 43
1257
842
  }
1258
843
  ]
1259
844
  },
1260
845
  {
1261
846
  "type": "struct contract_schema::order_book::OrderCancelledInternalEvent",
1262
- "metadataTypeId": 34,
847
+ "metadataTypeId": 27,
1263
848
  "components": [
1264
849
  {
1265
850
  "name": "order_id",
@@ -1267,13 +852,13 @@ const abi = {
1267
852
  },
1268
853
  {
1269
854
  "name": "timestamp",
1270
- "typeId": 55
855
+ "typeId": 43
1271
856
  }
1272
857
  ]
1273
858
  },
1274
859
  {
1275
860
  "type": "struct contract_schema::order_book::OrderCreatedEvent",
1276
- "metadataTypeId": 35,
861
+ "metadataTypeId": 28,
1277
862
  "components": [
1278
863
  {
1279
864
  "name": "order_id",
@@ -1281,15 +866,15 @@ const abi = {
1281
866
  },
1282
867
  {
1283
868
  "name": "trader_id",
1284
- "typeId": 19
869
+ "typeId": 12
1285
870
  },
1286
871
  {
1287
872
  "name": "order_side",
1288
- "typeId": 10
873
+ "typeId": 7
1289
874
  },
1290
875
  {
1291
876
  "name": "order_type",
1292
- "typeId": 9
877
+ "typeId": 6
1293
878
  },
1294
879
  {
1295
880
  "name": "quantity",
@@ -1301,35 +886,17 @@ const abi = {
1301
886
  },
1302
887
  {
1303
888
  "name": "timestamp",
1304
- "typeId": 55
1305
- }
1306
- ]
1307
- },
1308
- {
1309
- "type": "struct contract_schema::order_book::OrderHaltedEvent",
1310
- "metadataTypeId": 36,
1311
- "components": [
1312
- {
1313
- "name": "order_id",
1314
- "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b"
1315
- },
1316
- {
1317
- "name": "remaining_quantity",
1318
- "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0"
1319
- },
1320
- {
1321
- "name": "timestamp",
1322
- "typeId": 55
889
+ "typeId": 43
1323
890
  }
1324
891
  ]
1325
892
  },
1326
893
  {
1327
894
  "type": "struct contract_schema::order_book::OrderMatchedEvent",
1328
- "metadataTypeId": 37,
895
+ "metadataTypeId": 29,
1329
896
  "components": [
1330
897
  {
1331
898
  "name": "match_id",
1332
- "typeId": 26
899
+ "typeId": 19
1333
900
  },
1334
901
  {
1335
902
  "name": "quantity",
@@ -1341,13 +908,13 @@ const abi = {
1341
908
  },
1342
909
  {
1343
910
  "name": "timestamp",
1344
- "typeId": 55
911
+ "typeId": 43
1345
912
  }
1346
913
  ]
1347
914
  },
1348
915
  {
1349
916
  "type": "struct contract_schema::order_book::OrderOutOfGasEvent",
1350
- "metadataTypeId": 38,
917
+ "metadataTypeId": 30,
1351
918
  "components": [
1352
919
  {
1353
920
  "name": "order_id",
@@ -1355,141 +922,31 @@ const abi = {
1355
922
  },
1356
923
  {
1357
924
  "name": "timestamp",
1358
- "typeId": 55
925
+ "typeId": 43
1359
926
  }
1360
927
  ]
1361
928
  },
1362
929
  {
1363
930
  "type": "struct contract_schema::order_book::OrderTooSmallEvent",
1364
- "metadataTypeId": 39,
1365
- "components": [
1366
- {
1367
- "name": "order_id",
1368
- "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b"
1369
- },
1370
- {
1371
- "name": "timestamp",
1372
- "typeId": 55
1373
- }
1374
- ]
1375
- },
1376
- {
1377
- "type": "struct contract_schema::order_book::TriggerOrder",
1378
- "metadataTypeId": 40,
1379
- "components": [
1380
- {
1381
- "name": "order_id",
1382
- "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b"
1383
- },
1384
- {
1385
- "name": "trader_id",
1386
- "typeId": 19
1387
- },
1388
- {
1389
- "name": "side",
1390
- "typeId": 10
1391
- },
1392
- {
1393
- "name": "price",
1394
- "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0"
1395
- },
1396
- {
1397
- "name": "quantity",
1398
- "typeId": 14
1399
- },
1400
- {
1401
- "name": "order_type",
1402
- "typeId": 13
1403
- },
1404
- {
1405
- "name": "trigger_price",
1406
- "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0"
1407
- }
1408
- ]
1409
- },
1410
- {
1411
- "type": "struct contract_schema::order_book::TriggerOrderArgs",
1412
- "metadataTypeId": 41,
1413
- "components": [
1414
- {
1415
- "name": "quantity",
1416
- "typeId": 14
1417
- },
1418
- {
1419
- "name": "order_type",
1420
- "typeId": 13
1421
- },
1422
- {
1423
- "name": "trigger_price",
1424
- "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0"
1425
- }
1426
- ]
1427
- },
1428
- {
1429
- "type": "struct contract_schema::order_book::TriggerOrderCreatedEvent",
1430
- "metadataTypeId": 42,
931
+ "metadataTypeId": 31,
1431
932
  "components": [
1432
933
  {
1433
934
  "name": "order_id",
1434
935
  "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b"
1435
936
  },
1436
- {
1437
- "name": "trader_id",
1438
- "typeId": 19
1439
- },
1440
- {
1441
- "name": "order_side",
1442
- "typeId": 10
1443
- },
1444
- {
1445
- "name": "order_type",
1446
- "typeId": 13
1447
- },
1448
- {
1449
- "name": "quantity",
1450
- "typeId": 14
1451
- },
1452
- {
1453
- "name": "trigger_price",
1454
- "typeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0"
1455
- },
1456
937
  {
1457
938
  "name": "timestamp",
1458
- "typeId": 55
1459
- },
1460
- {
1461
- "name": "sibling_order",
1462
- "typeId": 20,
1463
- "typeArguments": [
1464
- {
1465
- "name": "",
1466
- "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b"
1467
- }
1468
- ]
1469
- }
1470
- ]
1471
- },
1472
- {
1473
- "type": "struct contract_schema::order_book::TriggerOrderEjectedEvent",
1474
- "metadataTypeId": 43,
1475
- "components": [
1476
- {
1477
- "name": "order_id",
1478
- "typeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b"
1479
- },
1480
- {
1481
- "name": "reason",
1482
- "typeId": 4
939
+ "typeId": 43
1483
940
  }
1484
941
  ]
1485
942
  },
1486
943
  {
1487
944
  "type": "struct contract_schema::order_book::WithdrawSettledTradeEvent",
1488
- "metadataTypeId": 44,
945
+ "metadataTypeId": 32,
1489
946
  "components": [
1490
947
  {
1491
948
  "name": "trader_id",
1492
- "typeId": 19
949
+ "typeId": 12
1493
950
  },
1494
951
  {
1495
952
  "name": "base_amount",
@@ -1503,51 +960,51 @@ const abi = {
1503
960
  },
1504
961
  {
1505
962
  "type": "struct ownership::events::OwnershipSet",
1506
- "metadataTypeId": 45,
963
+ "metadataTypeId": 33,
1507
964
  "components": [
1508
965
  {
1509
966
  "name": "new_owner",
1510
- "typeId": 19
967
+ "typeId": 12
1511
968
  }
1512
969
  ]
1513
970
  },
1514
971
  {
1515
972
  "type": "struct ownership::events::OwnershipTransferred",
1516
- "metadataTypeId": 46,
973
+ "metadataTypeId": 34,
1517
974
  "components": [
1518
975
  {
1519
976
  "name": "new_owner",
1520
- "typeId": 19
977
+ "typeId": 12
1521
978
  },
1522
979
  {
1523
980
  "name": "previous_owner",
1524
- "typeId": 19
981
+ "typeId": 12
1525
982
  }
1526
983
  ]
1527
984
  },
1528
985
  {
1529
986
  "type": "struct pausable::events::PauseEvent",
1530
- "metadataTypeId": 47,
987
+ "metadataTypeId": 35,
1531
988
  "components": [
1532
989
  {
1533
990
  "name": "caller",
1534
- "typeId": 19
991
+ "typeId": 12
1535
992
  }
1536
993
  ]
1537
994
  },
1538
995
  {
1539
996
  "type": "struct pausable::events::UnpauseEvent",
1540
- "metadataTypeId": 48,
997
+ "metadataTypeId": 36,
1541
998
  "components": [
1542
999
  {
1543
1000
  "name": "caller",
1544
- "typeId": 19
1001
+ "typeId": 12
1545
1002
  }
1546
1003
  ]
1547
1004
  },
1548
1005
  {
1549
1006
  "type": "struct std::address::Address",
1550
- "metadataTypeId": 49,
1007
+ "metadataTypeId": 37,
1551
1008
  "components": [
1552
1009
  {
1553
1010
  "name": "bits",
@@ -1557,7 +1014,7 @@ const abi = {
1557
1014
  },
1558
1015
  {
1559
1016
  "type": "struct std::asset_id::AssetId",
1560
- "metadataTypeId": 50,
1017
+ "metadataTypeId": 38,
1561
1018
  "components": [
1562
1019
  {
1563
1020
  "name": "bits",
@@ -1567,11 +1024,11 @@ const abi = {
1567
1024
  },
1568
1025
  {
1569
1026
  "type": "struct std::bytes::Bytes",
1570
- "metadataTypeId": 51,
1027
+ "metadataTypeId": 39,
1571
1028
  "components": [
1572
1029
  {
1573
1030
  "name": "buf",
1574
- "typeId": 52
1031
+ "typeId": 40
1575
1032
  },
1576
1033
  {
1577
1034
  "name": "len",
@@ -1581,11 +1038,11 @@ const abi = {
1581
1038
  },
1582
1039
  {
1583
1040
  "type": "struct std::bytes::RawBytes",
1584
- "metadataTypeId": 52,
1041
+ "metadataTypeId": 40,
1585
1042
  "components": [
1586
1043
  {
1587
1044
  "name": "ptr",
1588
- "typeId": 22
1045
+ "typeId": 15
1589
1046
  },
1590
1047
  {
1591
1048
  "name": "cap",
@@ -1595,7 +1052,7 @@ const abi = {
1595
1052
  },
1596
1053
  {
1597
1054
  "type": "struct std::contract_id::ContractId",
1598
- "metadataTypeId": 53,
1055
+ "metadataTypeId": 41,
1599
1056
  "components": [
1600
1057
  {
1601
1058
  "name": "bits",
@@ -1605,17 +1062,17 @@ const abi = {
1605
1062
  },
1606
1063
  {
1607
1064
  "type": "struct std::string::String",
1608
- "metadataTypeId": 54,
1065
+ "metadataTypeId": 42,
1609
1066
  "components": [
1610
1067
  {
1611
1068
  "name": "bytes",
1612
- "typeId": 51
1069
+ "typeId": 39
1613
1070
  }
1614
1071
  ]
1615
1072
  },
1616
1073
  {
1617
1074
  "type": "struct std::time::Time",
1618
- "metadataTypeId": 55,
1075
+ "metadataTypeId": 43,
1619
1076
  "components": [
1620
1077
  {
1621
1078
  "name": "unix",
@@ -1625,11 +1082,11 @@ const abi = {
1625
1082
  },
1626
1083
  {
1627
1084
  "type": "struct std::vec::RawVec",
1628
- "metadataTypeId": 56,
1085
+ "metadataTypeId": 44,
1629
1086
  "components": [
1630
1087
  {
1631
1088
  "name": "ptr",
1632
- "typeId": 22
1089
+ "typeId": 15
1633
1090
  },
1634
1091
  {
1635
1092
  "name": "cap",
@@ -1637,20 +1094,20 @@ const abi = {
1637
1094
  }
1638
1095
  ],
1639
1096
  "typeParameters": [
1640
- 21
1097
+ 14
1641
1098
  ]
1642
1099
  },
1643
1100
  {
1644
1101
  "type": "struct std::vec::Vec",
1645
- "metadataTypeId": 57,
1102
+ "metadataTypeId": 45,
1646
1103
  "components": [
1647
1104
  {
1648
1105
  "name": "buf",
1649
- "typeId": 56,
1106
+ "typeId": 44,
1650
1107
  "typeArguments": [
1651
1108
  {
1652
1109
  "name": "",
1653
- "typeId": 21
1110
+ "typeId": 14
1654
1111
  }
1655
1112
  ]
1656
1113
  },
@@ -1660,7 +1117,7 @@ const abi = {
1660
1117
  }
1661
1118
  ],
1662
1119
  "typeParameters": [
1663
- 21
1120
+ 14
1664
1121
  ]
1665
1122
  }
1666
1123
  ],
@@ -2045,258 +1502,109 @@ const abi = {
2045
1502
  {
2046
1503
  "name": "doc-comment",
2047
1504
  "arguments": [
2048
- " # Storage Access"
2049
- ]
2050
- },
2051
- {
2052
- "name": "doc-comment",
2053
- "arguments": [
2054
- ""
2055
- ]
2056
- },
2057
- {
2058
- "name": "doc-comment",
2059
- "arguments": [
2060
- " - Reads: Current order book state to check for matches"
2061
- ]
2062
- },
2063
- {
2064
- "name": "doc-comment",
2065
- "arguments": [
2066
- " - Writes: Updates order book with new order or executes trades"
2067
- ]
2068
- },
2069
- {
2070
- "name": "doc-comment",
2071
- "arguments": [
2072
- ""
2073
- ]
2074
- },
2075
- {
2076
- "name": "doc-comment",
2077
- "arguments": [
2078
- " # Events"
2079
- ]
2080
- },
2081
- {
2082
- "name": "doc-comment",
2083
- "arguments": [
2084
- ""
2085
- ]
2086
- },
2087
- {
2088
- "name": "doc-comment",
2089
- "arguments": [
2090
- " - Emits `OrderCreatedEvent` if order is added to book"
2091
- ]
2092
- },
2093
- {
2094
- "name": "doc-comment",
2095
- "arguments": [
2096
- " - Emits `OrderMatchedEvent` for each match executed"
2097
- ]
2098
- },
2099
- {
2100
- "name": "doc-comment",
2101
- "arguments": [
2102
- ""
2103
- ]
2104
- },
2105
- {
2106
- "name": "doc-comment",
2107
- "arguments": [
2108
- " # Reverts"
2109
- ]
2110
- },
2111
- {
2112
- "name": "doc-comment",
2113
- "arguments": [
2114
- ""
2115
- ]
2116
- },
2117
- {
2118
- "name": "doc-comment",
2119
- "arguments": [
2120
- " - If quantity is zero"
1505
+ " # Storage Access"
2121
1506
  ]
2122
1507
  },
2123
1508
  {
2124
1509
  "name": "doc-comment",
2125
1510
  "arguments": [
2126
- " - If price is zero"
1511
+ ""
2127
1512
  ]
2128
1513
  },
2129
1514
  {
2130
1515
  "name": "doc-comment",
2131
1516
  "arguments": [
2132
- " - If msg_asset_id is neither BASE_ASSET nor QUOTE_ASSET"
1517
+ " - Reads: Current order book state to check for matches"
2133
1518
  ]
2134
1519
  },
2135
1520
  {
2136
1521
  "name": "doc-comment",
2137
1522
  "arguments": [
2138
- " - If msg_amount doesn't match expected amount:"
1523
+ " - Writes: Updates order book with new order or executes trades"
2139
1524
  ]
2140
1525
  },
2141
1526
  {
2142
1527
  "name": "doc-comment",
2143
1528
  "arguments": [
2144
- " - Buy orders: msg_amount != quantity * price"
1529
+ ""
2145
1530
  ]
2146
1531
  },
2147
1532
  {
2148
1533
  "name": "doc-comment",
2149
1534
  "arguments": [
2150
- " - Sell orders: msg_amount != quantity"
1535
+ " # Events"
2151
1536
  ]
2152
1537
  },
2153
1538
  {
2154
- "name": "storage",
1539
+ "name": "doc-comment",
2155
1540
  "arguments": [
2156
- "read",
2157
- "write"
1541
+ ""
2158
1542
  ]
2159
1543
  },
2160
1544
  {
2161
- "name": "payable",
2162
- "arguments": []
2163
- }
2164
- ]
2165
- },
2166
- {
2167
- "name": "create_order_with_triggers",
2168
- "inputs": [
2169
- {
2170
- "name": "order_args",
2171
- "concreteTypeId": "027cfee5b9839be8e12b3b56eaf1315f269a86a23ae0a392f084185f7b54a410"
2172
- },
2173
- {
2174
- "name": "trigger_1",
2175
- "concreteTypeId": "e915e400fd7cca76151cd63ea4a84d70d906ea97663b011363db9271072cad74"
2176
- },
2177
- {
2178
- "name": "trigger_2",
2179
- "concreteTypeId": "020bfa2968cbf7600b3752287637e71587b0f46760ffdf0a977421343746b5c8"
2180
- }
2181
- ],
2182
- "output": "cdeacf58742dab0aa73fcb9b540d076dab5973f18c48cdd27818f72784feb6f2",
2183
- "attributes": [
2184
- {
2185
- "name": "storage",
1545
+ "name": "doc-comment",
2186
1546
  "arguments": [
2187
- "read",
2188
- "write"
1547
+ " - Emits `OrderCreatedEvent` if order is added to book"
2189
1548
  ]
2190
1549
  },
2191
1550
  {
2192
- "name": "payable",
2193
- "arguments": []
2194
- }
2195
- ]
2196
- },
2197
- {
2198
- "name": "create_trigger_order",
2199
- "inputs": [
2200
- {
2201
- "name": "trigger_order",
2202
- "concreteTypeId": "e915e400fd7cca76151cd63ea4a84d70d906ea97663b011363db9271072cad74"
2203
- },
2204
- {
2205
- "name": "expected_parent_quantity",
2206
- "concreteTypeId": "d852149004cc9ec0bbe7dc4e37bffea1d41469b759512b6136f2e865a4c06e7d"
2207
- }
2208
- ],
2209
- "output": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b",
2210
- "attributes": [
2211
- {
2212
- "name": "storage",
1551
+ "name": "doc-comment",
2213
1552
  "arguments": [
2214
- "read",
2215
- "write"
1553
+ " - Emits `OrderMatchedEvent` for each match executed"
2216
1554
  ]
2217
1555
  },
2218
1556
  {
2219
- "name": "payable",
2220
- "arguments": []
2221
- }
2222
- ]
2223
- },
2224
- {
2225
- "name": "create_trigger_orders",
2226
- "inputs": [
2227
- {
2228
- "name": "trigger_order_1",
2229
- "concreteTypeId": "e915e400fd7cca76151cd63ea4a84d70d906ea97663b011363db9271072cad74"
2230
- },
2231
- {
2232
- "name": "trigger_order_2",
2233
- "concreteTypeId": "e915e400fd7cca76151cd63ea4a84d70d906ea97663b011363db9271072cad74"
1557
+ "name": "doc-comment",
1558
+ "arguments": [
1559
+ ""
1560
+ ]
2234
1561
  },
2235
1562
  {
2236
- "name": "expected_parent_quantity",
2237
- "concreteTypeId": "d852149004cc9ec0bbe7dc4e37bffea1d41469b759512b6136f2e865a4c06e7d"
2238
- }
2239
- ],
2240
- "output": "bc42ec26f2a17c5b23fc007d96b96bf35f8949ee156afdd789064210d881f7e0",
2241
- "attributes": [
2242
- {
2243
- "name": "storage",
1563
+ "name": "doc-comment",
2244
1564
  "arguments": [
2245
- "read",
2246
- "write"
1565
+ " # Reverts"
2247
1566
  ]
2248
1567
  },
2249
- {
2250
- "name": "payable",
2251
- "arguments": []
2252
- }
2253
- ]
2254
- },
2255
- {
2256
- "name": "execute_trigger_order",
2257
- "inputs": [],
2258
- "output": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d",
2259
- "attributes": [
2260
1568
  {
2261
1569
  "name": "doc-comment",
2262
1570
  "arguments": [
2263
- " Executes the next trigger order at the head of the global queue."
1571
+ ""
2264
1572
  ]
2265
1573
  },
2266
1574
  {
2267
1575
  "name": "doc-comment",
2268
1576
  "arguments": [
2269
- ""
1577
+ " - If quantity is zero"
2270
1578
  ]
2271
1579
  },
2272
1580
  {
2273
1581
  "name": "doc-comment",
2274
1582
  "arguments": [
2275
- " The trigger is funded by whatever has accumulated in its lock. If a parent spot"
1583
+ " - If price is zero"
2276
1584
  ]
2277
1585
  },
2278
1586
  {
2279
1587
  "name": "doc-comment",
2280
1588
  "arguments": [
2281
- " order is still resting, it is cancelled first (its escrow returned to the trader's"
1589
+ " - If msg_asset_id is neither BASE_ASSET nor QUOTE_ASSET"
2282
1590
  ]
2283
1591
  },
2284
1592
  {
2285
1593
  "name": "doc-comment",
2286
1594
  "arguments": [
2287
- " settled balance) so the trigger fires at the snapshot of available funds rather"
1595
+ " - If msg_amount doesn't match expected amount:"
2288
1596
  ]
2289
1597
  },
2290
1598
  {
2291
1599
  "name": "doc-comment",
2292
1600
  "arguments": [
2293
- " than racing future fills against it. The new spot's quantity is scaled down to"
1601
+ " - Buy orders: msg_amount != quantity * price"
2294
1602
  ]
2295
1603
  },
2296
1604
  {
2297
1605
  "name": "doc-comment",
2298
1606
  "arguments": [
2299
- " match the available lock — never up."
1607
+ " - Sell orders: msg_amount != quantity"
2300
1608
  ]
2301
1609
  },
2302
1610
  {
@@ -2305,6 +1613,10 @@ const abi = {
2305
1613
  "read",
2306
1614
  "write"
2307
1615
  ]
1616
+ },
1617
+ {
1618
+ "name": "payable",
1619
+ "arguments": []
2308
1620
  }
2309
1621
  ]
2310
1622
  },
@@ -2503,19 +1815,6 @@ const abi = {
2503
1815
  "output": "0d79387ad3bacdc3b7aad9da3a96f4ce60d9a1b6002df254069ad95a3931d5c8",
2504
1816
  "attributes": null
2505
1817
  },
2506
- {
2507
- "name": "get_head_trigger_order",
2508
- "inputs": [],
2509
- "output": "aa46988b96e71d9a5994f2807f743c9a360e72be8e9865141192345e539187f5",
2510
- "attributes": [
2511
- {
2512
- "name": "storage",
2513
- "arguments": [
2514
- "read"
2515
- ]
2516
- }
2517
- ]
2518
- },
2519
1818
  {
2520
1819
  "name": "get_heap_price",
2521
1820
  "inputs": [
@@ -2689,28 +1988,6 @@ const abi = {
2689
1988
  }
2690
1989
  ]
2691
1990
  },
2692
- {
2693
- "name": "get_locked_balance_of",
2694
- "inputs": [
2695
- {
2696
- "name": "trader",
2697
- "concreteTypeId": "ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335"
2698
- },
2699
- {
2700
- "name": "order_id",
2701
- "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b"
2702
- }
2703
- ],
2704
- "output": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0",
2705
- "attributes": [
2706
- {
2707
- "name": "storage",
2708
- "arguments": [
2709
- "read"
2710
- ]
2711
- }
2712
- ]
2713
- },
2714
1991
  {
2715
1992
  "name": "get_maker_fee",
2716
1993
  "inputs": [],
@@ -3253,78 +2530,6 @@ const abi = {
3253
2530
  }
3254
2531
  ]
3255
2532
  },
3256
- {
3257
- "name": "get_trigger_order",
3258
- "inputs": [
3259
- {
3260
- "name": "order_id",
3261
- "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b"
3262
- }
3263
- ],
3264
- "output": "aa46988b96e71d9a5994f2807f743c9a360e72be8e9865141192345e539187f5",
3265
- "attributes": [
3266
- {
3267
- "name": "storage",
3268
- "arguments": [
3269
- "read"
3270
- ]
3271
- }
3272
- ]
3273
- },
3274
- {
3275
- "name": "get_trigger_order_parent",
3276
- "inputs": [
3277
- {
3278
- "name": "order_id",
3279
- "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b"
3280
- }
3281
- ],
3282
- "output": "0c2beb9013490c4f753f2757dfe2d8340b22ce3827d596d81d249b7038033cb6",
3283
- "attributes": [
3284
- {
3285
- "name": "storage",
3286
- "arguments": [
3287
- "read"
3288
- ]
3289
- }
3290
- ]
3291
- },
3292
- {
3293
- "name": "get_trigger_order_sibling",
3294
- "inputs": [
3295
- {
3296
- "name": "order_id",
3297
- "concreteTypeId": "7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b"
3298
- }
3299
- ],
3300
- "output": "0c2beb9013490c4f753f2757dfe2d8340b22ce3827d596d81d249b7038033cb6",
3301
- "attributes": [
3302
- {
3303
- "name": "storage",
3304
- "arguments": [
3305
- "read"
3306
- ]
3307
- }
3308
- ]
3309
- },
3310
- {
3311
- "name": "get_trigger_orders_at_price",
3312
- "inputs": [
3313
- {
3314
- "name": "trigger_price",
3315
- "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0"
3316
- }
3317
- ],
3318
- "output": "90bd4a53a7770f92afd12f9ceaea3e7f99a6c46d42d3ddedeef0874b7be6c92a",
3319
- "attributes": [
3320
- {
3321
- "name": "storage",
3322
- "arguments": [
3323
- "read"
3324
- ]
3325
- }
3326
- ]
3327
- },
3328
2533
  {
3329
2534
  "name": "get_whitelist_id",
3330
2535
  "inputs": [],
@@ -3654,44 +2859,6 @@ const abi = {
3654
2859
  }
3655
2860
  ]
3656
2861
  },
3657
- {
3658
- "name": "eject_trigger_order",
3659
- "inputs": [],
3660
- "output": "2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d",
3661
- "attributes": [
3662
- {
3663
- "name": "doc-comment",
3664
- "arguments": [
3665
- " Owner-only escape hatch: removes the trigger at the head of the global queue,"
3666
- ]
3667
- },
3668
- {
3669
- "name": "doc-comment",
3670
- "arguments": [
3671
- " refunds any held lock to the trader, clears all linked state, and unhalts the book"
3672
- ]
3673
- },
3674
- {
3675
- "name": "doc-comment",
3676
- "arguments": [
3677
- " if it was halted. Used when a trigger at the head is stuck (e.g. systematically"
3678
- ]
3679
- },
3680
- {
3681
- "name": "doc-comment",
3682
- "arguments": [
3683
- " running OOG and blocking subsequent triggers)."
3684
- ]
3685
- },
3686
- {
3687
- "name": "storage",
3688
- "arguments": [
3689
- "read",
3690
- "write"
3691
- ]
3692
- }
3693
- ]
3694
- },
3695
2862
  {
3696
2863
  "name": "emit_orderbook_config",
3697
2864
  "inputs": [],
@@ -4071,14 +3238,6 @@ const abi = {
4071
3238
  "logId": "4997665884103701952",
4072
3239
  "concreteTypeId": "455b46a49016f5c03c18ce54b969ea3d0d33c9b00263b3dcc36aa8da27558b8a"
4073
3240
  },
4074
- {
4075
- "logId": "11872035487494935780",
4076
- "concreteTypeId": "a4c1f16008f794e4bb5f1e3dee0e961b2c480dad11ea5b89fc2eacfe38631db5"
4077
- },
4078
- {
4079
- "logId": "10821972466347811362",
4080
- "concreteTypeId": "962f5e9ef1b8222269128afe35ff4d3241c140c267d673365de624d353b563c8"
4081
- },
4082
3241
  {
4083
3242
  "logId": "1043998670105365804",
4084
3243
  "concreteTypeId": "0e7d0742559c4d2c273298fdc0b9b7e9b07f7f944855ca3020dba8617515e2f0"
@@ -4134,18 +3293,6 @@ const abi = {
4134
3293
  {
4135
3294
  "logId": "11719039397861176592",
4136
3295
  "concreteTypeId": "a2a2643e0252b510328c0323a0ea60724fb4cb3309a2322ab31b27566ff9a79d"
4137
- },
4138
- {
4139
- "logId": "1559614116885970782",
4140
- "concreteTypeId": "15a4dcc6afac3f5e9d69383292c88895475737c599b518309c34cf8c1104f8f5"
4141
- },
4142
- {
4143
- "logId": "16602627312738262893",
4144
- "concreteTypeId": "e668619391f65f6ddbe3de3cfd8a1777035887bc8bbb31c7847131031159841a"
4145
- },
4146
- {
4147
- "logId": "8092143774995562521",
4148
- "concreteTypeId": "704d11e3abffc019b7c89fea24cbc379742ed0dc7ddc01c5425a143c1f0bc2b8"
4149
3296
  }
4150
3297
  ],
4151
3298
  "messagesTypes": [],
@@ -4153,139 +3300,133 @@ const abi = {
4153
3300
  {
4154
3301
  "name": "INITIAL_OWNER",
4155
3302
  "concreteTypeId": "287a382c1e0b1f11d12a422e77a248d27761327cd17515cc6e6369d528cf31ca",
4156
- "offset": 148816,
3303
+ "offset": 76896,
4157
3304
  "indirect": false
4158
3305
  },
4159
3306
  {
4160
3307
  "name": "BASE_ASSET",
4161
3308
  "concreteTypeId": "c0710b6731b1dd59799cf6bef33eee3b3b04a2e40e80a0724090215bbf2ca974",
4162
- "offset": 148704,
3309
+ "offset": 76784,
4163
3310
  "indirect": false
4164
3311
  },
4165
3312
  {
4166
3313
  "name": "QUOTE_ASSET",
4167
3314
  "concreteTypeId": "c0710b6731b1dd59799cf6bef33eee3b3b04a2e40e80a0724090215bbf2ca974",
4168
- "offset": 148960,
3315
+ "offset": 77040,
4169
3316
  "indirect": false
4170
3317
  },
4171
3318
  {
4172
3319
  "name": "MIN_ORDER",
4173
3320
  "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0",
4174
- "offset": 148928,
3321
+ "offset": 77008,
4175
3322
  "indirect": false
4176
3323
  },
4177
3324
  {
4178
3325
  "name": "MAKER_FEE",
4179
3326
  "concreteTypeId": "1b5759d94094368cfd443019e7ca5ec4074300e544e5ea993a979f5da627261e",
4180
- "offset": 148864,
3327
+ "offset": 76944,
4181
3328
  "indirect": false
4182
3329
  },
4183
3330
  {
4184
3331
  "name": "TAKER_FEE",
4185
3332
  "concreteTypeId": "1b5759d94094368cfd443019e7ca5ec4074300e544e5ea993a979f5da627261e",
4186
- "offset": 149016,
3333
+ "offset": 77096,
4187
3334
  "indirect": false
4188
3335
  },
4189
3336
  {
4190
3337
  "name": "BASE_DECIMALS",
4191
3338
  "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0",
4192
- "offset": 148736,
3339
+ "offset": 76816,
4193
3340
  "indirect": false
4194
3341
  },
4195
3342
  {
4196
3343
  "name": "QUOTE_DECIMALS",
4197
3344
  "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0",
4198
- "offset": 148992,
3345
+ "offset": 77072,
4199
3346
  "indirect": false
4200
3347
  },
4201
3348
  {
4202
3349
  "name": "PRICE_WINDOW",
4203
3350
  "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0",
4204
- "offset": 148944,
3351
+ "offset": 77024,
4205
3352
  "indirect": false
4206
3353
  },
4207
3354
  {
4208
3355
  "name": "PRICE_PRECISION",
4209
3356
  "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0",
4210
- "offset": 148936,
3357
+ "offset": 77016,
4211
3358
  "indirect": false
4212
3359
  },
4213
3360
  {
4214
3361
  "name": "QUANTITY_PRECISION",
4215
3362
  "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0",
4216
- "offset": 148952,
3363
+ "offset": 77032,
4217
3364
  "indirect": false
4218
3365
  },
4219
3366
  {
4220
3367
  "name": "DUST",
4221
3368
  "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0",
4222
- "offset": 148808,
3369
+ "offset": 76888,
4223
3370
  "indirect": false
4224
3371
  },
4225
3372
  {
4226
3373
  "name": "BASE_GAS",
4227
3374
  "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0",
4228
- "offset": 148744,
3375
+ "offset": 76824,
4229
3376
  "indirect": false
4230
3377
  },
4231
3378
  {
4232
3379
  "name": "MATCH_EVENT_GAS",
4233
3380
  "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0",
4234
- "offset": 148896,
3381
+ "offset": 76976,
4235
3382
  "indirect": false
4236
3383
  },
4237
3384
  {
4238
3385
  "name": "MATCH_SINGLE_LEVEL_GAS",
4239
3386
  "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0",
4240
- "offset": 148912,
3387
+ "offset": 76992,
4241
3388
  "indirect": false
4242
3389
  },
4243
3390
  {
4244
3391
  "name": "MATCH_MULTI_LEVEL_GAS",
4245
3392
  "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0",
4246
- "offset": 148904,
3393
+ "offset": 76984,
4247
3394
  "indirect": false
4248
3395
  },
4249
3396
  {
4250
3397
  "name": "MIN_GAS",
4251
3398
  "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0",
4252
- "offset": 148920,
3399
+ "offset": 77000,
4253
3400
  "indirect": false
4254
3401
  },
4255
3402
  {
4256
3403
  "name": "ALLOW_FRACTIONAL_PRICE",
4257
3404
  "concreteTypeId": "b760f44fa5965c2474a3b471467a22c43185152129295af588b022ae50b50903",
4258
- "offset": 148696,
4259
- "indirect": false
4260
- },
4261
- {
4262
- "name": "TRIGGER_MAX_SLIPPAGE",
4263
- "concreteTypeId": "1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0",
4264
- "offset": 149048,
3405
+ "offset": 76776,
4265
3406
  "indirect": false
4266
3407
  },
4267
3408
  {
4268
3409
  "name": "BASE_SYMBOL",
4269
3410
  "concreteTypeId": "338a25cb65b9251663dcce6362b744fe10aa849758299590f4efed5dd299bf50",
4270
- "offset": 148752,
3411
+ "offset": 76832,
4271
3412
  "indirect": false
4272
3413
  },
4273
3414
  {
4274
3415
  "name": "QUOTE_SYMBOL",
4275
3416
  "concreteTypeId": "338a25cb65b9251663dcce6362b744fe10aa849758299590f4efed5dd299bf50",
4276
- "offset": 149000,
3417
+ "offset": 77080,
4277
3418
  "indirect": false
4278
3419
  },
4279
3420
  {
4280
3421
  "name": "WHITE_LIST_CONTRACT",
4281
3422
  "concreteTypeId": "0d79387ad3bacdc3b7aad9da3a96f4ce60d9a1b6002df254069ad95a3931d5c8",
4282
- "offset": 149056,
3423
+ "offset": 77128,
4283
3424
  "indirect": false
4284
3425
  },
4285
3426
  {
4286
3427
  "name": "BLACK_LIST_CONTRACT",
4287
3428
  "concreteTypeId": "0d79387ad3bacdc3b7aad9da3a96f4ce60d9a1b6002df254069ad95a3931d5c8",
4288
- "offset": 148768,
3429
+ "offset": 76848,
4289
3430
  "indirect": false
4290
3431
  }
4291
3432
  ],
@@ -4293,14 +3434,6 @@ const abi = {
4293
3434
  "panickingCalls": {}
4294
3435
  };
4295
3436
  const storageSlots = [
4296
- {
4297
- "key": "0e37d740667cc57abb67fd7a1336769600f94d8b7ee55c86be3d3ab1b450d5f6",
4298
- "value": "0000000000000000000000000000000000000000000000000000000000000000"
4299
- },
4300
- {
4301
- "key": "4d01d421159e00072c30c0e33ebb92efc2ad962501ea745cc6443828196d0262",
4302
- "value": "0000000000000000000000000000000000000000000000000000000000000000"
4303
- },
4304
3437
  {
4305
3438
  "key": "7ceadc98468d452f30f6b180bc1065fbce8620efac57fef287b5c34e4c9687f4",
4306
3439
  "value": "0000000000000000000000000000000000000000000000000000000000000000"
@@ -4312,10 +3445,6 @@ const storageSlots = [
4312
3445
  {
4313
3446
  "key": "ad467f799b8cd85bf32c612ea056ff074c7e9fef2ca8673e7a9b34743223d66f",
4314
3447
  "value": "000000000000000000000000000000000000000000000000ffffffffffffffff"
4315
- },
4316
- {
4317
- "key": "d86e355c3987290610faa33c5721bb75366b3434e51536793b2486554f8c4d0c",
4318
- "value": "0000000000000000000000000000000000000000000000000000000000000000"
4319
3448
  }
4320
3449
  ];
4321
3450
  export class OrderBookInterface extends Interface {