Commit Graph

23 Commits

Author SHA1 Message Date
TAMARA LIPOWSKI
f3c4128eda fix: USV3 encoding/decoding after rebase
- Also do some renamings and comment improvements:
transfer method -> type
- Remove integration tests since we no longer support direct calls to USV3 executor, even for testing.
2025-04-23 12:31:41 +01:00
TAMARA LIPOWSKI
4bc29f283b chore: Renamings + comment fixes
- Renamed ExecutorTransferMethods to TokenTransfer to avoid leaking information about how the transfer happens into the executor. The executor shouldn't care if there are multiple methods or one single method that takes care of everything.
- Also renamed TransferMethod to TransferType to match the rust encoding
2025-04-23 12:31:41 +01:00
TAMARA LIPOWSKI
e3ac394d27 feat: Proper USV3Executor transfer decoding + tests
- Properly decode, update tests with proper decoding
- Added test case for each transfer method
- Also fully tested permit2 transferFrom and it works perfectly.

NOTE:
UniswapV3 doesn't support NONE as a transfer method.

TODO:
- Fix integration tests once encoding is implemented.
2025-04-23 12:31:40 +01:00
TAMARA LIPOWSKI
ca1d474f08 feat: Proper USV2Executor transfer decoding + tests
- Properly decode, update tests with proper decoding
- Added test case for each transfer method
- Also fully tested permit2 transferFrom and it works perfectly.

TODO:
- Fix integration tests once encoding is implemented.
2025-04-23 12:31:40 +01:00
TAMARA LIPOWSKI
8969186654 feat: allow to pass msg.sender to USV3 callback
- So that we can possibly do a transferFrom
- This should still be safe since the user can't control what is passed here
2025-04-23 12:31:40 +01:00
TAMARA LIPOWSKI
389009901e feat: ExecutorTransferMethods in UniswapV3Executor 2025-04-23 12:31:40 +01:00
Diana Carvalho
af449562b0 feat: Refactor callback to use transient storage
With this, we don't need the univ3 specific method in the router contract. This should be flexible enough for most protocols that integrate

TODO: is this safe enough??

--- don't change below this line ---
ENG-4411 Took 1 hour 52 minutes

Took 4 minutes

Took 5 minutes
2025-04-09 13:05:53 +01: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
TAMARA LIPOWSKI
33973a65b8 fix: make USV2 factory configurable in Executor
- This factory is not the same for Ethereum and Base, so Base txs were failing when verifying pool addresses.
- I've double checked that we don't have this problem for Balancer V2 - the vault address in the same on Base and on Ethereum Mainnet.
2025-02-27 23:15:08 -05:00
Diana Carvalho
59eb2195b6 feat: Change license to SPDX-License-Identifier: UNLICENSED everywhere
Remove unnecessary files

--- don't change below this line ---
ENG-4260 Took 13 minutes
2025-02-27 17:38:53 +00:00
royvardhan
f4f5b841e7 chore: keep test naming consistent 2025-02-22 01:39:11 +05:30
royvardhan
4b77128df2 chore: rename _computePairAddress to _verifyPairAddress, add fake v2 pool in v2 test file 2025-02-22 00:26:15 +05:30
royvardhan
40bd37a1a4 chore: rm redundant usv3 test 2025-02-21 23:28:03 +05:30
royvardhan
2f1507dd0e test: add target verification tests for usv2, usv3 2025-02-21 23:28:03 +05:30
Diana Carvalho
2aa63d7ec0 feat: Change signature of _handleCallback to take only bytes calldata
The selector and executor are decoded inside this function now.
For Uniswap V3 I had to manually slice the msg.data from uniswapV3SwapCallback to get the data that matters for the callback

Took 3 hours 12 minutes
2025-02-18 11:11:43 +00:00
royvardhan
9b8175aff9 chore: cleanup 2025-02-15 01:01:16 +05:30
royvardhan
9d3b96f997 feat: add uniswapV3SwapCallback in USV3 executor 2025-02-15 00:34:07 +05:30
royvardhan
cccb252bf2 feat: update handleCallback in USV3 to do verification 2025-02-14 23:27:44 +05:30
royvardhan
5853de679a feat: move callback testing to usv3 executor 2025-02-14 01:29:30 +05:30
royvardhan
80500e615e feat: fix input decoding in usv3 executor and execution dispatcher 2025-02-14 00:53:43 +05:30
royvardhan
bd1971334e feat: update new interface in codebase 2025-02-13 20:54:54 +05:30
royvardhan
bdd3daffba feat: update solc and add V4Router into UniswapV4Executor 2025-02-13 00:25:25 +05:30
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