@orbs-network/spot 1.10.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +20 -13
  2. package/{script/input/config.json → config.json} +84 -6
  3. package/index.js +8 -3
  4. package/out/02_DeployCosigner.s.sol/DeployCosigner.json +1 -1
  5. package/out/03_DeployReactor.s.sol/DeployReactor.json +1 -1
  6. package/out/04_DeployExecutor.s.sol/DeployExecutor.json +1 -1
  7. package/out/BaseTest.sol/BaseTest.abi.json +26 -13
  8. package/out/BaseTest.sol/BaseTest.json +1 -1
  9. package/out/CosignatureLib.sol/CosignatureLib.abi.json +10 -0
  10. package/out/CosignatureLib.sol/CosignatureLib.json +1 -1
  11. package/out/CosignatureLib.t.sol/CosignatureLibTest.abi.json +125 -16
  12. package/out/CosignatureLib.t.sol/CosignatureLibTest.json +1 -1
  13. package/out/Cosigner.sol/Cosigner.abi.json +12 -115
  14. package/out/Cosigner.sol/Cosigner.json +1 -1
  15. package/out/Cosigner.t.sol/CosignerTest.abi.json +30 -154
  16. package/out/Cosigner.t.sol/CosignerTest.json +1 -1
  17. package/out/Cosigner.t.sol/CosignerWrapper.abi.json +12 -115
  18. package/out/Cosigner.t.sol/CosignerWrapper.json +1 -1
  19. package/out/CosignerIntegration.t.sol/CosignerIntegrationTest.abi.json +49 -33
  20. package/out/CosignerIntegration.t.sol/CosignerIntegrationTest.json +1 -1
  21. package/out/DefaultDexAdapter.sol/DefaultDexAdapter.abi.json +105 -4
  22. package/out/DefaultDexAdapter.sol/DefaultDexAdapter.json +1 -1
  23. package/out/DefaultDexAdapter.t.sol/DefaultDexAdapterTest.abi.json +33 -13
  24. package/out/DefaultDexAdapter.t.sol/DefaultDexAdapterTest.json +1 -1
  25. package/out/ExclusivityOverrideLib.t.sol/ExclusivityCaller.json +1 -1
  26. package/out/ExclusivityOverrideLib.t.sol/ExclusivityLibTest.abi.json +26 -13
  27. package/out/ExclusivityOverrideLib.t.sol/ExclusivityLibTest.json +1 -1
  28. package/out/Executor.sol/Executor.abi.json +200 -13
  29. package/out/Executor.sol/Executor.json +1 -1
  30. package/out/Executor.t.sol/ExecutorTest.abi.json +26 -13
  31. package/out/Executor.t.sol/ExecutorTest.json +1 -1
  32. package/out/IExchangeAdapter.sol/IExchangeAdapter.abi.json +105 -4
  33. package/out/IExchangeAdapter.sol/IExchangeAdapter.json +1 -1
  34. package/out/IReactor.sol/IReactor.abi.json +100 -4
  35. package/out/IReactor.sol/IReactor.json +1 -1
  36. package/out/IReactorCallback.sol/IReactorCallback.abi.json +100 -4
  37. package/out/IReactorCallback.sol/IReactorCallback.json +1 -1
  38. package/out/MockReactor.sol/MockReactor.abi.json +200 -8
  39. package/out/MockReactor.sol/MockReactor.json +1 -1
  40. package/out/OrderLib.sol/OrderLib.json +1 -1
  41. package/out/OrderReactor.E2E.t.sol/OrderReactorE2ETest.abi.json +27 -14
  42. package/out/OrderReactor.E2E.t.sol/OrderReactorE2ETest.json +1 -1
  43. package/out/OrderReactor.sol/OrderReactor.abi.json +130 -14
  44. package/out/OrderReactor.sol/OrderReactor.json +1 -1
  45. package/out/OrderReactorPause.t.sol/OrderReactorPauseTest.abi.json +26 -13
  46. package/out/OrderReactorPause.t.sol/OrderReactorPauseTest.json +1 -1
  47. package/out/OrderReactorPause.t.sol/SimpleCallback.abi.json +100 -4
  48. package/out/OrderReactorPause.t.sol/SimpleCallback.json +1 -1
  49. package/out/OrderValidationLib.Fuzz.t.sol/OrderValidationLibFuzzTest.abi.json +136 -22
  50. package/out/OrderValidationLib.Fuzz.t.sol/OrderValidationLibFuzzTest.json +1 -1
  51. package/out/OrderValidationLib.sol/OrderValidationLib.abi.json +15 -5
  52. package/out/OrderValidationLib.sol/OrderValidationLib.json +1 -1
  53. package/out/OrderValidationLib.t.sol/OrderValidationLibTest.abi.json +160 -30
  54. package/out/OrderValidationLib.t.sol/OrderValidationLibTest.json +1 -1
  55. package/out/P2DexAdapter.sol/P2DexAdapter.abi.json +105 -4
  56. package/out/P2DexAdapter.sol/P2DexAdapter.json +1 -1
  57. package/out/P2DexAdapter.t.sol/P2DexAdapterTest.abi.json +33 -13
  58. package/out/P2DexAdapter.t.sol/P2DexAdapterTest.json +1 -1
  59. package/out/ParaswapDexAdapter.sol/ParaswapDexAdapter.abi.json +105 -4
  60. package/out/ParaswapDexAdapter.sol/ParaswapDexAdapter.json +1 -1
  61. package/out/ParaswapDexAdapter.t.sol/ParaswapDexAdapterTest.abi.json +33 -13
  62. package/out/ParaswapDexAdapter.t.sol/ParaswapDexAdapterTest.json +1 -1
  63. package/out/RePermit.t.sol/RePermitTest.abi.json +26 -13
  64. package/out/RePermit.t.sol/RePermitTest.json +1 -1
  65. package/out/Refinery.t.sol/PayableTarget.json +1 -1
  66. package/out/Refinery.t.sol/RefineryTest.abi.json +26 -13
  67. package/out/Refinery.t.sol/RefineryTest.json +1 -1
  68. package/out/ResolutionLib.Fuzz.t.sol/ResolutionLibFuzzTest.abi.json +122 -18
  69. package/out/ResolutionLib.Fuzz.t.sol/ResolutionLibFuzzTest.json +1 -1
  70. package/out/ResolutionLib.sol/ResolutionLib.abi.json +1 -1
  71. package/out/ResolutionLib.sol/ResolutionLib.json +1 -1
  72. package/out/ResolutionLib.t.sol/ResolutionLibTest.abi.json +133 -20
  73. package/out/ResolutionLib.t.sol/ResolutionLibTest.json +1 -1
  74. package/out/SettlementLib.sol/SettlementLib.json +1 -1
  75. package/out/SettlementLib.t.sol/SettlementLibTest.abi.json +26 -13
  76. package/out/SettlementLib.t.sol/SettlementLibTest.json +1 -1
  77. package/out/SettlementLib.t.sol/SettlementWrapper.abi.json +100 -4
  78. package/out/SettlementLib.t.sol/SettlementWrapper.json +1 -1
  79. package/out/SwapAdapter.sol/SwapAdapterMock.abi.json +100 -9
  80. package/out/SwapAdapter.sol/SwapAdapterMock.json +1 -1
  81. package/out/WM.t.sol/WMTest.abi.json +26 -13
  82. package/out/WM.t.sol/WMTest.json +1 -1
  83. package/package.json +2 -1
  84. package/script/input/cosignature.skeleton.json +0 -1
  85. package/script/input/repermit.skeleton.json +12 -2
  86. package/out/06_DeployDefaultExchange.s.sol/DeployDefaultExchange.abi.json +0 -28
  87. package/out/06_DeployDefaultExchange.s.sol/DeployDefaultExchange.json +0 -1
  88. package/out/06_DeployP2Exchange.s.sol/DeployP2Exchange.abi.json +0 -28
  89. package/out/06_DeployP2Exchange.s.sol/DeployP2Exchange.json +0 -1
  90. package/out/06_DeployParaswapExchange.s.sol/DeployParaswapExchange.abi.json +0 -28
  91. package/out/06_DeployParaswapExchange.s.sol/DeployParaswapExchange.json +0 -1
  92. package/out/07_CheckOrder.s.sol/AlwaysValid1271.abi.json +0 -26
  93. package/out/07_CheckOrder.s.sol/AlwaysValid1271.json +0 -1
  94. package/out/07_CheckOrder.s.sol/CheckOrder.abi.json +0 -78
  95. package/out/07_CheckOrder.s.sol/CheckOrder.json +0 -1
  96. package/out/build-info/12dff9362aac7f9c.json +0 -1
  97. package/script/input/order.json +0 -63
@@ -80,6 +80,11 @@
80
80
  "type": "uint256",
81
81
  "internalType": "uint256"
82
82
  },
83
+ {
84
+ "name": "start",
85
+ "type": "uint256",
86
+ "internalType": "uint256"
87
+ },
83
88
  {
84
89
  "name": "deadline",
85
90
  "type": "uint256",
@@ -148,7 +153,12 @@
148
153
  "internalType": "uint256"
149
154
  },
150
155
  {
151
- "name": "stop",
156
+ "name": "triggerLower",
157
+ "type": "uint256",
158
+ "internalType": "uint256"
159
+ },
160
+ {
161
+ "name": "triggerUpper",
152
162
  "type": "uint256",
153
163
  "internalType": "uint256"
154
164
  },
@@ -167,7 +177,78 @@
167
177
  "internalType": "bytes"
168
178
  },
169
179
  {
170
- "name": "cosignatureData",
180
+ "name": "trigger",
181
+ "type": "tuple",
182
+ "internalType": "struct Cosignature",
183
+ "components": [
184
+ {
185
+ "name": "cosigner",
186
+ "type": "address",
187
+ "internalType": "address"
188
+ },
189
+ {
190
+ "name": "reactor",
191
+ "type": "address",
192
+ "internalType": "address"
193
+ },
194
+ {
195
+ "name": "chainid",
196
+ "type": "uint256",
197
+ "internalType": "uint256"
198
+ },
199
+ {
200
+ "name": "timestamp",
201
+ "type": "uint256",
202
+ "internalType": "uint256"
203
+ },
204
+ {
205
+ "name": "input",
206
+ "type": "tuple",
207
+ "internalType": "struct CosignedValue",
208
+ "components": [
209
+ {
210
+ "name": "token",
211
+ "type": "address",
212
+ "internalType": "address"
213
+ },
214
+ {
215
+ "name": "value",
216
+ "type": "uint256",
217
+ "internalType": "uint256"
218
+ },
219
+ {
220
+ "name": "decimals",
221
+ "type": "uint8",
222
+ "internalType": "uint8"
223
+ }
224
+ ]
225
+ },
226
+ {
227
+ "name": "output",
228
+ "type": "tuple",
229
+ "internalType": "struct CosignedValue",
230
+ "components": [
231
+ {
232
+ "name": "token",
233
+ "type": "address",
234
+ "internalType": "address"
235
+ },
236
+ {
237
+ "name": "value",
238
+ "type": "uint256",
239
+ "internalType": "uint256"
240
+ },
241
+ {
242
+ "name": "decimals",
243
+ "type": "uint8",
244
+ "internalType": "uint8"
245
+ }
246
+ ]
247
+ }
248
+ ]
249
+ },
250
+ {
251
+ "name": "current",
171
252
  "type": "tuple",
172
253
  "internalType": "struct Cosignature",
173
254
  "components": [
@@ -238,7 +319,12 @@
238
319
  ]
239
320
  },
240
321
  {
241
- "name": "cosignature",
322
+ "name": "triggerCosignature",
323
+ "type": "bytes",
324
+ "internalType": "bytes"
325
+ },
326
+ {
327
+ "name": "currentCosignature",
242
328
  "type": "bytes",
243
329
  "internalType": "bytes"
244
330
  }
@@ -270,7 +356,12 @@
270
356
  "internalType": "uint256"
271
357
  },
272
358
  {
273
- "name": "stop",
359
+ "name": "triggerLower",
360
+ "type": "uint256",
361
+ "internalType": "uint256"
362
+ },
363
+ {
364
+ "name": "triggerUpper",
274
365
  "type": "uint256",
275
366
  "internalType": "uint256"
276
367
  },
@@ -281,6 +372,11 @@
281
372
  }
282
373
  ]
283
374
  },
375
+ {
376
+ "name": "target",
377
+ "type": "address",
378
+ "internalType": "address"
379
+ },
284
380
  {
285
381
  "name": "data",
286
382
  "type": "bytes",
@@ -376,6 +472,11 @@
376
472
  "type": "uint256",
377
473
  "internalType": "uint256"
378
474
  },
475
+ {
476
+ "name": "start",
477
+ "type": "uint256",
478
+ "internalType": "uint256"
479
+ },
379
480
  {
380
481
  "name": "deadline",
381
482
  "type": "uint256",
@@ -444,7 +545,12 @@
444
545
  "internalType": "uint256"
445
546
  },
