pub trait DeriveSubstrateAddress<AccountId> {
    fn derive_substrate_address(address: &H160) -> AccountId;
}
Expand description

A trait for converting from Ethereum address to Substrate account_id.

Required Methods

Implementors

The ConcatConverter used to convert Ethereum address to Substrate account_id The concat rule included three parts:

  1. AccountId Prefix: concat(“dvm:”, “0x00000000000000”), length: 11 bytes
  2. EVM address: the original evm address, length: 20 bytes
  3. CheckSum: byte_xor(AccountId Prefix + EVM address), length: 1 bytes