umbracle/ethgo

How to get pending transaction?

Closed this issue · 2 comments

Can implement ethersjs on("pending",function())?

data := make(chan []byte)
_, err := Client.Subscribe("newPendingTransactions", func(b []byte) {
data <- b
})

Hey, as @dingding001 pointed out, you can use the Subscribe method for that. Unfortunately, there is no typed function for this right now.