Passing SPKG instead of contract address to init
leads to registry unable to fetch contract info
#1898
Labels
bug
Something isn't working
Which packages are impacted by your issue?
@graphprotocol/graph-cli
Describe the issue
When providing all the arguments to the CLI for
init
, this line checks if a contract address or an spkg is provided:graph-tooling/packages/cli/src/commands/init.ts
Line 200 in 93d87a8
The registry then tries to use the contract address value to fetch the ABI info.
graph-tooling/packages/cli/src/commands/init.ts
Line 225 in 93d87a8
But if a SPKG was supplied instead,
fromContract
is then undefined leading to the contract service's failure to fetch the info.Logs
Notice
address=undefined
in the URLs.Reproduction
Github repo
Steps to Reproduce the Bug or Issue
test.spkg
)graph init Test ./ --spkg=test.spkg --network=mainnet --protocol=ethereum --node=http://localhost
DEBUG=*
to see the logs.Expected behavior
ABI should be fetched in case of using SPKG.
Screenshots or Videos
No response
Platform
@graphprotocol/*
version(s): 0.93.3Subgraph Manifest
No response
Subgraph GraphQL Schema
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: