solana-labs / explorer

Explorer for Solana clusters
https://explorer.solana.com
MIT License
214 stars 278 forks source link

[Bug] Anchor IDL not showing for program #316

Open mcintyre94 opened 7 months ago

mcintyre94 commented 7 months ago

Describe the bug

A user asked on stackexchange why their anchor IDL doesn't show up on our Explorer: https://solana.stackexchange.com/questions/9569/idls-explorers-curiosity

Explorer link to their program: https://explorer.solana.com/address/propm845StqEBV57ZSnTe8EW8duzAxo5p7h4inhibXV?cluster=devnet

I took a look at Explorer and I think the code that fetches the IDL is this:

https://github.com/solana-labs/explorer/blob/5dcb64618bbbec58a4ec03ab2b8abe75ea92a19b/app/providers/anchor.tsx#L10-L37

I put a debugger on line 26 and viewed the reported program on devnet, and got an error "Tuple enum variants not yet implemented."

Screenshot 2024-01-22 at 11 15 15

Their IDL does work on solscan: https://solscan.io/account/propm845StqEBV57ZSnTe8EW8duzAxo5p7h4inhibXV?cluster=devnet#anchorProgramIDL

It also has a suspicious looking enum field:

Screenshot 2024-01-22 at 11 22 47

I'm guessing we need to update our version of Anchor to parse the newest IDLs

To Reproduce Steps to reproduce the behavior:

  1. Go to https://explorer.solana.com/address/propm845StqEBV57ZSnTe8EW8duzAxo5p7h4inhibXV?cluster=devnet, No Anchor IDL
  2. Go to https://solscan.io/account/propm845StqEBV57ZSnTe8EW8duzAxo5p7h4inhibXV?cluster=devnet#anchorProgramIDL, Anchor IDL displays

Example Links

Expected behavior

Show the Anchor IDL on this program!