Looking at the Verify trait implementation, we can see that the Signer is EthereumSigner (see https://github.com/polkadot-evm/frontier/blob/master/primitives/account/src/lib.rs#L200).
And EthereumSigner is basically a 20 bytes struct.
However when we look at what we have in substrate the signer is MultiSigner (see https://github.com/paritytech/polkadot-sdk/blob/master/substrate/primitives/runtime/src/lib.rs#L471) and MultiSigner is a enum of public key for different signature schemes.
Shouldn't EthereumSigner be a ECDSA public key ? That would mean we change the into_account function to convert it into a AccountId20.
It would look something like this :
pub struct EthereumSigner([u8; 64]); // Uncompressed public key
impl sp_runtime::traits::IdentifyAccount for EthereumSigner {
type AccountId = AccountId20;
fn into_account(self) -> AccountId20 {
let account = H160::from(H256::from(keccak_256(&self.0)));
AccountId20(account.0)
}
}
Looking at the
Verifytrait implementation, we can see that theSignerisEthereumSigner(see https://github.com/polkadot-evm/frontier/blob/master/primitives/account/src/lib.rs#L200).And
EthereumSigneris basically a 20 bytes struct.However when we look at what we have in substrate the signer is
MultiSigner(see https://github.com/paritytech/polkadot-sdk/blob/master/substrate/primitives/runtime/src/lib.rs#L471) andMultiSigneris a enum of public key for different signature schemes.Shouldn't
EthereumSignerbe a ECDSA public key ? That would mean we change theinto_accountfunction to convert it into aAccountId20.It would look something like this :