fudgebucket27 / Lexplorer

Loopring explorer alternative
14 stars 10 forks source link

Check Pool token of pool no. 57 #217

Closed modersohn closed 1 year ago

modersohn commented 2 years ago

Something is not working as expected - name and 2nd token seem to be wrong/missing:

image
modersohn commented 2 years ago

The official explorer shows that this is the "Maker / MKR" token - info it probably got via the API as discussed in #63 as well.

image
modersohn commented 2 years ago

I have now learnt and tried that we can actually retrieve info like token name and symbol from the token address, i.e. the ERC20 contract via Nethereum directly!

modersohn commented 2 years ago

Hey @fudgebucket27 since you've got way more experience with calling Ethereum contracts, could you possibly check this out: ccc1f6a is where I started fetching token details and it works for an L2 AMM pool token, but not for the Maker token, which is also missing from the graph.

The test with the maker token causes a SystemOverflowException with "Value was either too large or too small for an Int32." for both contract methods (name and symbol).

Any idea what's going on?

fudgebucket27 commented 2 years ago

Hey yep I'll take a look at it mate!

On Sat, 9 July 2022, 4:54 am modersohn, @.***> wrote:

Hey @fudgebucket27 https://github.com/fudgebucket27 since you've got way more experience with calling Ethereum contracts, could you possibly check this out: ccc1f6a https://github.com/fudgebucket27/Lexplorer/commit/ccc1f6a6ec484d10aee326777fa989bada76db8f is where I started fetching token details and it works for an L2 AMM pool token, but not for the Maker token, which is also missing from the graph.

The test with the maker token causes a SystemOverflowException with "Value was either too large or too small for an Int32." for both contract methods (name and symbol).

Any idea what's going on?

— Reply to this email directly, view it on GitHub https://github.com/fudgebucket27/Lexplorer/issues/217#issuecomment-1179276556, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIDWT32O3FMOHSV4BKJ5Y3VTB2PBANCNFSM52TNUK3A . You are receiving this because you were mentioned.Message ID: @.***>

modersohn commented 2 years ago

In the meantime, I've now successfully retrieved symbol and name for almost all LP tokens. The Maker token remains the only one, which is empty in the graph, that I cannot query via it's contract.

If I look at the graph code it seems the reason why symbol and name are empty, is that querying the contract failed for the graph too?!

But when why can I easily read the contract on etherscan?

modersohn commented 2 years ago

Finally found out what's going on. The Maker token contract is actually not ERC20 compliant, because it defines symbol and name functions as returning bytes32 not string. If I change the ABI accordingly I can get symbol and name for Maker, but obviously not for the others. Not sure what to do with all that info now.