@orbs-network/spot 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/README.md +25 -22
  2. package/index.js +16 -0
  3. package/out/00_DeployWM.s.sol/DeployWM.abi.json +0 -7
  4. package/out/00_DeployWM.s.sol/DeployWM.json +1 -1
  5. package/out/01_UpdateWMWhitelist.s.sol/UpdateWMWhitelist.abi.json +0 -7
  6. package/out/01_UpdateWMWhitelist.s.sol/UpdateWMWhitelist.json +1 -1
  7. package/out/02_DeployRepermit.s.sol/DeployRepermit.abi.json +0 -7
  8. package/out/02_DeployRepermit.s.sol/DeployRepermit.json +1 -1
  9. package/out/03_DeployReactor.s.sol/DeployReactor.abi.json +0 -7
  10. package/out/03_DeployReactor.s.sol/DeployReactor.json +1 -1
  11. package/out/04_DeployExecutor.s.sol/DeployExecutor.abi.json +0 -7
  12. package/out/04_DeployExecutor.s.sol/DeployExecutor.json +1 -1
  13. package/out/05_DeployDefaultExchange.s.sol/DeployDefaultExchange.abi.json +0 -7
  14. package/out/05_DeployDefaultExchange.s.sol/DeployDefaultExchange.json +1 -1
  15. package/out/06_DeployRefinery.s.sol/DeployRefinery.abi.json +0 -7
  16. package/out/06_DeployRefinery.s.sol/DeployRefinery.json +1 -1
  17. package/out/{BaseScript.sol/BaseScript.abi.json → 07_CheckOrderSignature.s.sol/CheckOrderSignature.abi.json} +13 -2
  18. package/out/07_CheckOrderSignature.s.sol/CheckOrderSignature.json +1 -0
  19. package/out/Address.sol/Address.abi.json +13 -1
  20. package/out/Address.sol/Address.json +1 -1
  21. package/out/Base.sol/CommonBase.json +1 -1
  22. package/out/Base.sol/ScriptBase.json +1 -1
  23. package/out/Base.sol/TestBase.json +1 -1
  24. package/out/BaseTest.sol/BaseTest.abi.json +0 -13
  25. package/out/BaseTest.sol/BaseTest.json +1 -1
  26. package/out/Bytes.sol/Bytes.abi.json +1 -0
  27. package/out/Bytes.sol/Bytes.json +1 -0
  28. package/out/Constants.sol/Constants.json +1 -1
  29. package/out/Context.sol/Context.json +1 -1
  30. package/out/CosignatureLib.sol/CosignatureLib.json +1 -1
  31. package/out/CosignatureLib.t.sol/CosignatureLibTest.abi.json +9 -15
  32. package/out/CosignatureLib.t.sol/CosignatureLibTest.json +1 -1
  33. package/out/DefaultDexAdapter.sol/DefaultDexAdapter.abi.json +47 -4
  34. package/out/DefaultDexAdapter.sol/DefaultDexAdapter.json +1 -1
  35. package/out/DefaultDexAdapter.t.sol/DefaultDexAdapterTest.abi.json +0 -13
  36. package/out/DefaultDexAdapter.t.sol/DefaultDexAdapterTest.json +1 -1
  37. package/out/ECDSA.sol/ECDSA.abi.json +29 -1
  38. package/out/ECDSA.sol/ECDSA.json +1 -1
  39. package/out/EIP712.sol/EIP712.json +1 -1
  40. package/out/ERC20.sol/ERC20.abi.json +89 -67
  41. package/out/ERC20.sol/ERC20.json +1 -1
  42. package/out/ERC20Mock.sol/ERC20Mock.abi.json +89 -51
  43. package/out/ERC20Mock.sol/ERC20Mock.json +1 -1
  44. package/out/EpochLib.sol/EpochLib.json +1 -1
  45. package/out/EpochLib.t.sol/EpochLibTest.abi.json +31 -0
  46. package/out/EpochLib.t.sol/EpochLibTest.json +1 -1
  47. package/out/Errors.sol/Errors.abi.json +39 -0
  48. package/out/Errors.sol/Errors.json +1 -0
  49. package/out/ExclusivityOverrideLib.sol/ExclusivityOverrideLib.json +1 -1
  50. package/out/ExclusivityOverrideLib.t.sol/ExclusivityCaller.json +1 -1
  51. package/out/ExclusivityOverrideLib.t.sol/ExclusivityLibTest.abi.json +0 -13
  52. package/out/ExclusivityOverrideLib.t.sol/ExclusivityLibTest.json +1 -1
  53. package/out/Executor.sol/Executor.abi.json +69 -21
  54. package/out/Executor.sol/Executor.json +1 -1
  55. package/out/Executor.t.sol/ExecutorTest.abi.json +0 -13
  56. package/out/Executor.t.sol/ExecutorTest.json +1 -1
  57. package/out/IEIP712.sol/IEIP712.json +1 -1
  58. package/out/IERC1271.sol/IERC1271.json +1 -1
  59. package/out/IERC1363.sol/IERC1363.abi.json +373 -0
  60. package/out/IERC1363.sol/IERC1363.json +1 -0
  61. package/out/IERC165.sol/IERC165.abi.json +21 -0
  62. package/out/IERC165.sol/IERC165.json +1 -0
  63. package/out/IERC20.sol/IERC20.abi.json +3 -3
  64. package/out/IERC20.sol/IERC20.json +1 -1
  65. package/out/IERC20Metadata.sol/IERC20Metadata.abi.json +3 -3
  66. package/out/IERC20Metadata.sol/IERC20Metadata.json +1 -1
  67. package/out/IERC5267.sol/IERC5267.json +1 -1
  68. package/out/IERC7913.sol/IERC7913SignatureVerifier.abi.json +31 -0
  69. package/out/IERC7913.sol/IERC7913SignatureVerifier.json +1 -0
  70. package/out/IExchangeAdapter.sol/IExchangeAdapter.abi.json +4 -4
  71. package/out/IExchangeAdapter.sol/IExchangeAdapter.json +1 -1
  72. package/out/IMulticall3.sol/IMulticall3.json +1 -1
  73. package/out/IReactor.sol/IReactor.abi.json +4 -4
  74. package/out/IReactor.sol/IReactor.json +1 -1
  75. package/out/IReactorCallback.sol/IReactorCallback.abi.json +4 -4
  76. package/out/IReactorCallback.sol/IReactorCallback.json +1 -1
  77. package/out/IWM.sol/IWM.json +1 -1
  78. package/out/LowLevelCall.sol/LowLevelCall.abi.json +1 -0
  79. package/out/LowLevelCall.sol/LowLevelCall.json +1 -0
  80. package/out/Math.sol/Math.json +1 -1
  81. package/out/MessageHashUtils.sol/MessageHashUtils.abi.json +1 -0
  82. package/out/MessageHashUtils.sol/MessageHashUtils.json +1 -0
  83. package/out/MockDexRouter.sol/MockDexRouter.json +1 -1
  84. package/out/MockReactor.sol/MockReactor.abi.json +8 -8
  85. package/out/MockReactor.sol/MockReactor.json +1 -1
  86. package/out/Multicall3Lib.sol/Multicall3Lib.json +1 -1
  87. package/out/OrderLib.sol/OrderLib.json +1 -1
  88. package/out/OrderReactor.E2E.t.sol/OrderReactorE2ETest.abi.json +0 -13
  89. package/out/OrderReactor.E2E.t.sol/OrderReactorE2ETest.json +1 -1
  90. package/out/OrderReactor.sol/OrderReactor.abi.json +134 -6
  91. package/out/OrderReactor.sol/OrderReactor.json +1 -1
  92. package/out/OrderReactorPause.t.sol/OrderReactorPauseTest.abi.json +937 -0
  93. package/out/OrderReactorPause.t.sol/OrderReactorPauseTest.json +1 -0
  94. package/out/OrderReactorPause.t.sol/SimpleCallback.abi.json +285 -0
  95. package/out/OrderReactorPause.t.sol/SimpleCallback.json +1 -0
  96. package/out/OrderValidationLib.Fuzz.t.sol/OrderValidationLibFuzzTest.abi.json +8 -16
  97. package/out/OrderValidationLib.Fuzz.t.sol/OrderValidationLibFuzzTest.json +1 -1
  98. package/out/OrderValidationLib.sol/OrderValidationLib.abi.json +6 -1
  99. package/out/OrderValidationLib.sol/OrderValidationLib.json +1 -1
  100. package/out/OrderValidationLib.t.sol/OrderValidationLibTest.abi.json +29 -16
  101. package/out/OrderValidationLib.t.sol/OrderValidationLibTest.json +1 -1
  102. package/out/Ownable.sol/Ownable.abi.json +22 -0
  103. package/out/Ownable.sol/Ownable.json +1 -1
  104. package/out/Ownable2Step.sol/Ownable2Step.abi.json +22 -0
  105. package/out/Ownable2Step.sol/Ownable2Step.json +1 -1
  106. package/out/Panic.sol/Panic.abi.json +1 -0
  107. package/out/Panic.sol/Panic.json +1 -0
  108. package/out/Pausable.sol/Pausable.abi.json +51 -0
  109. package/out/Pausable.sol/Pausable.json +1 -0
  110. package/out/RePermit.sol/RePermit.abi.json +11 -0
  111. package/out/RePermit.sol/RePermit.json +1 -1
  112. package/out/RePermit.t.sol/RePermitTest.abi.json +0 -13
  113. package/out/RePermit.t.sol/RePermitTest.json +1 -1
  114. package/out/RePermitLib.sol/RePermitLib.json +1 -1
  115. package/out/ReentrancyGuard.sol/ReentrancyGuard.abi.json +7 -1
  116. package/out/ReentrancyGuard.sol/ReentrancyGuard.json +1 -1
  117. package/out/Refinery.sol/Refinery.abi.json +32 -0
  118. package/out/Refinery.sol/Refinery.json +1 -1
  119. package/out/Refinery.t.sol/RefineryTest.abi.json +0 -13
  120. package/out/Refinery.t.sol/RefineryTest.json +1 -1
  121. package/out/ResolutionLib.Fuzz.t.sol/ResolutionLibFuzzTest.abi.json +3 -16
  122. package/out/ResolutionLib.Fuzz.t.sol/ResolutionLibFuzzTest.json +1 -1
  123. package/out/ResolutionLib.sol/ResolutionLib.abi.json +1 -1
  124. package/out/ResolutionLib.sol/ResolutionLib.json +1 -1
  125. package/out/ResolutionLib.t.sol/ResolutionLibTest.abi.json +3 -16
  126. package/out/ResolutionLib.t.sol/ResolutionLibTest.json +1 -1
  127. package/out/SafeCast.sol/SafeCast.abi.json +56 -0
  128. package/out/SafeCast.sol/SafeCast.json +1 -0
  129. package/out/SafeERC20.sol/SafeERC20.abi.json +34 -1
  130. package/out/SafeERC20.sol/SafeERC20.json +1 -1
  131. package/out/Script.sol/Script.json +1 -1
  132. package/out/SettlementLib.sol/SettlementLib.json +1 -1
  133. package/out/SettlementLib.t.sol/SettlementLibTest.abi.json +0 -13
  134. package/out/SettlementLib.t.sol/SettlementLibTest.json +1 -1
  135. package/out/SettlementLib.t.sol/SettlementWrapper.abi.json +36 -4
  136. package/out/SettlementLib.t.sol/SettlementWrapper.json +1 -1
  137. package/out/ShortStrings.sol/ShortStrings.json +1 -1
  138. package/out/SignatureChecker.sol/SignatureChecker.json +1 -1
  139. package/out/SignedMath.sol/SignedMath.json +1 -1
  140. package/out/StdAssertions.sol/StdAssertions.json +1 -1
  141. package/out/StdChains.sol/StdChains.json +1 -1
  142. package/out/StdCheats.sol/StdCheats.json +1 -1
  143. package/out/StdCheats.sol/StdCheatsSafe.json +1 -1
  144. package/out/StdConstants.sol/StdConstants.json +1 -1
  145. package/out/StdError.sol/stdError.json +1 -1
  146. package/out/StdInvariant.sol/StdInvariant.json +1 -1
  147. package/out/StdJson.sol/stdJson.json +1 -1
  148. package/out/StdMath.sol/stdMath.json +1 -1
  149. package/out/StdStorage.sol/stdStorage.json +1 -1
  150. package/out/StdStorage.sol/stdStorageSafe.json +1 -1
  151. package/out/StdStyle.sol/StdStyle.json +1 -1
  152. package/out/StdToml.sol/stdToml.json +1 -1
  153. package/out/StdUtils.sol/StdUtils.json +1 -1
  154. package/out/StorageSlot.sol/StorageSlot.json +1 -1
  155. package/out/Strings.sol/Strings.abi.json +28 -1
  156. package/out/Strings.sol/Strings.json +1 -1
  157. package/out/SurplusLib.sol/SurplusLib.json +1 -1
  158. package/out/SurplusLib.t.sol/SurplusHarness.abi.json +99 -0
  159. package/out/SurplusLib.t.sol/SurplusHarness.json +1 -0
  160. package/out/SurplusLib.t.sol/SurplusLibTest.abi.json +649 -0
  161. package/out/SurplusLib.t.sol/SurplusLibTest.json +1 -0
  162. package/out/SwapAdapter.sol/SwapAdapterMock.abi.json +4 -4
  163. package/out/SwapAdapter.sol/SwapAdapterMock.json +1 -1
  164. package/out/Test.sol/Test.json +1 -1
  165. package/out/TokenLib.sol/TokenLib.json +1 -1
  166. package/out/USDTMock.sol/USDTMock.abi.json +88 -50
  167. package/out/USDTMock.sol/USDTMock.json +1 -1
  168. package/out/Vm.sol/Vm.json +1 -1
  169. package/out/Vm.sol/VmSafe.json +1 -1
  170. package/out/WM.sol/WM.abi.json +22 -0
  171. package/out/WM.sol/WM.json +1 -1
  172. package/out/WM.t.sol/WMTest.abi.json +0 -13
  173. package/out/WM.t.sol/WMTest.json +1 -1
  174. package/out/WMAllowed.sol/WMAllowed.abi.json +20 -0
  175. package/out/WMAllowed.sol/WMAllowed.json +1 -0
  176. package/out/build-info/037112f63429c300b44e96328184f05a.json +1 -0
  177. package/out/build-info/16de2dd5b443b11d72d219dfcd1709b9.json +1 -0
  178. package/out/build-info/50bc67b585dbea6ac87fe65f446e0ec8.json +1 -0
  179. package/out/build-info/59250f5d4903fd400804c8dcf9731df6.json +1 -0
  180. package/out/build-info/9c92abef5721c2db19a5f93602da1109.json +1 -0
  181. package/out/build-info/dc9b337f3ebd0040efbc89ac5318ff6e.json +1 -0
  182. package/out/build-info/e3089fca92b0a40eb41a6add475e1864.json +1 -0
  183. package/out/build-info/f3a0be9d4dbd4ae836db0c7e923178fd.json +1 -0
  184. package/out/build-info/ffa3efad6bfcb2b770c05c8e61943032.json +1 -0
  185. package/out/console.sol/console.json +1 -1
  186. package/out/draft-IERC6093.sol/IERC1155Errors.abi.json +104 -0
  187. package/out/draft-IERC6093.sol/IERC1155Errors.json +1 -0
  188. package/out/draft-IERC6093.sol/IERC20Errors.abi.json +88 -0
  189. package/out/draft-IERC6093.sol/IERC20Errors.json +1 -0
  190. package/out/draft-IERC6093.sol/IERC721Errors.abi.json +105 -0
  191. package/out/draft-IERC6093.sol/IERC721Errors.json +1 -0
  192. package/out/safeconsole.sol/safeconsole.json +1 -1
  193. package/package.json +6 -4
  194. package/script/input/config.json +8 -8
  195. package/script/input/order.json +61 -0
  196. package/script/input/repermit.skeleton.json +4 -4
  197. package/out/BaseScript.sol/BaseScript.json +0 -1
  198. package/out/IERC20Permit.sol/IERC20Permit.abi.json +0 -77
  199. package/out/IERC20Permit.sol/IERC20Permit.json +0 -1
  200. package/out/build-info/363db87197fc9814c7bfdf743fe3f032.json +0 -1
  201. package/out/build-info/58edb1e201d69cafa30a8647665617e6.json +0 -1
  202. package/out/build-info/73bd7c3e9ec8bc61cee51a6d313820a9.json +0 -1
  203. package/out/build-info/77f38a2f64e07d9cd0b3e2102d7863fd.json +0 -1
  204. package/out/build-info/c14311d7870724b723128a4d397b0f4c.json +0 -1
@@ -11,6 +11,11 @@
11
11
  "name": "_cosigner",
12
12
  "type": "address",
13
13
  "internalType": "address"
14
+ },
15
+ {
16
+ "name": "_wm",
17
+ "type": "address",
18
+ "internalType": "address"
14
19
  }
15
20
  ],
16
21
  "stateMutability": "nonpayable"
@@ -175,12 +180,12 @@
175
180
  "internalType": "address"
176
181
  },
177
182
  {
178
- "name": "amount",
183
+ "name": "limit",
179
184
  "type": "uint256",
180
185
  "internalType": "uint256"
181
186
  },
182
187
  {
183
- "name": "maxAmount",
188
+ "name": "stop",
184
189
  "type": "uint256",
185
190
  "internalType": "uint256"
186
191
  },
@@ -297,12 +302,12 @@
297
302
  "internalType": "address"
298
303
  },
299
304
  {
300
- "name": "amount",
305
+ "name": "limit",
301
306
  "type": "uint256",
302
307
  "internalType": "uint256"
303
308
  },
304
309
  {
305
- "name": "maxAmount",
310
+ "name": "stop",
306
311
  "type": "uint256",
307
312
  "internalType": "uint256"
308
313
  },
@@ -324,6 +329,26 @@
324
329
  "outputs": [],
