npmyarnpkgsubgraphuniswapthegraph

How can I deploy this repo(uniswap v3 subgraph) on my own subgraph?(The Graph) #104


I just try to deploy uniswap v3 subgraph in The Graph. (hosted service)

I clone this repo and ran this steps

  1. yarn
  2. npm run codegen
  3. npm run build
  4. graph auth --product hosted-service <ACCESS_TOKEN>
  5. npm run deploy when 5 I got
Build completed: ~~~

✖ Failed to deploy to Graph node https://api.thegraph.com/deploy/: Invalid account name or access token

here is pakage.json

{
  "name": "uniswap-v3-subgraph",
  "version": "1.0.0",
  "repository": "https://github.com/graphprotocol/uniswap-v3-subgraph",
  "license": "GPL-3.0-or-later",
  "scripts": {
    "codegen": "graph codegen --output-dir src/types/",
    "build": "graph build",
    "create-local": "graph create ianlapham/uniswap-v3 --node http://127.0.0.1:8020",
    "deploy-local": "graph deploy ianlapham/uniswap-v3 --debug --ipfs http://localhost:5001 --node http://127.0.0.1:8020",
    "deploy": "graph deploy mingookk/uniswap-v3-copy --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/ --debug",
    "deploy-dev": "graph deploy sommelier/uniswap-v3 --ipfs http://35.197.14.14:5000/ --node http://35.197.14.14:8020/ --debug",
    "deploy-staging": "graph deploy $THE_GRAPH_GITHUB_USER/$THE_GRAPH_SUBGRAPH_NAME /Uniswap --ipfs https://api.staging.thegraph.com/ipfs/ --node https://api.staging.thegraph.com/deploy/",
    "watch-local": "graph deploy ianlapham/uniswap-v3 --watch --debug --node http://127.0.0.1:8020/ --ipfs http://localhost:5001"
  },
  "devDependencies": {
    "@graphprotocol/graph-cli": "^0.29.0",
    "@graphprotocol/graph-ts": "^0.26.0",
    "@typescript-eslint/eslint-plugin": "^2.0.0",
    "@typescript-eslint/parser": "^2.0.0",
    "eslint": "^6.2.2",
    "eslint-config-prettier": "^6.1.0",
    "prettier": "^1.18.2",
    "typescript": "^3.5.2"
  }
}

how can I solve this?


Solution

  • did you create the subgraph in https://thegraph.com/hosted-service/ ?

    1. First create the subgraph online. 1b. check if you have the correct access token.
    2. Deploy.