Uniswap / v3-subgraph

Subgraph for Uniswap V3
GNU General Public License v3.0
337 stars 467 forks source link

getting indexing_error #159

Open moisty70 opened 1 year ago

moisty70 commented 1 year ago

Arbitrum One subgraph is showing indexing_error

speedmax commented 1 year ago

Arbitrum Analytic site is not showing any data for a week now on https://info.uniswap.org

Top tokens/ top pools are not loading.

image

I have pinged ianlapham on Twitter.

image
jb1011 commented 1 year ago

Hello, I'm getting the exact same error, have you managed to fix it?

mhxw commented 9 months ago

I encountered the same issue. My subgraph involves scanning token data, and here's how I resolved it. You can apply a similar approach to other situations.

https://github.com/Uniswap/v3-subgraph/blob/main/src/mappings/factory.ts#L48

    if (token0 === null) {
        token0 = new Token(event.params.token0.toHexString());
        let endpoint         = ERC20.bind(event.params.token0)
        let name             = endpoint.try_name()
        let symbol           = endpoint.try_symbol()
        let decimals         = endpoint.try_decimals()
        token0.symbol = symbol.reverted   ? "unknown" : symbol.value
        token0.name = name.reverted     ? "unknown" : name.value
        token0.decimals = decimals.reverted ? BigInt.fromI32(18)  : BigInt.fromI32(decimals.value)
    }

    if (token1 === null) {
        token1 = new Token(event.params.token1.toHexString());
        let endpoint         = ERC20.bind(event.params.token1)
        let name             = endpoint.try_name()
        let symbol           = endpoint.try_symbol()
        let decimals         = endpoint.try_decimals()
        token1.symbol = symbol.reverted   ? "unknown" : symbol.value
        token1.name = name.reverted     ? "unknown" : name.value
        token1.decimals = decimals.reverted ? BigInt.fromI32(18)  : BigInt.fromI32(decimals.value)
    }