325
330
  "stateMutability": "payable"
326
331
  },
332
+ {
333
+ "type": "function",
334
+ "name": "pause",
335
+ "inputs": [],
336
+ "outputs": [],
337
+ "stateMutability": "nonpayable"
338
+ },
339
+ {
340
+ "type": "function",
341
+ "name": "paused",
342
+ "inputs": [],
343
+ "outputs": [
344
+ {
345
+ "name": "",
346
+ "type": "bool",
347
+ "internalType": "bool"
348
+ }
349
+ ],
350
+ "stateMutability": "view"
351
+ },
327
352
  {
328
353
  "type": "function",
329
354
  "name": "repermit",
@@ -337,6 +362,26 @@
337
362
  ],
338
363
  "stateMutability": "view"
339
364
  },
365
+ {
366
+ "type": "function",
367
+ "name": "unpause",
368
+ "inputs": [],
369
+ "outputs": [],
370
+ "stateMutability": "nonpayable"
371
+ },
372
+ {
373
+ "type": "function",
374
+ "name": "wm",
375
+ "inputs": [],
376
+ "outputs": [
377
+ {
378
+ "name": "",
379
+ "type": "address",
380
+ "internalType": "address"
381
+ }
382
+ ],
383
+ "stateMutability": "view"
384
+ },
340
385
  {
341
386
  "type": "event",
342
387
  "name": "Fill",
@@ -368,9 +413,50 @@
368
413
  ],
