2

I've implemented an evm-based Substrate chain (i.e. it uses the H160 address format), but when I try to open Accounts page on Polkadot explorer, I get this error:

Invalid AccountId provided, expected 32 bytes, found 20

Error screenshot

I've also added my chain in the ethereumChains.ts file, following this PR, but still I'm getting this error.

8
  • Like what I said in substrate.stackexchange.com/questions/6699/…. I think there are some mistakes in your code. Our chain works perfectly. It lives on Rococo polkadot.js.org/apps/…. Feb 2 at 10:37
  • I guess the link to your chain is broken. Can you please specify the types that you have to use in the polkadot-js/apps/packages/apps-config/src/api/spec ?
    – Discardo
    Feb 9 at 4:35
  • Use this one polkadot.js.org/apps/… Feb 9 at 5:06
  • Yes, it looks good. And how can I generate my spec types to be used in polkadot-js/apps/packages/apps-config/src/api/spec ?
    – Discardo
    Feb 9 at 5:27
  • Can you execute any extrinsic from your chain on polkadot-js/apps? I'm getting UnknownTransaction::CannotLookup on each extrinsic
    – Discardo
    Feb 9 at 5:48

2 Answers 2

1

I encountered this today on our new network.

After submitting a PR to PolkadotJs, everything works well.

https://github.com/polkadot-js/apps/pull/9057

The PolkadotJs library will match your chain's spec name to check if it was in the Ethereum network list.

If not, you will get this error.

3
  • I added my chain to the Ethereum network list, but then I get this error on each extrinsic. :(
    – Discardo
    Feb 23 at 8:39
  • Did you update the library? Feb 23 at 8:39
  • Which library? I ran the polkadot-js explorer locally, added my chain types in the apps-config/src/api/spec and added my chain name in the EthereumChains list. That's all. Is there anything more to this that I'm missing?
    – Discardo
    Feb 23 at 8:42
0

Looks like this has been fixed in polkadot-js.

GitHub issue

I'm not sure if it will be live yet but you could run the apps master branch locally to get the changes.

5
  • facing the same issue with the apps master branch
    – Discardo
    Feb 8 at 5:50
  • What's the version number at the top right?
    – forgetso
    Feb 8 at 9:21
  • apps v0.124.2-49 Here is the screenshot
    – Discardo
    Feb 8 at 10:34
  • Well, seems like you'll have this bug fix in your version then. Did you create your chain spec in polkadot-js/apps/packages/apps-config/src/api/spec yet? I don't have any other suggestions, sorry.
    – forgetso
    Feb 8 at 11:13
  • yeah, I'm struggling with generating that spec types for my chain. I've tried using the specs for another chain that implements the same evm accounts as in my chain, but that didn't work either
    – Discardo
    Feb 8 at 12:02

Your Answer

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

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