We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39bc008 commit a0ed6fbCopy full SHA for a0ed6fb
precompiles/src/extensions.rs
@@ -116,14 +116,12 @@ pub(crate) trait PrecompileExt<AccountId: From<[u8; 32]>> {
116
// the method parameter.
117
fn account_id() -> AccountId {
118
let hash = H160::from_low_u64_be(Self::INDEX);
119
- let address_bytes: [u8; 20] = hash.into();
120
-
121
let prefix = b"evm:";
122
123
// Concatenate prefix and ethereum address
124
- let mut combined = Vec::with_capacity(prefix.len().saturating_add(address_bytes.len()));
+ let mut combined = Vec::new();
125
combined.extend_from_slice(prefix);
126
- combined.extend_from_slice(&address_bytes);
+ combined.extend_from_slice(hash.as_bytes());
127
128
let hash = blake2_256(&combined);
129
0 commit comments