@o2exchange/contracts 0.2.1-rc → 0.2.2

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