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.
- {substrate-interface-1.7.5/substrate_interface.egg-info → substrate-interface-1.7.6}/PKG-INFO +1 -1
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/setup.py +1 -1
- {substrate-interface-1.7.5 → substrate-interface-1.7.6/substrate_interface.egg-info}/PKG-INFO +1 -1
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrate_interface.egg-info/requires.txt +1 -1
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/utils/ecdsa_helpers.py +5 -5
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_create_extrinsics.py +7 -7
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_query.py +3 -3
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_runtime_call.py +1 -1
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_type_registry.py +2 -2
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/LICENSE +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/README.md +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/setup.cfg +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrate_interface.egg-info/SOURCES.txt +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrate_interface.egg-info/dependency_links.txt +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrate_interface.egg-info/top_level.txt +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/__init__.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/base.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/constants.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/contracts.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/exceptions.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/extensions.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/interfaces.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/key.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/keypair.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/storage.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/utils/__init__.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/utils/caching.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/utils/encrypted_json.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/utils/hasher.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/utils/ss58.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_block.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_contracts.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_extension_interface.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_helper_functions.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_init.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_keypair.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_query_map.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_rpc_compatibility.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_ss58.py +0 -0
- {substrate-interface-1.7.5 → substrate-interface-1.7.6}/test/test_subscriptions.py +0 -0
|
@@ -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.
|
|
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'
|
{substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/utils/ecdsa_helpers.py
RENAMED
|
@@ -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='
|
|
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, '
|
|
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='
|
|
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='
|
|
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='
|
|
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='
|
|
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='
|
|
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='
|
|
47
|
+
block_hash='0xbf787e2f322080e137ed53e763b1cc97d5c5585be1f736914e27d68ac97f5f2c'
|
|
48
48
|
)
|
|
49
49
|
|
|
50
|
-
self.assertEqual(
|
|
51
|
-
self.assertEqual(
|
|
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='
|
|
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='
|
|
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='
|
|
219
|
+
call_function='transfer_keep_alive',
|
|
220
220
|
call_params={
|
|
221
221
|
'dest': keypair_alice.ss58_address,
|
|
222
222
|
'value': 2000
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrate_interface.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrate_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/utils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{substrate-interface-1.7.5 → substrate-interface-1.7.6}/substrateinterface/utils/encrypted_json.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|