Skip to content

Commit

Permalink
fix clippy: feature EVM
Browse files Browse the repository at this point in the history
  • Loading branch information
OverOrion committed Oct 24, 2022
1 parent 7ced971 commit 470c9cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app-libs/stf/src/evm_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ pub fn evm_create_address(caller: H160, nonce: Index) -> H160 {
// FIXME: Once events are available, these addresses should be read from events.
pub fn evm_create2_address(caller: H160, salt: H256, code_hash: H256) -> H160 {
let mut hasher = Keccak256::new();
hasher.update(&[0xff]);
hasher.update([0xff]);
hasher.update(&caller[..]);
hasher.update(&salt[..]);
hasher.update(&code_hash[..]);
H256::from_slice(hasher.finalize().as_slice()).into()
}

pub fn create_code_hash(code: &[u8]) -> H256 {
H256::from_slice(Keccak256::digest(&code).as_slice())
H256::from_slice(Keccak256::digest(code).as_slice())
}

pub fn get_evm_account(account: &AccountId) -> H160 {
Expand Down

0 comments on commit 470c9cb

Please sign in to comment.