Mantle
eth_subscription (logs)2 额度
在 eth_subscribe 之后,节点通过 WebSocket 推送的通知;它不是可以调用的方法。
参数
无需参数(params 数组为空)。
返回值
类型
Object
通知 { jsonrpc, method: "eth_subscription", params: { subscription, result } }。params.subscription 是 eth_subscribe 返回的 ID。params.result 取决于订阅类型:newHeads 为区块头(number、hash、parentHash、timestamp、miner、gasLimit、gasUsed、stateRoot 等);logs 为日志对象(address、topics、data、blockHash、blockNumber、transactionHash、transactionIndex、logIndex、removed);newPendingTransactions 为交易哈希;syncing 为布尔值,或包含 startingBlock、currentBlock、highestBlock、pulledStates、knownStates 的对象。