@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
@@ -86,6 +86,11 @@
86
86
  "type": "uint256",
87
87
  "internalType": "uint256"
88
88
  },
89
+ {
90
+ "name": "start",
91
+ "type": "uint256",
92
+ "internalType": "uint256"
93
+ },
89
94
  {
90
95
  "name": "deadline",
91
96
  "type": "uint256",
@@ -154,7 +159,12 @@
154
159
  "internalType": "uint256"
155
160
  },
156
161
  {
157
- "name": "stop",
162
+ "name": "triggerLower",
163
+ "type": "uint256",
164
+ "internalType": "uint256"
165
+ },
166
+ {
167
+ "name": "triggerUpper",
158
168
  "type": "uint256",
159
169
  "internalType": "uint256"
160
170
  },
@@ -173,7 +183,78 @@
173
183
  "internalType": "bytes"
174
184
  },
175
185
  {
176
- "name": "cosignatureData",
186
+ "name": "trigger",
187
+ "type": "tuple",
188
+ "internalType": "struct Cosignature",
189
+ "components": [
190
+ {
191
+ "name": "cosigner",
192
+ "type": "address",
193
+ "internalType": "address"
194
+ },
195
+ {
196
+ "name": "reactor",
197
+ "type": "address",
198
+ "internalType": "address"
199
+ },
200
+ {
201
+ "name": "chainid",
202
+ "type": "uint256",
203
+ "internalType": "uint256"
204
+ },
205
+ {
206
+ "name": "timestamp",
207
+ "type": "uint256",
208
+ "internalType": "uint256"
209
+ },
210
+ {
211
+ "name": "input",
212
+ "type": "tuple",
213
+ "internalType": "struct CosignedValue",
214
+ "components": [
215
+ {
216
+ "name": "token",
217
+ "type": "address",
218
+ "internalType": "address"
219
+ },
220
+ {
221
+ "name": "value",
222
+ "type": "uint256",
223
+ "internalType": "uint256"
224
+ },
225
+ {
226
+ "name": "decimals",
227
+ "type": "uint8",
228
+ "internalType": "uint8"
229
+ }
230
+ ]
231
+ },
232
+ {
233
+ "name": "output",
234
+ "type": "tuple",
235
+ "internalType": "struct CosignedValue",
236
+ "components": [
237
+ {
238
+ "name": "token",
239
+ "type": "address",
240
+ "internalType": "address"
241
+ },
242
+ {
243
+ "name": "value",
244
+ "type": "uint256",
245
+ "internalType": "uint256"
246
+ },
247
+ {
248
+ "name": "decimals",
249
+ "type": "uint8",
250
+ "internalType": "uint8"
251
+ }
252
+ ]
253
+ }
254
+ ]
255
+ },
256
+ {
257
+ "name": "current",
177
258
  "type": "tuple",
178
259
  "internalType": "struct Cosignature",
179
260
  "components": [
@@ -244,7 +325,12 @@
244
325
  ]
245
326
  },
246
327
  {
247
- "name": "cosignature",
328
+ "name": "triggerCosignature",
329
+ "type": "bytes",
330
+ "internalType": "bytes"
331
+ },
332
+ {
333
+ "name": "currentCosignature",
248
334
  "type": "bytes",
249
335
  "internalType": "bytes"
250
336
  }
@@ -448,19 +534,6 @@
448
534
  ],
449
535
  "stateMutability": "view"
450
536
  },
451
- {
452
- "type": "function",
453
- "name": "outMax",
454
- "inputs": [],
455
- "outputs": [
456
- {
457
- "name": "",
458
- "type": "uint256",
459
- "internalType": "uint256"
460
- }
461
- ],
462
- "stateMutability": "view"
463
- },
464
537
  {
465
538
  "type": "function",
466
539
  "name": "outToken",
@@ -726,7 +799,12 @@
726
799
  "internalType": "uint256"
727
800
  },
728
801
  {
729
- "name": "maxOut",
802
+ "name": "lowerTrigger",
803
+ "type": "uint256",
804
+ "internalType": "uint256"
805
+ },
806
+ {
807
+ "name": "upperTrigger",
730
808
  "type": "uint256",
731
809
  "internalType": "uint256"
732
810
  },
@@ -765,6 +843,32 @@
765
843
  ],
766
844
  "stateMutability": "view"
767
845
  },
846
+ {
847
+ "type": "function",
848
+ "name": "triggerLower",
849
+ "inputs": [],
850
+ "outputs": [
851
+ {
852
+ "name": "",
853
+ "type": "uint256",
854
+ "internalType": "uint256"
855
+ }
856
+ ],
857
+ "stateMutability": "view"
858
+ },
859
+ {
860
+ "type": "function",
861
+ "name": "triggerUpper",
862
+ "inputs": [],
863
+ "outputs": [
864
+ {
865
+ "name": "",
866
+ "type": "uint256",
867
+ "internalType": "uint256"
868
+ }
869
+ ],
870
+ "stateMutability": "view"
871
+ },
768
872
  {
769
873
  "type": "function",
770
874
  "name": "wm",
@@ -1182,11 +1286,6 @@
1182
1286
  "name": "InvalidOrderInputTokenZero",
1183
1287
  "inputs": []
1184
1288
  },
1185
- {
1186
- "type": "error",
1187
- "name": "InvalidOrderOutputLimitGtStop",
1188
- "inputs": []
1189
- },
1190
1289
  {
1191
1290
  "type": "error",
1192
1291
  "name": "InvalidOrderOutputRecipientZero",
@@ -1212,9 +1311,24 @@
1212
1311
  "name": "InvalidOrderSlippageTooHigh",
1213
1312
  "inputs": []
1214
1313
  },
1314
+ {
1315
+ "type": "error",
1316
+ "name": "InvalidOrderStartInFuture",
1317
+ "inputs": []
1318
+ },
1319
+ {
1320
+ "type": "error",
1321
+ "name": "InvalidOrderStartZero",
1322
+ "inputs": []
1323
+ },
1215
1324
  {
1216
1325
  "type": "error",
1217
1326
  "name": "InvalidOrderSwapperZero",
1218
1327
  "inputs": []
1328
+ },
1329
+ {
1330
+ "type": "error",
1331
+ "name": "InvalidOrderTriggerRange",
1332
+ "inputs": []
1219
1333
  }
1220
1334
  ]