Commit Graph

828 Commits

Author SHA1 Message Date
dianacarvalho1
012b9f1508 Merge pull request #130 from propeller-heads/encoding/tnl/4318-single-strategy
feat: SingleSwapStrategyEncoder
2025-04-23 12:30:13 +01:00
Diana Carvalho
6430c99d76 feat: Delete EVMStrategyEncoder (this is now unnecessary)
Moved ple_encode into utils.rs

--- don't change below this line ---
ENG-4306 Took 5 minutes
2025-04-23 12:30:13 +01:00
TAMARA LIPOWSKI
f12bebcdfb test: Fix executor address in swap test 2025-04-23 12:30:13 +01:00
TAMARA LIPOWSKI
fcedd39f30 fix: Remove router_address from Solution object
after merge
2025-04-23 12:30:13 +01:00
TAMARA LIPOWSKI
11a05e4f18 feat: SingleSwapStrategyEncoder
- Had to take the implementation of the swap header encoding out of the main EVMStrategyEncoder trait, since it will now be difference for single and split swap strategies.
- Integration tests will be added in separate task/PR.


Took 7 seconds
2025-04-23 12:30:13 +01:00
TAMARA LIPOWSKI
3f6bc5643e fix: Integration tests after merge
Took 50 seconds
2025-04-23 12:30:06 +01:00
TAMARA LIPOWSKI
3d01158bbb chore: merge main
Took 3 minutes
2025-04-23 12:29:36 +01:00
Tamara
6c74c674f0 Merge pull request #120 from propeller-heads/router/tnl/ENG-4317-sequential-in
feat: Add sequential swap methods
2025-04-23 12:26:31 +01:00
TAMARA LIPOWSKI
8f2346330a fix: fix slither CI action
- Need to manually install foundry and compile the project, or else it attempts to install the latest foundry version, which fails due to GLIBC not being found
2025-04-23 12:26:31 +01:00
TAMARA LIPOWSKI
c4455dcabb refactor: Separate test files for split/sequential/single
- Add more test cases for sequential swap and single swap to match those of split swap (fee, slippage), to catch errors more easily if someone makes a small code change to either the single or sequential methods
- Excluded USV3 and USV4 tests on sequential and single swap, since these tests were more to test USV3 and USV4 executor functionality than the high level sswap methods - they should already be sufficiently tested.
- Remove `testSplitSwapSimple` and `testSplitSwapSingleUSV3` since this is already tested by several other high-level methods (see single USV3 and single USV4 tests). We should prioritize integration-testing public methods over private methods.
2025-04-23 12:26:31 +01:00
TAMARA LIPOWSKI
49e0c49828 chore: (single swap) remove unnecessary cycle check
- It's not possible to have a single cyclical swap.
2025-04-23 12:26:31 +01:00
TAMARA LIPOWSKI
1dad4afb6b feat: Decode single and sequential swaps in LibSwap
- The old way was useful when we just had split swaps. Unfortunately, we now have split, sequential, and single swaps, which don't always require token indices or split percentages, so we need to decode differently for each case.
2025-04-23 12:26:31 +01:00
TAMARA LIPOWSKI
64345663d0 feat: Single swap methods.
- Remove duplicate test case for single swp with permit2. This test came from the days when we could still have a 0 minimum amount.
2025-04-23 12:26:31 +01:00
TAMARA LIPOWSKI
3ae9d3ad67 feat: Add sequential swap methods
- Add some basic tests (will add more in next commits)
- Adapt sequential tests (which originally tested split swap)
- Adapt a forgotten single swap test

TODO:
- Fix encoding of single and sequential swaps to not expect the split sawp format every time (the split and the token indices are not necessary and consume unnecessary gas).
2025-04-23 12:26:31 +01:00
TAMARA LIPOWSKI
65178681e0 docs: Rename to splitSwap in helper method docs too
Took 4 minutes
2025-04-23 12:26:31 +01:00
TAMARA LIPOWSKI
7fc008a718 feat: Rename split swap interfaces
- In preparation for adding single and sequential swap methods.
2025-04-23 12:25:36 +01:00
semantic-release-bot
6c679c0434 chore(release): 0.76.0 [skip ci]
## [0.76.0](https://github.com/propeller-heads/tycho-execution/compare/0.75.1...0.76.0) (2025-04-03)

### Features

* deploy Ekubo gas optimizations ([9012d7b](9012d7b4d1))
2025-04-03 13:34:26 +00:00
Tamara
b8e56c2062 Merge pull request #152 from propeller-heads/router/tnl/ekubo-gas-improvements-deployment
feat: deploy Ekubo gas optimizations
2025-04-03 15:32:16 +02:00
TAMARA LIPOWSKI
9012d7b4d1 feat: deploy Ekubo gas optimizations
new executor and new router (since the executor is hardcoded for now).
2025-04-03 12:51:23 +02:00
Tamara
9c8e093588 Merge pull request #146 from die-herdplatte/remove-ekubo-balance-of-checks
feat: Remove balanceOf checks in EkuboExecutor & remove ICallback impl
2025-04-03 12:18:06 +02:00
Tamara
10ad95be69 Merge branch 'main' into remove-ekubo-balance-of-checks 2025-04-03 12:13:32 +02:00
semantic-release-bot
568b17f074 chore(release): 0.75.1 [skip ci]
## [0.75.1](https://github.com/propeller-heads/tycho-execution/compare/0.75.0...0.75.1) (2025-04-03)

### Bug Fixes

* Proper ekubo protocol name in GROUPABLE_PROTOCOLS ([b4c687b](b4c687bc3f))
2025-04-03 10:10:12 +00:00
Tamara
d03dd910d2 Merge branch 'main' into remove-ekubo-balance-of-checks 2025-04-03 12:08:26 +02:00
Tamara
5414b658fb Merge pull request #151 from propeller-heads/encoding/tnl/fix-ekubo-grouping
fix: Proper ekubo protocol name in GROUPABLE_PROTOCOLS
2025-04-03 12:06:51 +02:00
Tamara
ae5b468485 Merge branch 'main' into encoding/tnl/fix-ekubo-grouping 2025-04-03 11:46:35 +02:00
semantic-release-bot
f2c29c2c7c chore(release): 0.75.0 [skip ci]
## [0.75.0](https://github.com/propeller-heads/tycho-execution/compare/0.74.0...0.75.0) (2025-04-03)

### Features

* Unichain deployment ([d05e118](d05e1183d4))

### Bug Fixes

* Run foundry tests on PR branch (not main) ([43f1a07](43f1a07017))
* Set native and wrapped tokens for Unichain ([4878229](4878229e1d))
2025-04-03 09:46:01 +00:00
Tamara
e2be13521b Merge branch 'main' into encoding/tnl/fix-ekubo-grouping 2025-04-03 11:45:14 +02:00
dianacarvalho1
c0247de888 Merge pull request #150 from propeller-heads/router/tnl/deploy-unichain
feat: Unichain deployment
2025-04-03 10:43:37 +01:00
TAMARA LIPOWSKI
43f1a07017 fix: Run foundry tests on PR branch (not main) 2025-04-03 11:26:06 +02:00
TAMARA LIPOWSKI
b4c687bc3f fix: Proper ekubo protocol name in GROUPABLE_PROTOCOLS 2025-04-03 11:09:31 +02:00
TAMARA LIPOWSKI
25cafa31e7 chore: forge fmt 2025-04-03 10:53:55 +02:00
Tamara
3a42059598 Merge branch 'main' into router/tnl/deploy-unichain 2025-04-03 10:53:31 +02:00
die-herdplatte
5540503a59 forge fmt 2025-04-03 00:42:10 +07:00
die-herdplatte
4e34f45bf4 Remove balanceOf checks in EkuboExecutor & remove ICallback impl 2025-04-03 00:36:38 +07:00
semantic-release-bot
f514871e61 chore(release): 0.74.0 [skip ci]
## [0.74.0](https://github.com/propeller-heads/tycho-execution/compare/0.73.0...0.74.0) (2025-04-02)

### Features

* Fix rollFork usage for Ekubo test ([6cdca83](6cdca8381e))

### Bug Fixes

* Fix tests after cherry picking ([5336969](5336969df8))
2025-04-02 15:19:00 +00:00
dianacarvalho1
624700d614 Merge pull request #148 from propeller-heads/router/dc/refactor-tests
feat: Refactor router tests
2025-04-02 16:17:06 +01:00
Diana Carvalho
5336969df8 fix: Fix tests after cherry picking
--- don't change below this line ---
ENG-4411 Took 1 hour 9 minutes

Took 18 minutes
2025-04-02 16:13:58 +01:00
Diana Carvalho
6cdca8381e feat: Fix rollFork usage for Ekubo test
- Created methods to deploy the router and the executors. Whenever we use rollFork we need to redeploy everything! Notice that the addresses will be different then!
- Created a test_executor_addresses.json to be used in the encoding tests, this way the calldata for the integration tests is already correct and we don't need to do any manual replacing (this was annoying). The addresses in this file match with the addresses used in the solidity tests

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

Took 28 minutes


Took 4 minutes

Took 45 minutes
2025-04-02 16:13:58 +01:00
TAMARA LIPOWSKI
4878229e1d fix: Set native and wrapped tokens for Unichain 2025-04-02 16:06:26 +02:00
TAMARA LIPOWSKI
d05e1183d4 feat: Unichain deployment 2025-04-02 15:49:08 +02:00
semantic-release-bot
69f4e748b5 chore(release): 0.73.0 [skip ci]
## [0.73.0](https://github.com/propeller-heads/tycho-execution/compare/0.72.0...0.73.0) (2025-04-02)

### Features

* Add router_address to cli ([1f6f1a4](1f6f1a4236))
2025-04-02 10:08:01 +00:00
Tamara
b3ea015e9f Merge pull request #149 from propeller-heads/encoding/tnl/configurable-router-address
feat: Add router_address to cli
2025-04-02 12:05:50 +02:00
TAMARA LIPOWSKI
1f6f1a4236 feat: Add router_address to cli 2025-04-02 12:02:56 +02:00
semantic-release-bot
4bcba64347 chore(release): 0.72.0 [skip ci]
## [0.72.0](https://github.com/propeller-heads/tycho-execution/compare/0.71.0...0.72.0) (2025-04-02)

### Features

* Make EncodingContext.router_address optional ([8865e22](8865e22116))
* Remove router_address from Solution, set default ([d5c589d](d5c589d2c0))
* Support manual router address setting in builder ([c336a28](c336a28905))

### Bug Fixes

* fix Solution.router_address for Ekubo ([b397ddd](b397ddd2be))
2025-04-02 09:33:01 +00:00
Tamara
aeaab073b8 Merge pull request #147 from propeller-heads/encoding/tnl/default-router-address
feat: Remove router_address from Solution, set default
2025-04-02 11:30:22 +02:00
TAMARA LIPOWSKI
c336a28905 feat: Support manual router address setting in builder 2025-04-02 11:24:31 +02:00
TAMARA LIPOWSKI
99adaa9796 chore: Update latest router address in router_addresses.json 2025-04-02 11:24:23 +02:00
TAMARA LIPOWSKI
b397ddd2be fix: fix Solution.router_address for Ekubo 2025-04-02 11:24:12 +02:00
TAMARA LIPOWSKI
8865e22116 feat: Make EncodingContext.router_address optional 2025-04-02 11:24:04 +02:00
TAMARA LIPOWSKI
d5c589d2c0 feat: Remove router_address from Solution, set default
- The router address can be set when creating the SplitSwapStrategy, which now takes an Option<Bytes> as input during initialization (another breaking interface change)
- This change allows us to change our router address in the future with minimal effect on the users. Users should only pass the router address in the split swap initialization if they intend to use their own router for execution.
- This change also means that the router address does not need to be passed with the solution, even when using the executor strategy (which was pointless).
- I thought of having a router_address() method to set this in the encoder builder - but it seemed too messy, since we don't need the router address for execution for example. We would then potentially unnecessarily load and set the default router address when not needed. It is also not even used at the highest level EVMTychoEncoder, so it makes more sense for it to be directly associated with the swap strategy instead.
- Users will now not be able to encode for different routers without re-initializing the strategy. We assumed this use case to be very rare and not worth supporting.
2025-04-02 11:18:30 +02:00