。getPastEvents不是函数

问题描述 投票:0回答:1

我正在尝试使用以下代码获取所有过去的事件

export const loadAllOrders = async (exchange, dispatch) => {
// Fetch cancelled orders with the "Cancel" event stream
const cancelStream = await exchange.getPastEvents('CancelOrder', { fromBlock: 0, toBlock: 'latest' })

我收到上述错误。我可能会缺少什么?

这是我正在使用的。

getPastEvents from web3

ethereum web3
1个回答
0
投票

您设法解决了这个问题吗?我面临着类似的问题,其中getPastEvents未被识别为函数。如果您能够解决此问题,能否解释解决方案?

© www.soinside.com 2019 - 2024. All rights reserved.