gnosis / prediction-market-agent-tooling

Tools to benchmark, deploy and monitor prediction market agents.
GNU Lesser General Public License v3.0
13 stars 0 forks source link

Refactor test_deploy #214

Open gabrielfior opened 4 months ago

gabrielfior commented 4 months ago

The deploy_local function calls agent.run(market_type=Omen ( (in the test) , which leads to the function redeem_from_all_user_positions being called (https://github.com/gnosis/prediction-market-agent-tooling/blob/main/prediction_market_agent_tooling/deploy/agent.py#L188)

The function redeem_from_all_user_positions costs money to run - it normally doesn't because we are redeeming positions during our GCP runs, but still this has the potential to incur costs if it finds a non-zero resolvable position.

The test is meaningful, but I suggest having it run on a local chain (where we have infinite money). Additionally, as it's the only place testing the function redeem_from_all_user_positions, I suggest we write a test for this.

Suggested steps:

gabrielfior commented 4 months ago

@kongzii please share any thoughts/suggestions you might have about this