typescript - 我们如何生成 Uniswap 子图构建文件夹?
问题描述
当我尝试生成构建文件夹时出现这些错误。
ERROR TS2305: Module '~lib/@graphprotocol/graph-ts' has no exported member 'EthereumEvent'.
import { log, BigInt, BigDecimal, Address, EthereumEvent } from '@graphprotocol/graph-ts'
~~~~~~~~~~~~~
in src/mappings/helpers.ts(2,44)
WARNING AS226: Expression resolves to unusual type 'usize'.
let totalSupplyValue = null
~~~~
in src/mappings/helpers.ts(108,26)
ERROR TS2322: Type '~lib/@graphprotocol/graph-ts/chain/ethereum/ethereum.CallResult<~lib/@graphprotocol/graph-ts/common/numbers/BigInt>' is not assignable to type 'i32'.
totalSupplyValue = totalSupplyResult as i32
~~~~~~~~~~~~~~~~~
in src/mappings/helpers.ts(111,24)
WARNING AS226: Expression resolves to unusual type 'usize'.
let decimalValue = null
~~~~
in src/mappings/helpers.ts(119,22)
× Failed to compile subgraph: Failed to compile data source mapping: 2 compile error(s)
解决方案
推荐阅读
- python - 计算张量流梯度
- reactjs - 类型“IntrinsicAttributes”上不存在属性“样式”
- php - 如何使用登录页面中的会话变量显示用户数据?
- php - 在 VSCode 上调试 Laravel 应用程序
- sql-server - 如何获取 Patterson 的 Eaglesoft 数据库的数据库架构
- spyder - 无法使用 anaconda navigator 或 conda propmt 升级或降级 spyder 3.2.8 吗?
- idris - Idris 中的实例解析
- angularjs - 路由演示在更新到 AngularJS 1.6 时停止工作
- hyperledger-fabric - 不同 ORG 的 2 个对等点可以实例化相同的 ChainCode 并提交交易吗?
- linux - 有没有办法在 Ubuntu 上运行映像 Windows Docker?