olas-operate-middleware 0.10.16__py3-none-any.whl → 0.10.18__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: olas-operate-middleware
3
- Version: 0.10.16
3
+ Version: 0.10.18
4
4
  Summary:
5
5
  License-File: LICENSE
6
6
  Author: David Vilela
@@ -6,7 +6,7 @@ operate/bridge/providers/lifi_provider.py,sha256=FpAlBAA_gOt-oOHKhGaOQhhTZIL-hgY
6
6
  operate/bridge/providers/native_bridge_provider.py,sha256=gG8bSyxUoAVEF6_J9tn1qKRv1PnXuMJdMwUAVJ4GJz8,24647
7
7
  operate/bridge/providers/provider.py,sha256=i54RL7m4wMSADM_D_V_quQump_ipPTmByUc-c-AOLPQ,19687
8
8
  operate/bridge/providers/relay_provider.py,sha256=L7D-PKepsuBadarJmrNneZk0bsrh88u05uD6_2MSss4,17341
9
- operate/cli.py,sha256=eijw4jzmqHpXqYk5wTgigkgmWfp16ZhY9XQVun9RU7s,56135
9
+ operate/cli.py,sha256=szRqOnL3xCj7MmNcjY-zQCymJ5TGjqEUUN4j-noPNL4,56983
10
10
  operate/constants.py,sha256=p_kYu4YyMnoZKHVrhhSjJlCCjWxRdSIzWfvQQeO8Ud4,3030
11
11
  operate/data/README.md,sha256=jGPyZTvg2LCGdllvmYxmFMkkkiXb6YWatbqIkcX3kv4,879
12
12
  operate/data/__init__.py,sha256=ttC51Yqk9c4ehpIgs1Qbe7aJvzkrbbdZ1ClaCxJYByE,864
@@ -59,7 +59,7 @@ operate/data/contracts/uniswap_v2_erc20/tests/__init__.py,sha256=3Arw8dsCsJz6hVO
59
59
  operate/data/contracts/uniswap_v2_erc20/tests/test_contract.py,sha256=FzZbw9OTcr_yvjOXpk9YcO-K40eyDARyybcfSHDg2Ps,13392
60
60
  operate/keys.py,sha256=mPZ2KZujPjHZ1RNVD2vkLzK_3q6J32o9q0WCB6Raxs4,5237
61
61
  operate/ledger/__init__.py,sha256=hGTrWaPBRCodIFYUKVzfx_t_kpDa7SYyFjat8OhNRqA,3026
62
- operate/ledger/profiles.py,sha256=LaYPyz-1Cy-KRRuXk60W0ZXQJ2cwoWmDxYrL_psIdKo,11993
62
+ operate/ledger/profiles.py,sha256=d6c-oNIULuL9N_2y45kqyMPRuH1ETK4B8iMFWYAZekE,12191
63
63
  operate/migration.py,sha256=TJhztfHUVhZ2buKHx10vXeVo1rRAORdbqGE8fLHL15I,17305
64
64
  operate/operate_http/__init__.py,sha256=dxCIVSUos23M4R-PFZZG6k5QrOlEiK0SxhCYSFNxh7U,4711
65
65
  operate/operate_http/exceptions.py,sha256=4UFzrn-GyDD71RhkaOyFPBynL6TrrtP3eywaaU3o4fc,1339
@@ -70,7 +70,7 @@ operate/quickstart/claim_staking_rewards.py,sha256=K7X1Yq0mxe3qWmFLb1Xu9-Jghhml9
70
70
  operate/quickstart/reset_configs.py,sha256=ipPpbYyB9gQ4KOKS-xBrRi8fT5LvwctSkQi-8XiUMig,3341
71
71
  operate/quickstart/reset_password.py,sha256=78riP7zyFM2JMa1H8Dh6pg-PtLJLQS7PFzx9SECPACQ,2571
72
72
  operate/quickstart/reset_staking.py,sha256=SB5LZq9EctG4SYn2M6oPZ7R7ARHSFLRGzAqfKkpRcy0,5111
73
- operate/quickstart/run_service.py,sha256=ruEShJadhIa0E2IsPWu41ObkzZsaWF9XkVH8Vb7uRUU,27146
73
+ operate/quickstart/run_service.py,sha256=oir4muejak7YJv0ktAcFEPPvEDhyqlfqsVqz6bgKng8,27272
74
74
  operate/quickstart/stop_service.py,sha256=CNcCucI4sqfZG0wTxxh-k14xGcbOh50UGyXqTZVQJP0,2048
