@orbs-network/spot 2.12.1 → 2.13.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 (23) hide show
  1. package/config.json +5 -14
  2. package/out/CosignatureLib.t.sol/CosignatureLibTest.abi.json +14 -0
  3. package/out/Cosigner.t.sol/CosignerTest.abi.json +14 -0
  4. package/out/Cosigner.t.sol/RevertingCommitteeSync.abi.json +26 -0
  5. package/out/DynamicP2DexAdapter.t.sol/DynamicP2DexAdapterTest.abi.json +28 -0
  6. package/out/DynamicP2DexAdapter.t.sol/HookToken.abi.json +512 -0
  7. package/out/DynamicP2DexAdapter.t.sol/MsgSenderPermit2Router.abi.json +35 -0
  8. package/out/DynamicP2DexAdapter.t.sol/Permit2Target.abi.json +171 -0
  9. package/out/MockPermit2.sol/MockPermit2.abi.json +83 -0
  10. package/out/OrderReactor.E2E.t.sol/OrderReactorE2ETest.abi.json +14 -0
  11. package/out/OrderReactor.E2E.t.sol/ReentrantAdapter.abi.json +386 -0
  12. package/out/P2DexAdapter.t.sol/P2DexAdapterTest.abi.json +7 -0
  13. package/out/Settler.t.sol/SettlerTest.abi.json +14 -0
  14. package/package.json +1 -1
  15. package/out/Settler.t.sol/VmContractHelper143.abi.json +0 -233
  16. /package/out/DefaultDexAdapter.t.sol/{VmContractHelper118.abi.json → VmContractHelper119.abi.json} +0 -0
  17. /package/out/DynamicP2DexAdapter.t.sol/{VmContractHelper120.abi.json → VmContractHelper124.abi.json} +0 -0
  18. /package/out/{OrderReactorPause.t.sol → Executor.t.sol}/VmContractHelper129.abi.json +0 -0
  19. /package/out/{ParaswapDexAdapter.t.sol → OrderReactorPause.t.sol}/VmContractHelper134.abi.json +0 -0
  20. /package/out/{Executor.t.sol/VmContractHelper125.abi.json → P2DexAdapter.t.sol/VmContractHelper138.abi.json} +0 -0
  21. /package/out/{OrderReactor.E2E.t.sol/VmContractHelper128.abi.json → ParaswapDexAdapter.t.sol/VmContractHelper139.abi.json} +0 -0
  22. /package/out/{P2DexAdapter.t.sol/VmContractHelper133.abi.json → Refinery.t.sol/VmContractHelper142.abi.json} +0 -0
  23. /package/out/{Refinery.t.sol/VmContractHelper137.abi.json → Settler.t.sol/VmContractHelper148.abi.json} +0 -0