369
414
  "anonymous": false
370
415
  },
416
+ {
417
+ "type": "event",
418
+ "name": "Paused",
419
+ "inputs": [
420
+ {
421
+ "name": "account",
422
+ "type": "address",
423
+ "indexed": false,
424
+ "internalType": "address"
425
+ }
426
+ ],
427
+ "anonymous": false
428
+ },
429
+ {
430
+ "type": "event",
431
+ "name": "Unpaused",
432
+ "inputs": [
433
+ {
434
+ "name": "account",
435
+ "type": "address",
436
+ "indexed": false,
437
+ "internalType": "address"
438
+ }
439
+ ],
440
+ "anonymous": false
441
+ },
371
442
  {
372
443
  "type": "error",
373
- "name": "CosignedMaxAmount",
444
+ "name": "CosignedExceedsStop",
445
+ "inputs": []
446
+ },
447
+ {
448
+ "type": "error",
449
+ "name": "EnforcedPause",
450
+ "inputs": []
451
+ },
452
+ {
453
+ "type": "error",
454
+ "name": "ExpectedPause",
455
+ "inputs": []
456
+ },
457
+ {
458
+ "type": "error",
459
+ "name": "FailedCall",
374
460
  "inputs": []
375
461
  },
376
462
  {
@@ -378,6 +464,22 @@
378
464
  "name": "FutureCosignatureTimestamp",
379
465
  "inputs": []
380
466
  },
