mech-client 0.15.1__py3-none-any.whl → 0.15.3__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.
mech_client/__init__.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """Mech client."""
2
2
 
3
- __version__ = "0.15.1"
3
+ __version__ = "0.15.3"
mech_client/cli.py CHANGED
@@ -41,7 +41,7 @@ from operate.services.manage import KeysManager
41
41
  from tabulate import tabulate # type: ignore
42
42
 
43
43
  from mech_client import __version__
44
- from mech_client.interact import ConfirmationType
44
+ from mech_client.interact import ConfirmationType, get_mech_config
45
45
  from mech_client.interact import interact as interact_
46
46
  from mech_client.marketplace_interact import IPFS_URL_TEMPLATE
47
47
  from mech_client.marketplace_interact import (
@@ -79,9 +79,9 @@ SETUP_MODE_COMMAND = "setup-agent-mode"
79
79
  DEFAULT_NETWORK = "gnosis"
80
80
 
81
81
  CHAIN_TO_TEMPLATE = {
82
- "gnosis": BASE_DIR / "config" / "mech_client_gnosis.json",
83
- "base": BASE_DIR / "config" / "mech_client_base.json",
84
- "polygon": BASE_DIR / "config" / "mech_client_polygon.json",
82
+ "gnosis": CURR_DIR / "config" / "mech_client_gnosis.json",
83
+ "base": CURR_DIR / "config" / "mech_client_base.json",
84
+ "polygon": CURR_DIR / "config" / "mech_client_polygon.json",
85
85
  }
86
86
 
87
87
  ENV_PATH = BASE_DIR / ".env"
@@ -130,7 +130,12 @@ def mech_client_configure_local_config(
130
130
  config.rpc = {}
131
131
 
132
132
  for chain in template["configurations"]:
133
- config.rpc[chain] = os.getenv("MECHX_RPC_URL")
133
+ # Use environment variable if set, otherwise fall back to default from mechs.json
134
+ env_rpc = os.getenv("MECHX_CHAIN_RPC")
135
+ if env_rpc is None:
136
+ mech_config = get_mech_config(chain)
137
+ env_rpc = mech_config.rpc_url
138
+ config.rpc[chain] = env_rpc
134
139
 
135
140
  config.principal_chain = template["home_chain"]
136
141
 
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "Mech Client (agent mode) on Base",
3
+ "hash": "bafybeicrsrqajrzgweh7q4grfsbkkadovyqzfouqgb5lmxyqulqv7mjaye",
4
+ "description": "The mech_client service to allow interacting with on-chain mechs",
5
+ "image": "https://gateway.autonolas.tech/ipfs/bafybeidzpenez565d7vp7jexfrwisa2wijzx6vwcffli57buznyyqkrceq",
6
+ "service_version": "v0.1.0",
7
+ "home_chain": "base",
8
+ "configurations": {
9
+ "base": {
10
+ "agent_id": 77,
11
+ "nft": "bafybeifgj3kackzfoq4fxjiuousm6epgwx7jbc3n2gjwzjgvtbbz7fc3su",
12
+ "threshold": 1,
13
+ "use_mech_marketplace": false,
14
+ "cost_of_bond": 1,
15
+ "fund_requirements": {
16
+ "0x0000000000000000000000000000000000000000": {
17
+ "agent": 100000000000000,
18
+ "safe": 100000000000000
19
+ }
20
+ }
21
+ }
22
+ },
23
+ "env_variables": {},
24
+ "agent_release": {
25
+ "is_aea": true,
26
+ "repository": {
27
+ "owner": "valory-xyz",
28
+ "name": "mech-client",
29
+ "version": "v0.1.0"
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "Mech Client (agent mode) on Gnosis",
3
+ "hash": "bafybeicrsrqajrzgweh7q4grfsbkkadovyqzfouqgb5lmxyqulqv7mjaye",
4
+ "description": "The mech_client service to allow interacting with on-chain mechs",
5
+ "image": "https://gateway.autonolas.tech/ipfs/bafybeidzpenez565d7vp7jexfrwisa2wijzx6vwcffli57buznyyqkrceq",
6
+ "service_version": "v0.1.0",
7
+ "home_chain": "gnosis",
8
+ "configurations": {
9
+ "gnosis": {
10
+ "agent_id": 77,
11
+ "nft": "bafybeifgj3kackzfoq4fxjiuousm6epgwx7jbc3n2gjwzjgvtbbz7fc3su",
12
+ "threshold": 1,
13
+ "use_mech_marketplace": false,
14
+ "cost_of_bond": 1,
15
+ "fund_requirements": {
16
+ "0x0000000000000000000000000000000000000000": {
17
+ "agent": 100000000000000000,
18
+ "safe": 100000000000000000
19
+ }
20
+ }
21
+ }
22
+ },
23
+ "env_variables": {},
24
+ "agent_release": {
25
+ "is_aea": true,
26
+ "repository": {
27
+ "owner": "valory-xyz",
28
+ "name": "mech-client",
29
+ "version": "v0.1.0"
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "Mech Client (agent mode) on Polygon",
3
+ "hash": "bafybeicrsrqajrzgweh7q4grfsbkkadovyqzfouqgb5lmxyqulqv7mjaye",
4
+ "description": "The mech_client service to allow interacting with on-chain mechs",
5
+ "image": "https://gateway.autonolas.tech/ipfs/bafybeidzpenez565d7vp7jexfrwisa2wijzx6vwcffli57buznyyqkrceq",
6
+ "service_version": "v0.1.0",
7
+ "home_chain": "polygon",
8
+ "configurations": {
9
+ "polygon": {
10
+ "agent_id": 77,
11
+ "nft": "bafybeifgj3kackzfoq4fxjiuousm6epgwx7jbc3n2gjwzjgvtbbz7fc3su",
12
+ "threshold": 1,
13
+ "use_mech_marketplace": false,
14
+ "cost_of_bond": 1,
15
+ "fund_requirements": {
16
+ "0x0000000000000000000000000000000000000000": {
17
+ "agent": 1000000000000000000,
18
+ "safe": 0
19
+ },
20
+ "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359": { "agent": 0, "safe": 1000000 }
21
+ }
22
+ }
23
+ },
24
+ "env_variables": {},
25
+ "agent_release": {
26
+ "is_aea": true,
27
+ "repository": {
28
+ "owner": "valory-xyz",
29
+ "name": "mech-client",
30
+ "version": "v0.1.0"
31
+ }
32
+ }
33
+ }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mech-client
3
- Version: 0.15.1
3
+ Version: 0.15.3
4
4
  Summary: Basic client to interact with a mech
5
5
  License: Apache-2.0
6
6
  Author: David Minarsch
@@ -1,4 +1,4 @@
1
- mech_client/__init__.py,sha256=Iu9RKNRKh9xSx9NxEMVPqWsKtDpP6qgpMbbJeGBd7V8,43
1
+ mech_client/__init__.py,sha256=bwCmqv6p0fpPdQnE6gw9mEFn67h0TR6v9xmYl2RHS_Q,43
2
2
  mech_client/abis/AgentMech.json,sha256=IEbs_xBGunBu5h-uT5DvIty8Zw412QoPI46S_DUMYNw,18082
3
3
  mech_client/abis/AgentRegistry.json,sha256=2qmXeFINZWz9pyOma6Bq67kMDSUI1lD7WvgHLwuETD8,24723
4
4
  mech_client/abis/AgreementStoreManager.base.json,sha256=_ljdIZcfFGmFzBHUTfhA4X0382ZHHpkdr_CziTwUETo,34360
@@ -30,7 +30,10 @@ mech_client/abis/SubscriptionToken.base.json,sha256=5StPEyfRvDMTqtQPO-KakXXZqobX
30
30
  mech_client/abis/TransferNFTCondition.base.json,sha256=71O_3itHBz9qPtoTLev8_a7KxlcQfIZSfxK2562lkqw,42540
31
31
  mech_client/abis/TransferNFTCondition.gnosis.json,sha256=-huhxV54eoNY8mR9WtQdmSgQDgaKiUi0PULJ4HEshWw,42540
32
32
  mech_client/acn.py,sha256=Rj_jLPvJ5loDQfGbu3a_O24cJC4SwIErLceSz_zVYS8,5356
33
- mech_client/cli.py,sha256=4atyFMnVqN0TqczoI935hQKOD500ktt2dztUMFUPH8U,27631
33
+ mech_client/cli.py,sha256=lC7EQeFEog2ISeToL2KNkD_E0DlwJ3sZCjIh5s76IlY,27885
34
+ mech_client/config/mech_client_base.json,sha256=y3yhaq-eecjm9_x3ITivFvfe56zEODW9WFQUUyffhLA,1090
35
+ mech_client/config/mech_client_gnosis.json,sha256=m5x_RzM8sN5GbJNtZ742nIogoVhnnB1_8kYm3o3BVDI,1102
36
+ mech_client/config/mech_client_polygon.json,sha256=VtoneJEasDN0otWuVOsysWaj7K36PDVsczNBTsWkOe4,1185
34
37
  mech_client/configs/mechs.json,sha256=eR0yoNNtGozNB0w4KMx9E9dxM-zI10EhDSKnBuw8nP0,5099
35
38
  mech_client/delivery.py,sha256=PU_qSzP5juDRHiKQsyg6TH9oacc8nRoRY9BQBBe_fW0,5588
36
39
  mech_client/fetch_ipfs_hash.py,sha256=tg_hYVf4deXl89x3SOBrGFUthaSeN_Vg_OHDtfjdbp4,2752
@@ -64,12 +67,12 @@ scripts/nvm_subscription/contracts/token.py,sha256=SQmNLJzhcmNJRQ7A4-ZpN1ThPxOCl
64
67
  scripts/nvm_subscription/contracts/transfer_nft.py,sha256=Z3IlfBYVQLT4WhI5cszruHCKBrwQGTBuZrlQQcuEN3s,2681
65
68
  scripts/nvm_subscription/envs/base.env,sha256=mI2loQ5Dt-rkZzuzmgyNiV-fUutwN89kOsEmygG4K78,528
66
69
  scripts/nvm_subscription/envs/gnosis.env,sha256=mDCb1wEY4fRQYJQuyqg2b4qTFQtHHopRaKYCXTCeACM,554
67
- scripts/nvm_subscription/manager.py,sha256=Ibx_QN8IzkbDGlqHutADl5Wj2a92FOQeXaxSRIoK4MA,13600
70
+ scripts/nvm_subscription/manager.py,sha256=yr1xKoQp7Vp4jqBiq2x4VzisEtCuQMuM4v8HKuA79Lk,13602
68
71
  scripts/nvm_subscription/resources/networks.json,sha256=xH0P3YkgkMTkQdahVKO0kI9m6ybJ67iwHApstUlfRmw,2359
69
72
  scripts/utils.py,sha256=bbupA1PwBbVlMRojCFXEvj20eGAZ37PYRM2XsiwT85U,3332
70
73
  scripts/whitelist.py,sha256=7PDGrl5GADe6kphxAH02oR5xalYYQovUfBz-xPjUnxw,604
71
- mech_client-0.15.1.dist-info/LICENSE,sha256=mdBDB-mWKV5Cz4ejBzBiKqan6Z8zVLAh9xwM64O2FW4,11339
72
- mech_client-0.15.1.dist-info/METADATA,sha256=NrLR6xHEj9ICvf0tZbQsQswFHI-N88UVYKN0XEymB0I,31133
73
- mech_client-0.15.1.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
74
- mech_client-0.15.1.dist-info/entry_points.txt,sha256=SbRMRsayzD8XfNXhgwPuXEqQsdZ5Bw9XDPnUuaDExyY,45
75
- mech_client-0.15.1.dist-info/RECORD,,
74
+ mech_client-0.15.3.dist-info/LICENSE,sha256=mdBDB-mWKV5Cz4ejBzBiKqan6Z8zVLAh9xwM64O2FW4,11339
75
+ mech_client-0.15.3.dist-info/METADATA,sha256=mvbvBhNBqRaZzDSAD6aKGQSdoyrWWjeb1Z4zZKrJikk,31133
76
+ mech_client-0.15.3.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
77
+ mech_client-0.15.3.dist-info/entry_points.txt,sha256=SbRMRsayzD8XfNXhgwPuXEqQsdZ5Bw9XDPnUuaDExyY,45
78
+ mech_client-0.15.3.dist-info/RECORD,,
@@ -58,7 +58,7 @@ class NVMSubscriptionManager:
58
58
  Initialize the SubscriptionManager, including contract instances
59
59
  and Web3 connection.
60
60
  """
61
- self.url = os.getenv("MECHX_RPC_URL", CONFIGS[network]["nvm"]['web3ProviderUri'])
61
+ self.url = os.getenv("MECHX_CHAIN_RPC", CONFIGS[network]["nvm"]['web3ProviderUri'])
62
62
  self.web3 = Web3(Web3.HTTPProvider(self.url))
63
63
  self.agent_mode = agent_mode
64
64
  if self.agent_mode: