Skip to content

Commit

Permalink
Merge fc6ad72 into e74ce15
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan authored Jan 22, 2025
2 parents e74ce15 + fc6ad72 commit 1d1e2c8
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ pub fn assert_initialization_matches_address_preimage_private(context: PrivateCo
);
}

fn compute_initialization_hash(init_selector: FunctionSelector, init_args_hash: Field) -> Field {
/// This function is not only used in macros but it's also used by external people to check that an instance has been
/// initialized with the correct constructor arguments. Don't hide this unless you implement factory functionality.
pub fn compute_initialization_hash(
init_selector: FunctionSelector,
init_args_hash: Field,
) -> Field {
poseidon2_hash_with_separator(
[init_selector.to_field(), init_args_hash],
GENERATOR_INDEX__CONSTRUCTOR,
Expand Down

0 comments on commit 1d1e2c8

Please sign in to comment.