467
+ {
468
+ "type": "error",
469
+ "name": "InsufficientBalance",
470
+ "inputs": [
471
+ {
472
+ "name": "balance",
473
+ "type": "uint256",
474
+ "internalType": "uint256"
475
+ },
476
+ {
477
+ "name": "needed",
478
+ "type": "uint256",
479
+ "internalType": "uint256"
480
+ }
481
+ ]
482
+ },
381
483
  {
382
484
  "type": "error",
383
485
  "name": "InvalidCosignature",
@@ -475,7 +577,7 @@
475
577
  },
476
578
  {
477
579
  "type": "error",
478
- "name": "InvalidOrderOutputAmountGtMax",
580
+ "name": "InvalidOrderOutputLimitGtStop",
479
581
  "inputs": []
480
582
  },
481
583
  {
@@ -493,6 +595,11 @@
493
595
  "name": "InvalidOrderReactorZero",
494
596
  "inputs": []
495
597
  },
598
+ {
599
+ "type": "error",
600
+ "name": "InvalidOrderSameToken",
601
+ "inputs": []
602
+ },
496
603
  {
497
604
  "type": "error",
498
605
  "name": "InvalidOrderSlippageTooHigh",
@@ -508,6 +615,27 @@
508
615
  "name": "InvalidSender",
509
616
  "inputs": []
510
617
  },
618
+ {
619
+ "type": "error",
620
+ "name": "NotAllowed",
621
+ "inputs": []
622
+ },
623
+ {
624
+ "type": "error",
625
+ "name": "ReentrancyGuardReentrantCall",
626
+ "inputs": []
627
+ },
628
+ {
629
+ "type": "error",
630
+ "name": "SafeERC20FailedOperation",
631
+ "inputs": [
632
+ {
633
+ "name": "token",
634
+ "type": "address",
635
+ "internalType": "address"
636
+ }
637
+ ]
638
+ },
511
639
  {
512
640
  "type": "error",
513
641
  "name": "StaleCosignature",