I'm wiring up the substrate sidecar to a chain which has some custom type and some out of date types (as compared to current) such as AccountInfo. I've found that it uses the older AccountInfoWithRefCount definition. Accordingly I created a json file as follows:

  "types": {
    "AccountInfo": "AccountInfoWithRefCount"

I then used the environment variable SAS_SUBSTRATE_TYPES=/custom_types/types.json (obviously with the correct volume mapping done) to fire up the container. The logs from the container indicate that it is using the custom type file... however no behavioral change is observed. The same decode error is present before and after:

"Unable to decode storage system.account:: createType(AccountInfo):: {\"nonce\":\"Index\",\"consumers\":\"RefCount\",\"providers\":\"RefCount\",\"sufficients\":\"RefCount\",\"data\":\"AccountData\"}:: Decoded input doesn't match input, received … (72 bytes), created … (80 bytes)"

Am I doing something wrong with the type file or is the sidecar not honoring it in some way? Any help much appreciated.

1 Answer 1


Geez... remove the outer types property so just have:

  "AccountInfo": "AccountInfoWithRefCount"

And everything works... maybe this will help someone else.

  • You can mark your own answer as the answer. :)
    – Shawn Tabrizi
    Commented Feb 23, 2022 at 17:01

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.