Commit Graph

168 Commits

Author SHA1 Message Date
royvardhan
b2097ca4a5 feat: handle amounts in unlockCallback 2025-02-13 00:25:25 +05:30
royvardhan
ed90cb4ef1 feat: add callback 2025-02-13 00:25:25 +05:30
royvardhan
cb4c8f4e51 feat: add univ4 executor 2025-02-13 00:25:25 +05:30
Diana Carvalho
582533fa31 fix: Miscellaneous audit remarks
- Move pause functions together
- Add missing zero checks
- Use openzepplin's sendValues instead of transfer

--- don't change below this line ---
ENG-4226 Took 25 minutes


Took 2 minutes
2025-02-11 16:35:26 +00:00
TAMARA LIPOWSKI
37efe52c10 fix: (TychoRouter) Revert if empty swaps
- This is for security purposes. Max uncovered a vulnerability where funds could be stolen if we don't ether the while loop (i.e. if we have empty swaps).
2025-02-10 23:49:01 -05:00
Tamara
e8f22a2eee Merge branch 'main' into encoding/tnl/fix-wrapping-indices 2025-02-04 11:47:58 -05:00
Tamara
9980170fe5 Merge branch 'main' into encoding/tnl/fix-wrapping-indices 2025-02-04 10:35:53 -05:00
royvardhan
e6310d65d1 fix: executor test naming 2025-02-04 20:56:21 +05:30
royvardhan
6333072178 feat: add swap encoder test in balancer v2 executor 2025-02-04 19:56:52 +05:30
TAMARA LIPOWSKI
3f4e27a348 fix: Fix bug with token indexing when wrapping/unwrapping
The issue was that we weren't indexing WETH properly since it was looking for the WETH address in tokens, when only native ETH would be in there

- Found by adding integration tests for the wrapping and unwrapping cases.
2025-02-03 22:46:20 -05:00
Diana Carvalho
2aa1df9b0d chore: Move methods around and improve docstrings
--- don't change below this line ---
ENG-4087 Took 30 seconds


Took 5 seconds
2025-02-03 16:52:31 +00:00
Diana Carvalho
0860d67d7a feat: Verify that no amount in is left in the router
--- don't change below this line ---
ENG-4087 Took 1 hour 41 minutes


Took 2 minutes
2025-02-03 16:52:26 +00:00
Tamara
c5e40f2933 Merge branch 'main' into router/dc/return-eth 2025-01-31 12:17:30 -05:00
TAMARA LIPOWSKI
faacd3f25c fix: Accidentally changed wrong test's calldata 2025-01-31 12:11:24 -05:00
TAMARA LIPOWSKI
5a81ed6be5 fix: Expect decimal during encoding, add assert to test
- The util function was previously expecting a value between 0 and 100, which we felt was a weird UI.
- In integration test - make sure we spent all input tokens
2025-01-31 12:04:53 -05:00
dianacarvalho1
81e0859c10 Merge branch 'main' into router/dc/return-eth 2025-01-31 16:47:53 +00:00
TAMARA LIPOWSKI
ff3c7aa629 test: Split swap integration test 2025-01-31 11:34:50 -05:00
Diana Carvalho
3245ea7295 fix: transfer ETH if tokenOut is ETH
And not only if unwrapETH is true
There might be pools that deal in ETH directly

--- don't change below this line ---
ENG-4081 Took 7 minutes
2025-01-31 15:58:23 +00:00
Diana Carvalho
c85c353e34 fix: Fix token index order in strategy encoding.
The contract relies on this order!!

Remove TODOs and comments

--- don't change below this line ---
ENG-4081 Took 1 hour 12 minutes


Took 12 seconds
2025-01-31 15:34:12 +00:00
TAMARA LIPOWSKI
4d697bfebf test: Router integration test with many TODOs 2025-01-31 15:34:12 +00:00
TAMARA LIPOWSKI
a9c68a4de0 test: (WIP) Router integration tests
TODO it don't pass


Took 14 seconds

Took 12 minutes
2025-01-31 15:34:12 +00:00
Harsh Vardhan Roy
8c4e48b32a Merge branch 'main' into router/hr/ENG-4194-Batch-Set-Executor 2025-01-30 21:21:52 +05:30
royvardhan
6c8226340d chore: remove console 2025-01-30 21:17:25 +05:30
royvardhan
da7b02407a chore: remove console 2025-01-30 21:17:25 +05:30
royvardhan
8cb95f0950 feat: remove exact_out from USV2 2025-01-30 21:17:25 +05:30
royvardhan
746733056c chore: encoder test naming 2025-01-30 21:17:25 +05:30
royvardhan
1b8bf56c75 feat: resolve pr comments 2025-01-30 21:17:25 +05:30
royvardhan
a50c31203b chore: foundry fmt 2025-01-30 21:17:25 +05:30
royvardhan
cfce36486a chore: add comment 2025-01-30 21:17:25 +05:30
royvardhan
0196767eff feat: add swap test with hex for univ2 executor 2025-01-30 21:17:25 +05:30
royvardhan
c482e21a5f feat: add univ2 executor test with hex 2025-01-30 21:17:25 +05:30
Tamara
94b214384b Merge branch 'main' into router/tnl/ENG-4034-usv3-executor 2025-01-30 10:33:18 -05:00
TAMARA LIPOWSKI
83bbabddd1 chore: rename amountOwed -> amountIn
...for consistency.

Also remove comment. We will keep exact_out to avoid future interface changes.
2025-01-30 10:33:09 -05:00
royvardhan
24e95b1206 fix: rm redundant test 2025-01-30 21:01:28 +05:30
Harsh Vardhan Roy
bd49c86d86 Update TychoRouter.t.sol
Co-authored-by: Tamara <tamara@datarevenue.com>
2025-01-30 20:53:28 +05:30
royvardhan
c653062027 feat: rename batchSetExecutor to setExecutors 2025-01-30 19:29:24 +05:30
royvardhan
719a15c0e5 chore: fmt 2025-01-30 19:00:15 +05:30
royvardhan
ea504faca1 feat: replace setExecutor with batchSetExecutor 2025-01-30 18:58:54 +05:30
TAMARA LIPOWSKI
92b4ee00d3 chore: remove unused factory variable 2025-01-29 19:53:22 -05:00
TAMARA LIPOWSKI
ca32446a9e feat: UniswapV3Executor and integration tests
- Note: I think we can get the fee straight from the pool... why did we always encode this and send it from the solver? Is this bound to change sometimes?
2025-01-29 19:51:17 -05:00
Diana Carvalho
33ada0cf26 fix: Remove amountReceived, dataOffset from ICallbackVerifier interface
--- don't change below this line ---
ENG-4081 Took 1 hour 36 minutes
2025-01-29 20:19:34 +00:00
Diana Carvalho
63b94b5584 fix: Remove amountReceived and dataOffset from the callback verification
--- don't change below this line ---
ENG-4047 Took 20 minutes
2025-01-29 20:19:34 +00:00
Diana Carvalho
fafeba9248 feat: Implement generic callback
--- don't change below this line ---
ENG-4047 Took 26 minutes


Took 4 minutes

Took 8 seconds

Took 59 seconds

Took 22 seconds
2025-01-29 20:19:34 +00:00
TAMARA LIPOWSKI
d3f1136486 chore: Remove v3-periphery from gitmodules
- We aren't using this anymore since the solc version is outdated
2025-01-29 14:05:56 -05:00
TAMARA LIPOWSKI
96af542923 feat: fixed USV3 Verification
- We cannot use the regular v3-periphery library because of outdated solc versions. I've copied the v3-updated library which we have used in our previous project
2025-01-29 12:12:58 -05:00
TAMARA LIPOWSKI
057c616b0c chore: merge main 2025-01-29 10:19:18 -05:00
TAMARA LIPOWSKI
3b9f7dbb52 chore: update gitmodules 2025-01-29 10:11:32 -05:00
TAMARA LIPOWSKI
7822c4f913 feat: USV3 verification 2025-01-29 10:10:13 -05:00
Harsh Vardhan Roy
cb6d165e7f feat: approve max 2025-01-28 23:49:28 +05:30
royvardhan
15e3933aa7 chore: cleanup 2025-01-28 23:21:22 +05:30