prediction-market-agent-tooling 0.60.0.dev418__py3-none-any.whl → 0.60.1.dev424__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -336,6 +336,7 @@ class ContractERC4626BaseClass(ContractERC20BaseClass):
336
336
  tx_params: t.Optional[TxParams] = None,
337
337
  web3: Web3 | None = None,
338
338
  ) -> TxReceipt:
339
+ # assets_wei is the amount of assets (underlying erc20 token amount) we want to withdraw.
339
340
  receiver = receiver or api_keys.bet_from_address
340
341
  owner = owner or api_keys.bet_from_address
341
342
  return self.send(
@@ -346,6 +347,13 @@ class ContractERC4626BaseClass(ContractERC20BaseClass):
346
347
  web3=web3,
347
348
  )
348
349
 
350
+ def withdraw_in_shares(
351
+ self, api_keys: APIKeys, shares_wei: Wei, web3: Web3 | None = None
352
+ ) -> TxReceipt:
353
+ # shares_wei is the amount of shares we want to withdraw.
354
+ assets = self.convertToAssets(shares_wei, web3=web3)
355
+ return self.withdraw(api_keys=api_keys, assets_wei=assets, web3=web3)
356
+
349
357
  def convertToShares(self, assets: Wei, web3: Web3 | None = None) -> Wei:
350
358
  shares: Wei = self.call("convertToShares", [assets], web3=web3)
351
359
  return shares
@@ -53,7 +53,7 @@ def auto_withdraw_collateral_token(
53
53
  logger.info(
54
54
  f"Withdrawing {wei_to_xdai(amount_wei)} from {collateral_token_contract.symbol_cached(web3)} into {KEEPING_ERC20_TOKEN.symbol_cached(web3)}"
55
55
  )
56
- collateral_token_contract.withdraw(
56
+ collateral_token_contract.withdraw_in_shares(
57
57
  api_keys,
58
58
  amount_wei,
59
59
  web3=web3,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: prediction-market-agent-tooling
3
- Version: 0.60.0.dev418
3
+ Version: 0.60.1.dev424
4
4
  Summary: Tools to benchmark, deploy and monitor prediction market agents.
5
5
  Author: Gnosis
6
6
  Requires-Python: >=3.10,<3.13
@@ -83,7 +83,7 @@ prediction_market_agent_tooling/tools/betting_strategies/utils.py,sha256=kpIb-ci
83
83
  prediction_market_agent_tooling/tools/caches/db_cache.py,sha256=Q5E5cI5Mn65wq8N9Mv7on_lOnl9JOqzezvZc2ZbWhFo,11119
84
84
  prediction_market_agent_tooling/tools/caches/inmemory_cache.py,sha256=ZW5iI5rmjqeAebu5T7ftRnlkxiL02IC-MxCfDB80x7w,1506
85
85
  prediction_market_agent_tooling/tools/caches/serializers.py,sha256=vFDx4fsPxclXp2q0sv27j4al_M_Tj9aR2JJP-xNHQXA,2151
86
- prediction_market_agent_tooling/tools/contract.py,sha256=gmSuANqlfwldFG7hc4uom0q1Z-mo40qfYh5TDUKLFTs,20518
86
+ prediction_market_agent_tooling/tools/contract.py,sha256=BCl3R-n5jpp5XPAho9yTuUxRbOoKbZSga1Qaa4RfAp8,20945
87
87
  prediction_market_agent_tooling/tools/costs.py,sha256=EaAJ7v9laD4VEV3d8B44M4u3_oEO_H16jRVCdoZ93Uw,954
88
88
  prediction_market_agent_tooling/tools/cow/cow_manager.py,sha256=WK6Uk722VotjLHtxDPHxvwBrWVb3rvTegg_3w58ehwU,3869
89
89
  prediction_market_agent_tooling/tools/cow/cow_order.py,sha256=M3zQohgAzy_LETnf9rKtS1L9rr7FP92CH6v0G2laZkM,4435
@@ -112,13 +112,13 @@ prediction_market_agent_tooling/tools/streamlit_user_login.py,sha256=NXEqfjT9Lc9
112
112
  prediction_market_agent_tooling/tools/tavily/tavily_models.py,sha256=5ldQs1pZe6uJ5eDAuP4OLpzmcqYShlIV67kttNFvGS0,342
113
113
  prediction_market_agent_tooling/tools/tavily/tavily_search.py,sha256=Kw2mXNkMTYTEe1MBSTqhQmLoeXtgb6CkmHlcAJvhtqE,3809
114
114
  prediction_market_agent_tooling/tools/tokens/auto_deposit.py,sha256=o8_ERfPL-ps9FLvH5vgdiSRJQ4dZONJw9KK9sHgeP2I,6390
115
- prediction_market_agent_tooling/tools/tokens/auto_withdraw.py,sha256=gOvfZlrw6hdpYquGKLjMw-YpjAvWHnyGa-ke0Z6GIzU,3150
115
+ prediction_market_agent_tooling/tools/tokens/auto_withdraw.py,sha256=25Y0H1p0hSD3gWShKPcJ5BckQc3nr_hOAvImOFODC0w,3160
116
116
  prediction_market_agent_tooling/tools/tokens/main_token.py,sha256=v5PfD2m9m92bJpK-k8ww6yDO7dwpchFtQ1BJRgi8rhs,714
117
117
  prediction_market_agent_tooling/tools/transaction_cache.py,sha256=K5YKNL2_tR10Iw2TD9fuP-CTGpBbZtNdgbd0B_R7pjg,1814
118
118
  prediction_market_agent_tooling/tools/utils.py,sha256=jLG4nbEoIzzJiZ4RgMx4Q969Zdl0p0s63p8uET_0Fuw,6440
119
119
  prediction_market_agent_tooling/tools/web3_utils.py,sha256=2PXZfGRrDVZD60agVpBN4JkOF0YsNBXgTEH1y-V71uQ,12723
120
- prediction_market_agent_tooling-0.60.0.dev418.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
121
- prediction_market_agent_tooling-0.60.0.dev418.dist-info/METADATA,sha256=jQnA7q4cVvDbsuTDW4z_DpdMmeSwrdN6bRn_PFvPeR4,8636
122
- prediction_market_agent_tooling-0.60.0.dev418.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
123
- prediction_market_agent_tooling-0.60.0.dev418.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
124
- prediction_market_agent_tooling-0.60.0.dev418.dist-info/RECORD,,
120
+ prediction_market_agent_tooling-0.60.1.dev424.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
121
+ prediction_market_agent_tooling-0.60.1.dev424.dist-info/METADATA,sha256=J1Ilnb6VXdi85KIt6GiAZ7B3fhp4lRLQNRTBGpvnbIg,8636
122
+ prediction_market_agent_tooling-0.60.1.dev424.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
123
+ prediction_market_agent_tooling-0.60.1.dev424.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
124
+ prediction_market_agent_tooling-0.60.1.dev424.dist-info/RECORD,,