Skip to content

Commit

Permalink
Reverse Splitter service (#49)
Browse files Browse the repository at this point in the history
* Implement splitter service - WIP

* Implement pre_validate func on ServiceConfig

* Implement calculations for ratios

* Fix broken test

* Add test for a mix of 3 tokens incl. a CW20 and ratios

* cargo fmt

* Add README

* Remove splitter-temp service

* Add support for config update + tests

* Added test; fix build

* Reverse splitter service

* Add support for dynamic ratio

* Use ServiceAccountType for account addresses in ServiceConfig

* Address PR review feedback; add zero amount & ratio checks

* Simplify Reverse Splitter service config

* Address PR review feedback
  • Loading branch information
stiiifff authored Oct 8, 2024
1 parent f150d10 commit c3822f2
Show file tree
Hide file tree
Showing 23 changed files with 2,076 additions and 601 deletions.
507 changes: 265 additions & 242 deletions Cargo.lock

Large diffs are not rendered by default.

21 changes: 10 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,16 @@ sha2 = "0.10.8"
thiserror = "1.0.63"

# our contracts
valence-authorization = { path = "contracts/authorization", features = ["library"] }
valence-base-account = { path = "contracts/accounts/base_account", features = ["library"] }
valence-processor = { path = "contracts/processor", features = ["library"] }
valence-reverse-splitter = { path = "contracts/services/reverse-splitter-temp", features = ["library"] }
valence-splitter = { path = "contracts/services/splitter-temp", features = ["library"] }
valence-workflow-registry = { path = "contracts/workflow-registry", features = ["library"] }
valence-astroport-withdrawer = { path = "contracts/services/astroport-withdrawer", features = ["library"] }
valence-astroport-lper = { path = "contracts/services/astroport-lper", features = ["library"] }
valence-splitter-service = { path = "contracts/services/splitter", features = ["library"] }
valence-test-dynamic-ratio = { path = "contracts/testing/test-dynamic-ratio", features = ["library"] }
valence-test-service = { path = "contracts/testing/test-service", features = ["library"] }
valence-authorization = { path = "contracts/authorization", features = ["library"] }
valence-base-account = { path = "contracts/accounts/base_account", features = ["library"] }
valence-processor = { path = "contracts/processor", features = ["library"] }
valence-workflow-registry = { path = "contracts/workflow-registry", features = ["library"] }
valence-astroport-lper = { path = "contracts/services/astroport-lper", features = ["library"] }
valence-astroport-withdrawer = { path = "contracts/services/astroport-withdrawer", features = ["library"] }
valence-reverse-splitter-service = { path = "contracts/services/reverse-splitter", features = ["library"] }
valence-splitter-service = { path = "contracts/services/splitter", features = ["library"] }
valence-test-dynamic-ratio = { path = "contracts/testing/test-dynamic-ratio", features = ["library"] }
valence-test-service = { path = "contracts/testing/test-service", features = ["library"] }

# our packages
valence-account-utils = { path = "packages/account-utils" }
Expand Down
4 changes: 0 additions & 4 deletions contracts/services/reverse-splitter-temp/.cargo/config.toml

This file was deleted.

37 changes: 0 additions & 37 deletions contracts/services/reverse-splitter-temp/Cargo.toml

This file was deleted.

3 changes: 0 additions & 3 deletions contracts/services/reverse-splitter-temp/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions contracts/services/reverse-splitter-temp/src/bin/schema.rs

This file was deleted.

144 changes: 0 additions & 144 deletions contracts/services/reverse-splitter-temp/src/contract.rs

This file was deleted.

20 changes: 0 additions & 20 deletions contracts/services/reverse-splitter-temp/src/error.rs

This file was deleted.

11 changes: 0 additions & 11 deletions contracts/services/reverse-splitter-temp/src/helpers.rs

This file was deleted.

7 changes: 0 additions & 7 deletions contracts/services/reverse-splitter-temp/src/lib.rs

This file was deleted.

95 changes: 0 additions & 95 deletions contracts/services/reverse-splitter-temp/src/msg.rs

This file was deleted.

7 changes: 0 additions & 7 deletions contracts/services/reverse-splitter-temp/src/state.rs

This file was deleted.

Loading

0 comments on commit c3822f2

Please sign in to comment.