Commit Graph

573 Commits

Author SHA1 Message Date
TAMARA LIPOWSKI
b3078f9c7b feat: Support Ekubo callback in TychoRouter
- add integration test
- cannot directly call _handleCallback from the locked method of the tycho router because of bytes memory to bytes callback conversion
- Rename to EkuboPoolKey because of conflict with USV4 pool key

- Bonus: fix bug where input token to swap method must be ERC20 (we should also support ETH)
2025-03-31 17:49:45 +02:00
Tamara
414a9609ec Merge branch 'main' into router/tnl/ENG-4409-pancake-v3-callback 2025-03-31 17:44:27 +02:00
die-herdplatte
68a9198e9c forge fmt 2025-03-29 10:32:22 +01:00
die-herdplatte
95e1bf1290 Fix wrong argument order 2025-03-29 10:29:21 +01:00
die-herdplatte
9fc99caf74 forge fmt 2025-03-26 16:57:43 +01:00
die-herdplatte
47d96c2347 Add integration test 2025-03-26 16:50:03 +01:00
die-herdplatte
3e2e9308d4 Fix slither lints 2025-03-26 16:48:17 +01:00
die-herdplatte
261e2b2091 Merge remote-tracking branch 'upstream/main' into ekubo 2025-03-26 08:25:37 +01:00
TAMARA LIPOWSKI
fa024a4a67 feat: Add PancakeSwapV3 support to encoding
- Add deployed executor address to json
- Build proper encoder for pancake v3
- Increase gas limit when setting executors (costs more since we set one more)
- Fix json filename in scripts/README.md
2025-03-25 17:50:25 +01:00
TAMARA LIPOWSKI
c361e1515d refactor: remove duplicate code
The callback verification was already implemented in _verifyPairAddress.
2025-03-25 17:50:25 +01:00
TAMARA LIPOWSKI
d582543057 feat: Pancakeswap V3 support 2025-03-25 17:50:25 +01:00
TAMARA LIPOWSKI
1ed149a9b8 fix: Remove pancakeswap V3 from approved executor addresses
- Our router does not properly support pancakeswap.
2025-03-20 12:40:03 -04:00
TAMARA LIPOWSKI
783712be5d feat: Set v2/v3 executor addresses on ethereum
- Also fix router address env name in readme
2025-03-20 12:40:03 -04:00
TAMARA LIPOWSKI
39bd9df4b6 fix: proper exchange name when deploying executors
- Also update base executors in json
2025-03-20 12:40:03 -04:00
TAMARA LIPOWSKI
2a4ee88cad feat: Support Pancakeswap v3 on ethereum
- Needed to take pool code init hash as input param for executors
- Added tests for ethereum. Will test base on-chain.
- Important note: Pancakeswap uses their deployer instead of their factory (this is a different address) for target verification.
2025-03-20 12:40:03 -04:00
die-herdplatte
05d6286921 Merge remote-tracking branch 'origin/main' into ekubo 2025-03-20 09:59:19 +01:00
die-herdplatte
3c982c5824 Ekubo integration 2025-03-20 09:58:40 +01:00
TAMARA LIPOWSKI
0a8a34be03 feat: Support sushiswap v2 and pancakeswap v2 on ethereum
- Needed to take pool code init hash as input param for executors
- Added tests for ethereum. Will test base on-chain.
2025-03-19 14:27:34 -04:00
TAMARA LIPOWSKI
a75dfd02ab docs: Fix swap without permit2 doc
- We changed this to use a transferFrom
2025-03-16 00:18:37 -04:00
Diana Carvalho
27c9c53889 feat: Add check to don't support cyclical swaps with native actions
Remove unnecessary tests and improve comments

