-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tag v1.0.2 cannot create an extrinsic using the Utility.batch call using polkadot v.0.9.11 #143
Comments
Confirmed it also happens with tag |
…te-interface#143 Pass metadata in nested Calls
The scrip provided in issue is still failing:
I use latest version:
How can I make it work? |
|
I did more tests,
Error still present |
I notice that from substrateinterface import SubstrateInterface, Keypair
from substrateinterface.exceptions import SubstrateRequestException
try:
substrate = SubstrateInterface(
url="ws://127.0.0.1:9944",
type_registry_preset='development'
)
except ConnectionRefusedError:
print("⚠️ No local Substrate node running, try running 'start_local_substrate_node.sh' first")
exit()
keypair = Keypair.create_from_uri('//Alice')
session_key = substrate.rpc_request(method="author_rotateKeys", params=[])['result']
if type(session_key) == str:
type_id = substrate.get_metadata_call_function('Session', 'set_keys')['fields'][0]['type']
session_key = substrate.decode_scale("scale_info::{}".format(type_id), session_key)
call = substrate.compose_call(
call_module='Session',
call_function='set_keys',
call_params={
'keys': session_key,
'proof': 'None'
}
)
extrinsic = substrate.create_signed_extrinsic(
call=call,
keypair=keypair,
)
receipt = substrate.submit_extrinsic(extrinsic, wait_for_inclusion=True)
if receipt and receipt.is_success: # <= this line fails
print(True)
else:
print(False) Error:
|
@BulatSaif errors confirmed, after some debugging I noticed the path used for a |
@BulatSaif Found the breaking change in Substrate: paritytech/substrate#11981 |
Issue will be addressed in polkascan/py-scale-codec#80 |
@BulatSaif Issue should be resolved after you update |
Wow, that was fast! |
The following code works when connecting to polkadot 0.9.10 but not 0.9.11
Fails when trying compose the batch call
Stacktrace is :
The text was updated successfully, but these errors were encountered: