tusdt-cli 0.2.2__tar.gz → 0.2.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 (26) hide show
  1. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/PKG-INFO +1 -1
  2. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/pyproject.toml +1 -1
  3. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/src/tusdt_cli/__init__.py +1 -1
  4. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/src/tusdt_cli/client.py +13 -6
  5. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/.gitignore +0 -0
  6. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/LICENSE +0 -0
  7. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/README.md +0 -0
  8. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/requirements.txt +0 -0
  9. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/src/tusdt_cli/abi/tusdt_auction.json +0 -0
  10. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/src/tusdt_cli/abi/tusdt_erc20.json +0 -0
  11. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/src/tusdt_cli/abi/tusdt_governance.json +0 -0
  12. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/src/tusdt_cli/abi/tusdt_oracle.json +0 -0
  13. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/src/tusdt_cli/abi/tusdt_treasury.json +0 -0
  14. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/src/tusdt_cli/abi/tusdt_vault.json +0 -0
  15. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/src/tusdt_cli/cli.py +0 -0
  16. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/src/tusdt_cli/commands/__init__.py +0 -0
  17. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/src/tusdt_cli/commands/auction.py +0 -0
  18. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/src/tusdt_cli/commands/governance.py +0 -0
  19. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/src/tusdt_cli/commands/oracle.py +0 -0
  20. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/src/tusdt_cli/commands/token.py +0 -0
  21. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/src/tusdt_cli/commands/treasury.py +0 -0
  22. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/src/tusdt_cli/commands/vault.py +0 -0
  23. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/src/tusdt_cli/config.py +0 -0
  24. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/src/tusdt_cli/utils.py +0 -0
  25. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/src/tusdt_cli/wallet.py +0 -0
  26. {tusdt_cli-0.2.2 → tusdt_cli-0.2.3}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tusdt-cli
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: CLI for interacting with the TUSDT ink! smart contract system on subtensor(bittensor)
5
5
  Project-URL: Homepage, https://github.com/tensorusd/tusdt-cli
6
6
  Project-URL: Repository, https://github.com/tensorusd/tusdt-cli
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "tusdt-cli"
7
- version = "0.2.2"
7
+ version = "0.2.3"
8
8
  description = "CLI for interacting with the TUSDT ink! smart contract system on subtensor(bittensor)"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -1,3 +1,3 @@
1
1
  """TUSDT CLI - Command-line interface for the TUSDT ink! smart contract system."""
2
2
 
3
- __version__ = "0.2.2"
3
+ __version__ = "0.2.3"
@@ -9,9 +9,8 @@ from typing import Any
9
9
 
10
10
  from substrateinterface import Keypair, SubstrateInterface
11
11
  from substrateinterface.contracts import ContractInstance, ContractMetadata
12
- from substrateinterface.exceptions import ContractReadFailedException
13
-
14
12
  from substrateinterface.contracts import ContractMetadata as _ContractMetadata
13
+ from substrateinterface.exceptions import ContractReadFailedException
15
14
 
16
15
  from tusdt_cli.utils import (
17
16
  ContractError,
@@ -21,6 +20,7 @@ from tusdt_cli.utils import (
21
20
  unwrap_result,
22
21
  )
23
22
 
23
+
24
24
  # ---------------------------------------------------------------------------
25
25
  # Patch: fix substrate-interface 1.8.1 V5 metadata loading bug
26
26
  #
@@ -55,10 +55,14 @@ def _fixed_convert(self: _ContractMetadata) -> None:
55
55
 
56
56
  # V1 -> V2: name -> label
57
57
  if self.metadata_version <= 1:
58
+
58
59
  def _replace_name(obj: dict) -> dict:
59
60
  if "name" in obj:
60
- obj["label"] = "::".join(obj.pop("name")) if isinstance(obj["name"], list) else obj.pop("name")
61
+ obj["label"] = (
62
+ "::".join(obj.pop("name")) if isinstance(obj["name"], list) else obj.pop("name")
63
+ )
61
64
  return obj
65
+
62
66
  for section in ("constructors", "events", "messages"):
63
67
  for idx, c in enumerate(self.metadata_dict["spec"][section]):
64
68
  self.metadata_dict["spec"][section][idx]["args"] = [_replace_name(a) for a in c["args"]]
@@ -66,18 +70,20 @@ def _fixed_convert(self: _ContractMetadata) -> None:
66
70
 
67
71
  # V2 -> V3: default payable=True for constructors
68
72
  if self.metadata_version <= 2:
69
- for idx, c in enumerate(self.metadata_dict["spec"]["constructors"]):
73
+ for _idx, c in enumerate(self.metadata_dict["spec"]["constructors"]):
70
74
  c["payable"] = True
71
75
 
72
76
  # V4 -> V5: add module_path and signature_topic to events
73
77
  if self.metadata_version <= 4:
74
- for idx, event in enumerate(self.metadata_dict["spec"]["events"]):
78
+ for _idx, event in enumerate(self.metadata_dict["spec"]["events"]):
75
79
  event["module_path"] = event.get("module_path", "")
76
80
  event["signature_topic"] = event.get("signature_topic", "")
77
81
 
78
82
  # Set type offset and prefix
79
83
  self._ContractMetadata__type_offset = 0
80
- if "V0" in self.metadata_dict and tuple(int(x) for x in self.metadata_dict["metadataVersion"].split(".")) < (0, 7, 0):
84
+ if "V0" in self.metadata_dict and tuple(
85
+ int(x) for x in self.metadata_dict["metadataVersion"].split(".")
86
+ ) < (0, 7, 0):
81
87
  self._ContractMetadata__type_offset = 1
82
88
 
83
89
  self.type_string_prefix = f"ink::{self.metadata_dict['source']['hash']}"
@@ -97,6 +103,7 @@ def _fixed_convert(self: _ContractMetadata) -> None:
97
103
  raw_types = raw_types.value_object
98
104
  self.substrate.runtime_config.update_from_scale_info_types(raw_types, prefix=self.type_string_prefix)
99
105
 
106
+
100
107
  _ContractMetadata._ContractMetadata__convert_to_latest_metadata = _fixed_convert
101
108
 
102
109
 
File without changes
File without changes
File without changes
File without changes
File without changes