Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate Specific Module for Soroswap #27

Open
celadari opened this issue Mar 7, 2024 · 0 comments
Open

Integrate Specific Module for Soroswap #27

celadari opened this issue Mar 7, 2024 · 0 comments

Comments

@celadari
Copy link
Collaborator

celadari commented Mar 7, 2024

Proposed Implementation:

Ideally, I envision being able to use the library as follows:

const mercury = new Mercury(...);
mercury.soroswap.getAllLiquidityPools;
mercury.soroswap.getProvidedLiquidityOperations({filters});

The above methods are just examples, but the key idea is to be able to parse specific events from Soroswap contracts seamlessly.

Additionally, considering that contract addresses may change and that other AMM should be added (Phoenix, Comet, ...), I propose the Soroswap module should adhere to the following design principles:

  1. Lazy Initialization: The Soroswap module should be lazy, meaning it doesn't need to be instantiated unless the user specifically intends to use the Soroswap functionalities.
  2. Configurable Contract Addresses: Users should have the option to specify contract addresses when instantiating the Mercury client. This adds flexibility and future-proofs the module against changes in contract addresses.
  3. Default Endpoint Utilization: If no contract addresses are provided by the user, the module should default to using standard Soroswap endpoints to retrieve the necessary information.

Motivation:

Integrating a dedicated Soroswap module into the Mercury SDK would significantly streamline the development process for projects targeting Soroswap.

I believe this addition could represent a valuable collaboration opportunity and further the SDK's adoption and utility for the Stellar/Soroban developer community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant