mech-client 0.15.1__tar.gz → 0.15.3__tar.gz

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.
Files changed (78) hide show
  1. {mech_client-0.15.1 → mech_client-0.15.3}/PKG-INFO +1 -1
  2. mech_client-0.15.3/mech_client/__init__.py +3 -0
  3. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/cli.py +10 -5
  4. mech_client-0.15.3/mech_client/config/mech_client_base.json +32 -0
  5. mech_client-0.15.3/mech_client/config/mech_client_gnosis.json +32 -0
  6. mech_client-0.15.3/mech_client/config/mech_client_polygon.json +33 -0
  7. {mech_client-0.15.1 → mech_client-0.15.3}/pyproject.toml +1 -1
  8. {mech_client-0.15.1 → mech_client-0.15.3}/scripts/nvm_subscription/manager.py +1 -1
  9. mech_client-0.15.1/mech_client/__init__.py +0 -3
  10. {mech_client-0.15.1 → mech_client-0.15.3}/LICENSE +0 -0
  11. {mech_client-0.15.1 → mech_client-0.15.3}/README.md +0 -0
  12. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/AgentMech.json +0 -0
  13. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/AgentRegistry.json +0 -0
  14. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/AgreementStoreManager.base.json +0 -0
  15. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/AgreementStoreManager.gnosis.json +0 -0
  16. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/BalanceTrackerFixedPriceNative.json +0 -0
  17. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/BalanceTrackerFixedPriceToken.json +0 -0
  18. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/BalanceTrackerNvmSubscriptionNative.json +0 -0
  19. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/BalanceTrackerNvmSubscriptionToken.json +0 -0
  20. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/ComplementaryServiceMetadata.json +0 -0
  21. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/DIDRegistry.base.json +0 -0
  22. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/DIDRegistry.gnosis.json +0 -0
  23. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/EscrowPaymentCondition.base.json +0 -0
  24. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/EscrowPaymentCondition.gnosis.json +0 -0
  25. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/IERC1155.json +0 -0
  26. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/IMech.json +0 -0
  27. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/IToken.json +0 -0
  28. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/LockPaymentCondition.base.json +0 -0
  29. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/LockPaymentCondition.gnosis.json +0 -0
  30. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/MechMarketplace.json +0 -0
  31. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/NFTSalesTemplate.base.json +0 -0
  32. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/NFTSalesTemplate.gnosis.json +0 -0
  33. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/NeverminedConfig.base.json +0 -0
  34. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/NeverminedConfig.gnosis.json +0 -0
  35. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/SubscriptionNFT.base.json +0 -0
  36. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/SubscriptionNFT.gnosis.json +0 -0
  37. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/SubscriptionProvider.base.json +0 -0
  38. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/SubscriptionProvider.gnosis.json +0 -0
  39. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/SubscriptionToken.base.json +0 -0
  40. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/TransferNFTCondition.base.json +0 -0
  41. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/abis/TransferNFTCondition.gnosis.json +0 -0
  42. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/acn.py +0 -0
  43. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/configs/mechs.json +0 -0
  44. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/delivery.py +0 -0
  45. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/fetch_ipfs_hash.py +0 -0
  46. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/helpers/__init__.py +0 -0
  47. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/interact.py +0 -0
  48. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/marketplace_interact.py +0 -0
  49. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/mech_marketplace_subgraph.py +0 -0
  50. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/mech_marketplace_tool_management.py +0 -0
  51. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/mech_tool_management.py +0 -0
  52. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/prompt_to_ipfs.py +0 -0
  53. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/push_to_ipfs.py +0 -0
  54. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/safe.py +0 -0
  55. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/subgraph.py +0 -0
  56. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/to_png.py +0 -0
  57. {mech_client-0.15.1 → mech_client-0.15.3}/mech_client/wss.py +0 -0
  58. {mech_client-0.15.1 → mech_client-0.15.3}/scripts/__init__.py +0 -0
  59. {mech_client-0.15.1 → mech_client-0.15.3}/scripts/benchmark.sh +0 -0
  60. {mech_client-0.15.1 → mech_client-0.15.3}/scripts/bump.py +0 -0
  61. {mech_client-0.15.1 → mech_client-0.15.3}/scripts/deposit_native.py +0 -0
  62. {mech_client-0.15.1 → mech_client-0.15.3}/scripts/deposit_token.py +0 -0
  63. {mech_client-0.15.1 → mech_client-0.15.3}/scripts/nvm_subscribe.py +0 -0
  64. {mech_client-0.15.1 → mech_client-0.15.3}/scripts/nvm_subscription/contracts/agreement_manager.py +0 -0
  65. {mech_client-0.15.1 → mech_client-0.15.3}/scripts/nvm_subscription/contracts/base_contract.py +0 -0
  66. {mech_client-0.15.1 → mech_client-0.15.3}/scripts/nvm_subscription/contracts/did_registry.py +0 -0
  67. {mech_client-0.15.1 → mech_client-0.15.3}/scripts/nvm_subscription/contracts/escrow_payment.py +0 -0
  68. {mech_client-0.15.1 → mech_client-0.15.3}/scripts/nvm_subscription/contracts/lock_payment.py +0 -0
  69. {mech_client-0.15.1 → mech_client-0.15.3}/scripts/nvm_subscription/contracts/nft.py +0 -0
  70. {mech_client-0.15.1 → mech_client-0.15.3}/scripts/nvm_subscription/contracts/nft_sales.py +0 -0
  71. {mech_client-0.15.1 → mech_client-0.15.3}/scripts/nvm_subscription/contracts/subscription_provider.py +0 -0
  72. {mech_client-0.15.1 → mech_client-0.15.3}/scripts/nvm_subscription/contracts/token.py +0 -0
  73. {mech_client-0.15.1 → mech_client-0.15.3}/scripts/nvm_subscription/contracts/transfer_nft.py +0 -0
  74. {mech_client-0.15.1 → mech_client-0.15.3}/scripts/nvm_subscription/envs/base.env +0 -0
  75. {mech_client-0.15.1 → mech_client-0.15.3}/scripts/nvm_subscription/envs/gnosis.env +0 -0
  76. {mech_client-0.15.1 → mech_client-0.15.3}/scripts/nvm_subscription/resources/networks.json +0 -0
  77. {mech_client-0.15.1 → mech_client-0.15.3}/scripts/utils.py +0 -0
  78. {mech_client-0.15.1 → mech_client-0.15.3}/scripts/whitelist.py +0 -0
@@ -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
@@ -0,0 +1,3 @@
1
+ """Mech client."""
2
+
3
+ __version__ = "0.15.3"
@@ -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
  [tool.poetry]
2
2
  name = "mech-client"
3
- version = "0.15.1"
3
+ version = "0.15.3"
4
4
  description = "Basic client to interact with a mech"
5
5
  authors = ["David Minarsch <david.minarsch@googlemail.com>"]
6
6
  readme = "README.md"
@@ -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:
@@ -1,3 +0,0 @@
1
- """Mech client."""
2
-
3
- __version__ = "0.15.1"
File without changes
File without changes