diff --git a/src/telliot_feeds/reporters/custom_reporter.py b/src/telliot_feeds/reporters/custom_reporter.py index 3292a009..e4813270 100644 --- a/src/telliot_feeds/reporters/custom_reporter.py +++ b/src/telliot_feeds/reporters/custom_reporter.py @@ -61,7 +61,7 @@ def __init__( self.max_fee = max_fee self.priority_fee = priority_fee self.legacy_gas_price = legacy_gas_price - self.gas_price_speed = gas_price_speed + self.gas_price_speed = [gas_price_speed] self.trb_usd_median_feed = trb_usd_median_feed self.eth_usd_median_feed = eth_usd_median_feed self.custom_contract = custom_contract diff --git a/src/telliot_feeds/reporters/interval.py b/src/telliot_feeds/reporters/interval.py index 54ee1c33..eee7742d 100644 --- a/src/telliot_feeds/reporters/interval.py +++ b/src/telliot_feeds/reporters/interval.py @@ -11,7 +11,7 @@ from chained_accounts import ChainedAccount from eth_utils import to_checksum_address from telliot_core.contract.contract import Contract -from telliot_core.gas.legacy_gas import ethgasstation +from telliot_core.gas.legacy_gas import legacy_gas_station from telliot_core.model.endpoints import RPCEndpoint from telliot_core.utils.key_helpers import lazy_unlock_account from telliot_core.utils.response import error_status @@ -70,7 +70,7 @@ def __init__( self.max_fee = max_fee self.priority_fee = priority_fee self.legacy_gas_price = legacy_gas_price - self.gas_price_speed = gas_price_speed + self.gas_price_speed = [gas_price_speed] self.trb_usd_median_feed = trb_usd_median_feed self.eth_usd_median_feed = eth_usd_median_feed self.wait_period = wait_period @@ -108,9 +108,9 @@ async def check_reporter_lock(self) -> ResponseStatus: return status - async def fetch_gas_price(self, speed: Union[tuple[str], str] = "average") -> Optional[int]: + async def fetch_gas_price(self, speed: Optional[Any] = None) -> Optional[int]: """Fetch gas price from ethgasstation in gwei.""" - return await ethgasstation(speed) # type: ignore + return await legacy_gas_station(chain_id=self.chain_id, speed_parse_lis=speed) # type: ignore async def ensure_staked(self) -> Tuple[bool, ResponseStatus]: """Make sure the current user is staked diff --git a/src/telliot_feeds/reporters/tellor_flex.py b/src/telliot_feeds/reporters/tellor_flex.py index 88c8fc75..d4c17471 100644 --- a/src/telliot_feeds/reporters/tellor_flex.py +++ b/src/telliot_feeds/reporters/tellor_flex.py @@ -72,7 +72,7 @@ def __init__( self.wait_period = wait_period self.priority_fee = priority_fee self.legacy_gas_price = legacy_gas_price - self.gas_price_speed = gas_price_speed + self.gas_price_speed = [gas_price_speed] self.autopaytip = 0 self.staked_amount: Optional[float] = None self.qtag_selected = False if self.datafeed is None else True @@ -84,7 +84,7 @@ def __init__( self.account: ChainedAccount = account assert self.acct_addr == to_checksum_address(self.account.address) - async def fetch_gas_price(self, speed: Optional[Union[tuple[str], str]] = None) -> Optional[int]: + async def fetch_gas_price(self, speed: Optional[Any] = None) -> Optional[int]: """Fetch estimated gas prices. Expected to return gas price in gwei."""