diff --git a/crates/starknet-types-core/src/hash/pedersen.rs b/crates/starknet-types-core/src/hash/pedersen.rs index 940ddd0..752a086 100644 --- a/crates/starknet-types-core/src/hash/pedersen.rs +++ b/crates/starknet-types-core/src/hash/pedersen.rs @@ -6,15 +6,16 @@ use lambdaworks_math::field::{ use super::traits::StarkHash; -pub struct Pedersen; +#[derive(Default)] +pub struct Pedersen(PedersenLambdaworks); impl StarkHash for Pedersen { /// Computes the Pedersen hash of two Felts, as defined /// in fn hash(felt_0: &Felt, felt_1: &Felt) -> Felt { - let pedersen = PedersenLambdaworks::default(); + // let pedersen = PedersenLambdaworks::default(); - let hash = pedersen.hash(&felt_0.0, &felt_1.0); + let hash = Self.0.hash(&felt_0.0, &felt_1.0); Felt(hash) }