Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR defines several exceptions that can happen during sending response (aka reporting) back to on-chain.
TxInvalidAddress
TxProcessingResponseError
TxCannotEstimateGasError
ProviderNetworkError
I decided to not retry to send transaction to on-chain as was planned before because all of these error messages are not related to timeout which would be the only meaningful reason to retry it. However, I will keep this issue in mind and delve into it more if we notice that that timeout is happening. Currently, there is no way how to set a timeout when using ethers
JsonRpcProvider
, we can only setnumberConfirmations
inwait
method which has different purpose.Additionally, this PR unifies
reporter
definitions, creates and enforces anIReporter
type for predefined reporters.Defined test in
reporter.test.ts
require network to be running on http:127.0.0.1:8545 which is hardhat network. This test would fail if run in Github Actions or without launched hardhat network. However, it is modified in a way that if it cannot connect to network, then the test are ignore. I will have to later figure out how we can launch hardhat network inside of Github Actions and run them always there as well.Type of change
Checklist before requesting a review
Deployment