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

xDAI (or other arbitrary chain) support #52

Open
anxolin opened this issue Jan 7, 2021 · 7 comments
Open

xDAI (or other arbitrary chain) support #52

anxolin opened this issue Jan 7, 2021 · 7 comments

Comments

@anxolin
Copy link

anxolin commented Jan 7, 2021

Hi, given the big traction xDAI network, it's alignment with Ethereum roadmap, and the fact that is fully compatible with Ethereum, could it be supported by the SDK?

These are their endpoints:
https://www.xdaichain.com/for-developers/developer-resources#json-rpc-endpoints

Chain Ids:
https://github.com/Uniswap/uniswap-sdk/blob/v2/src/constants.ts#L6

@anxolin
Copy link
Author

anxolin commented Jan 8, 2021

Also, I just want to add, that right now there's a fork of Uniswap in xDAI called HoneySwap, https://www.xdaichain.com/about-xdai/project-spotlights/1hive#honey-liquidity-and-exchange

it would be nice to see Uniswap "the original" also in that network, and since it's 100% compatible, I don't think it would be too much development effort. xDAI will allow to swap for less than a cent! Great for many use cases, like being able to use dapps that are prohibitively expensive in mainnet, and onboarding users.

@anxolin
Copy link
Author

anxolin commented Jan 19, 2021

@moodysalem don't you think this would be good for Uniswap?

@moodysalem
Copy link
Contributor

It seems like all that is needed is to add a value to the enum, but since it can be any network ID it might be better to support a special OTHER chainId that can be used with any network. I would happily review a PR that adds that.

@anxolin
Copy link
Author

anxolin commented Jan 19, 2021

I went for it, and created the PR #53 @moodysalem

Edit: Superseded by a more general PR for supporting any network #54

@moodysalem
Copy link
Contributor

I've refactored the code to use ChainId | number everywhere which only fails if you are trying to swap to/from the Currency.ETHER constant (because of how we map between WETH9/Ether)

Please let me know if the SDK is flexible enough for your use case now

@moodysalem moodysalem changed the title xDAI support xDAI (or other chain) support Mar 7, 2021
@moodysalem moodysalem changed the title xDAI (or other chain) support xDAI (or other arbitrary chain) support Mar 7, 2021
@anxolin
Copy link
Author

anxolin commented Mar 8, 2021

@moodysalem is this version available in https://www.npmjs.com/package/@uniswap/sdk?

@moodysalem
Copy link
Contributor

@moodysalem is this version available in https://www.npmjs.com/package/@uniswap/sdk?

No, the package is now @uniswap/v2-sdk for consistency with core and periphery

But you might also be blocked by #55

royalaid pushed a commit to royalaid/qidao-sdk that referenced this issue May 9, 2023
Add wsteth/eths, abri arb, and mainnet crv, fixes gDAI minCDR, adds dogechain
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants