update_price_oracle_with_sync_events_single_thread
Documentation for eth_defi.uniswap_v2.oracle.update_price_oracle_with_sync_events_single_thread function.
- update_price_oracle_with_sync_events_single_thread(oracle, web3, pair_contract_address, start_block, end_block, reverse_token_order=False)[source]
Feed price oracle data for a given block range.
A slow single threaded implementation - suitable for testing.
Example:
- Parameters
oracle (eth_defi.price_oracle.oracle.PriceOracle) – Price oracle to update
web3 (web3.main.Web3) – Web3 connection we use to fetch Sync event data from JSON-RPC node
start_block (int) – First block to include data for
end_block (int) – Last block to include data for (inclusive)
reverse_token_order – If pair token0 is the quote token to calculate the price.
pair_contract_address (str) –