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

Using this library to provide liquidity #38

Open
GeorgeGkas opened this issue Mar 10, 2022 · 1 comment
Open

Using this library to provide liquidity #38

GeorgeGkas opened this issue Mar 10, 2022 · 1 comment

Comments

@GeorgeGkas
Copy link

Hello,

I have a question regarding the use of this library and would like to get some directions. I'm trying to create a liquidity pool for, lets say an artificail pair ETH > $TOKEN. How should I procceed? Is this supported from the library? I took a look in the source code and found that the required functionalities are implemented, but what classes should I use? uniswap-router-contract.factory.v2.ts already contains the method addLiquidity. From what I understand the following steps should be followed:

  1. Create a UniswapPair instance
  2. Create a UniswapRouterContractFactoryV2 instance
  3. Call addLiquidity method of UniswapRouterContractFactoryV2 instance and provide the token parameters from UniswapPair instance.
  4. Check for approval
  5. Send the transaction to network using a web3/ethers provider.

Is my assumptions correct? There might be the case that we also need to have a deployed contract for the desired liquidity pool, but I am not sure. I read the uniswap documentations but could not figure how to procceed. You take a very important step by creating this library, which is so much simpler to use than the official Uniswap SDK, so I took the initiate to ask for help here.

@tongtongking
Copy link

The question is so import for me.
I was still thinking the same question.

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

2 participants