Skip to content

Conversation

@YaroShkvorets
Copy link
Contributor

@YaroShkvorets YaroShkvorets commented Feb 26, 2025

The other day with @marcusrein we've ran into an issue with Explorer for one of the chains supplying slightly invalid ABI (one of the required fields was being lost during serialization).

graph init would scaffold subgraph for this ABI but graph deploy request to Graph Node would fail with a very generic error:

✖ Failed to deploy to Graph node http://localhost:8020/: subgraph resolve error: resolve error: failed to resolve data source Contract with source_address Some(0x88b8e2161dedc77ef4ab7585569d2415a1c1055d) and source_start_block 4900000

Deployment: QmejLsgNNWCWT25HqVsgWZ6VgDBWpaR7RijQeYdcDZn6k3

This PR makes error message more descriptive for the subgraph developer:

✖ Failed to deploy to Graph node http://localhost:8020/: subgraph resolve error: resolve error: failed to resolve data source Contract with source_address Some(0x88b8e2161dedc77ef4ab7585569d2415a1c1055d) and source_start_block 4900000: failed to resolve mapping /ipfs/QmWmftR3RhDtRJpeK8JhgcP1Bys8cwMCwpMs6LH2noh1A3: failed to load ABI Contract: Serialization error: missing fieldanonymousat line 169 column 3: missing field "anonymous" at line 169 column 3

@YaroShkvorets
Copy link
Contributor Author

YaroShkvorets commented Feb 27, 2025

It appears to be an issue with multiple explorers, i.e. all oklink.com explorers(50+ chains) corrupt ABI by eating "anonymous" field. So if you copy-paste ABI from their UI and build subgraph from it, you are out of luck with that deployment error.

https://www.oklink.com/xlayer/token/0x1e4a5963abfd975d8c9021ce480b42188849d41d?tab=contract

@mangas mangas merged commit 1d550cb into graphprotocol:master Mar 6, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants