Open JavierTrujilloG opened 5 months ago
(This un-merged PR contains the fix: #194 )
There's definitely a problem, but it's in the try_decimals part, not the conversion of that to a bigint. The problem is that the graph expects erc20 contracts to follow the erc20 standard, which includes defining decimals as uint8. The challenge is this particular contract does not follow the erc20 standard; its Decimals doesn't return a uint8, but instead a bytes32.
So, the bytes32 (0x0000000000000000000000000000000000000000000000000000000067e53c31) overflows the toI32() in graph-ts (now graph-tooling), as it expects the first 4 bytes of the array to be the number, not the last 4 bytes.
There's a couple of issues going on here:
Code for toInt32(): https://github.com/graphprotocol/graph-tooling/blob/5a3ec8626a860e3df4cca8da14cdd908191b2258/packages/ts/common/collections.ts#L120
Interesting, I tried building the subgraph at #194 and I'm running into build time issues
Hi there, We are experiencing an overflow error across multiple chains. Here's an example for ethereum:
Here’s the transaction.
This seems to also affecting https://info.uniswap.org/ It could be caused by this change https://github.com/Uniswap/v3-subgraph/commit/ac71c01902164c31827760a342acc20ab8f69177