diff --git a/prediction_market_agent/agents/microchain_agent/utils.py b/prediction_market_agent/agents/microchain_agent/utils.py index 01707223..26722a54 100644 --- a/prediction_market_agent/agents/microchain_agent/utils.py +++ b/prediction_market_agent/agents/microchain_agent/utils.py @@ -1,7 +1,6 @@ import typing as t from decimal import Decimal -from eth_typing import ChecksumAddress from prediction_market_agent_tooling.markets.agent_market import ( AgentMarket, FilterBy, @@ -16,16 +15,8 @@ from prediction_market_agent_tooling.markets.omen.data_models import ( get_boolean_outcome as get_omen_boolean_outcome, ) -from prediction_market_agent_tooling.markets.omen.omen_contracts import ( - OmenConditionalTokenContract, -) -from prediction_market_agent_tooling.markets.omen.omen_subgraph_handler import ( - OmenSubgraphHandler, -) from prediction_market_agent_tooling.tools.balances import get_balances -from prediction_market_agent_tooling.tools.hexbytes_custom import HexBytes from pydantic import BaseModel -from web3.types import Wei from prediction_market_agent.utils import APIKeys @@ -72,20 +63,6 @@ def get_balance(market_type: MarketType) -> BetAmount: raise ValueError(f"Market type '{market_type}' not supported") -def get_market_token_balance( - user_address: ChecksumAddress, market_condition_id: HexBytes, market_index_set: int -) -> Wei: - # We get the multiple positions for each market - positions = OmenSubgraphHandler().get_positions(market_condition_id) - # Find position matching market_outcome - position_for_index_set = next( - p for p in positions if market_index_set in p.indexSets - ) - position_as_int = int(position_for_index_set.id.hex(), 16) - balance = OmenConditionalTokenContract().balanceOf(user_address, position_as_int) - return balance - - def get_boolean_outcome(market_type: MarketType, outcome: str) -> bool: if market_type == MarketType.OMEN: return get_omen_boolean_outcome(outcome)