Make examples in examples.md more complete so that they can work #129
armchairancap
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Imports are assumed to be too simple to mention, I suppose, but people who know what to import probably don't need to look at those examples...
Of course, I get
NameError: name 'response' is not defined
. How is this supposed to work?Okay, let's try the next one:
Ugh, no
metadata
... Let's try the 3rd example further belowOkay, that doesn't work either.
Am I the only one who thinks these examples are very hard to try?
Also, in the first example, I wonder what
response
can there be when there's no connection to anywhere?I know in pre-V14 that may have been necessary for online presets, but they're not even used (and if they are they should be included in this example).
I'm not even sure this example is how one is supposed to use this library these days...
Can someone provide a full working example for
Encode a Call
so that we can move on to other examples, none of which can be followed because of that confusing first example...If a metadata V14 JSON can be loaded from file or obtained from substrate RPC, that would simplify that example and make it useful.
It'd be best to create a PR to examples.md so that people don't have to find this discussion to figure it out, but I'm not creating a GH issue for this because I may be wrong and it's perfectly documented as-is...
Beta Was this translation helpful? Give feedback.
All reactions