FixedPriceOracle
Documentation for eth_defi.price_oracle.oracle.FixedPriceOracle Python class.
- class FixedPriceOracle[source]
Always use the same hardcoded exchange rate.
Most useful for unit testing.
Methods summary
__init__
(exchange_rate)calculate_price
([block_number])Get a price for the current block.
- __init__(exchange_rate)[source]
- Parameters
exchange_rate (decimal.Decimal) –