75
75
  operate/quickstart/terminate_on_chain_service.py,sha256=5ENU8_mkj06i80lKUX-v1QbLU0YzKeOZDUL1e_jzySE,2914
76
76
  operate/quickstart/utils.py,sha256=rmd9e7whQIsYpRKqWBEQxMA_SHrivBg6DppFY5ECtQQ,9135
@@ -89,10 +89,10 @@ operate/utils/__init__.py,sha256=DZNUgg0V9yfNfDrUynp10PErSieJkoxU0AKvsEFIhAw,467
89
89
  operate/utils/gnosis.py,sha256=CS07ZqvrO7uelkFe09VMyPBcLzKONUI1ZqFvi41BDhc,17924
90
90
  operate/utils/ssl.py,sha256=O5DrDoZD4T4qQuHP8GLwWUVxQ-1qXeefGp6uDJiF2lM,4308
91
91
  operate/wallet/__init__.py,sha256=NGiozD3XhvkBi7_FaOWQ8x1thZPK4uGpokJaeDY_o2w,813
92
- operate/wallet/master.py,sha256=jLFLcRgO6ADok2DigpK59PFJ4mnc_0H9a4RRioYzlvw,30811
92
+ operate/wallet/master.py,sha256=l5YLP08dBTBaiIV6Hj5Xe8WIvxuncMckzEG0y_thUUU,30924
93
93
  operate/wallet/wallet_recovery_manager.py,sha256=sXEZyvFMePxQKf9NJg4HT90mPg4-7ZcTbvggMnKKzhA,7795
94
- olas_operate_middleware-0.10.16.dist-info/METADATA,sha256=aR-iWzrLt6OeeXr7_NnBoYlkEcQhpgXKvrNUBoZj__4,2058
95
- olas_operate_middleware-0.10.16.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
96
- olas_operate_middleware-0.10.16.dist-info/entry_points.txt,sha256=dM1g2I7ODApKQFcgl5J4NGA7pfBTo6qsUTXM-j2OLlw,44
97
- olas_operate_middleware-0.10.16.dist-info/licenses/LICENSE,sha256=mdBDB-mWKV5Cz4ejBzBiKqan6Z8zVLAh9xwM64O2FW4,11339
98
- olas_operate_middleware-0.10.16.dist-info/RECORD,,
94
+ olas_operate_middleware-0.10.18.dist-info/METADATA,sha256=y2GKv51ijf-Fq0O_II4i_WJ2K7Fz_4r0PkkqgyqO768,2058
95
+ olas_operate_middleware-0.10.18.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
96
+ olas_operate_middleware-0.10.18.dist-info/entry_points.txt,sha256=dM1g2I7ODApKQFcgl5J4NGA7pfBTo6qsUTXM-j2OLlw,44
97
+ olas_operate_middleware-0.10.18.dist-info/licenses/LICENSE,sha256=mdBDB-mWKV5Cz4ejBzBiKqan6Z8zVLAh9xwM64O2FW4,11339
98
+ olas_operate_middleware-0.10.18.dist-info/RECORD,,
operate/cli.py CHANGED
@@ -751,7 +751,7 @@ def create_app( # pylint: disable=too-many-locals, unused-argument, too-many-st
751
751
  )[wallet.address]
752
752
  initial_funds = subtract_dicts(balances, DEFAULT_MASTER_EOA_FUNDS[chain])
753
753
 
754
- logger.info(f"POST /api/wallet/safe Computed {initial_funds=}")
754
+ logger.info(f"_create_safe Computed {initial_funds=}")
755
755
 
756
756
  try:
