Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scaffold subgraph generation failing for contracts using 2D arrays as event params #1878

Open
yash251 opened this issue Dec 26, 2024 · 1 comment · May be fixed by #1884
Open

scaffold subgraph generation failing for contracts using 2D arrays as event params #1878

yash251 opened this issue Dec 26, 2024 · 1 comment · May be fixed by #1884
Labels
bug Something isn't working

Comments

@yash251
Copy link
Member

yash251 commented Dec 26, 2024

Which packages are impacted by your issue?

@graphprotocol/graph-ts

Describe the issue

subgraph generation fails for the contracts having 2D arrays as event params

Reproduction

Steps to Reproduce the Bug or Issue

Try to index this contract 0x16C6521Dff6baB339122a0FE25a9116693265353 on Mainnet and subgraph generation will fail with the error

✖ Failed to create subgraph scaffold: ',' expected. (3:26)
  1 |
  2 |   import { assert, describe, test, clearStore, beforeAll, afterAll } from "matchstick-as/assembly/index"
> 3 |   import { Address, Array<BigInt, BigInt } from "@graphprotocol/graph-ts"
    |                          ^
  4 |   import { Exchange } from "../generated/schema"
  5 |   import { Exchange as ExchangeEvent } from "../generated/CurveRouter/CurveRouter"
  6 |   import { handleExchange } from "../src/curve-router"
    SyntaxError: ',' expected. (3:26)
      1 |
      2 |   import { assert, describe, test, clearStore, beforeAll, afterAll }
     from "matchstick-as/assembly/index"
    > 3 |   import { Address, Array<BigInt, BigInt } from 
    "@graphprotocol/graph-ts"
        |                          ^
      4 |   import { Exchange } from "../generated/schema"
      5 |   import { Exchange as ExchangeEvent } from 
    "../generated/CurveRouter/CurveRouter"
      6 |   import { handleExchange } from "../src/curve-router"
      ```

### Expected behavior

Expect to get scaffold subgraph code but getting `✖ Failed to create subgraph scaffold`

### 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_
@yash251 yash251 added the bug Something isn't working label Dec 26, 2024
@matthewdarwin
Copy link
Collaborator

Seen #1576
Workaround documented in #1706

@YaroShkvorets YaroShkvorets linked a pull request Dec 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants