Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Different versions between documentation and github code #119

Open
Noe315 opened this issue Dec 8, 2022 · 2 comments
Open

Different versions between documentation and github code #119

Noe315 opened this issue Dec 8, 2022 · 2 comments

Comments

@Noe315
Copy link

Noe315 commented Dec 8, 2022

I was installing the SDK using this guide and realized that the FACTORY_ADDRESS and INIT_CODE_HASH is only for Uniswap. I have deployed my own contracts (source code here) on KardiaChain, so I needed to replace the FACTORY_ADDRESS and INIT_CODE_HASH with my own.

I tried to clone this repository and modified the FACTORY_ADDRESS and INIT_CODE_HASH, then build again, but it seems that the repository (which is of version 3.0.1) does not match with the documentation (which is of version 3.0.3). This makes it a bit difficult to follow the documentation.

I have not found the code for version 3.0.3 anywhere, so if you guys could share the source for version 3.0.3 (to match with the documentation), that would be much appreciated.

Thank you.

@Noe315
Copy link
Author

Noe315 commented Dec 8, 2022

I found a workaround (which is kind of bad, but it works for now), that is to search and replace the original FACTORY_ADDRESS and INIT_CODE_HASH with that of my own.

@Florian-S-A-W
Copy link

Florian-S-A-W commented Apr 26, 2023

Hi @Noe315

Parts of the documentation are for the deprecated "uniswap-sdk" package, which was re-released as the "v2-sdk" and updated from there. Version 1.0.0 of this sdk, the uniswap "v2-sdk", is version 3.0.3 of "uniswap-sdk", which you are referring to.
So version 3.0.1 is actually 2 major versions ahead of 3.0.3 so some functionalities may have been removed or updated.

If you are using a fork of Uniswap V2 on a different chain, you can fork this repository and replace the factory address and init code hash in the constants class.

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

No branches or pull requests

2 participants