royvardhan
0273f58274
fix: remove 0 amount check in _unwrapEth
2025-02-27 20:08:49 +05:30
Harsh Vardhan Roy
393ed61595
docs: update _unwrapEth docs
...
Co-authored-by: Tamara <tamara@datarevenue.com >
2025-02-27 20:08:49 +05:30
royvardhan
353861f738
refactor: update unwrapEth to only check 0 amount
2025-02-27 20:08:49 +05:30
Diana Carvalho
9eb4299ffe
fix: the key for univ4 fee is key_lp_fee
...
Update tests with new executor addresses as well
--- don't change below this line ---
ENG-4260 Took 6 minutes
2025-02-27 11:49:03 +00:00
Diana Carvalho
f95c74fbc6
feat: Deploy all executors
...
univ3, univ4 and balancer v2
--- don't change below this line ---
ENG-4260 Took 33 minutes
2025-02-27 09:44:53 +00:00
Tamara
503d7e0907
Merge branch 'main' into router/tnl/ENG-4269-base-deployment
2025-02-26 13:21:04 -05:00
TAMARA LIPOWSKI
ac35256c69
fix: rename mainnet -> ethereum
...
we must match what we have in the executors file (which is what tycho-indexer gives us)
2025-02-26 13:20:51 -05:00
TAMARA LIPOWSKI
e5759b9498
fix: TENDERLY_RPC_URL -> RPC_URL
...
for simplicity and consistency
2025-02-26 13:01:48 -05:00
royvardhan
7b0dd5872c
chore: merge main
2025-02-26 23:26:27 +05:30
TAMARA LIPOWSKI
adfcb3da82
fix: proper executor address json after merge
2025-02-26 12:39:54 -05:00
TAMARA LIPOWSKI
1bdcbb83e0
fix: (deployment) add tenderly keys to json files
2025-02-26 10:59:35 -05:00
TAMARA LIPOWSKI
7ca9120b7b
feat: support base deployment
...
gas limit had to be set when setting executors on base: kept getting UNPREDICTABLE_GAS_LIMIT error. It should definitely not cost more than 100000 gas to set limit... but this may be a problem on other chains in the future.
2025-02-26 10:59:25 -05:00
royvardhan
0be69c9aea
refactor: check if amountIn was fully consumed based on balance changes
2025-02-26 19:04:26 +05:30
royvardhan
53d48f1bac
refactor: centralize swap logic to reduce duplication between swap and swapPermit2
2025-02-26 18:05:29 +05:30
Diana Carvalho
57789a40e4
fix: Unify both executor addresses in one file
...
- Move executor_addresses.json to a top level directory
- Delete executors.json
- Use the same file for both encoding and setting executors
--- don't change below this line ---
ENG-4260 Took 19 minutes
Took 11 seconds
2025-02-26 10:10:30 +00:00
Diana Carvalho
34563c3eb7
feat: Deploy on mainnet
...
Also update executors.json with uniswap v2 address on mainnet
--- don't change below this line ---
ENG-4101 Took 22 minutes
Took 7 seconds
2025-02-26 09:49:00 +00:00
Diana Carvalho
02a9da183e
feat: Deploy executors and set them in router
...
--- don't change below this line ---
ENG-4101 Took 59 minutes
Took 10 seconds
2025-02-26 09:49:00 +00:00
Diana Carvalho
90cf194869
feat: Set roles script
...
Added a roles.json file where we can define all the addresses that need roles
--- don't change below this line ---
ENG-4101 Took 42 seconds
2025-02-26 09:49:00 +00:00
Diana Carvalho
77ba9498a7
feat: Verify router contract on tenderly
...
Fix package.json
--- don't change below this line ---
ENG-4101 Took 34 minutes
2025-02-26 09:49:00 +00:00
Diana Carvalho
cbea0bdab3
feat: Add deployment and fund wallet scripts
...
--- don't change below this line ---
ENG-4101 Took 1 hour 2 minutes
Took 2 minutes
Took 8 minutes
Took 4 minutes
Took 28 minutes
2025-02-26 09:49:00 +00:00
dianacarvalho1
6008d5e836
Merge branch 'main' into router/dc/ENG-4260-improve-receive
2025-02-26 09:40:58 +00:00
TAMARA LIPOWSKI
857522134b
chore: forge fmt
...
kill blank lines
2025-02-25 13:14:30 -05:00
TAMARA LIPOWSKI
abef1e062e
style: TychoRouter ascii art
2025-02-25 13:10:29 -05:00
Diana Carvalho
801976fafa
fix: Restrict receive callers to have code
...
--- don't change below this line ---
ENG-4260 Took 8 minutes
2025-02-25 09:36:04 +00:00
royvardhan
892726e07b
chore: cleanup
2025-02-24 21:41:19 +05:30
royvardhan
bfaa63a1a0
test: fix router tests with new integration calldata
2025-02-24 21:37:40 +05:30
royvardhan
18efe0305b
fix: usv4 integration tests and remove selector from swap/strategy encoder
2025-02-24 19:48:25 +05:30
royvardhan
69745b18fd
feat: rm selector from usv3, usv4, update tests, and rename dispatcher file
2025-02-24 17:16:27 +05:30
royvardhan
58116e074a
feat: hardcode callback and swap selection in dispatcher
2025-02-24 10:56:17 +05:30
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
royvardhan
7936ba1c94
feat: add target verification for usv2 and usv3 using _computePairAddress
2025-02-21 23:28:03 +05:30
Diana Carvalho
0ba5d02268
feat: Use openzepplin's sendValue instead of send for ETH transfers
...
--- don't change below this line ---
ENG-4260 Took 7 minutes
2025-02-21 17:07:46 +00:00
TAMARA LIPOWSKI
023ae9c1ea
chore: merge main
2025-02-21 09:48:22 -05:00
TAMARA LIPOWSKI
c42421718b
docs: Fix typos in code comments
2025-02-21 09:44:21 -05:00
TAMARA LIPOWSKI
a7aa4d7ebb
fix: Native ETH input/output integration tests/fixes
...
- Only for single swaps
- Used USV4 for this because it's the only DEX we support that allows native ETH swaps
- For Native ETH input single swaps, we need to properly check the remaining amount (we were treating them wronly like ERC20 tokens)
- For Native ETH output single swaps, we were passing the incorrect currency (the settle always needs to be the out token and the take always needs to be the in token, this should not depend on the zeroForOne value).
2025-02-21 00:23:24 -05:00
Diana Carvalho
20e6419a20
feat: Adapt SplitSwapStrategyEncoder to have optional permit2 logic
...
- If the signer_pk is not passed -> use the swap method that expects the tokens to be already in the Router
- If it is passed -> compute permit2 and use swap method that does the token in transfer
- Extend builder to have another shortcut
- Add integration test with contract
- Update bin (and simplified it) and quickstart
--- don't change below this line ---
ENG-4255 Took 1 hour 51 minutes
Took 2 minutes
Took 7 seconds
2025-02-20 18:29:11 +00:00
TAMARA LIPOWSKI
d65d575003
feat: Don't encode min amount for USV4
...
We aren't checking min amount for any other executor. This would be overkill (since we are already checking in the main router) and also inconsistent.
2025-02-20 12:15:40 -05:00
TAMARA LIPOWSKI
9eda00cbb6
chore: PR comments
2025-02-20 11:51:08 -05:00
TAMARA LIPOWSKI
bb8778b2bf
chore: merge main
2025-02-20 11:45:18 -05:00
TAMARA LIPOWSKI
2d267792f3
docs: Fixed outdated comments
...
Some copypastas, some other improvements.
2025-02-20 10:46:27 -05:00
TAMARA LIPOWSKI
45fdfc708d
feat: UniswapV4 integration test and fixes
...
- Biggest issue: We must encode the executor address, not the router address, in the USV4 swap encoder
2025-02-19 18:12:11 -05:00
TAMARA LIPOWSKI
c3482a509a
feat: TychoRouter swap method not requiring Permit2
...
- Assume the tokens have been transferred into our router beforehand.
2025-02-19 16:15:57 -05:00
royvardhan
e2a2aaaad1
refactor: usv4 swap encoder test, encoder
2025-02-19 23:59:27 +05:30
royvardhan
f7ddace559
feat: early return in usv4 swap encoder for second swap, add utils
2025-02-19 21:42:13 +05:30
royvardhan
5e9b38876e
feat: add integration test for complex swaps
2025-02-19 20:32:55 +05:30
royvardhan
1bfe656e6b
feat: add new attributes in encoding context, update usv4 swap encoder and tests
2025-02-19 08:39:21 +05:30
royvardhan
529456f40c
feat: add single swap integration test for usv4 executor
2025-02-18 21:24:49 +05:30