Skip to content
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

allow human readable key name: get_storage_by_key(storage_key_name) #4

Closed
wants to merge 1 commit into from
Closed

Conversation

drandreaskrueger
Copy link

allows

get_storage_by_key(storage_key_name='Sudo Key')

not only

get_storage_by_key(storage_key=0x50a63a871aced22e88ee6466fe5aa5d9)

See ifduyue/python-xxhash#34 (comment) and #3 (comment) (<-- with that please help me! Thanks.)

Included is a python simpletest.py but you probably don't want to merge that.

@emielsebastiaan
Copy link
Contributor

emielsebastiaan commented Nov 26, 2019

Hi @drandreaskrueger

Yeah thank you. We won't be merging that.
We are working on a generalized solution for exactly this.
You can find the spec here: https://github.com/w3f/Web3-collaboration/blob/master/grants/speculative/python_substrate_api.md

We hope to finish that by the end of the year.
Therefore, I am closing this PR.

@drandreaskrueger
Copy link
Author

drandreaskrueger commented Nov 26, 2019

We are working on a generalized solution for exactly this.

Great news. Looking forward to that.

We hope to finish that by the end of the year.

Nice one. As I want to continue before then ... what is your suggestion what I can do for now? I have other questions too. Which other python libraries exist? Is there a riotchat or slack for substrate+python ? Thanks.

@emielsebastiaan
Copy link
Contributor

Yeah I do not really have a suggestion... hang tight perhaps :)
When it comes to python and substrate we have done all the heavy lifting.
We cannot go any faster than we are already going unfortunately.
That said the stuff we build is actually pretty generalized and should eventually work with any substrate instance regardless of the runtime specification.

@emielsebastiaan
Copy link
Contributor

If you cannot wait... I suggest you fork the repositories and make modifications downstream.

@drandreaskrueger
Copy link
Author

drandreaskrueger commented Nov 26, 2019

I suggest you fork the repositories and make modifications downstream.

I can try. Which ones?

If you mean this one, then I have tried already many many things, but I cannot get this beast

def get_storage(self, block_hash, module, function, params=None, return_scale_type=None, hasher=None,
spec_version_id='default', metadata=None):

working to simply replicate that example

https://www.shawntabrizi.com/substrate/querying-substrate-storage-via-rpc/#storage-map-query --> Storage Map Query

I would think for one from your team, it would be a quick thing to just write down a Python threeliner example ... how to do the exact same but with your library substrateinterface

That ^ was the purpose of this issue: #3 (comment) <-- please reopen, thanks.

@emielsebastiaan
Copy link
Contributor

I'll ask @arjanz to look at that...

Arjan: if you could look at #3 and see if you have a quick fix for @drandreaskrueger
thx

@drandreaskrueger
Copy link
Author

drandreaskrueger commented Nov 26, 2019

Thanks a lot. Much appreciated!

And again, this is really great news, fantastic. I am loving it already: https://github.com/w3f/Web3-collaboration/blob/master/grants/speculative/python_substrate_api.md#example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants