substrate-interface 1.7.6__tar.gz → 1.7.8__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.6/substrate_interface.egg-info → substrate-interface-1.7.8}/PKG-INFO +1 -1
- {substrate-interface-1.7.6 → substrate-interface-1.7.8/substrate_interface.egg-info}/PKG-INFO +1 -1
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrateinterface/base.py +2 -1
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrateinterface/contracts.py +6 -4
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/test/test_subscriptions.py +0 -2
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/LICENSE +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/README.md +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/setup.cfg +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/setup.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrate_interface.egg-info/SOURCES.txt +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrate_interface.egg-info/dependency_links.txt +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrate_interface.egg-info/requires.txt +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrate_interface.egg-info/top_level.txt +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrateinterface/__init__.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrateinterface/constants.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrateinterface/exceptions.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrateinterface/extensions.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrateinterface/interfaces.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrateinterface/key.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrateinterface/keypair.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrateinterface/storage.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrateinterface/utils/__init__.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrateinterface/utils/caching.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrateinterface/utils/ecdsa_helpers.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrateinterface/utils/encrypted_json.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrateinterface/utils/hasher.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrateinterface/utils/ss58.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/test/test_block.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/test/test_contracts.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/test/test_create_extrinsics.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/test/test_extension_interface.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/test/test_helper_functions.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/test/test_init.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/test/test_keypair.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/test/test_query.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/test/test_query_map.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/test/test_rpc_compatibility.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/test/test_runtime_call.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/test/test_ss58.py +0 -0
- {substrate-interface-1.7.6 → substrate-interface-1.7.8}/test/test_type_registry.py +0 -0
|
@@ -2355,7 +2355,8 @@ class SubstrateInterface:
|
|
|
2355
2355
|
|
|
2356
2356
|
engine = bytes(log_digest[1][0])
|
|
2357
2357
|
# Retrieve validator set
|
|
2358
|
-
|
|
2358
|
+
parent_hash = block_data['header']['parentHash']
|
|
2359
|
+
validator_set = self.query("Session", "Validators", block_hash=parent_hash)
|
|
2359
2360
|
|
|
2360
2361
|
if engine == b'BABE':
|
|
2361
2362
|
babe_predigest = self.runtime_config.create_scale_object(
|
|
@@ -446,11 +446,12 @@ class ContractExecutionReceipt(ExtrinsicReceipt):
|
|
|
446
446
|
"""
|
|
447
447
|
self.__contract_events = None
|
|
448
448
|
self.contract_metadata = kwargs.pop('contract_metadata')
|
|
449
|
+
self.contract_address = kwargs.pop('contract_address')
|
|
449
450
|
super(ContractExecutionReceipt, self).__init__(*args, **kwargs)
|
|
450
451
|
|
|
451
452
|
@classmethod
|
|
452
453
|
def create_from_extrinsic_receipt(cls, receipt: ExtrinsicReceipt,
|
|
453
|
-
contract_metadata: ContractMetadata) -> "ContractExecutionReceipt":
|
|
454
|
+
contract_metadata: ContractMetadata, contract_address: str = None) -> "ContractExecutionReceipt":
|
|
454
455
|
"""
|
|
455
456
|
Promotes a ExtrinsicReceipt object to a ContractExecutionReceipt. It uses the provided ContractMetadata to
|
|
456
457
|
decode "ContractExecution" events
|
|
@@ -469,7 +470,8 @@ class ContractExecutionReceipt(ExtrinsicReceipt):
|
|
|
469
470
|
extrinsic_hash=receipt.extrinsic_hash,
|
|
470
471
|
block_hash=receipt.block_hash,
|
|
471
472
|
finalized=receipt.finalized,
|
|
472
|
-
contract_metadata=contract_metadata
|
|
473
|
+
contract_metadata=contract_metadata,
|
|
474
|
+
contract_address=contract_address
|
|
473
475
|
)
|
|
474
476
|
|
|
475
477
|
def process_events(self):
|
|
@@ -482,7 +484,7 @@ class ContractExecutionReceipt(ExtrinsicReceipt):
|
|
|
482
484
|
for event in self.triggered_events:
|
|
483
485
|
|
|
484
486
|
if self.substrate.implements_scaleinfo():
|
|
485
|
-
if event.value['module_id'] == 'Contracts' and event.value['event_id'] == 'ContractEmitted':
|
|
487
|
+
if event.value['module_id'] == 'Contracts' and event.value['event_id'] == 'ContractEmitted' and event.value['attributes']['contract'] == self.contract_address:
|
|
486
488
|
# Create contract event
|
|
487
489
|
contract_event_obj = ContractEvent(
|
|
488
490
|
data=ScaleBytes(event['event'][1][1]['data'].value_object),
|
|
@@ -855,4 +857,4 @@ class ContractInstance:
|
|
|
855
857
|
extrinsic, wait_for_inclusion=wait_for_inclusion, wait_for_finalization=wait_for_finalization
|
|
856
858
|
)
|
|
857
859
|
|
|
858
|
-
return ContractExecutionReceipt.create_from_extrinsic_receipt(receipt, self.metadata)
|
|
860
|
+
return ContractExecutionReceipt.create_from_extrinsic_receipt(receipt, self.metadata, self.contract_address)
|
|
@@ -36,7 +36,6 @@ class SubscriptionsTestCase(unittest.TestCase):
|
|
|
36
36
|
|
|
37
37
|
result = self.substrate.query("System", "Events", [], subscription_handler=subscription_handler)
|
|
38
38
|
|
|
39
|
-
self.assertEqual(result['update_nr'], 0)
|
|
40
39
|
self.assertIsNotNone(result['subscription_id'])
|
|
41
40
|
|
|
42
41
|
def test_subscribe_storage_multi(self):
|
|
@@ -57,7 +56,6 @@ class SubscriptionsTestCase(unittest.TestCase):
|
|
|
57
56
|
storage_keys=storage_keys, subscription_handler=subscription_handler
|
|
58
57
|
)
|
|
59
58
|
|
|
60
|
-
self.assertEqual(result['update_nr'], 0)
|
|
61
59
|
self.assertIsNotNone(result['subscription_id'])
|
|
62
60
|
|
|
63
61
|
def test_subscribe_new_heads(self):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrate_interface.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrate_interface.egg-info/requires.txt
RENAMED
|
File without changes
|
{substrate-interface-1.7.6 → substrate-interface-1.7.8}/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
|
{substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrateinterface/utils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{substrate-interface-1.7.6 → substrate-interface-1.7.8}/substrateinterface/utils/ecdsa_helpers.py
RENAMED
|
File without changes
|
{substrate-interface-1.7.6 → substrate-interface-1.7.8}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|