@orbs-network/spot 1.10.0 → 2.0.1

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 (103) hide show
  1. package/README.md +20 -13
  2. package/{script/input/config.json → config.json} +54 -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/06_DeployDefaultAdapter.s.sol/DeployDefaultAdapter.json +1 -1
  8. package/out/06_DeployDelegatingAdapter.s.sol/DeployDelegatingAdapter.json +1 -1
  9. package/out/06_DeployP2Adapter.s.sol/DeployP2Adapter.json +1 -1
  10. package/out/06_DeployParaswapAdapter.s.sol/DeployParaswapAdapter.json +1 -1
  11. package/out/06_DeployUniversalAdapter.s.sol/DeployUniversalAdapter.json +1 -1
  12. package/out/BaseTest.sol/BaseTest.abi.json +26 -13
  13. package/out/BaseTest.sol/BaseTest.json +1 -1
  14. package/out/CosignatureLib.sol/CosignatureLib.abi.json +10 -0
  15. package/out/CosignatureLib.sol/CosignatureLib.json +1 -1
  16. package/out/CosignatureLib.t.sol/CosignatureLibTest.abi.json +125 -16
  17. package/out/CosignatureLib.t.sol/CosignatureLibTest.json +1 -1
  18. package/out/Cosigner.sol/Cosigner.abi.json +12 -115
  19. package/out/Cosigner.sol/Cosigner.json +1 -1
  20. package/out/Cosigner.t.sol/CosignerTest.abi.json +30 -154
  21. package/out/Cosigner.t.sol/CosignerTest.json +1 -1
  22. package/out/Cosigner.t.sol/CosignerWrapper.abi.json +12 -115
  23. package/out/Cosigner.t.sol/CosignerWrapper.json +1 -1
  24. package/out/CosignerIntegration.t.sol/CosignerIntegrationTest.abi.json +49 -33
  25. package/out/CosignerIntegration.t.sol/CosignerIntegrationTest.json +1 -1
  26. package/out/DefaultDexAdapter.sol/DefaultDexAdapter.abi.json +105 -4
  27. package/out/DefaultDexAdapter.sol/DefaultDexAdapter.json +1 -1
  28. package/out/DefaultDexAdapter.t.sol/DefaultDexAdapterTest.abi.json +33 -13
  29. package/out/DefaultDexAdapter.t.sol/DefaultDexAdapterTest.json +1 -1
  30. package/out/DelegatingAdapter.sol/DelegatingAdapter.json +1 -1
  31. package/out/DelegatingAdapter.t.sol/DelegatingAdapterTest.json +1 -1
  32. package/out/DelegatingAdapter.t.sol/MockDelegateTarget.json +1 -1
  33. package/out/ExclusivityOverrideLib.t.sol/ExclusivityCaller.json +1 -1
  34. package/out/ExclusivityOverrideLib.t.sol/ExclusivityLibTest.abi.json +26 -13
  35. package/out/ExclusivityOverrideLib.t.sol/ExclusivityLibTest.json +1 -1
  36. package/out/Executor.sol/Executor.abi.json +200 -13
  37. package/out/Executor.sol/Executor.json +1 -1
  38. package/out/Executor.t.sol/ExecutorTest.abi.json +26 -13
  39. package/out/Executor.t.sol/ExecutorTest.json +1 -1
  40. package/out/ICommitteeSync.sol/ICommitteeSync.json +1 -1
  41. package/out/IExchangeAdapter.sol/IExchangeAdapter.abi.json +105 -4
  42. package/out/IExchangeAdapter.sol/IExchangeAdapter.json +1 -1
  43. package/out/IReactor.sol/IReactor.abi.json +100 -4
  44. package/out/IReactor.sol/IReactor.json +1 -1
  45. package/out/IReactorCallback.sol/IReactorCallback.abi.json +100 -4
  46. package/out/IReactorCallback.sol/IReactorCallback.json +1 -1
  47. package/out/IWrappedNative.sol/IWrappedNative.json +1 -1
  48. package/out/MockCommitteeSync.sol/MockCommitteeSync.json +1 -1
  49. package/out/MockReactor.sol/MockReactor.abi.json +200 -8
  50. package/out/MockReactor.sol/MockReactor.json +1 -1
  51. package/out/OrderLib.sol/OrderLib.json +1 -1
  52. package/out/OrderReactor.E2E.t.sol/OrderReactorE2ETest.abi.json +27 -14
  53. package/out/OrderReactor.E2E.t.sol/OrderReactorE2ETest.json +1 -1
  54. package/out/OrderReactor.sol/OrderReactor.abi.json +130 -14
  55. package/out/OrderReactor.sol/OrderReactor.json +1 -1
  56. package/out/OrderReactorPause.t.sol/OrderReactorPauseTest.abi.json +26 -13
  57. package/out/OrderReactorPause.t.sol/OrderReactorPauseTest.json +1 -1
  58. package/out/OrderReactorPause.t.sol/SimpleCallback.abi.json +100 -4
  59. package/out/OrderReactorPause.t.sol/SimpleCallback.json +1 -1
  60. package/out/OrderValidationLib.Fuzz.t.sol/OrderValidationLibFuzzTest.abi.json +136 -22
  61. package/out/OrderValidationLib.Fuzz.t.sol/OrderValidationLibFuzzTest.json +1 -1
  62. package/out/OrderValidationLib.sol/OrderValidationLib.abi.json +15 -5
  63. package/out/OrderValidationLib.sol/OrderValidationLib.json +1 -1
  64. package/out/OrderValidationLib.t.sol/OrderValidationLibTest.abi.json +160 -30
  65. package/out/OrderValidationLib.t.sol/OrderValidationLibTest.json +1 -1
  66. package/out/P2DexAdapter.sol/P2DexAdapter.abi.json +105 -4
  67. package/out/P2DexAdapter.sol/P2DexAdapter.json +1 -1
  68. package/out/P2DexAdapter.t.sol/P2DexAdapterTest.abi.json +33 -13
  69. package/out/P2DexAdapter.t.sol/P2DexAdapterTest.json +1 -1
  70. package/out/ParaswapDexAdapter.sol/ParaswapDexAdapter.abi.json +105 -4
  71. package/out/ParaswapDexAdapter.sol/ParaswapDexAdapter.json +1 -1
  72. package/out/ParaswapDexAdapter.t.sol/ParaswapDexAdapterTest.abi.json +33 -13
  73. package/out/ParaswapDexAdapter.t.sol/ParaswapDexAdapterTest.json +1 -1
  74. package/out/RePermit.t.sol/RePermitTest.abi.json +26 -13
  75. package/out/RePermit.t.sol/RePermitTest.json +1 -1
  76. package/out/Refinery.t.sol/PayableTarget.json +1 -1
  77. package/out/Refinery.t.sol/RefineryTest.abi.json +26 -13
  78. package/out/Refinery.t.sol/RefineryTest.json +1 -1
  79. package/out/ResolutionLib.Fuzz.t.sol/ResolutionLibFuzzTest.abi.json +122 -18
  80. package/out/ResolutionLib.Fuzz.t.sol/ResolutionLibFuzzTest.json +1 -1
  81. package/out/ResolutionLib.sol/ResolutionLib.abi.json +1 -1
  82. package/out/ResolutionLib.sol/ResolutionLib.json +1 -1
  83. package/out/ResolutionLib.t.sol/ResolutionLibTest.abi.json +133 -20
  84. package/out/ResolutionLib.t.sol/ResolutionLibTest.json +1 -1
  85. package/out/SettlementLib.sol/SettlementLib.json +1 -1
  86. package/out/SettlementLib.t.sol/SettlementLibTest.abi.json +26 -13
  87. package/out/SettlementLib.t.sol/SettlementLibTest.json +1 -1
  88. package/out/SettlementLib.t.sol/SettlementWrapper.abi.json +100 -4
  89. package/out/SettlementLib.t.sol/SettlementWrapper.json +1 -1
  90. package/out/Settler.sol/Settler.json +1 -1
  91. package/out/Settler.t.sol/SettlerTest.json +1 -1
  92. package/out/SwapAdapter.sol/SwapAdapterMock.abi.json +100 -9
  93. package/out/SwapAdapter.sol/SwapAdapterMock.json +1 -1
  94. package/out/UniversalAdapter.sol/UniversalAdapter.json +1 -1
  95. package/out/UniversalAdapter.t.sol/UniversalAdapterTest.json +1 -1
  96. package/out/WM.t.sol/WMTest.abi.json +26 -13
  97. package/out/WM.t.sol/WMTest.json +1 -1
  98. package/out/WrappedNativeMock.sol/WrappedNativeMock.json +1 -1
  99. package/out/build-info/{12dff9362aac7f9c.json → 4e40b5549a3a794d.json} +1 -1
  100. package/package.json +2 -1
  101. package/script/input/cosignature.skeleton.json +0 -1
  102. package/script/input/repermit.skeleton.json +12 -2
  103. package/script/input/order.json +0 -63
@@ -117,6 +117,11 @@
117
117
  "type": "uint256",
118
118
  "internalType": "uint256"
119
119
  },
120
+ {
121
+ "name": "start",
122
+ "type": "uint256",
123
+ "internalType": "uint256"
124
+ },
120
125
  {
121
126
  "name": "deadline",
122
127
  "type": "uint256",
@@ -185,7 +190,12 @@
185
190
  "internalType": "uint256"
186
191
  },
187
192
  {
188
- "name": "stop",
193
+ "name": "triggerLower",
194
+ "type": "uint256",
195
+ "internalType": "uint256"
196
+ },
197
+ {
198
+ "name": "triggerUpper",
189
199
  "type": "uint256",
190
200
  "internalType": "uint256"
191
201
  },
@@ -204,7 +214,78 @@
204
214
  "internalType": "bytes"
205
215
  },
206
216
  {
207
- "name": "cosignatureData",
217
+ "name": "trigger",
218
+ "type": "tuple",
219
+ "internalType": "struct Cosignature",
220
+ "components": [
221
+ {
222
+ "name": "cosigner",
223
+ "type": "address",
224
+ "internalType": "address"
225
+ },
226
+ {
227
+ "name": "reactor",
228
+ "type": "address",
229
+ "internalType": "address"
230
+ },
231
+ {
232
+ "name": "chainid",
233
+ "type": "uint256",
234
+ "internalType": "uint256"
235
+ },
236
+ {
237
+ "name": "timestamp",
238
+ "type": "uint256",
239
+ "internalType": "uint256"
240
+ },
241
+ {
242
+ "name": "input",
243
+ "type": "tuple",
244
+ "internalType": "struct CosignedValue",
245
+ "components": [
246
+ {
247
+ "name": "token",
248
+ "type": "address",
249
+ "internalType": "address"
250
+ },
251
+ {
252
+ "name": "value",
253
+ "type": "uint256",
254
+ "internalType": "uint256"
255
+ },
256
+ {
257
+ "name": "decimals",
258
+ "type": "uint8",
259
+ "internalType": "uint8"
260
+ }
261
+ ]
262
+ },
263
+ {
264
+ "name": "output",
265
+ "type": "tuple",
266
+ "internalType": "struct CosignedValue",
267
+ "components": [
268
+ {
269
+ "name": "token",
270
+ "type": "address",
271
+ "internalType": "address"
272
+ },
273
+ {
274
+ "name": "value",
275
+ "type": "uint256",
276
+ "internalType": "uint256"
277
+ },
278
+ {
279
+ "name": "decimals",
280
+ "type": "uint8",
281
+ "internalType": "uint8"
282
+ }
283
+ ]
284
+ }
285
+ ]
286
+ },
287
+ {
288
+ "name": "current",
208
289
  "type": "tuple",
209
290
  "internalType": "struct Cosignature",
210
291
  "components": [
@@ -275,7 +356,12 @@
275
356
  ]
276
357
  },