@@ -0,0 +1,171 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "doPartialSwap",
5
+ "inputs": [
6
+ {
7
+ "name": "tokenIn",
8
+ "type": "address",
9
+ "internalType": "address"
10
+ },
11
+ {
12
+ "name": "spentAmountIn",
13
+ "type": "uint256",
14
+ "internalType": "uint256"
15
+ },
16
+ {
17
+ "name": "tokenOut",
18
+ "type": "address",
19
+ "internalType": "address"
20
+ },
21
+ {
22
+ "name": "amountOut",
23
+ "type": "uint256",
24
+ "internalType": "uint256"
25
+ },
26
+ {
27
+ "name": "to",
28
+ "type": "address",
29
+ "internalType": "address"
30
+ }
31
+ ],
32
+ "outputs": [],
33
+ "stateMutability": "nonpayable"
34
+ },
35
+ {
36
+ "type": "function",
37
+ "name": "doSwap",
38
+ "inputs": [
39
+ {
40
+ "name": "tokenIn",
41
+ "type": "address",
42
+ "internalType": "address"
43
+ },
44
+ {
45
+ "name": "amountIn",
46
+ "type": "uint256",
47
+ "internalType": "uint256"
48
+ },
49
+ {
50
+ "name": "tokenOut",
51
+ "type": "address",
52
+ "internalType": "address"
53
+ },
54
+ {
55
+ "name": "amountOut",
56
+ "type": "uint256",
57
+ "internalType": "uint256"
58
+ },
59
+ {
60
+ "name": "to",
61
+ "type": "address",
62
+ "internalType": "address"
63
+ }
64
+ ],
65
+ "outputs": [],
66
+ "stateMutability": "nonpayable"
67
+ },
68
+ {
69
+ "type": "function",
70
+ "name": "pull",
71
+ "inputs": [
72
+ {
73
+ "name": "permit2",
74
+ "type": "address",
75
+ "internalType": "contract MockPermit2"
76
+ },
77
+ {
78
+ "name": "token",
79
+ "type": "address",
80
+ "internalType": "address"
81
+ },
82
+ {
83
+ "name": "from",
84
+ "type": "address",
85
+ "internalType": "address"
86
+ },
87
+ {
88
+ "name": "amount",
89
+ "type": "uint160",
90
+ "internalType": "uint160"
91
+ }
92
+ ],
93
+ "outputs": [],
94
+ "stateMutability": "nonpayable"
95
+ },
96
+ {
97
+ "type": "function",
98
+ "name": "setShouldFail",
99
+ "inputs": [
100
+ {
101
+ "name": "_shouldFail",
102
+ "type": "bool",
103
+ "internalType": "bool"
104
+ }
105
+ ],
106
+ "outputs": [],
107
+ "stateMutability": "nonpayable"
108
+ },
109
+ {
110
+ "type": "function",
111
+ "name": "shouldFail",
112
+ "inputs": [],
113
+ "outputs": [
114
+ {
115
+ "name": "",
116
+ "type": "bool",
117
+ "internalType": "bool"
118
+ }
119
+ ],
120
+ "stateMutability": "view"
121
+ },
122
+ {
123
+ "type": "function",
124
+ "name": "swapThroughPreviousTarget",
125
+ "inputs": [
126
+ {
127
+ "name": "previousTarget",
128
+ "type": "address",
129
+ "internalType": "contract Permit2Target"
130
+ },
131
+ {
132
+ "name": "permit2",
133
+ "type": "address",
134
+ "internalType": "contract MockPermit2"
135
+ },
136
+ {
137
+ "name": "tokenIn",
138
+ "type": "address",
139
+ "internalType": "address"
140
+ },
141
+ {
142
+ "name": "amount",
143
+ "type": "uint160",
144
+ "internalType": "uint160"
145
+ },
146
+ {
147
+ "name": "stolenAmount",
148
+ "type": "uint160",
149
+ "internalType": "uint160"
150
+ },
151
+ {
152
+ "name": "tokenOut",
153
+ "type": "address",
154
+ "internalType": "contract ERC20Mock"
155
+ }
156
+ ],
157
+ "outputs": [],
158
+ "stateMutability": "nonpayable"
159
+ },
160
+ {
161
+ "type": "error",
162
+ "name": "SafeERC20FailedOperation",
163
+ "inputs": [
164
+ {
165
+ "name": "token",
166
+ "type": "address",
167
+ "internalType": "address"
168
+ }
169
+ ]
170
+ }
171
+ ]
@@ -1,4 +1,48 @@
1
1
  [
2
+ {
3
+ "type": "function",
4
+ "name": "allowance",
5
+ "inputs": [
6
+ {
7
+ "name": "owner",
8
+ "type": "address",
9
+ "internalType": "address"
10
+ },
11
+ {
12
+ "name": "token",
13
+ "type": "address",
14
+ "internalType": "address"
15
+ },
16
+ {
17
+ "name": "spender",
18
+ "type": "address",
19
+ "internalType": "address"
20
+ }
21
+ ],
22
+ "outputs": [
23
+ {
24
+ "name": "token",
25
+ "type": "address",
26
+ "internalType": "address"
27
+ },
28
+ {
29
+ "name": "spender",
30
+ "type": "address",
31
+ "internalType": "address"
32
+ },
33
+ {
34
+ "name": "amount",
35
+ "type": "uint160",
36
+ "internalType": "uint160"
37
+ },
38
+ {
39
+ "name": "expiration",
40
+ "type": "uint48",
41
+ "internalType": "uint48"
42
+ }
43
+ ],
44
+ "stateMutability": "view"
45
+ },
2
46
  {
3
47
  "type": "function",
4
48
  "name": "approve",
@@ -67,5 +111,44 @@
67
111
  }
68
112
  ],
