diff --git a/kakarot_scripts/constants.py b/kakarot_scripts/constants.py index 4334a52b5..2d451399a 100644 --- a/kakarot_scripts/constants.py +++ b/kakarot_scripts/constants.py @@ -177,7 +177,7 @@ class ArtifactType(Enum): {"contract_name": "uninitialized_account", "cairo_version": ArtifactType.cairo0}, {"contract_name": "EVM", "cairo_version": ArtifactType.cairo0}, {"contract_name": "OpenzeppelinAccount", "cairo_version": ArtifactType.cairo0}, - {"contract_name": "Precompiles", "cairo_version": ArtifactType.cairo1}, + {"contract_name": "Cairo1Helpers", "cairo_version": ArtifactType.cairo1}, {"contract_name": "replace_class", "cairo_version": ArtifactType.cairo0}, ] diff --git a/kakarot_scripts/deploy_kakarot.py b/kakarot_scripts/deploy_kakarot.py index 9839be608..6380795dc 100644 --- a/kakarot_scripts/deploy_kakarot.py +++ b/kakarot_scripts/deploy_kakarot.py @@ -58,7 +58,7 @@ async def main(): ETH_TOKEN_ADDRESS, # native_token_address_ class_hash["account_contract"], # account_contract_class_hash_ class_hash["uninitialized_account"], # uninitialized_account_class_hash_ - class_hash["Precompiles"], + class_hash["Cairo1Helpers"], BLOCK_GAS_LIMIT, ) @@ -68,7 +68,7 @@ async def main(): ETH_TOKEN_ADDRESS, # native_token_address_ class_hash["account_contract"], # account_contract_class_hash_ class_hash["uninitialized_account"], # uninitialized_account_class_hash_ - class_hash["Precompiles"], + class_hash["Cairo1Helpers"], BLOCK_GAS_LIMIT, ) diff --git a/src/kakarot/interfaces/interfaces.cairo b/src/kakarot/interfaces/interfaces.cairo index d31856be8..edb2fcad6 100644 --- a/src/kakarot/interfaces/interfaces.cairo +++ b/src/kakarot/interfaces/interfaces.cairo @@ -139,9 +139,14 @@ namespace IKakarot { } @contract_interface -namespace IPrecompiles { +namespace ICairo1Helpers { func exec_precompile(address: felt, data_len: felt, data: felt*) -> ( success: felt, gas: felt, return_data_len: felt, return_data: felt* ) { } + + func keccak( + words_len: felt, words: felt*, last_input_word: felt, last_input_num_bytes: felt + ) -> (hash: Uint256) { + } } diff --git a/src/kakarot/precompiles/precompiles.cairo b/src/kakarot/precompiles/precompiles.cairo index c5bc12b4c..96c4a3302 100644 --- a/src/kakarot/precompiles/precompiles.cairo +++ b/src/kakarot/precompiles/precompiles.cairo @@ -6,7 +6,7 @@ from starkware.starknet.common.syscalls import library_call from starkware.cairo.common.alloc import alloc from starkware.cairo.common.memcpy import memcpy -from kakarot.interfaces.interfaces import IPrecompiles +from kakarot.interfaces.interfaces import ICairo1Helpers from kakarot.storages import Kakarot_precompiles_class_hash from kakarot.errors import Errors from kakarot.precompiles.blake2f import PrecompileBlake2f @@ -130,7 +130,7 @@ namespace Precompiles { memcpy(calldata + 2, input, input_len); let ( success, gas, return_data_len, return_data - ) = IPrecompiles.library_call_exec_precompile( + ) = ICairo1Helpers.library_call_exec_precompile( class_hash=implementation, address=evm_address, data_len=input_len, data=input );