degenbot.exceptions.infrastructure¶

Infrastructure and token exceptions.

Includes exceptions for: - Database operations (BackupExists) - Anvil fork operations (AnvilError) - ERC-20 token operations (Erc20TokenError, NoPriceOracle)

Module Contents¶

exception degenbot.exceptions.infrastructure.BackupExists(path: pathlib.Path)¶

Bases: degenbot.exceptions.base.DegenbotError

Raised by degenbot database backup if a file exists at the target path.

path¶
exception degenbot.exceptions.infrastructure.AnvilError(method: str, error: str)¶

Bases: degenbot.exceptions.base.DegenbotError

Raised on errors resulting from failed calls to Anvil via JSON-RPC.

This exception is specifically for errors that occur when making RPC calls to an Anvil instance, such as invalid method calls, parameter errors, or other Anvil-specific failures.

method¶
error¶
exception degenbot.exceptions.infrastructure.Erc20TokenError(*, message: str | None = None)¶

Bases: degenbot.exceptions.base.DegenbotError

Exception raised inside ERC-20 token helpers.

exception degenbot.exceptions.infrastructure.NoPriceOracle¶

Bases: Erc20TokenError

Raised when .price is called on a token without a price oracle.