1

I am trying to run the substrate-api-client as a dependency for making RPC calls to the local substrate node.
But i am getting this error:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidMetadata(InvalidVersion)'

Any help would be superb.

4
  • You need to have a node using metadata v14 as per this github.com/scs/substrate-api-client/blob/…
    – Jaco
    Mar 28, 2022 at 9:47
  • Okay @Jaco I executed a new node. Am getting this error: thread 'main' panicked at 'called 'Result::unwrap()' on an 'Err' value: Deserializing(Error("missing field 'stateVersion'", line: 1, column: 392))'
    – Tejas
    Mar 28, 2022 at 10:08
  • This issue is somewhat similar to the one i'm facing but not sure how it links to it. Thanks @Jaco for the previous correction. Not facing that error anymore.
    – Tejas
    Mar 28, 2022 at 11:42
  • github.com/scs/substrate-api-client/issues/…. This may be a workaround for stateVersion
    – brenzi
    Mar 29, 2022 at 11:22

1 Answer 1

3

Substrate-api-client doesn't aim at reverse compatibility. Therefore you may need to work with an older revision if you need legacy metadata. Or upgrade the node and/or runtime you're talking to if you can

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.