69
113
  "stateMutability": "view"
114
+ },
115
+ {
116
+ "type": "function",
117
+ "name": "transferFrom",
118
+ "inputs": [
119
+ {
120
+ "name": "from",
121
+ "type": "address",
122
+ "internalType": "address"
123
+ },
124
+ {
125
+ "name": "to",
126
+ "type": "address",
127
+ "internalType": "address"
128
+ },
129
+ {
130
+ "name": "amount",
131
+ "type": "uint160",
132
+ "internalType": "uint160"
133
+ },
134
+ {
135
+ "name": "token",
136
+ "type": "address",
137
+ "internalType": "address"
138
+ }
139
+ ],
140
+ "outputs": [],
141
+ "stateMutability": "nonpayable"
142
+ },
143
+ {
144
+ "type": "error",
145
+ "name": "SafeERC20FailedOperation",
146
+ "inputs": [
147
+ {
148
+ "name": "token",
149
+ "type": "address",
150
+ "internalType": "address"
151
+ }
152
+ ]
70
153
  }
71
154
  ]
@@ -552,6 +552,13 @@
552
552
  "outputs": [],
553
553
  "stateMutability": "nonpayable"
554
554
  },
555
+ {
556
+ "type": "function",
557
+ "name": "test_e2e_reentrancy_into_reactor_reverts",
558
+ "inputs": [],
559
+ "outputs": [],
560
+ "stateMutability": "nonpayable"
561
+ },
555
562
  {
556
563
  "type": "function",
557
564
  "name": "test_e2e_referral_surplus_distribution",
@@ -566,6 +573,13 @@
566
573
  "outputs": [],
567
574
  "stateMutability": "nonpayable"
568
575
  },
576
+ {
577
+ "type": "function",
578
+ "name": "test_e2e_single_fill_order_cannot_replay_even_with_remaining_permit_allowance",
579
+ "inputs": [],
580
+ "outputs": [],
581
+ "stateMutability": "nonpayable"
582
+ },
569
583
  {
570
584
  "type": "function",
571
585
  "name": "test_e2e_stop_loss_respects_max_output_trigger",
@@ -0,0 +1,386 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "delegateSwap",
5
+ "inputs": [
6
+ {
7
+ "name": "",
8
+ "type": "bytes32",
9
+ "internalType": "bytes32"
10
+ },
11
+ {
12
+ "name": "",
13
+ "type": "uint256",
14
+ "internalType": "uint256"
15
+ },
16
+ {
17
+ "name": "co",
18
+ "type": "tuple",
19
+ "internalType": "struct CosignedOrder",
20
+ "components": [
21
+ {
22
+ "name": "order",
23
+ "type": "tuple",
24
+ "internalType": "struct Order",
25
+ "components": [
26
+ {
27
+ "name": "reactor",
28
+ "type": "address",
29
+ "internalType": "address"
30
+ },
31
+ {
32
+ "name": "executor",
33
+ "type": "address",
34
+ "internalType": "address"
35
+ },
36
+ {
37
+ "name": "exchange",
38
+ "type": "tuple",
39
+ "internalType": "struct Exchange",
40
+ "components": [
41
+ {
42
+ "name": "adapter",
43
+ "type": "address",
44
+ "internalType": "address"
45
+ },
46
+ {
47
+ "name": "ref",
48
+ "type": "address",
49
+ "internalType": "address"
50
+ },
51
+ {
52
+ "name": "share",
53
+ "type": "uint32",
54
+ "internalType": "uint32"
55
+ },
56
+ {
57
+ "name": "data",
58
+ "type": "bytes",
59
+ "internalType": "bytes"
60
+ }
61
+ ]
62
+ },
63
+ {
64
+ "name": "swapper",
65
+ "type": "address",
66
+ "internalType": "address"
67
+ },
68
+ {
69
+ "name": "nonce",
70
+ "type": "uint256",
71
+ "internalType": "uint256"
72
+ },
73
+ {
74
+ "name": "start",
75
+ "type": "uint256",
76
+ "internalType": "uint256"
77
+ },
78
+ {
79
+ "name": "deadline",
80
+ "type": "uint256",
81
+ "internalType": "uint256"
82
+ },
83
+ {
84
+ "name": "chainid",
85
+ "type": "uint256",
86
+ "internalType": "uint256"
87
+ },
88
+ {
89
+ "name": "exclusivity",
90
+ "type": "uint32",
91
+ "internalType": "uint32"
92
+ },
93
+ {
94
+ "name": "epoch",
95
+ "type": "uint32",
96
+ "internalType": "uint32"
97
+ },
98
+ {
99
+ "name": "slippage",
100
+ "type": "uint32",
101
+ "internalType": "uint32"
102
+ },
103
+ {
104
+ "name": "freshness",
105
+ "type": "uint32",
106
+ "internalType": "uint32"
107
+ },
108
+ {
109
+ "name": "input",
110
+ "type": "tuple",
111
+ "internalType": "struct Input",
112
+ "components": [
113
+ {
114
+ "name": "token",
115
+ "type": "address",
116
+ "internalType": "address"
117
+ },
118
+ {
119
+ "name": "amount",
120
+ "type": "uint256",
121
+ "internalType": "uint256"
122
+ },
123
+ {
124
+ "name": "maxAmount",
125
+ "type": "uint256",
126
+ "internalType": "uint256"
127
+ }
128
+ ]
129
+ },
130
+ {
131
+ "name": "output",
132
+ "type": "tuple",
133
+ "internalType": "struct Output",
134
+ "components": [
135
+ {
136
+ "name": "token",
137
+ "type": "address",
138
+ "internalType": "address"
139
+ },
140
+ {
141
+ "name": "limit",
142
+ "type": "uint256",
143
+ "internalType": "uint256"
144
+ },
145
+ {
146
+ "name": "triggerLower",
147
+ "type": "uint256",
148
+ "internalType": "uint256"
149
+ },
150
+ {
151
+ "name": "triggerUpper",
152
+ "type": "uint256",
153
+ "internalType": "uint256"
154
+ },
155
+ {
156
+ "name": "recipient",
157
+ "type": "address",
158
+ "internalType": "address"
159
+ }
160
+ ]
161
+ }
162
+ ]
163
+ },
164
+ {
165
+ "name": "signature",
166
+ "type": "bytes",
167
+ "internalType": "bytes"
168
+ },
169
+ {
170
+ "name": "trigger",
171
+ "type": "tuple",
172
+ "internalType": "struct Cosignature",
173
+ "components": [
174
+ {
175
+ "name": "cosigner",
176
+ "type": "address",
177
+ "internalType": "address"
178
+ },
179
+ {
180
+ "name": "reactor",
181
+ "type": "address",
182
+ "internalType": "address"
183
+ },
184
+ {
185
+ "name": "chainid",
186
+ "type": "uint256",
187
+ "internalType": "uint256"
188
+ },
189
+ {
190
+ "name": "timestamp",
191
+ "type": "uint256",
192
+ "internalType": "uint256"
193
+ },
194
+ {
195
+ "name": "input",
196
+ "type": "tuple",
197
+ "internalType": "struct CosignedValue",
198
+ "components": [
199
+ {
200
+ "name": "token",
201
+ "type": "address",
202
+ "internalType": "address"
203
+ },
204
+ {
205
+ "name": "value",
206
+ "type": "uint256",
207
+ "internalType": "uint256"
208
+ },
209
+ {
210
+ "name": "decimals",
211
+ "type": "uint8",
212
+ "internalType": "uint8"
213
+ }
214
+ ]
215
+ },
216
+ {
217
+ "name": "output",
218
+ "type": "tuple",
219
+ "internalType": "struct CosignedValue",
220
+ "components": [
221
+ {
222
+ "name": "token",
223
+ "type": "address",
224
+ "internalType": "address"
225
+ },
226
+ {
227
+ "name": "value",
228
+ "type": "uint256",
229
+ "internalType": "uint256"
230
+ },
231
+ {
232
+ "name": "decimals",
233
+ "type": "uint8",
234
+ "internalType": "uint8"
235
+ }
236
+ ]
237
+ }
238
+ ]
239
+ },
240
+ {
241
+ "name": "current",
242
+ "type": "tuple",
243
+ "internalType": "struct Cosignature",
244
+ "components": [
245
+ {
246
+ "name": "cosigner",
247
+ "type": "address",
248
+ "internalType": "address"
249
+ },
250
+ {
251
+ "name": "reactor",
252
+ "type": "address",
253
+ "internalType": "address"
254
+ },
255
+ {
256
+ "name": "chainid",
257
+ "type": "uint256",
258
+ "internalType": "uint256"
259
+ },
260
+ {
261
+ "name": "timestamp",
262
+ "type": "uint256",
263
+ "internalType": "uint256"
264
+ },
265
+ {
266
+ "name": "input",
267
+ "type": "tuple",
268
+ "internalType": "struct CosignedValue",
269
+ "components": [
270
+ {
271
+ "name": "token",
272
+ "type": "address",
273
+ "internalType": "address"
274
+ },
275
+ {
276
+ "name": "value",
277
+ "type": "uint256",
278
+ "internalType": "uint256"
279
+ },
280
+ {
281
+ "name": "decimals",
282
+ "type": "uint8",
283
+ "internalType": "uint8"
284
+ }
285
+ ]
286
+ },
287
+ {
288
+ "name": "output",
289
+ "type": "tuple",
290
+ "internalType": "struct CosignedValue",
291
+ "components": [
292
+ {
293
+ "name": "token",
294
+ "type": "address",
295
+ "internalType": "address"
296
+ },
297
+ {
298
+ "name": "value",
299
+ "type": "uint256",
300
+ "internalType": "uint256"
301
+ },
302
+ {
303
+ "name": "decimals",
304
+ "type": "uint8",
305
+ "internalType": "uint8"
306
+ }
307
+ ]
308
+ }
309
+ ]
310
+ },
311
+ {
312
+ "name": "triggerCosignature",
313
+ "type": "bytes",
314
+ "internalType": "bytes"
315
+ },
316
+ {
317
+ "name": "currentCosignature",
318
+ "type": "bytes",
319
+ "internalType": "bytes"
320
+ }
321
+ ]
322
+ },
323
+ {
324
+ "name": "x",
325
+ "type": "tuple",
326
+ "internalType": "struct Execution",
327
+ "components": [
328
+ {
329
+ "name": "minAmountOut",
330
+ "type": "uint256",
331
+ "internalType": "uint256"
332
+ },
333
+ {
334
+ "name": "fees",
335
+ "type": "tuple[]",
336
+ "internalType": "struct Output[]",
337
+ "components": [
338
+ {
339
+ "name": "token",
340
+ "type": "address",
341
+ "internalType": "address"
342
+ },
343
+ {
344
+ "name": "limit",
345
+ "type": "uint256",
346
+ "internalType": "uint256"
347
+ },
348
+ {
349
+ "name": "triggerLower",
350
+ "type": "uint256",
351
+ "internalType": "uint256"
352
+ },
353
+ {
354
+ "name": "triggerUpper",
355
+ "type": "uint256",
356
+ "internalType": "uint256"
357
+ },
358
+ {
359
+ "name": "recipient",
360
+ "type": "address",
361
+ "internalType": "address"
362
+ }
363
+ ]
364
+ },
365
+ {
366
+ "name": "target",
367
+ "type": "address",
368
+ "internalType": "address"
369
+ },
370
+ {
371
+ "name": "data",
372
+ "type": "bytes",
373
+ "internalType": "bytes"
374
+ }
375
+ ]
376
+ }
377
+ ],
378
+ "outputs": [],
379
+ "stateMutability": "nonpayable"
380
+ },
381
+ {
382
+ "type": "error",
383
+ "name": "InvalidTarget",
384
+ "inputs": []
385
+ }
386
+ ]
@@ -483,6 +483,13 @@
483
483
  ],
484
484
  "stateMutability": "view"
485
485
  },
486
+ {
487
+ "type": "function",
488
+ "name": "test_executor_blocks_arbitrary_input_token_target_surplus_capture",
489
+ "inputs": [],
490
+ "outputs": [],
491
+ "stateMutability": "nonpayable"
492
+ },
486
493
  {
487
494
  "type": "function",
488
495
  "name": "test_swap_ERC20_to_ERC20_success",