Replies: 2 comments
-
Is |
Beta Was this translation helpful? Give feedback.
-
This is actually pretty dangerous to simply offer developers, because the nuance of how it works. For example, if a developer uses a blockIssued of 0, it would hammer the network looking for that nonce. Improvements can be made using binary search, but it is still a very expensive call, and many would not be aware of why. For now, I'm not planning to expose this too much. In v6, there is an API to do it on the TransactionResponse object, but it is not advertised, so you can use it at your own risk. :) |
Beta Was this translation helpful? Give feedback.
-
I really like the option to detect if a transaction has been cancelled or repriced, thank you very much for that! But it's only usable when the
TransactionResponse
object was created byethers
either throughprovider.sendTransaction
or as aContractTransaction
Is your feature request related to a problem? Please describe.
When I don't have a whole
TransactionResponse
but only transaction hash,provider.waitForTransaction(hash)
doesn't detect cancelled transaction.Neither does
(await provider.getTransaction(hash)).wait()
.Describe the solution you'd like
I can keep track of the blockNumber the transaction was sent at, so I could pass it either to
waitForTransaction
orgetTransaction
along with the hash, to enable the cancellation detecting logic.Describe alternatives you've considered
As a workaround the following works:
Beta Was this translation helpful? Give feedback.
All reactions