Skip to content

Commit d1c4d74

Browse files
committed
Calculate SHARP bootloaded Integrity fact hash
1 parent 1a4ab6c commit d1c4d74

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

cairo/src/data_processor.cairo

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ pub trait IDataProcessor<TContractState> {
7676

7777
#[starknet::component]
7878
pub mod data_processor_component {
79-
use integrity::calculate_fact_hash;
79+
use integrity::{
80+
calculate_fact_hash,
81+
SHARP_BOOTLOADER_PROGRAM_HASH
82+
};
8083
use openzeppelin::access::ownable::OwnableComponent;
8184
use openzeppelin::access::ownable::OwnableComponent::InternalTrait as OwnableInternal;
8285
use starknet::storage::{
@@ -259,7 +262,11 @@ pub mod data_processor_component {
259262
program_output.append(mmr_root_high.try_into().expect('mmr_root_high not felt252'));
260263
}
261264

262-
let fact_hash = calculate_fact_hash(task_data.program_hash, program_output.span());
265+
let fact_hash = calculate_bootloaded_fact_hash(
266+
SHARP_BOOTLOADER_PROGRAM_HASH,
267+
task_data.program_hash,
268+
program_output.span()
269+
);
263270

264271
let cairo_fact_registry = get_dep_component!(@self, CairoFactRegistry);
265272
assert(cairo_fact_registry.isCairoFactValidForInternal(fact_hash), 'Invalid fact');
@@ -294,4 +301,3 @@ pub mod data_processor_component {
294301
}
295302
}
296303
}
297-

0 commit comments

Comments
 (0)