277
358
  {
278
- "name": "cosignature",
359
+ "name": "triggerCosignature",
360
+ "type": "bytes",
361
+ "internalType": "bytes"
362
+ },
363
+ {
364
+ "name": "currentCosignature",
279
365
  "type": "bytes",
280
366
  "internalType": "bytes"
281
367
  }
@@ -307,7 +393,12 @@
307
393
  "internalType": "uint256"
308
394
  },
309
395
  {
310
- "name": "stop",
396
+ "name": "triggerLower",
397
+ "type": "uint256",
398
+ "internalType": "uint256"
399
+ },
400
+ {
401
+ "name": "triggerUpper",
311
402
  "type": "uint256",
312
403
  "internalType": "uint256"
313
404
  },
@@ -318,6 +409,11 @@
318
409
  }
319
410
  ]
320
411
  },
412
+ {
413
+ "name": "target",
414
+ "type": "address",
415
+ "internalType": "address"
416
+ },
321
417
  {
322
418
  "name": "data",
323
419
  "type": "bytes",
@@ -439,11 +535,6 @@
439
535
  ],
440
536
  "anonymous": false
441
537
  },
442
- {
443
- "type": "error",
444
- "name": "CosignedExceedsStop",
445
- "inputs": []
446
- },
447
538
  {
448
539
  "type": "error",
449
540
  "name": "EnforcedPause",
@@ -575,11 +666,6 @@
575
666
  "name": "InvalidOrderInputTokenZero",
576
667
  "inputs": []
577
668
  },
578
- {
579
- "type": "error",
580
- "name": "InvalidOrderOutputLimitGtStop",
581
- "inputs": []
582
- },
583
669
  {
584
670
  "type": "error",
585
671
  "name": "InvalidOrderOutputRecipientZero",
@@ -605,11 +691,26 @@
605
691
  "name": "InvalidOrderSlippageTooHigh",
606
692
  "inputs": []
607
693
  },
694
+ {
695
+ "type": "error",
696
+ "name": "InvalidOrderStartInFuture",
697
+ "inputs": []
698
+ },
699
+ {
700
+ "type": "error",
701
+ "name": "InvalidOrderStartZero",
702
+ "inputs": []
703
+ },
608
704
  {
609
705
  "type": "error",
610
706
  "name": "InvalidOrderSwapperZero",
611
707
  "inputs": []
612
708
  },
709
+ {
710
+ "type": "error",
711
+ "name": "InvalidOrderTriggerRange",
712
+ "inputs": []
713
+ },
613
714
  {
614
715
  "type": "error",
615
716
  "name": "InvalidSender",
@@ -620,6 +721,11 @@
620
721
  "name": "NotAllowed",
621
722
  "inputs": []
622
723
  },
724
+ {
725
+ "type": "error",
726
+ "name": "NotTriggered",
727
+ "inputs": []
728
+ },
623
729
  {
624
730
  "type": "error",
625
731
  "name": "ReentrancyGuardReentrantCall",
@@ -640,5 +746,15 @@
640
746
  "type": "error",
641
747
  "name": "StaleCosignature",
642
748
  "inputs": []
749
+ },
750
+ {
751
+ "type": "error",
752
+ "name": "TriggerAfterCurrent",
753
+ "inputs": []
754
+ },
755
+ {
756
+ "type": "error",
757
+ "name": "TriggerBeforeStart",
758
+ "inputs": []
643
759
  }
644
760
  ]