757
757
  create_tx = wallet.create_safe( # pylint: disable=no-member
@@ -763,6 +763,9 @@ def create_app( # pylint: disable=too-many-locals, unused-argument, too-many-st
763
763
 
764
764
  transfer_txs = {}
765
765
  for asset, amount in initial_funds.items():
766
+ logger.info(
767
+ f"_create_safe Transfer to={safe_address} {amount=} {chain} {asset=}"
768
+ )
766
769
  tx_hash = wallet.transfer_asset(
767
770
  to=safe_address,
768
771
  amount=int(amount),
@@ -862,6 +865,19 @@ def create_app( # pylint: disable=too-many-locals, unused-argument, too-many-st
862
865
  content={service_id: service_id in _services for service_id in service_ids}
863
866
  )
864
867
 
868
+ @app.get("/api/v2/services/deployment")
869
+ @with_retries
870
+ async def _get_services_deployment(request: Request) -> JSONResponse:
871
+ """Get a service deployment."""
872
+ service_manager = operate.service_manager()
873
+ output = {}
874
+ for service in service_manager.get_all_services()[0]:
875
+ deployment_json = service.deployment.json
876
+ deployment_json["healthcheck"] = service.get_latest_healthcheck()
877
+ output[service.service_config_id] = deployment_json
878
+
879
+ return JSONResponse(content=output)
880
+
865
881
  @app.get("/api/v2/service/{service_config_id}")
866
882
  @with_retries
867
883
  async def _get_service(request: Request) -> JSONResponse:
@@ -1380,8 +1396,12 @@ def qs_start(
1380
1396
  @_operate.command(name="quickstop")
1381
1397
  def qs_stop(
1382
1398
  config: Annotated[str, params.String(help="Quickstart config file path")],
1399
+ attended: Annotated[
1400
+ str, params.String(help="Run in attended/unattended mode (default: true")
1401
+ ] = "true",
1383
1402
  ) -> None:
1384
- """Quickstart."""
1403
+ """Quickstop."""
1404
+ os.environ["ATTENDED"] = attended.lower()
1385
1405
  operate = OperateApp()
1386
1406
  operate.setup()
1387
1407
  stop_service(operate=operate, config_path=config)
@@ -85,6 +85,8 @@ STAKING: t.Dict[Chain, t.Dict[str, str]] = {
85
85
  "pearl_beta_mech_marketplace_2": "0x8d7bE092d154b01d404f1aCCFA22Cef98C613B5D",
86
86
  "pearl_beta_mech_marketplace_3": "0x9D00A0551F20979080d3762005C9B74D7Aa77b85",
87
87
  "pearl_beta_mech_marketplace_4": "0xE2f80659dB1069f3B6a08af1A62064190c119543",
88
+ "quickstart_beta_mech_marketplace_expert_1": "0xdB9E2713c3dA3C403F2eA6E570eB978b00304e9E",
89
+ "quickstart_beta_mech_marketplace_expert_2": "0x1E90522b45c771DCF5f79645B9e96551d2ECaF62",
88
90
  "quickstart_beta_mech_marketplace_expert_3": "0x75EECA6207be98cAc3fDE8a20eCd7B01e50b3472",
89
91
  "quickstart_beta_mech_marketplace_expert_4": "0x9c7F6103e3a72E4d1805b9C683Ea5B370Ec1a99f",
90
92
  "quickstart_beta_mech_marketplace_expert_5": "0xcdC603e0Ee55Aae92519f9770f214b2Be4967f7d",
@@ -96,6 +96,8 @@ QS_STAKING_PROGRAMS: t.Dict[Chain, t.Dict[str, str]] = {
96
96
  "quickstart_beta_expert_16_mech_marketplace": "trader",
97
97
  "quickstart_beta_expert_17_mech_marketplace": "trader",
98
98
  "quickstart_beta_expert_18_mech_marketplace": "trader",
99
+ "quickstart_beta_mech_marketplace_expert_1": "trader",
100
+ "quickstart_beta_mech_marketplace_expert_2": "trader",
99
101
  "quickstart_beta_mech_marketplace_expert_3": "trader",
100
102
  "quickstart_beta_mech_marketplace_expert_4": "trader",
101
103
  "quickstart_beta_mech_marketplace_expert_5": "trader",
operate/wallet/master.py CHANGED
@@ -352,7 +352,8 @@ class EthereumMasterWallet(MasterWallet):
352
352
  {
353
353
  "from": wallet_address,
354
354
  "gas": 1,
355
- "gasPrice": ledger_api.api.eth.gas_price,
355
+ "maxFeePerGas": 1,
356
+ "maxPriorityFeePerGas": 1,
356
357
  "nonce": ledger_api.api.eth.get_transaction_count(wallet_address),
357
358
  }
358
359
  )
@@ -362,7 +363,12 @@ class EthereumMasterWallet(MasterWallet):
362
363
  )
363
364
 
364
365
  setattr(tx_settler, "build", _build_transfer_tx) # noqa: B010
365
- tx_receipt = tx_settler.transact(lambda x: x, "", kwargs={})
366
+ tx_receipt = tx_settler.transact(
367
+ method=lambda: {},
368
+ contract="",
369
+ kwargs={},
370
+ dry_run=False,
371
+ )
366
372
  tx_hash = tx_receipt.get("transactionHash", "").hex()
367
373
  return tx_hash
368
374