簡體   English   中英

無法建立子圖:縮進錯誤

[英]Can not build a subgraph: indentation error

我正在嘗試使用graph-cli創建一個子圖並將其發布到 Graph 網絡。 這是我的子圖 yaml 文件:

specVersion: 0.0.4
schema:
  file: ./schema.graphql
dataSources:
  – kind: ethereum
    name: Contract
    network: mainnet
    source:
      address: “0xc944e90c64b2c07662a292be6244bdf05cda44a7”
      abi: Contract
      startBlock: 11446769
    mapping:
      kind: ethereum/events
      apiVersion: 0.0.5
      language: wasm/assemblyscript
      entities:
        – Transfer
      abis:
        – name: Contract
          file: ./abis/Contract.json
      eventHandlers:
        – event: Transfer(indexed address,indexed address,uint256)
          handler: handleTransfer
      file: ./src/contract.ts

但是,當我嘗試使用npm run codegen命令構建子圖時,出現以下錯誤:

在此處輸入圖像描述

但我不確定如何存在縮進問題。 如何解決?

您使用了錯誤的破折號。 你應該做-而不是

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM