18 for (
const auto&
event : events) {
20 uint256_t update_metadata_hi = update_metadata >> 32;
24 uint64_t timestamp_of_change =
static_cast<uint64_t
>(
static_cast<uint32_t
>(update_metadata & 0xffffffff));
26 bool timestamp_is_lt_timestamp_of_change =
event.current_timestamp < timestamp_of_change;
28 FF update_hash_inv =
event.update_hash == 0 ? 0 :
event.update_hash.invert();
30 FF timestamp_of_change_subtraction = timestamp_is_lt_timestamp_of_change
31 ? (timestamp_of_change - 1 -
event.current_timestamp)
32 : (
event.current_timestamp - timestamp_of_change);
34 bool update_pre_class_id_is_zero =
event.update_preimage_pre_class_id == 0;
35 FF update_pre_class_inv = update_pre_class_id_is_zero ? 0 :
event.update_preimage_pre_class_id.invert();
37 bool update_post_class_id_is_zero =
event.update_preimage_post_class_id == 0;
38 FF update_post_class_inv = update_post_class_id_is_zero ? 0 :
event.update_preimage_post_class_id.invert();
42 { { { C::update_check_sel, 1 },
43 { C::update_check_address,
event.address },
44 { C::update_check_current_class_id,
event.current_class_id },
45 { C::update_check_original_class_id,
event.original_class_id },
46 { C::update_check_public_data_tree_root,
event.public_data_tree_root },
47 { C::update_check_timestamp,
event.current_timestamp },
49 { C::update_check_update_hash,
event.update_hash },
50 { C::update_check_update_hash_inv, update_hash_inv },
51 { C::update_check_hash_not_zero,
event.update_hash != 0 },
52 { C::update_check_update_preimage_metadata,
event.update_preimage_metadata },
53 { C::update_check_update_preimage_pre_class_id,
event.update_preimage_pre_class_id },
54 { C::update_check_update_preimage_post_class_id,
event.update_preimage_post_class_id },
56 { C::update_check_delayed_public_mutable_slot,
event.delayed_public_mutable_slot },
57 { C::update_check_delayed_public_mutable_hash_slot,
61 { C::update_check_timestamp_of_change, timestamp_of_change },
62 { C::update_check_update_hi_metadata, update_metadata_hi },
63 { C::update_check_update_hi_metadata_bit_size,
66 { C::update_check_timestamp_is_lt_timestamp_of_change, timestamp_is_lt_timestamp_of_change },
67 { C::update_check_timestamp_of_change_subtraction, timestamp_of_change_subtraction },
68 { C::update_check_update_pre_class_id_is_zero, update_pre_class_id_is_zero },
69 { C::update_check_update_pre_class_inv, update_pre_class_inv },
70 { C::update_check_update_post_class_id_is_zero, update_post_class_id_is_zero },
71 { C::update_check_update_post_class_inv, update_post_class_inv } } });