0x-api icon indicating copy to clipboard operation
0x-api copied to clipboard

Support Gorli Testnet

Open sthornton13 opened this issue 3 years ago • 1 comments

Expected Behavior

Support Gorli Testnet like Ropsten with a new Gorli endpoint https://ropsten.api.0x.org/ => https://goerli.api.0x.org/

Current Behavior

Currently only the Ropsten testnet is supported or you have to fork mainnet with ganache or hardhat.

Context

Ropsten is/being deprecated. Gorli is currently the only listed testnet on Ethereum that is to be expecting long term support. https://ethereum.org/en/developers/docs/networks/ It would be beneficial to improve 0x to support Gorli as a testnet option. Services like BitQuery and others are using it for their testnet. If 0x supported Gorli it would help make 0x compatible with other Ethereum blockchain services.

sthornton13 avatar Jul 07 '22 20:07 sthornton13

As mentioned in Support for Goerli and Mumbai testnets, they now support Goerli.
However the Swap API does not seem to work and I couldn't find specific details on what is really supported for Goerli.

For example this endpoint gives a response https://ropsten.api.0x.org/swap/v1/quote?buyToken=DAI&sellToken=WETH&sellAmount=100000000000000000 but not this one https://goerli.api.0x.org/swap/v1/quote?buyToken=DAI&sellToken=WETH&sellAmount=100000000000000000 which gives the following response:

{
    "code": 100,
    "reason": "Validation Failed",
    "validationErrors": [
        {
            "field": "buyToken",
            "code": 1000,
            "reason": "buyToken and sellToken must be different"
        },
        {
            "field": "sellToken",
            "code": 1000,
            "reason": "buyToken and sellToken must be different"
        }
    ]
}

sey avatar Aug 17 '22 06:08 sey

Same for Mumbai.

They have a rather scarce support for the community, no one replies about problems or bugs on Discord, github o stackexchange.

soccerarenadev avatar Nov 03 '22 07:11 soccerarenadev