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

`graph add` generates incomplete event types for some contracts

Open YaroShkvorets opened this issue 1 year ago • 0 comments

Which packages are impacted by your issue?

@graphprotocol/graph-cli

Describe the issue

graph add 0x514910771AF9Ca656af840dff83E8264EcF986CA completes without issues but fails to build.

Reproduction

N/A

Steps to Reproduce the Bug or Issue

  1. graph init, select mainnet, specify USDT contract: 0xdAC17F958D2ee523a2206206994597C13D831ec7
  2. graph add 0x514910771AF9Ca656af840dff83E8264EcF986CA
  3. yarn install && yarn build
ERROR TS2339: Property 'data' does not exist on type '~lib/@graphprotocol/graph-ts/common/collections/TypedMap<~lib/string/String,~lib/@graphprotocol/graph-ts/common/value/Value>'.

   entity.data = event.params.data

However, everything works as expected if you generate subgraph for this contract with graph init, so the issue appears to be with graph add

Expected behavior

Should add a contract to subgraph and events handlers with all fields

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • NodeJS: [e.g. 18.5.0]
  • @graphprotocol/* version(s): [e.g. 2.6.2]

Subgraph Manifest

No response

Subgraph GraphQL Schema

No response

Additional context

No response

YaroShkvorets avatar Dec 16 '24 03:12 YaroShkvorets