Polymarket / polymarket-subgraph

Polymarket's public subgraph manifest for indexing on-chain trade, volume, user, liquidity and market data.
GNU Lesser General Public License v3.0
20 stars 5 forks source link

Codegen command breaking for the Polymarket subgraph #48

Open davidzshi opened 1 month ago

davidzshi commented 1 month ago

✖ Failed to load subgraph from polymarket-subgraph/subgraph.yaml: Error in polymarket-subgraph/subgraph.yaml:

Path: dataSources > 0 > mapping > abis > 0 > file File does not exist: abis/ConditionalTokens.json

Path: dataSources > 0 > mapping > abis > 1 > file File does not exist: abis/ERC20Detailed.json

Path: dataSources > 1 > mapping > abis > 0 > file File does not exist: abis/FixedProductMarketMakerFactory.json

Path: dataSources > 1 > mapping > abis > 1 > file File does not exist: abis/ConditionalTokens.json

Path: dataSources > 1 > mapping > abis > 2 > file File does not exist: abis/ERC20Detailed.json

Path: dataSources > 2 > mapping > abis > 0 > file File does not exist: abis/Exchange.json

Path: dataSources > 3 > mapping > abis > 0 > file File does not exist: abis/Exchange.json

Path: templates > 0 > mapping > abis > 0 > file File does not exist: abis/FixedProductMarketMaker.json

Path: templates > 0 > mapping > abis > 1 > file File does not exist: abis/ConditionalTokens.json

Path: templates > 0 > mapping > abis > 2 > file File does not exist: abis/ERC20Detailed.json

Path: templates > 1 > mapping > abis > 0 > file File does not exist: abis/ConditionalTokens.json

Path: templates > 2 > mapping > abis > 0 > file File does not exist: abis/ERC20Detailed.json error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

davidzshi commented 1 month ago

I figured out a hacky solution in the case team wants to implement a change. The abi paths in the generated subgraph.yaml is incorrect relative to the direction (it's working for the other subgraphs)

I first ran the templatify command, then with the generated subgraphs I swapped out all abi references starting with ./ to ../