Commit Graph

347 Commits

Author SHA1 Message Date
royvardhan
520bee5a5d fix: chain.into() 2025-02-06 22:28:02 +05:30
Harsh Vardhan Roy
8d69d748d1 Merge branch 'main' into encoder/hr/ENG-4093-bin 2025-02-06 22:20:56 +05:30
semantic-release-bot
54ef671683 chore(release): 0.33.0 [skip ci]
## [0.33.0](https://github.com/propeller-heads/tycho-execution/compare/0.32.0...0.33.0) (2025-02-06)

### Features

* Get native/wrapped addresses from chain ([8cd7d9f](8cd7d9f76e))
* Take Chain object containing native/wrapped addresses ([e83b8d9](e83b8d9aef))

### Bug Fixes

* Do not let user specify the native/wrapped token ([1a07c7d](1a07c7dc61))
2025-02-06 16:43:48 +00:00
Tamara
9c8fbb634d Merge pull request #52 from propeller-heads/encoding/tnl/configurable-chain
feat: Get native/wrapped addresses for chain
2025-02-06 11:41:52 -05:00
TAMARA LIPOWSKI
41a5fe99c9 chore: merge main 2025-02-06 11:09:07 -05:00
TAMARA LIPOWSKI
1a07c7dc61 Fix: Do not let user specify the native/wrapped token
This puts too much burden on the user. Instead, specify native and wrapped tokens as methods which return hardcoded values.
2025-02-06 11:08:06 -05:00
royvardhan
1dad36d7a8 fix: rm v4-core 2025-02-06 20:57:43 +05:30
royvardhan
32c3bd2220 feat: update cli params and docs 2025-02-06 20:55:27 +05:30
Harsh Vardhan Roy
535384393b Merge branch 'main' into encoder/hr/ENG-4093-bin 2025-02-06 18:34:27 +05:30
royvardhan
a5166f282d feat: use clap for cli and resolve pr comments 2025-02-06 18:30:52 +05:30
semantic-release-bot
6ed23db449 chore(release): 0.32.0 [skip ci]
## [0.32.0](https://github.com/propeller-heads/tycho-execution/compare/0.31.0...0.32.0) (2025-02-06)

### Features

* Accept any struct that implements Into<ProtocolComponent> in Swap ([cb14022](cb14022681))
2025-02-06 09:21:59 +00:00
dianacarvalho1
5c51939d73 Merge pull request #56 from propeller-heads/encoding/dc/ENG-4213-generic-protocol-component
feat: Accept any struct that implements Into<ProtocolComponent> in Swap
2025-02-06 09:19:16 +00:00
TAMARA LIPOWSKI
e83b8d9aef feat: Take Chain object containing native/wrapped addresses
- This way this chain object contains everything we need, we don't need to worry about doing any transformation or calling any supplementary functions inside any of the encoders
- Needed to move our new Chain object to a higher level since this is used in the higher-level encoder traits. This required some weird default values in the constants in order to avoid using alloy's hex literal. I could have instead opted to make Bytes parse a string I think, though this would mean possibly returning an error at the constants level, which is not nice either.

Question:
- Do we want the user to be in charge of passing the native and wrapped token every single time? This may be a bit annoying for the user. For now, I have defaulted to those in constants.rs, this would take 5 mins to remove though if you don't like it, and it would get rid of this complicated bytes initialization.
2025-02-05 17:14:56 -05:00
TAMARA LIPOWSKI
f8b3baff55 chore: merge main 2025-02-05 13:48:00 -05:00
royvardhan
b93856073c feat: add serde primitive, update command 2025-02-06 00:16:35 +05:30
Diana Carvalho
cb14022681 feat: Accept any struct that implements Into<ProtocolComponent> in Swap
--- don't change below this line ---
ENG-4213 Took 27 minutes
2025-02-05 18:02:43 +00:00
royvardhan
38ce6e5c79 chore: rm json 2025-02-05 22:57:56 +05:30
royvardhan
fd4045e6fe feat: remove manual parsing 2025-02-05 22:57:38 +05:30
royvardhan
a3cf443056 fix: ci 2025-02-05 20:54:30 +05:30
royvardhan
c4f9fd0fa6 fix: remove redundant parse checks 2025-02-05 20:50:44 +05:30
royvardhan
d3ad0ba5bf feat: add default private key 2025-02-05 20:47:51 +05:30
royvardhan
80f1ca913b feat: default native action 2025-02-05 20:39:59 +05:30
royvardhan
07288163d2 chore: merge run.md to readme.md 2025-02-05 20:34:56 +05:30
semantic-release-bot
cb01f95af9 chore(release): 0.31.0 [skip ci]
## [0.31.0](https://github.com/propeller-heads/tycho-execution/compare/0.30.1...0.31.0) (2025-02-05)

### Features

* add tests for split swap validations ([b69aef9](b69aef9b8f))
* add tests for wrap unwrap case ([4d97c3f](4d97c3f16d))
* add validation for split swap ([f80ffa9](f80ffa924f))

### Bug Fixes

* checks in validations ([95edd5b](95edd5b1fe))
* get_mock_split_swap_strategy_encoder ([7b72263](7b7226356d))
* use native action to validate path ([c787f5e](c787f5e722))
2025-02-05 15:03:14 +00:00
Harsh Vardhan Roy
db6cf4f0f0 Merge pull request #48 from propeller-heads/encoder/hr/ENG-4083-Validate-SplitSwap
feat: add validations for split swap
2025-02-05 20:31:14 +05:30
Harsh Vardhan Roy
9e61261a51 Update strategy_encoders.rs
Co-authored-by: Tamara <tamara@datarevenue.com>
2025-02-05 20:23:10 +05:30
Harsh Vardhan Roy
3803be897e Merge branch 'main' into encoder/hr/ENG-4083-Validate-SplitSwap 2025-02-05 19:39:00 +05:30
royvardhan
6cec83fde5 fix: ci 2025-02-05 17:36:27 +05:30
royvardhan
d3be9d1489 feat: add md 2025-02-05 17:29:17 +05:30
royvardhan
8d97f73ec7 feat: simplify 2025-02-05 17:26:02 +05:30
royvardhan
ae6b1ed658 feat: remove direct execution hardcode 2025-02-05 17:05:06 +05:30
royvardhan
4f7fe3b96d feat: add encoder bin 2025-02-05 16:53:20 +05:30
dianacarvalho1
c868033072 Merge pull request #54 from propeller-heads/encoding/dc/ENG-4169-use-dto-objects
chore: Use tycho_core::dto objects instead of tycho_core::models
2025-02-05 10:33:21 +00:00
Diana Carvalho
3dcb8aee7b chore: Use tycho_core::dto objects instead of tycho_core::models
--- don't change below this line ---
ENG-4169 Took 11 minutes
2025-02-05 10:10:43 +00:00
TAMARA LIPOWSKI
8cd7d9f76e feat: Get native/wrapped addresses from chain
- These were being hardcoded to ETH and WETH, which may not always be the case for EVM-compatible chains.
2025-02-04 16:59:01 -05:00
royvardhan
7b7226356d fix: get_mock_split_swap_strategy_encoder 2025-02-05 00:18:26 +05:30
Harsh Vardhan Roy
b19dc89c8c Merge branch 'main' into encoder/hr/ENG-4083-Validate-SplitSwap 2025-02-05 00:17:21 +05:30
royvardhan
c787f5e722 fix: use native action to validate path 2025-02-05 00:14:09 +05:30
semantic-release-bot
25a26f21be chore(release): 0.30.1 [skip ci]
## [0.30.1](https://github.com/propeller-heads/tycho-execution/compare/0.30.0...0.30.1) (2025-02-04)

### Bug Fixes

* deprecated signature ([576f89d](576f89d24c))
2025-02-04 18:17:33 +00:00
Harsh Vardhan Roy
873b6ef961 Merge pull request #50 from propeller-heads/encoder/hr/bump-alloy
fix: use PrimitiveSignature instead of deprecated Signature
2025-02-04 23:45:14 +05:30
royvardhan
576f89d24c fix: deprecated signature 2025-02-04 23:30:23 +05:30
semantic-release-bot
6557ede64b chore(release): 0.30.0 [skip ci]
## [0.30.0](https://github.com/propeller-heads/tycho-execution/compare/0.29.1...0.30.0) (2025-02-04)

### Features

* Refactor Registries ([23875b8](23875b8b02))
2025-02-04 17:36:31 +00:00
dianacarvalho1
ce2179e16d Merge pull request #47 from propeller-heads/encoding/dc/refactor-init
feat: Refactor Registries
2025-02-04 17:34:31 +00:00
Diana Carvalho
79f513c76b chore: After rebase with master fixes
Took 2 minutes
2025-02-04 17:32:14 +00:00
Diana Carvalho
c89f46a2e6 chore: Rename registry -> swap_encoder_registry
Took 14 minutes

Took 8 seconds
2025-02-04 17:30:19 +00:00
Diana Carvalho
23875b8b02 feat: Refactor Registries
Interface changes:
- Rename StrategySelector to StrategyEncoderRegistry
- Implement clone for SwapEncoder

The StrategyEncoderRegistry needs to be initialised at the highest level and the passed to the TychoEncoder.
The TychoEncoder doesn't hold the chain nor the signer_pk as attributes anymore
The StrategyEncoderRegistry does:
- Initialises the SwapEncoderRegistry
- Initialises all the strategies and saves them in a HashMap
- Later, the TychoEncoder only reads from this hashmap

The StrategyEncoder now each holds a SwapEncoderRegistry as an attribute and they use this to get the correct SwapEncoder instead of reading from the global SWAP_ENCODER_REGISTRY

Simplified the SwapEncoderRegistry to not need a Config (everything is done inside itself)
All SwapEncoders implement clone

Took 2 hours 29 minutes

Took 11 seconds

Took 2 minutes
2025-02-04 17:30:10 +00:00
royvardhan
2f0013a934 chore: naming 2025-02-04 22:34:53 +05:30
royvardhan
4da50ddc9e chore: naming 2025-02-04 22:34:53 +05:30
royvardhan
4d97c3f16d feat: add tests for wrap unwrap case 2025-02-04 22:34:10 +05:30
royvardhan
b0dda205b0 chore: break tests 2025-02-04 22:34:10 +05:30