diff --git a/src/telliot_feeds/cli/commands/conditional.py b/src/telliot_feeds/cli/commands/conditional.py index 65ad54cc..b74c4e16 100644 --- a/src/telliot_feeds/cli/commands/conditional.py +++ b/src/telliot_feeds/cli/commands/conditional.py @@ -66,6 +66,7 @@ async def conditional( stale_timeout: int, query_tag: str, unsafe: bool, + skip_manual_feeds: bool, ) -> None: """Report values to Tellor oracle if certain conditions are met.""" click.echo("Starting Conditional Reporter...") @@ -137,6 +138,7 @@ async def conditional( "check_rewards": check_rewards, "gas_multiplier": gas_multiplier, "max_priority_fee_range": max_priority_fee_range, + "skip_manual_feeds": skip_manual_feeds, } reporter = ConditionalReporter( diff --git a/src/telliot_feeds/cli/commands/liquity.py b/src/telliot_feeds/cli/commands/liquity.py index 6fa87c75..fffbdec0 100644 --- a/src/telliot_feeds/cli/commands/liquity.py +++ b/src/telliot_feeds/cli/commands/liquity.py @@ -60,6 +60,7 @@ async def liquity( query_tag: str, chainlink_feed: str, unsafe: bool, + skip_manual_feeds: bool, ) -> None: """Report values to Tellor oracle if certain conditions are met.""" click.echo("Starting Liquity Backup Reporter...") @@ -140,6 +141,7 @@ async def liquity( "check_rewards": check_rewards, "gas_multiplier": gas_multiplier, "max_priority_fee_range": max_priority_fee_range, + "skip_manual_feeds": skip_manual_feeds, } reporter = ChainlinkBackupReporter( diff --git a/src/telliot_feeds/cli/commands/report.py b/src/telliot_feeds/cli/commands/report.py index e9503863..170095ef 100644 --- a/src/telliot_feeds/cli/commands/report.py +++ b/src/telliot_feeds/cli/commands/report.py @@ -180,6 +180,7 @@ async def report( max_priority_fee_range: int, ignore_tbr: bool, unsafe: bool, + skip_manual_feeds: bool, ) -> None: """Report values to Tellor oracle""" ctx.obj["ACCOUNT_NAME"] = account_str @@ -320,6 +321,7 @@ async def report( "gas_multiplier": gas_multiplier, "max_priority_fee_range": max_priority_fee_range, "ignore_tbr": ignore_tbr, + "skip_manual_feeds": skip_manual_feeds, } reporter: Union[FlashbotsReporter, RNGReporter, Tellor360Reporter] if sig_acct_addr: diff --git a/src/telliot_feeds/cli/utils.py b/src/telliot_feeds/cli/utils.py index 59d0204a..e81a4252 100644 --- a/src/telliot_feeds/cli/utils.py +++ b/src/telliot_feeds/cli/utils.py @@ -335,6 +335,13 @@ def common_reporter_options(f: Callable[..., Any]) -> Callable[..., Any]: callback=parse_profit_input, default="100.0", ) + @click.option( + "--skip-manual-feeds", + help="skip feeds that require manual value input when listening to tips", + nargs=1, + type=bool, + default=True, + ) @functools.wraps(f) def wrapper(*args: Any, **kwargs: Any) -> Any: return f(*args, **kwargs) diff --git a/src/telliot_feeds/feeds/__init__.py b/src/telliot_feeds/feeds/__init__.py index 82f4ae30..1a38fb83 100644 --- a/src/telliot_feeds/feeds/__init__.py +++ b/src/telliot_feeds/feeds/__init__.py @@ -213,3 +213,16 @@ "BTCBalance": btc_balance_feed, "EVMBalance": evm_balance_feed, } + +# populate list with feeds that require manual input +MANUAL_FEEDS: list[str] = [ + "SpotPrice", + "DivaProtocol", + "SnapshotOracle", + "NumericApiManualResponse", + "TWAP", + "DailyVolatility", + "TellorRNGManualResponse", + "CustomPrice", + "FileCID", +] diff --git a/src/telliot_feeds/reporters/tellor_360.py b/src/telliot_feeds/reporters/tellor_360.py index d315d4fd..1fa43cb6 100644 --- a/src/telliot_feeds/reporters/tellor_360.py +++ b/src/telliot_feeds/reporters/tellor_360.py @@ -52,11 +52,13 @@ def __init__( ignore_tbr: bool = False, # relevant only for eth-mainnet and eth-testnets stake: float = 0, use_random_feeds: bool = False, + skip_manual_feeds: bool = False, **kwargs: Any, ) -> None: super().__init__(**kwargs) self.autopay = autopay self.datafeed = datafeed + self.skip_manual_feeds = skip_manual_feeds self.use_random_feeds: bool = use_random_feeds self.qtag_selected = False if self.datafeed is None else True self.expected_profit = expected_profit @@ -231,7 +233,7 @@ async def fetch_datafeed(self) -> Optional[DataFeed[Any]]: # Fetch datafeed based on whichever is most funded in the AutoPay contract if self.datafeed is None: - suggested_feed, tip_amount = await get_feed_and_tip(self.autopay) + suggested_feed, tip_amount = await get_feed_and_tip(self.autopay, self.skip_manual_feeds) if suggested_feed is not None and tip_amount is not None: logger.info(f"Most funded datafeed in Autopay: {suggested_feed.query.type}") diff --git a/src/telliot_feeds/reporters/tips/listener/funded_feeds.py b/src/telliot_feeds/reporters/tips/listener/funded_feeds.py index 6d32c7bc..49297d54 100644 --- a/src/telliot_feeds/reporters/tips/listener/funded_feeds.py +++ b/src/telliot_feeds/reporters/tips/listener/funded_feeds.py @@ -39,6 +39,7 @@ async def get_funded_feed_queries(self) -> tuple[Optional[list[QueryIdandFeedDet return None, error_status(note="No funded feeds returned by autopay function call") # List of feeds with telliot supported query types + # TODO: make skipping manual feeds optional supported_funded_feeds = [ (feed, query_data) for (feed, query_data) in funded_feeds if feed_in_feed_builder_mapping(query_data) ] diff --git a/src/telliot_feeds/reporters/tips/suggest_datafeed.py b/src/telliot_feeds/reporters/tips/suggest_datafeed.py index d57788e1..17241431 100644 --- a/src/telliot_feeds/reporters/tips/suggest_datafeed.py +++ b/src/telliot_feeds/reporters/tips/suggest_datafeed.py @@ -22,7 +22,7 @@ # suggest a feed here not a query tag, because build feed portion # or check both mappings for type async def get_feed_and_tip( - autopay: TellorFlexAutopayContract, current_timestamp: Optional[TimeStamp] = None + autopay: TellorFlexAutopayContract, skip_manual_feeds: bool, current_timestamp: Optional[TimeStamp] = None ) -> Optional[Tuple[Optional[DataFeed[Any]], Optional[int]]]: """Fetch feeds with their tip and filter to get a feed suggestion with the max tip @@ -56,7 +56,8 @@ async def get_feed_and_tip( datafeed = feed_from_catalog_feeds(query_data) if datafeed is None: - datafeed = feed_in_feed_builder_mapping(query_data) + # TODO: add skip manual feed flag to make optional; currently skips all manual feeds + datafeed = feed_in_feed_builder_mapping(query_data, skip_manual_feeds=skip_manual_feeds) if datafeed is not None: query = get_query_from_qtyp_name(query_data) @@ -66,4 +67,6 @@ async def get_feed_and_tip( setattr(datafeed.source, param, val) break + if datafeed is None: + return None, None return datafeed, tip_amount diff --git a/src/telliot_feeds/utils/query_search_utils.py b/src/telliot_feeds/utils/query_search_utils.py index cf17a155..e17e1381 100644 --- a/src/telliot_feeds/utils/query_search_utils.py +++ b/src/telliot_feeds/utils/query_search_utils.py @@ -9,8 +9,12 @@ from telliot_feeds.feeds import CATALOG_FEEDS from telliot_feeds.feeds import DataFeed from telliot_feeds.feeds import DATAFEED_BUILDER_MAPPING +from telliot_feeds.feeds import MANUAL_FEEDS from telliot_feeds.queries.query import OracleQuery from telliot_feeds.queries.query_catalog import query_catalog +from telliot_feeds.utils.log import get_logger + +logger = get_logger(__name__) def decode_typ_name(qdata: bytes) -> str: @@ -56,7 +60,7 @@ def feed_from_catalog_feeds(qdata: bytes) -> Optional[DataFeed[Any]]: return CATALOG_FEEDS.get(qtag) if qtag else None -def feed_in_feed_builder_mapping(qdata: bytes) -> Optional[DataFeed[Any]]: +def feed_in_feed_builder_mapping(qdata: bytes, skip_manual_feeds: bool = False) -> Optional[DataFeed[Any]]: """Get feed if query type in DATAFEED_BUILDER_MAPPING Args: @@ -65,6 +69,11 @@ def feed_in_feed_builder_mapping(qdata: bytes) -> Optional[DataFeed[Any]]: Return: DataFeed """ qtyp_name = decode_typ_name(qdata) + if skip_manual_feeds: + if qtyp_name in MANUAL_FEEDS: + logger.info(f"There is a tip for this query type: {qtyp_name}. Query data: {qdata.hex()}, (manual feed)") + return None + return DATAFEED_BUILDER_MAPPING.get(qtyp_name) diff --git a/tests/tips/test_feed_suggestion.py b/tests/tips/test_feed_suggestion.py index e6423088..142bf217 100644 --- a/tests/tips/test_feed_suggestion.py +++ b/tests/tips/test_feed_suggestion.py @@ -21,7 +21,7 @@ async def test_no_tips(autopay_contract_setup, caplog): """Test no tips in autopay""" flex = await autopay_contract_setup - await get_feed_and_tip(flex.autopay) + await get_feed_and_tip(flex.autopay, skip_manual_feeds=False) assert "No one time tip funded queries available" in caplog.text assert "No funded feeds returned by autopay function call" in caplog.text assert "No tips available in autopay" in caplog.text @@ -31,7 +31,7 @@ async def test_no_tips(autopay_contract_setup, caplog): async def test_funded_feeds_only(setup_datafeed, caplog): """Test feed tips but no one time tips and no reported timestamps""" flex = await setup_datafeed - datafeed, tip = await get_feed_and_tip(flex.autopay) + datafeed, tip = await get_feed_and_tip(flex.autopay, skip_manual_feeds=False) assert isinstance(datafeed, DataFeed) assert isinstance(tip, int) assert tip == int(1e18) @@ -42,7 +42,7 @@ async def test_funded_feeds_only(setup_datafeed, caplog): async def test_one_time_tips_only(setup_one_time_tips, caplog): """Test one time tips but no feed tips""" flex = await setup_one_time_tips - datafeed, tip = await get_feed_and_tip(flex.autopay) + datafeed, tip = await get_feed_and_tip(flex.autopay, skip_manual_feeds=False) assert isinstance(datafeed, DataFeed) assert isinstance(tip, int) assert "No funded feeds returned by autopay function call" in caplog.text @@ -54,7 +54,7 @@ async def test_fetching_tips(tip_feeds_and_one_time_tips): A one time tip of 24 TRB exists autopay and plus 1 TRB in a feed its the highest so it should be the suggested query""" flex = await tip_feeds_and_one_time_tips - datafeed, tip = await get_feed_and_tip(flex.autopay) + datafeed, tip = await get_feed_and_tip(flex.autopay, skip_manual_feeds=False) assert isinstance(datafeed, DataFeed) assert isinstance(tip, int) assert tip == len(query_catalog._entries) * int(1e18) @@ -82,7 +82,7 @@ async def test_fake_queryid_feed_setup(autopay_contract_setup, caplog): _amount=int(1 * 10**18), ) assert status.ok - datafeed, tip = await get_feed_and_tip(flex.autopay) + datafeed, tip = await get_feed_and_tip(flex.autopay, skip_manual_feeds=False) assert datafeed is None assert tip is None assert "No funded feeds with telliot support found in autopay" in caplog.text @@ -163,7 +163,8 @@ async def test_feed_with_manual_source(autopay_contract_setup, caplog): _amount=int(10e18), ) assert status.ok - datafeed, tip = await get_feed_and_tip(r.autopay) + + datafeed, tip = await get_feed_and_tip(r.autopay, skip_manual_feeds=False) assert datafeed.query.asset == "fake" assert datafeed.query.currency == "usd" assert datafeed.query.type == "SpotPrice" @@ -181,7 +182,7 @@ async def test_feed_with_manual_source(autopay_contract_setup, caplog): legacy_gas_price=1, ) chain.mine(timedelta=1) - datafeed, tip = await get_feed_and_tip(r.autopay, current_timestamp=chain.time()) + datafeed, tip = await get_feed_and_tip(r.autopay, skip_manual_feeds=False, current_timestamp=chain.time()) assert datafeed is None assert tip is None assert "No auto source for feed with query type SpotPrice to check threshold" in caplog.text @@ -210,7 +211,7 @@ async def test_no_value_before(autopay_contract_setup, caplog): # bypass window to force threshold check chain.mine(timedelta=1) # check that no feed is suggested since there is no value before and not in window - feed, tip = await get_feed_and_tip(r.autopay, current_timestamp=chain.time()) + feed, tip = await get_feed_and_tip(r.autopay, skip_manual_feeds=False, current_timestamp=chain.time()) assert feed is not None assert tip is not None assert " No value before for SpotPrice" in caplog.text @@ -241,11 +242,39 @@ async def test_low_gas_limit_error(autopay_contract_setup, caplog): # imitate a low gas limit caused error with patch.object(AssembleCall, "gas_limit", 5000): - suggestion = await get_feed_and_tip(r.autopay, current_timestamp=chain.time()) + suggestion = await get_feed_and_tip(r.autopay, skip_manual_feeds=False, current_timestamp=chain.time()) assert suggestion == (None, None) assert "Error getting eligible funded feeds: multicall failed to fetch data: ContractLogicError" in caplog.text # should be no error when using default gas limit - feed, tip_amount = await get_feed_and_tip(r.autopay, current_timestamp=chain.time()) + feed, tip_amount = await get_feed_and_tip(r.autopay, skip_manual_feeds=False, current_timestamp=chain.time()) assert feed is not None assert tip_amount is not None + + +@pytest.mark.asyncio +async def test_skip_manual_feed(autopay_contract_setup, caplog): + """Test feed tips when skip_manual_feeds is True""" + flex = await autopay_contract_setup + jai_usd_query_data = "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706f745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000036a6169000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000" # noqa: E501 + jai_usd_query_id = "0x8cad613ed5dbbcb23c028a6656cb051a1adf2954c8aaa4cb834b1e7e45069ca4" + # setup a feed on autopay + _, status = await flex.autopay.write( + "setupDataFeed", + gas_limit=3500000, + legacy_gas_price=1, + _queryId=jai_usd_query_id, + _reward=1, + _startTime=chain.time(), + _interval=21600, + _window=60, + _priceThreshold=1, + _rewardIncreasePerSecond=0, + _queryData=jai_usd_query_data, + _amount=int(1 * 10**18), + ) + assert status.ok + datafeed, tip = await get_feed_and_tip(flex.autopay, skip_manual_feeds=True) + assert datafeed is None + assert tip is None + assert f"There is a tip for this query type: SpotPrice. Query data: {jai_usd_query_data[2:]}" in caplog.text diff --git a/tests/tips/test_generic_query_ids.py b/tests/tips/test_generic_query_ids.py index afed2dee..ed9cfbde 100644 --- a/tests/tips/test_generic_query_ids.py +++ b/tests/tips/test_generic_query_ids.py @@ -39,7 +39,7 @@ async def test_mashup_type(autopay_contract_setup, caplog): ) chain.mine(timedelta=1) reporting_time = chain.time() - datafeed, tip = await get_feed_and_tip(r.autopay, current_timestamp=reporting_time) + datafeed, tip = await get_feed_and_tip(r.autopay, skip_manual_feeds=False, current_timestamp=reporting_time) assert datafeed.query.type == "MimicryMacroMarketMashup" time_diff = reporting_time - start_time assert tip == 2500000000000000 + (1000000000000000 * time_diff) @@ -68,7 +68,7 @@ async def test_collection_type(autopay_contract_setup): ) chain.mine(timedelta=1) reporting_time = chain.time() - datafeed, tip = await get_feed_and_tip(r.autopay, current_timestamp=reporting_time) + datafeed, tip = await get_feed_and_tip(r.autopay, skip_manual_feeds=False, current_timestamp=reporting_time) assert datafeed.query.type == "MimicryCollectionStat" time_diff = reporting_time - start_time assert tip == 2500000000000000 + (1000000000000000 * time_diff) diff --git a/tests/tips/test_selected_queryid.py b/tests/tips/test_selected_queryid.py index 253d19c7..d4b92a8f 100644 --- a/tests/tips/test_selected_queryid.py +++ b/tests/tips/test_selected_queryid.py @@ -249,3 +249,50 @@ async def test_rng(autopay_contract_setup, mumbai_test_cfg, caplog): _, status = await reporter.report_once() assert '{"type":"TellorRNG","timestamp":1665592591}' in caplog.text assert status.ok + + +@pytest.mark.asyncio +async def test_skip_manual_feed(autopay_contract_setup, mumbai_test_cfg, caplog): + """Test skip manual feed""" + flex = await autopay_contract_setup + core = TelliotCore(config=mumbai_test_cfg) + account = core.get_account() + reporter = Tellor360Reporter( + oracle=flex.oracle, + token=flex.token, + autopay=flex.autopay, + endpoint=core.endpoint, + account=account, + chain_id=80001, + transaction_type=0, + expected_profit=100, + ignore_tbr=False, + skip_manual_feeds=True, + ) + jai_usd_query_data = "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706f745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000036a6169000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000" # noqa: E501 + jai_usd_query_id = "0x8cad613ed5dbbcb23c028a6656cb051a1adf2954c8aaa4cb834b1e7e45069ca4" + await reporter.autopay.write( + "tip", + gas_limit=3500000, + legacy_gas_price=1, + _queryId=jai_usd_query_id, + _queryData=jai_usd_query_data, + _amount=int(1e18), + ) + _, status = await reporter.report_once() + assert not status.ok + assert f"There is a tip for this query type: SpotPrice. Query data: {jai_usd_query_data[2:]}" in caplog.text + + eth_usd_query_data = "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706F745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000003657468000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000" # noqa: E501 + eth_usd_query_id = "0x83A7F3D48786AC2667503A61E8C415438ED2922EB86A2906E4EE66D9A2CE4992" + # report for eth_usd should work + await reporter.autopay.write( + "tip", + gas_limit=3500000, + legacy_gas_price=1, + _queryId=eth_usd_query_id, + _queryData=eth_usd_query_data, + _amount=int(1e18), + ) + _, status = await reporter.report_once() + assert status.ok diff --git a/tests/tips/test_tips_available_after_submission.py b/tests/tips/test_tips_available_after_submission.py index 397e4c47..f5b0fa38 100644 --- a/tests/tips/test_tips_available_after_submission.py +++ b/tests/tips/test_tips_available_after_submission.py @@ -42,7 +42,9 @@ async def test_feed_suggestion(autopay_contract_setup, caplog): **data_feed, ) # First report should get a funded query suggestion - query, tip_amount = await get_feed_and_tip(autopay=flex.autopay, current_timestamp=chain.time()) + query, tip_amount = await get_feed_and_tip( + autopay=flex.autopay, skip_manual_feeds=False, current_timestamp=chain.time() + ) assert query.get_state()["query"] == {"type": "SpotPrice", "asset": "albt", "currency": "usd"} assert tip_amount == int(0.5 * 1e18) get_price = await albt_usd_median_feed.source.fetch_new_datapoint() @@ -56,12 +58,16 @@ async def test_feed_suggestion(autopay_contract_setup, caplog): ) assert status.ok # Funded query shouldn't be suggested immediately after a report submission thats in window - tip_amount = await get_feed_and_tip(autopay=flex.autopay, current_timestamp=chain.time() + 5) + tip_amount = await get_feed_and_tip( + autopay=flex.autopay, skip_manual_feeds=False, current_timestamp=chain.time() + 5 + ) assert tip_amount == (None, None) assert "No tips available in autopay" in caplog.text # bypass time until next window chain.sleep(3600) - query, tip_amount = await get_feed_and_tip(autopay=flex.autopay, current_timestamp=chain.time() + 5) + query, tip_amount = await get_feed_and_tip( + autopay=flex.autopay, skip_manual_feeds=False, current_timestamp=chain.time() + 5 + ) assert query.get_state()["query"] == {"type": "SpotPrice", "asset": "albt", "currency": "usd"} assert tip_amount == int(0.5 * 1e18) chain.sleep(43200) @@ -74,12 +80,16 @@ async def test_feed_suggestion(autopay_contract_setup, caplog): ) assert status.ok # Should be no tips available in autopay immediately after an in window report submission - tip_amount = await get_feed_and_tip(autopay=flex.autopay, current_timestamp=chain.time() + 5) + tip_amount = await get_feed_and_tip( + autopay=flex.autopay, skip_manual_feeds=False, current_timestamp=chain.time() + 5 + ) assert tip_amount == (None, None) # bypass time until next window chain.sleep(3600) # This feeds should no longer be suggested since two previous submissions exhausted the funds - tip_amount = await get_feed_and_tip(autopay=flex.autopay, current_timestamp=chain.time() + 5) + tip_amount = await get_feed_and_tip( + autopay=flex.autopay, skip_manual_feeds=False, current_timestamp=chain.time() + 5 + ) assert tip_amount == (None, None) @@ -97,7 +107,9 @@ async def test_one_time_tip_suggestion(autopay_contract_setup): _amount=int(1e18), ) # Feed suggestion should be tipped query id - query, tip_amount = await get_feed_and_tip(autopay=flex.autopay, current_timestamp=chain.time()) + query, tip_amount = await get_feed_and_tip( + autopay=flex.autopay, skip_manual_feeds=False, current_timestamp=chain.time() + ) assert query.get_state()["query"] == {"type": "SpotPrice", "asset": "albt", "currency": "usd"} assert tip_amount == 1e18 _, status = await flex.oracle.write( @@ -108,5 +120,5 @@ async def test_one_time_tip_suggestion(autopay_contract_setup): ) assert status.ok # One time tipped query id should no longer be suggested after a submission - tip_amount = await get_feed_and_tip(autopay=flex.autopay, current_timestamp=chain.time()) + tip_amount = await get_feed_and_tip(autopay=flex.autopay, skip_manual_feeds=False, current_timestamp=chain.time()) assert tip_amount == (None, None) diff --git a/tests/tips/test_tips_disputed_submissions.py b/tests/tips/test_tips_disputed_submissions.py index c8ed03f0..69b22810 100644 --- a/tests/tips/test_tips_disputed_submissions.py +++ b/tests/tips/test_tips_disputed_submissions.py @@ -54,13 +54,13 @@ async def test_tips_disputed_submissions(deploy, mumbai_test_cfg): tellor_autopay.abi = autopay.abi tellor_autopay.connect() # get feed and tip, should not be none since we just tipped - datafeed, tip = await get_feed_and_tip(tellor_autopay, current_timestamp=chain.time()) + datafeed, tip = await get_feed_and_tip(tellor_autopay, skip_manual_feeds=False, current_timestamp=chain.time()) assert datafeed is not None assert tip is not None # submit a value playground.submitValue(query_id, int.to_bytes(100, 32, "big"), 0, query_data, {"from": accounts[0]}) # tip should be none since we just submitted a value - datafeed, tip = await get_feed_and_tip(tellor_autopay, current_timestamp=chain.time()) + datafeed, tip = await get_feed_and_tip(tellor_autopay, skip_manual_feeds=False, current_timestamp=chain.time()) assert datafeed is None assert tip is None chain.mine(timedelta=1) @@ -74,13 +74,13 @@ async def test_tips_disputed_submissions(deploy, mumbai_test_cfg): # submit a value playground.submitValue(query_id, int.to_bytes(100, 32, "big"), 0, query_data, {"from": accounts[0]}) assert autopay.getCurrentTip(query_id) == 0 - datafeed, tip = await get_feed_and_tip(tellor_autopay, current_timestamp=chain.time()) + datafeed, tip = await get_feed_and_tip(tellor_autopay, skip_manual_feeds=False, current_timestamp=chain.time()) assert datafeed is None assert tip is None playground.beginDispute(query_id, chain.time(), {"from": accounts[0]}) # get feed and tip, should not be none since previous report was disputed chain.mine(timedelta=1) - datafeed, tip = await get_feed_and_tip(tellor_autopay, current_timestamp=chain.time()) + datafeed, tip = await get_feed_and_tip(tellor_autopay, skip_manual_feeds=False, current_timestamp=chain.time()) assert datafeed is not None assert tip > 0 # submit a value @@ -88,7 +88,7 @@ async def test_tips_disputed_submissions(deploy, mumbai_test_cfg): playground.submitValue(query_id, int.to_bytes(100, 32, "big"), 0, query_data, {"from": accounts[0]}) assert autopay.getCurrentTip(query_id) == 0 playground.beginDispute(query_id, time, {"from": accounts[0]}) - datafeed, tip = await get_feed_and_tip(tellor_autopay, current_timestamp=chain.time()) + datafeed, tip = await get_feed_and_tip(tellor_autopay, skip_manual_feeds=False, current_timestamp=chain.time()) assert datafeed is not None assert tip > 0 # claimOneTimeTip @@ -113,20 +113,20 @@ async def test_tips_disputed_submissions(deploy, mumbai_test_cfg): ) assert txn.status == 1 chain.mine(timedelta=1) - datafeed, tip = await get_feed_and_tip(tellor_autopay, current_timestamp=chain.time()) + datafeed, tip = await get_feed_and_tip(tellor_autopay, skip_manual_feeds=False, current_timestamp=chain.time()) assert datafeed is not None assert tip > 0 # submit a value time = chain.time() playground.submitValue(query_id, int.to_bytes(100, 32, "big"), 0, query_data, {"from": accounts[0]}) chain.mine(timedelta=1) - datafeed, tip = await get_feed_and_tip(tellor_autopay, current_timestamp=chain.time()) + datafeed, tip = await get_feed_and_tip(tellor_autopay, skip_manual_feeds=False, current_timestamp=chain.time()) assert datafeed is None assert tip is None # dispute value playground.beginDispute(query_id, time, {"from": accounts[0]}) chain.mine(timedelta=1) - datafeed, tip = await get_feed_and_tip(tellor_autopay, current_timestamp=chain.time()) + datafeed, tip = await get_feed_and_tip(tellor_autopay, skip_manual_feeds=False, current_timestamp=chain.time()) assert datafeed is not None assert tip > 0