I just cloned frontier and modified the code for using H256 address following this

These are my changes in runtime/src/lib.rs:

pub type Signature = MultiSignature;

impl pallet_evm::Config for Runtime {
    type CallOrigin = EnsureAddressTruncated;
    type WithdrawOrigin = EnsureAddressTruncated;
    type AddressMapping = HashedAddressMapping<BlakeTwo256>;

impl pallet_hotfix_sufficients::Config for Runtime {
    type AddressMapping = HashedAddressMapping<BlakeTwo256>;

And changes in node/src/chain_spec.rs

                // Sudo account
                // Pre-funded accounts

Then I started with polkadotjs and get this error enter image description here

Uncaught error. Something went wrong with the query and rendering of this component. Please supply all the details below when logging an issue, it may help in tracing the cause.

createType(AccountId):: Invalid AccountId provided, expected 32 bytes, found 20

Error: createType(AccountId):: Invalid AccountId provided, expected 32 bytes, found 20
at h (https://polkadot.js.org/apps/modu.b1c146caef756c6c.js:50:76567)
at j.createType (https://polkadot.js.org/apps/modu.b1c146caef756c6c.js:50:163671)
at Array.<anonymous> (https://polkadot.js.org/apps/comm.6c4b6b9d268abd8d.js:871:1214)
at D (https://polkadot.js.org/apps/comm.6c4b6b9d268abd8d.js:871:1808)
at L (https://polkadot.js.org/apps/comm.6c4b6b9d268abd8d.js:871:2164)
at https://polkadot.js.org/apps/comm.6c4b6b9d268abd8d.js:921:182
at Object.Ii [as useState] (https://polkadot.js.org/apps/modu.542970b4dea9bb45.js:2:78769)
at t.useState (https://polkadot.js.org/apps/modu.542970b4dea9bb45.js:2:361050)
at https://polkadot.js.org/apps/comm.6c4b6b9d268abd8d.js:921:176
at Pi (https://polkadot.js.org/apps/modu.542970b4dea9bb45.js:2:75852)

Am I missing to change anything in the code?

1 Answer 1


I will need to change the name of blockchain. It is because "frontier-template" is ethereum chain type references

pub const VERSION: RuntimeVersion = RuntimeVersion {
    spec_name: create_runtime_str!("newName"),
    impl_name: create_runtime_str!("newName"),
    authoring_version: 1,
    spec_version: 1,
    impl_version: 1,
    transaction_version: 1,
    state_version: 1,

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.