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
get_account_id_from_seed::<sr25519::Public>("Alice"),
// Pre-funded accounts
vec![
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_account_id_from_seed::<sr25519::Public>("Bob"),
get_account_id_from_seed::<sr25519::Public>("Alice//stash"),
get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
],
Then I started with polkadotjs and get this error
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?