--- don't change below this line ---
ENG-4331 Took 30 minutes
2025-03-13 17:34:50 +00:00
royvardhan
ec26890d00 test: add assert in cyclic swap encoding tests 2025-03-12 00:49:42 +05:30
royvardhan
eb4ce40f6e test: add testCyclicSwapUnwrapOutputIntegration in encoder and testCyclicSwapUnwrapOutputIntegration test 2025-03-12 00:49:42 +05:30
royvardhan
b7c1619796 docs: make cyclic test ref addresses lowercase 2025-03-12 00:49:42 +05:30
royvardhan
6c31906733 chore: cleanup 2025-03-12 00:49:42 +05:30
royvardhan
525560ea16 chore: cleanup 2025-03-12 00:49:42 +05:30
royvardhan
bd504a8fed test: update test_split_input_cyclic_swap to use usv2 in the last swap 2025-03-12 00:49:42 +05:30
royvardhan
0edc201f06 test: add test_split_output_cyclic_swap in encoder, and testCyclicSplitOutputSwapIntegration integration test 2025-03-12 00:49:42 +05:30
royvardhan
3a6e933ce9 test: fix test_split_input_cyclic_swap and testCyclicSplitSwapIntegration 2025-03-12 00:49:42 +05:30
royvardhan
0a0101cc4d test: add testCyclicSplitSwapIntegration 2025-03-12 00:49:42 +05:30
royvardhan
79d6c020fa misc: fix _swapChecked for cyclic swap, update encoder swap path validation, add cyclic sequesntial swap integration test 2025-03-12 00:49:42 +05:30
royvardhan
91f36fe328 fix: amountConsumed check in _swapChecked for cyclic swap 2025-03-10 23:32:30 +05:30
Harsh Vardhan Roy
38cdf28e7e docs: update testSplitInputCyclicSwap
Co-authored-by: Tamara <tamara@datarevenue.com>
2025-03-10 23:25:38 +05:30
royvardhan
34d5ac6e1c test: update testSplitInputCyclicSwap to use all WETH for USDC 2025-03-10 22:20:13 +05:30
royvardhan
bd6f74ca9c docs: update docs at testSplitInputCyclicSwap and testSplitOutputCyclicSwap 2025-03-10 18:12:58 +05:30
royvardhan
bb10efc0cc docs: update docs at _swap and testSplitOutputCyclicSwap 2025-03-10 18:12:58 +05:30
royvardhan
4d67df4096 feat: add cyclicSwapAmountOut tracker in _swap, add split cylic tests 2025-03-10 18:12:58 +05:30
royvardhan
66c00df4f1 test: add testCyclicSplitSwap test and update var naming in testCyclicSequentialSwap 2025-03-10 18:12:58 +05:30
royvardhan
57acbd58c5 fix: remove amountIn addition to amountOut in _swap for cyclic swaps, add testCyclicSwapWithTwoPools test to verify 2025-03-10 18:12:58 +05:30
TAMARA LIPOWSKI
b74d4c9e25 chore: remove unnecessary min amount check, doc fix 2025-03-06 10:37:37 -05:00
Tamara
9821ab0c00 Merge branch 'main' into router/tnl/basescan-verify 2025-03-05 13:15:37 -05:00
TAMARA LIPOWSKI
09208b342a test: Add testSwapCheckedUndefinedMinAmount
To check if the swap actually reverts when min amount is 0.
2025-03-05 13:06:06 -05:00
Diana Carvalho
5c28d77f1d feat: Check min amount out is not zero
Update tests

--- don't change below this line ---
ENG-4286 Took 57 minutes


Took 20 seconds
2025-03-05 17:53:51 +00:00
royvardhan
7833086425 fix: TychoRouter swap check test naming and docs 2025-03-05 22:23:16 +05:30
Harsh Vardhan Roy
2086484898 docs: remove unnecessary comment from swap
Co-authored-by: Tamara <tamara@datarevenue.com>
2025-03-05 22:23:16 +05:30
royvardhan
f853739a3d feat: add transferFrom in swap and move core swap logic inside _swapChecked 2025-03-05 22:23:16 +05:30
Harsh Vardhan Roy
013113c4d9 Merge branch 'main' into router/hr/ENG-4280-gas-test 2025-03-05 21:32:40 +05:30
royvardhan
a3bffd4f75 fix: add amountIn in error TychoRouter__AmountInDiffersFromConsumed 2025-03-05 00:45:22 +05:30
royvardhan
6f421eb374 fix: inequality check for amountConsumed and amountIn 2025-03-05 00:35:51 +05:30
TAMARA LIPOWSKI
bc54eac110 feat: Rename Etherscan in deployment verification
This could also be Basescan. Abstract away to blockchain explorer.
2025-03-03 17:14:39 -05:00
Diana Carvalho
db9c8cde5a fix: Make permit2 permit an action in the universal router
--- don't change below this line ---
ENG-4286 Took 1 hour 35 minutes
2025-03-03 18:33:22 +00:00