446
547
  {
447
- "name": "stop",
548
+ "name": "triggerLower",
549
+ "type": "uint256",
550
+ "internalType": "uint256"
551
+ },
552
+ {
553
+ "name": "triggerUpper",
448
554
  "type": "uint256",
449
555
  "internalType": "uint256"
450
556
  },
@@ -463,7 +569,78 @@
463
569
  "internalType": "bytes"
464
570
  },
465
571
  {
466
- "name": "cosignatureData",
572
+ "name": "trigger",
573
+ "type": "tuple",
574
+ "internalType": "struct Cosignature",
575
+ "components": [
576
+ {
577
+ "name": "cosigner",
578
+ "type": "address",
579
+ "internalType": "address"
580
+ },
581
+ {
582
+ "name": "reactor",
583
+ "type": "address",
584
+ "internalType": "address"
585
+ },
586
+ {
587
+ "name": "chainid",
588
+ "type": "uint256",
589
+ "internalType": "uint256"
590
+ },
591
+ {
592
+ "name": "timestamp",
593
+ "type": "uint256",
594
+ "internalType": "uint256"
595
+ },
596
+ {
597
+ "name": "input",
598
+ "type": "tuple",
599
+ "internalType": "struct CosignedValue",
600
+ "components": [
601
+ {
602
+ "name": "token",
603
+ "type": "address",
604
+ "internalType": "address"
605
+ },
606
+ {
607
+ "name": "value",
608
+ "type": "uint256",
609
+ "internalType": "uint256"
610
+ },
611
+ {
612
+ "name": "decimals",
613
+ "type": "uint8",
614
+ "internalType": "uint8"
615
+ }
616
+ ]
617
+ },
618
+ {
619
+ "name": "output",
620
+ "type": "tuple",
621
+ "internalType": "struct CosignedValue",
622
+ "components": [
623
+ {
624
+ "name": "token",
625
+ "type": "address",
626
+ "internalType": "address"
627
+ },
628
+ {
629
+ "name": "value",
630
+ "type": "uint256",
631
+ "internalType": "uint256"
632
+ },
633
+ {
634
+ "name": "decimals",
635
+ "type": "uint8",
636
+ "internalType": "uint8"
637
+ }
638
+ ]
639
+ }
640
+ ]
641
+ },
642
+ {
643
+ "name": "current",
467
644
  "type": "tuple",
468
645
  "internalType": "struct Cosignature",
469
646
  "components": [
@@ -534,7 +711,12 @@
534
711
  ]
535
712
  },
536
713
  {
537
- "name": "cosignature",
714
+ "name": "triggerCosignature",
715
+ "type": "bytes",
716
+ "internalType": "bytes"
717
+ },
718
+ {
719
+ "name": "currentCosignature",
538
720
  "type": "bytes",
539
721
  "internalType": "bytes"
540
722
  }
@@ -566,7 +748,12 @@
566
748
  "internalType": "uint256"
567
749
  },
568
750
  {
569
- "name": "stop",
751
+ "name": "triggerLower",
752
+ "type": "uint256",
753
+ "internalType": "uint256"
754
+ },
755
+ {
756
+ "name": "triggerUpper",
570
757
  "type": "uint256",
571
758
  "internalType": "uint256"
572
759
  },
@@ -577,6 +764,11 @@
577
764
  }
578
765
  ]
579
766
  },
767
+ {
768
+ "name": "target",
769
+ "type": "address",
770
+ "internalType": "address"
771
+ },
580
772
  {
581
773
  "name": "data",
582
774
  "type": "bytes",
@@ -751,11 +943,6 @@
751
943
  }
752
944
  ]
753
945
  },
754
- {
755
- "type": "error",
756
- "name": "InvalidOrder",
757
- "inputs": []
758
- },
759
946
  {
760
947
  "type": "error",
761
948
  "name": "InvalidSender",