substrate-interface 1.7.5__tar.gz → 1.7.6__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 (40) hide show
  1. {substrate-interface-1.7.5/substrate_interface.egg-info → substrate-interface-1.7.6}/PKG-INFO +1 -1
  2. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/setup.py +1 -1
  3. {substrate-interface-1.7.5 → substrate-interface-1.7.6/substrate_interface.egg-info}/PKG-INFO +1 -1
  4. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrate_interface.egg-info/requires.txt +1 -1
  5. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/utils/ecdsa_helpers.py +5 -5
  6. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_create_extrinsics.py +7 -7
  7. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_query.py +3 -3
  8. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_runtime_call.py +1 -1
  9. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_type_registry.py +2 -2
  10. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/LICENSE +0 -0
  11. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/README.md +0 -0
  12. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/setup.cfg +0 -0
  13. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrate_interface.egg-info/SOURCES.txt +0 -0
  14. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrate_interface.egg-info/dependency_links.txt +0 -0
  15. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrate_interface.egg-info/top_level.txt +0 -0
  16. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/__init__.py +0 -0
  17. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/base.py +0 -0
  18. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/constants.py +0 -0
  19. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/contracts.py +0 -0
  20. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/exceptions.py +0 -0
  21. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/extensions.py +0 -0
  22. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/interfaces.py +0 -0
  23. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/key.py +0 -0
  24. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/keypair.py +0 -0
  25. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/storage.py +0 -0
  26. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/utils/__init__.py +0 -0
  27. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/utils/caching.py +0 -0
  28. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/utils/encrypted_json.py +0 -0
  29. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/utils/hasher.py +0 -0
  30. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/utils/ss58.py +0 -0
  31. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_block.py +0 -0
  32. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_contracts.py +0 -0
  33. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_extension_interface.py +0 -0
  34. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_helper_functions.py +0 -0
  35. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_init.py +0 -0
  36. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_keypair.py +0 -0
  37. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_query_map.py +0 -0
  38. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_rpc_compatibility.py +0 -0
  39. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_ss58.py +0 -0
  40. {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_subscriptions.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: substrate-interface
3
- Version: 1.7.5
3
+ Version: 1.7.6
4
4
  Summary: Library for interfacing with a Substrate node
5
5
  Home-page: https://github.com/polkascan/py-substrate-interface
6
6
  Author: Stichting Polkascan (Polkascan Foundation)
@@ -188,7 +188,7 @@ setup(
188
188
  'eth_utils>=1.3.0,<3',
189
189
  'pycryptodome>=3.11.0,<4',
190
190
  'PyNaCl>=1.0.1,<2',
191
- 'scalecodec>=1.2.6,<1.3',
191
+ 'scalecodec>=1.2.8,<1.3',
192
192
  'py-sr25519-bindings>=0.2.0,<1',
193
193
  'py-ed25519-zebra-bindings>=1.0,<2',
194
194
  'py-bip39-bindings>=0.1.9,<1'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: substrate-interface
3
- Version: 1.7.5
3
+ Version: 1.7.6
4
4
  Summary: Library for interfacing with a Substrate node
5
5
  Home-page: https://github.com/polkascan/py-substrate-interface
6
6
  Author: Stichting Polkascan (Polkascan Foundation)
@@ -9,7 +9,7 @@ eth-keys<1,>=0.2.1
9
9
  eth_utils<3,>=1.3.0
10
10
  pycryptodome<4,>=3.11.0
11
11
  PyNaCl<2,>=1.0.1
12
- scalecodec<1.3,>=1.2.6
12
+ scalecodec<1.3,>=1.2.8
13
13
  py-sr25519-bindings<1,>=0.2.0
14
14
  py-ed25519-zebra-bindings<2,>=1.0
15
15
  py-bip39-bindings<1,>=0.1.9
@@ -35,13 +35,13 @@ class PublicKey:
35
35
  self.point = int.from_bytes(private_key, byteorder='big') * BIP32_CURVE.generator
36
36
 
37
37
  def __bytes__(self):
38
- xstr = self.point.x().to_bytes(32, byteorder='big')
39
- parity = self.point.y() & 1
38
+ xstr = int(self.point.x()).to_bytes(32, byteorder='big')
39
+ parity = int(self.point.y()) & 1
40
40
  return (2 + parity).to_bytes(1, byteorder='big') + xstr
41
41
 
42
42
  def address(self):
43
- x = self.point.x()
44
- y = self.point.y()
43
+ x = int(self.point.x())
44
+ y = int(self.point.y())
45
45
  s = x.to_bytes(32, 'big') + y.to_bytes(32, 'big')
46
46
  return to_checksum_address(eth_utils_keccak(s)[12:])
47
47
 
@@ -72,7 +72,7 @@ def derive_bip32childkey(parent_key, parent_chain_code, i):
72
72
  key, chain_code = h[:32], h[32:]
73
73
  a = int.from_bytes(key, byteorder='big')
74
74
  b = int.from_bytes(parent_key, byteorder='big')
75
- key = (a + b) % BIP32_CURVE.order
75
+ key = (a + b) % int(BIP32_CURVE.order)
76
76
  if a < BIP32_CURVE.order and key != 0:
77
77
  key = key.to_bytes(32, byteorder='big')
78
78
  break
@@ -53,7 +53,7 @@ class CreateExtrinsicsTestCase(unittest.TestCase):
53
53
  # Create balance transfer call
54
54
  call = self.kusama_substrate.compose_call(
55
55
  call_module='Balances',
56
- call_function='transfer',
56
+ call_function='transfer_keep_alive',
57
57
  call_params={
58
58
  'dest': 'EaG2CRhJWPb7qmdcJvy3LiWdh26Jreu9Dx6R1rXxPmYXoDk',
59
59
  'value': 3 * 10 ** 3
@@ -66,7 +66,7 @@ class CreateExtrinsicsTestCase(unittest.TestCase):
66
66
  decoded_extrinsic.decode(extrinsic.data)
67
67
 
68
68
  self.assertEqual(decoded_extrinsic['call']['call_module'].name, 'Balances')
69
- self.assertEqual(decoded_extrinsic['call']['call_function'].name, 'transfer')
69
+ self.assertEqual(decoded_extrinsic['call']['call_function'].name, 'transfer_keep_alive')
70
70
  self.assertEqual(extrinsic['nonce'], 0)
71
71
  self.assertEqual(extrinsic['tip'], 1)
72
72
 
@@ -77,7 +77,7 @@ class CreateExtrinsicsTestCase(unittest.TestCase):
77
77
  # Create balance transfer call
78
78
  call = substrate.compose_call(
79
79
  call_module='Balances',
80
- call_function='transfer',
80
+ call_function='transfer_keep_alive',
81
81
  call_params={
82
82
  'dest': 'EaG2CRhJWPb7qmdcJvy3LiWdh26Jreu9Dx6R1rXxPmYXoDk',
83
83
  'value': 3 * 10 ** 3
@@ -99,7 +99,7 @@ class CreateExtrinsicsTestCase(unittest.TestCase):
99
99
 
100
100
  balance_call = self.polkadot_substrate.compose_call(
101
101
  call_module='Balances',
102
- call_function='transfer',
102
+ call_function='transfer_keep_alive',
103
103
  call_params={
104
104
  'dest': 'EaG2CRhJWPb7qmdcJvy3LiWdh26Jreu9Dx6R1rXxPmYXoDk',
105
105
  'value': 3 * 10 ** 3
@@ -126,7 +126,7 @@ class CreateExtrinsicsTestCase(unittest.TestCase):
126
126
 
127
127
  call = self.kusama_substrate.compose_call(
128
128
  call_module='Balances',
129
- call_function='transfer',
129
+ call_function='transfer_keep_alive',
130
130
  call_params={
131
131
  'dest': 'EaG2CRhJWPb7qmdcJvy3LiWdh26Jreu9Dx6R1rXxPmYXoDk',
132
132
  'value': 3 * 10 ** 3
@@ -172,7 +172,7 @@ class CreateExtrinsicsTestCase(unittest.TestCase):
172
172
 
173
173
  call = self.kusama_substrate.compose_call(
174
174
  call_module='Balances',
175
- call_function='transfer',
175
+ call_function='transfer_keep_alive',
176
176
  call_params={
177
177
  'dest': 'EaG2CRhJWPb7qmdcJvy3LiWdh26Jreu9Dx6R1rXxPmYXoDk',
178
178
  'value': 2000
@@ -218,7 +218,7 @@ class CreateExtrinsicsTestCase(unittest.TestCase):
218
218
  # Create balance transfer call
219
219
  call = self.kusama_substrate.compose_call(
220
220
  call_module='Balances',
221
- call_function='transfer',
221
+ call_function='transfer_keep_alive',
222
222
  call_params={
223
223
  'dest': 'EaG2CRhJWPb7qmdcJvy3LiWdh26Jreu9Dx6R1rXxPmYXoDk',
224
224
  'value': 3 * 10 ** 3
@@ -44,11 +44,11 @@ class QueryTestCase(unittest.TestCase):
44
44
  module='System',
45
45
  storage_function='Account',
46
46
  params=['F4xQKRUagnSGjFqafyhajLs94e7Vvzvr8ebwYJceKpr8R7T'],
47
- block_hash='0x176e064454388fd78941a0bace38db424e71db9d5d5ed0272ead7003a02234fa'
47
+ block_hash='0xbf787e2f322080e137ed53e763b1cc97d5c5585be1f736914e27d68ac97f5f2c'
48
48
  )
49
49
 
50
- self.assertEqual(7673, result.value['nonce'])
51
- self.assertEqual(637747267365404068, result.value['data']['free'])
50
+ self.assertEqual(67501, result.value['nonce'])
51
+ self.assertEqual(1099945000512, result.value['data']['free'])
52
52
  self.assertEqual(result.meta_info['result_found'], True)
53
53
 
54
54
  def test_system_account_non_existing(self):
@@ -51,7 +51,7 @@ class RuntimeCallTestCase(unittest.TestCase):
51
51
  def test_transaction_payment(self):
52
52
  call = self.substrate.compose_call(
53
53
  call_module='Balances',
54
- call_function='transfer',
54
+ call_function='transfer_keep_alive',
55
55
  call_params={
56
56
  'dest': 'EaG2CRhJWPb7qmdcJvy3LiWdh26Jreu9Dx6R1rXxPmYXoDk',
57
57
  'value': 3 * 10 ** 3
@@ -196,7 +196,7 @@ class AutodetectAddressTypeTestCase(unittest.TestCase):
196
196
 
197
197
  call = substrate.compose_call(
198
198
  call_module='Balances',
199
- call_function='transfer',
199
+ call_function='transfer_keep_alive',
200
200
  call_params={
201
201
  'dest': keypair_alice.ss58_address,
202
202
  'value': 2000
@@ -216,7 +216,7 @@ class AutodetectAddressTypeTestCase(unittest.TestCase):
216
216
 
217
217
  call = substrate.compose_call(
218
218
  call_module='Balances',
219
- call_function='transfer',
219
+ call_function='transfer_keep_alive',
220
220
  call_params={
221
221
  'dest': keypair_alice.ss58_address,
222
222
  'value': 2000