graph-tooling icon indicating copy to clipboard operation
graph-tooling copied to clipboard

`graph init` Ethereum/matic/Decentraland contract (480a0f4e360e8964e68858dd231c2922f1df45ef) fails

Open maoueh opened this issue 2 years ago • 1 comments

Which packages are impacted by your issue?

@graphprotocol/graph-cli

Describe the issue

graph init with answers:

  • Protocol · ethereum
  • Product for which to initialize · hosted-service
  • Subgraph name · maoueh/decentraland
  • Directory to create the subgraph in · decentraland
  • Ethereum network · matic
  • Contract address · 480a0f4e360e8964e68858dd231c2922f1df45ef ✖ Failed to fetch ABI from Etherscan: ABI not found, try loading it from a local file ✖ Failed to fetch Start Block: Failed to fetch contract creation transaction hash

However, this ABI exists there, see curl "https://api.polygonscan.com/api?module=contract&action=getabi&address=0x480a0f4e360E8964e68858Dd231c2922f1df45Ef"

Reproduction

See below

Steps to Reproduce the Bug or Issue

graph init then answer questions above

Expected behavior

Works

Screenshots or Videos

None

Platform

  • OS: macOS
  • NodeJS: 18.5.0
  • @graphprotocol/cli version(s): 0.59

Subgraph Manifest

No response

Subgraph GraphQL Schema

No response

Additional context

No response

maoueh avatar Oct 06 '23 16:10 maoueh

The issue is that API wants address to be prefixed with "0x". Otherwise it throws an error.

The wizard should probably just add the prefix if it's not there.

YaroShkvorets avatar Nov 03 '23 04:11 YaroShkvorets