Skip to content

Make 'out of funds' a non-recoverable error #174

@tilacog

Description

@tilacog

When the Oracle's wallet is low on funds and attempts to broadcast a transaction, we get back an error from the JRPC provider, like this one:

2022-08-02T15:07:19.400312207Z ERROR An error occurred and interrupted the last polling iteration. error="Couldn't submit a transaction to the mempool of the JRPC provider: Api error: RPC error: Error { code: ServerError(-32000), message: \"insufficient funds for gas * price + value\", data: None }"

We should create a new error variant that:

  1. emits a proper warning (and alerts, when we get to that)
  2. halts the main loop for longer than the default sleep duration to give the team some time to refund the wallet.

Ideally, the Oracle should keep track of its wallet's balance and emit warnings and alerts way before its depletion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions