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

Uniswapv2 subgraph powered by substreams #157

Open
userbox020 opened this issue May 24, 2024 · 0 comments
Open

Uniswapv2 subgraph powered by substreams #157

userbox020 opened this issue May 24, 2024 · 0 comments

Comments

@userbox020
Copy link

userbox020 commented May 24, 2024

Hello,

Im having troubles deploying the uniswapv2 subgraph for index it with substream on my localhost graph-node

im doin the follow commands

git clone https://github.com/messari/substreams.git
cd substreams/uniswap-v2
make build
make pack
graph create --node http://localhost:8020/ uniswap-v2-substreams
graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 uniswap-v2-substreams ./subgraph.yaml 

then the follow error shows up on my terminal

(base) mruserbox@guru-X99:/home/guru/Desktop/GURU_PROJECT/substreams/messari-substreams/substreams/uniswap-v2/build$ g
raph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 uniswap-v2-substreams ./subgraph.yaml 
Which version label to use? (e.g. "v0.0.1"): v0.0.1
  Skip migration: Bump mapping apiVersion from 0.0.1 to 0.0.2 (graph-ts dependency not installed yet)
  Skip migration: Bump mapping apiVersion from 0.0.2 to 0.0.3 (graph-ts dependency not installed yet)
  Skip migration: Bump mapping apiVersion from 0.0.3 to 0.0.4 (graph-ts dependency not installed yet)
  Skip migration: Bump mapping apiVersion from 0.0.4 to 0.0.5 (graph-ts dependency not installed yet)
  Skip migration: Bump mapping apiVersion from 0.0.5 to 0.0.6 (graph-ts dependency not installed yet)
  Skip migration: Bump manifest specVersion from 0.0.1 to 0.0.2
  Skip migration: Bump manifest specVersion from 0.0.2 to 0.0.4
✔ Apply migrations
✔ Load subgraph from subgraph.yaml
✔ Compile subgraph
  Copy schema file build/schema.graphql
  Write subgraph file build/uniswap_v2/uniswap_v2/substreams-uniswap-v2-v0.1.0.spkg
  Write subgraph manifest build/subgraph.yaml
✔ Write compiled subgraph to build/
  Add file to IPFS build/schema.graphql
                .. QmYPb2J3j6csXBuY4CfyZQqWScViujU6ECquePzs624ZmM
  Add file to IPFS build/uniswap_v2/uniswap_v2/substreams-uniswap-v2-v0.1.0.spkg
                .. Qmako7s5GvQLnZjxPxF3vcfUCwSyZjEUqMM3eDo6qScKJj
✔ Upload subgraph to IPFS

Build completed: QmeYgz4j3LukkkVGCWk75NoonvR44oCnXExPhHg7viNPQ7

✖ Failed to deploy to Graph node http://localhost:8020/: network not supported by registrar: no network mainnet found on chain substreams
/home/mruserbox/.nvm/versions/node/v22.2.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/gluegun/build/index.js:15
    throw up;
    ^

ExitError: EEXIT: 1
    at Object.exit (/home/mruserbox/.nvm/versions/node/v22.2.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/@oclif/core/lib/errors/index.js:21:11)
    at DeployCommand.exit (/home/mruserbox/.nvm/versions/node/v22.2.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/@oclif/core/lib/command.js:131:23)
    at /home/mruserbox/.nvm/versions/node/v22.2.0/lib/node_modules/@graphprotocol/graph-cli/dist/commands/deploy.js:254:26
    at Client._parseResponse (/home/mruserbox/.nvm/versions/node/v22.2.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/jayson/lib/client/index.js:212:14)
    at /home/mruserbox/.nvm/versions/node/v22.2.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/jayson/lib/client/index.js:149:10
    at Utils.JSON.parse (/home/mruserbox/.nvm/versions/node/v22.2.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/jayson/lib/utils.js:328:3)
    at IncomingMessage.<anonymous> (/home/mruserbox/.nvm/versions/node/v22.2.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/jayson/lib/client/http.js:86:22)
    at IncomingMessage.emit (node:events:532:35)
    at endReadableNT (node:internal/streams/readable:1696:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  oclif: { exit: 1 },
  code: 'EEXIT'
}

Node.js v22.2.0

the follow my subgraph.yaml

specVersion: 0.0.4
description: Uniswap v2 powered by substreams
repository: https://github.com/messari/substreams
schema:
  file: ./schema.graphql

dataSources:
  - kind: substreams
    name: uniswap_v2
    network: mainnet
    source:
      package:
        moduleName: graph_out
        file: substreams-uniswap-v2-v0.1.0.spkg
    mapping:
      kind: substreams/graph-entities
      apiVersion: 0.0.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant