From 2c46a788c4601f2951f82bbcbeeeff1ea8c0bac6 Mon Sep 17 00:00:00 2001 From: enitrat Date: Wed, 4 Dec 2024 14:27:48 +0800 Subject: [PATCH] fix ef-testing crate --- crates/ef-testing/program.sierra | 1226 ----------------- .../src/evm_sequencer/account/mod.rs | 6 +- .../ef-testing/src/evm_sequencer/constants.rs | 4 +- .../src/evm_sequencer/evm_state/mod.rs | 15 +- .../src/evm_sequencer/sequencer/mod.rs | 29 +- crates/ef-testing/src/models/result.rs | 4 +- crates/ef-testing/src/test_utils/mod.rs | 4 +- 7 files changed, 25 insertions(+), 1263 deletions(-) delete mode 100644 crates/ef-testing/program.sierra diff --git a/crates/ef-testing/program.sierra b/crates/ef-testing/program.sierra deleted file mode 100644 index 9adaee04..00000000 --- a/crates/ef-testing/program.sierra +++ /dev/null @@ -1,1226 +0,0 @@ -type RangeCheck = RangeCheck [storable: true, drop: false, dup: false, zero_sized: false]; -type Const = Const [storable: false, drop: false, dup: false, zero_sized: false]; -type Const = Const [storable: false, drop: false, dup: false, zero_sized: false]; -type Const = Const [storable: false, drop: false, dup: false, zero_sized: false]; -type Const = Const [storable: false, drop: false, dup: false, zero_sized: false]; -type ClassHash = ClassHash [storable: true, drop: true, dup: true, zero_sized: false]; -type Const = Const [storable: false, drop: false, dup: false, zero_sized: false]; -type Const = Const [storable: false, drop: false, dup: false, zero_sized: false]; -type ContractAddress = ContractAddress [storable: true, drop: true, dup: true, zero_sized: false]; -type contracts::components::ownable::ownable_component::OwnershipTransferred = Struct [storable: true, drop: true, dup: true, zero_sized: false]; -type contracts::components::ownable::ownable_component::Event = Enum [storable: true, drop: true, dup: true, zero_sized: false]; -type contracts::uninitialized_account::UninitializedAccount::Event = Enum [storable: true, drop: true, dup: true, zero_sized: false]; -type StorageBaseAddress = StorageBaseAddress [storable: true, drop: true, dup: true, zero_sized: false]; -type core::starknet::storage::StoragePointer0Offset::> = Struct [storable: true, drop: true, dup: true, zero_sized: false]; -type Const = Const [storable: false, drop: false, dup: false, zero_sized: false]; -type Const = Const [storable: false, drop: false, dup: false, zero_sized: false]; -type Box = Box [storable: true, drop: true, dup: true, zero_sized: false]; -type Box = Box [storable: true, drop: true, dup: true, zero_sized: false]; -type felt252 = felt252 [storable: true, drop: true, dup: true, zero_sized: false]; -type u128 = u128 [storable: true, drop: true, dup: true, zero_sized: false]; -type Array = Array [storable: true, drop: true, dup: false, zero_sized: false]; -type Snapshot> = Snapshot> [storable: true, drop: true, dup: true, zero_sized: false]; -type core::array::Span:: = Struct>> [storable: true, drop: true, dup: true, zero_sized: false]; -type Array = Array [storable: true, drop: true, dup: false, zero_sized: false]; -type Snapshot> = Snapshot> [storable: true, drop: true, dup: true, zero_sized: false]; -type core::array::Span:: = Struct>> [storable: true, drop: true, dup: true, zero_sized: false]; -type u32 = u32 [storable: true, drop: true, dup: true, zero_sized: false]; -type core::starknet::info::v2::TxInfo = Struct, felt252, felt252, felt252, core::array::Span::, u128, core::array::Span::, u32, u32, core::array::Span::> [storable: true, drop: true, dup: true, zero_sized: false]; -type u64 = u64 [storable: true, drop: true, dup: true, zero_sized: false]; -type core::starknet::info::BlockInfo = Struct [storable: true, drop: true, dup: true, zero_sized: false]; -type core::starknet::info::v2::ResourceBounds = Struct [storable: true, drop: true, dup: true, zero_sized: false]; -type core::starknet::info::v2::ExecutionInfo = Struct, Box, ContractAddress, ContractAddress, felt252> [storable: true, drop: true, dup: true, zero_sized: false]; -type Box = Box [storable: true, drop: true, dup: true, zero_sized: false]; -type contracts::components::ownable::ownable_component::ComponentState:: = Struct [storable: true, drop: true, dup: true, zero_sized: true]; -type contracts::uninitialized_account::UninitializedAccount::ContractState = Struct> [storable: true, drop: true, dup: true, zero_sized: true]; -type Unit = Struct [storable: true, drop: true, dup: true, zero_sized: true]; -type Tuple = Struct [storable: true, drop: true, dup: true, zero_sized: true]; -type core::panics::Panic = Struct [storable: true, drop: true, dup: true, zero_sized: true]; -type Tuple> = Struct> [storable: true, drop: true, dup: false, zero_sized: false]; -type core::panics::PanicResult::<(contracts::uninitialized_account::UninitializedAccount::ContractState, ())> = Enum, Tuple>> [storable: true, drop: true, dup: false, zero_sized: false]; -type core::option::Option::> = Enum, Unit> [storable: true, drop: true, dup: false, zero_sized: false]; -type Tuple, core::option::Option::>> = Struct, core::option::Option::>> [storable: true, drop: true, dup: false, zero_sized: false]; -type core::panics::PanicResult::<(core::array::Span::, core::option::Option::>)> = Enum, core::option::Option::>>, Tuple>> [storable: true, drop: true, dup: false, zero_sized: false]; -type Box = Box [storable: true, drop: true, dup: true, zero_sized: false]; -type core::option::Option::> = Enum, Unit> [storable: true, drop: true, dup: true, zero_sized: false]; -type Const = Const [storable: false, drop: false, dup: false, zero_sized: false]; -type Tuple, Unit> = Struct, Unit> [storable: true, drop: true, dup: true, zero_sized: true]; -type core::panics::PanicResult::<(contracts::components::ownable::ownable_component::ComponentState::, ())> = Enum, Unit>, Tuple>> [storable: true, drop: true, dup: false, zero_sized: false]; -type Tuple = Struct [storable: true, drop: true, dup: true, zero_sized: true]; -type core::panics::PanicResult::<((),)> = Enum, Tuple>> [storable: true, drop: true, dup: false, zero_sized: false]; -type Const = Const [storable: false, drop: false, dup: false, zero_sized: false]; -type NonZero = NonZero [storable: true, drop: true, dup: true, zero_sized: false]; -type core::option::Option:: = Enum [storable: true, drop: true, dup: true, zero_sized: false]; -type Const = Const [storable: false, drop: false, dup: false, zero_sized: false]; -type Const = Const [storable: false, drop: false, dup: false, zero_sized: false]; -type Tuple> = Struct> [storable: true, drop: true, dup: true, zero_sized: false]; -type Const = Const [storable: false, drop: false, dup: false, zero_sized: false]; -type StorageAddress = StorageAddress [storable: true, drop: true, dup: true, zero_sized: false]; -type core::starknet::storage::StoragePointer0Offset:: = Struct [storable: true, drop: true, dup: true, zero_sized: false]; -type BuiltinCosts = BuiltinCosts [storable: true, drop: true, dup: true, zero_sized: false]; -type System = System [storable: true, drop: false, dup: false, zero_sized: false]; -type core::panics::PanicResult::<(core::array::Span::,)> = Enum>, Tuple>> [storable: true, drop: true, dup: false, zero_sized: false]; -type Const = Const [storable: false, drop: false, dup: false, zero_sized: false]; -type GasBuiltin = GasBuiltin [storable: true, drop: false, dup: false, zero_sized: false]; - -libfunc revoke_ap_tracking = revoke_ap_tracking; -libfunc withdraw_gas = withdraw_gas; -libfunc branch_align = branch_align; -libfunc struct_deconstruct> = struct_deconstruct>; -libfunc store_temp = store_temp; -libfunc array_snapshot_pop_front = array_snapshot_pop_front; -libfunc drop>> = drop>>; -libfunc drop> = drop>; -libfunc array_new = array_new; -libfunc const_as_immediate> = const_as_immediate>; -libfunc store_temp = store_temp; -libfunc array_append = array_append; -libfunc struct_construct = struct_construct; -libfunc struct_construct>> = struct_construct>>; -libfunc enum_init,)>, 1> = enum_init,)>, 1>; -libfunc store_temp = store_temp; -libfunc store_temp = store_temp; -libfunc store_temp,)>> = store_temp,)>>; -libfunc get_builtin_costs = get_builtin_costs; -libfunc store_temp = store_temp; -libfunc withdraw_gas_all = withdraw_gas_all; -libfunc storage_base_address_const<1239149872729906871793169171313897310809028090219849129902089947133222824240> = storage_base_address_const<1239149872729906871793169171313897310809028090219849129902089947133222824240>; -libfunc struct_construct> = struct_construct>; -libfunc snapshot_take> = snapshot_take>; -libfunc drop> = drop>; -libfunc struct_deconstruct> = struct_deconstruct>; -libfunc rename = rename; -libfunc storage_address_from_base = storage_address_from_base; -libfunc const_as_immediate> = const_as_immediate>; -libfunc store_temp = store_temp; -libfunc store_temp = store_temp; -libfunc storage_read_syscall = storage_read_syscall; -libfunc contract_address_try_from_felt252 = contract_address_try_from_felt252; -libfunc contract_address_to_felt252 = contract_address_to_felt252; -libfunc snapshot_take> = snapshot_take>; -libfunc drop> = drop>; -libfunc struct_construct> = struct_construct>; -libfunc struct_construct>> = struct_construct>>; -libfunc enum_init,)>, 0> = enum_init,)>, 0>; -libfunc const_as_immediate> = const_as_immediate>; -libfunc store_temp> = store_temp>; -libfunc jump = jump; -libfunc const_as_immediate> = const_as_immediate>; -libfunc drop> = drop>; -libfunc enable_ap_tracking = enable_ap_tracking; -libfunc unbox = unbox; -libfunc rename = rename; -libfunc enum_init, 0> = enum_init, 0>; -libfunc store_temp>> = store_temp>>; -libfunc store_temp> = store_temp>; -libfunc struct_construct = struct_construct; -libfunc enum_init, 1> = enum_init, 1>; -libfunc enum_match> = enum_match>; -libfunc disable_ap_tracking = disable_ap_tracking; -libfunc drop = drop; -libfunc dup = dup; -libfunc felt252_is_zero = felt252_is_zero; -libfunc const_as_immediate> = const_as_immediate>; -libfunc drop> = drop>; -libfunc struct_construct> = struct_construct>; -libfunc snapshot_take> = snapshot_take>; -libfunc function_call::assert_only_owner> = function_call::assert_only_owner>; -libfunc enum_match> = enum_match>; -libfunc drop> = drop>; -libfunc store_temp = store_temp; -libfunc function_call::_transfer_ownership> = function_call::_transfer_ownership>; -libfunc enum_match, ())>> = enum_match, ())>>; -libfunc drop, Unit>> = drop, Unit>>; -libfunc struct_deconstruct>> = struct_deconstruct>>; -libfunc drop = drop; -libfunc drop> = drop>; -libfunc drop = drop; -libfunc const_as_immediate> = const_as_immediate>; -libfunc contract_address_const<0> = contract_address_const<0>; -libfunc store_temp>> = store_temp>>; -libfunc enum_init>, 0> = enum_init>, 0>; -libfunc store_temp>> = store_temp>>; -libfunc enum_init>, 1> = enum_init>, 1>; -libfunc enum_match>> = enum_match>>; -libfunc store_temp> = store_temp>; -libfunc function_call> = function_call>; -libfunc enum_match, core::option::Option::>)>> = enum_match, core::option::Option::>)>>; -libfunc struct_deconstruct, core::option::Option::>>> = struct_deconstruct, core::option::Option::>>>; -libfunc store_temp>> = store_temp>>; -libfunc enum_init>, 1> = enum_init>, 1>; -libfunc enum_match>> = enum_match>>; -libfunc struct_construct = struct_construct; -libfunc function_call = function_call; -libfunc enum_match> = enum_match>; -libfunc drop> = drop>; -libfunc get_execution_info_v2_syscall = get_execution_info_v2_syscall; -libfunc store_temp> = store_temp>; -libfunc unbox = unbox; -libfunc struct_deconstruct = struct_deconstruct; -libfunc drop> = drop>; -libfunc drop> = drop>; -libfunc drop = drop; -libfunc const_as_immediate> = const_as_immediate>; -libfunc enum_init, 1> = enum_init, 1>; -libfunc store_temp> = store_temp>; -libfunc felt252_sub = felt252_sub; -libfunc struct_construct> = struct_construct>; -libfunc enum_init, 0> = enum_init, 0>; -libfunc const_as_immediate> = const_as_immediate>; -libfunc struct_construct>> = struct_construct>>; -libfunc snapshot_take>> = snapshot_take>>; -libfunc drop>> = drop>>; -libfunc struct_deconstruct>> = struct_deconstruct>>; -libfunc storage_write_syscall = storage_write_syscall; -libfunc struct_construct = struct_construct; -libfunc enum_init = enum_init; -libfunc enum_init = enum_init; -libfunc store_temp = store_temp; -libfunc function_call>> = function_call>>; -libfunc struct_construct, Unit>> = struct_construct, Unit>>; -libfunc enum_init, ())>, 0> = enum_init, ())>, 0>; -libfunc store_temp, ())>> = store_temp, ())>>; -libfunc enum_init, ())>, 1> = enum_init, ())>, 1>; -libfunc dup = dup; -libfunc enum_init>, 0> = enum_init>, 0>; -libfunc struct_construct, core::option::Option::>>> = struct_construct, core::option::Option::>>>; -libfunc enum_init, core::option::Option::>)>, 0> = enum_init, core::option::Option::>)>, 0>; -libfunc store_temp, core::option::Option::>)>> = store_temp, core::option::Option::>)>>; -libfunc const_as_immediate> = const_as_immediate>; -libfunc enum_init, core::option::Option::>)>, 1> = enum_init, core::option::Option::>)>, 1>; -libfunc struct_deconstruct = struct_deconstruct; -libfunc const_as_immediate> = const_as_immediate>; -libfunc call_contract_syscall = call_contract_syscall; -libfunc class_hash_try_from_felt252 = class_hash_try_from_felt252; -libfunc dup = dup; -libfunc class_hash_to_felt252 = class_hash_to_felt252; -libfunc const_as_immediate> = const_as_immediate>; -libfunc library_call_syscall = library_call_syscall; -libfunc replace_class_syscall = replace_class_syscall; -libfunc struct_deconstruct, Unit>> = struct_deconstruct, Unit>>; -libfunc struct_construct> = struct_construct>; -libfunc enum_init, 0> = enum_init, 0>; -libfunc store_temp> = store_temp>; -libfunc enum_init, 1> = enum_init, 1>; -libfunc drop = drop; -libfunc const_as_immediate> = const_as_immediate>; -libfunc drop = drop; -libfunc snapshot_take = snapshot_take; -libfunc drop = drop; -libfunc enum_match = enum_match; -libfunc const_as_immediate> = const_as_immediate>; -libfunc enum_match = enum_match; -libfunc const_as_immediate> = const_as_immediate>; -libfunc dup = dup; -libfunc struct_deconstruct = struct_deconstruct; -libfunc rename = rename; -libfunc emit_event_syscall = emit_event_syscall; - -revoke_ap_tracking() -> (); // 0 -withdraw_gas([0], [1]) { fallthrough([4], [5]) 94([6], [7]) }; // 1 -branch_align() -> (); // 2 -struct_deconstruct>([3]) -> ([8]); // 3 -store_temp([4]) -> ([4]); // 4 -array_snapshot_pop_front([8]) { fallthrough([9], [10]) 21([11]) }; // 5 -branch_align() -> (); // 6 -drop>>([9]) -> (); // 7 -drop>([10]) -> (); // 8 -array_new() -> ([12]); // 9 -const_as_immediate>() -> ([13]); // 10 -store_temp([13]) -> ([13]); // 11 -array_append([12], [13]) -> ([14]); // 12 -struct_construct() -> ([15]); // 13 -struct_construct>>([15], [14]) -> ([16]); // 14 -enum_init,)>, 1>([16]) -> ([17]); // 15 -store_temp([4]) -> ([4]); // 16 -store_temp([5]) -> ([5]); // 17 -store_temp([2]) -> ([2]); // 18 -store_temp,)>>([17]) -> ([17]); // 19 -return([4], [5], [2], [17]); // 20 -branch_align() -> (); // 21 -drop>>([11]) -> (); // 22 -get_builtin_costs() -> ([18]); // 23 -store_temp([18]) -> ([18]); // 24 -withdraw_gas_all([4], [5], [18]) { fallthrough([19], [20]) 81([21], [22]) }; // 25 -branch_align() -> (); // 26 -storage_base_address_const<1239149872729906871793169171313897310809028090219849129902089947133222824240>() -> ([23]); // 27 -struct_construct>([23]) -> ([24]); // 28 -snapshot_take>([24]) -> ([25], [26]); // 29 -drop>([25]) -> (); // 30 -struct_deconstruct>([26]) -> ([27]); // 31 -rename([27]) -> ([28]); // 32 -storage_address_from_base([28]) -> ([29]); // 33 -const_as_immediate>() -> ([30]); // 34 -store_temp([30]) -> ([30]); // 35 -store_temp([29]) -> ([29]); // 36 -store_temp([19]) -> ([19]); // 37 -storage_read_syscall([20], [2], [30], [29]) { fallthrough([31], [32], [33]) 68([34], [35], [36]) }; // 38 -branch_align() -> (); // 39 -store_temp([33]) -> ([33]); // 40 -store_temp([31]) -> ([31]); // 41 -store_temp([32]) -> ([32]); // 42 -contract_address_try_from_felt252([19], [33]) { fallthrough([37], [38]) 58([39]) }; // 43 -branch_align() -> (); // 44 -array_new() -> ([40]); // 45 -contract_address_to_felt252([38]) -> ([41]); // 46 -array_append([40], [41]) -> ([42]); // 47 -snapshot_take>([42]) -> ([43], [44]); // 48 -drop>([43]) -> (); // 49 -struct_construct>([44]) -> ([45]); // 50 -struct_construct>>([45]) -> ([46]); // 51 -enum_init,)>, 0>([46]) -> ([47]); // 52 -store_temp([37]) -> ([37]); // 53 -store_temp([31]) -> ([31]); // 54 -store_temp([32]) -> ([32]); // 55 -store_temp,)>>([47]) -> ([47]); // 56 -return([37], [31], [32], [47]); // 57 -branch_align() -> (); // 58 -array_new() -> ([48]); // 59 -const_as_immediate>() -> ([49]); // 60 -store_temp([49]) -> ([49]); // 61 -array_append([48], [49]) -> ([50]); // 62 -store_temp([39]) -> ([51]); // 63 -store_temp([31]) -> ([52]); // 64 -store_temp([32]) -> ([53]); // 65 -store_temp>([50]) -> ([54]); // 66 -jump() { 73() }; // 67 -branch_align() -> (); // 68 -store_temp([19]) -> ([51]); // 69 -store_temp([34]) -> ([52]); // 70 -store_temp([35]) -> ([53]); // 71 -store_temp>([36]) -> ([54]); // 72 -struct_construct() -> ([55]); // 73 -struct_construct>>([55], [54]) -> ([56]); // 74 -enum_init,)>, 1>([56]) -> ([57]); // 75 -store_temp([51]) -> ([51]); // 76 -store_temp([52]) -> ([52]); // 77 -store_temp([53]) -> ([53]); // 78 -store_temp,)>>([57]) -> ([57]); // 79 -return([51], [52], [53], [57]); // 80 -branch_align() -> (); // 81 -array_new() -> ([58]); // 82 -const_as_immediate>() -> ([59]); // 83 -store_temp([59]) -> ([59]); // 84 -array_append([58], [59]) -> ([60]); // 85 -struct_construct() -> ([61]); // 86 -struct_construct>>([61], [60]) -> ([62]); // 87 -enum_init,)>, 1>([62]) -> ([63]); // 88 -store_temp([21]) -> ([21]); // 89 -store_temp([22]) -> ([22]); // 90 -store_temp([2]) -> ([2]); // 91 -store_temp,)>>([63]) -> ([63]); // 92 -return([21], [22], [2], [63]); // 93 -branch_align() -> (); // 94 -drop>([3]) -> (); // 95 -array_new() -> ([64]); // 96 -const_as_immediate>() -> ([65]); // 97 -store_temp([65]) -> ([65]); // 98 -array_append([64], [65]) -> ([66]); // 99 -struct_construct() -> ([67]); // 100 -struct_construct>>([67], [66]) -> ([68]); // 101 -enum_init,)>, 1>([68]) -> ([69]); // 102 -store_temp([6]) -> ([6]); // 103 -store_temp([7]) -> ([7]); // 104 -store_temp([2]) -> ([2]); // 105 -store_temp,)>>([69]) -> ([69]); // 106 -return([6], [7], [2], [69]); // 107 -revoke_ap_tracking() -> (); // 108 -withdraw_gas([0], [1]) { fallthrough([4], [5]) 262([6], [7]) }; // 109 -branch_align() -> (); // 110 -struct_deconstruct>([3]) -> ([8]); // 111 -enable_ap_tracking() -> (); // 112 -store_temp([4]) -> ([4]); // 113 -array_snapshot_pop_front([8]) { fallthrough([9], [10]) 122([11]) }; // 114 -branch_align() -> (); // 115 -unbox([10]) -> ([12]); // 116 -rename([12]) -> ([13]); // 117 -enum_init, 0>([13]) -> ([14]); // 118 -store_temp>>([9]) -> ([15]); // 119 -store_temp>([14]) -> ([16]); // 120 -jump() { 127() }; // 121 -branch_align() -> (); // 122 -struct_construct() -> ([17]); // 123 -enum_init, 1>([17]) -> ([18]); // 124 -store_temp>>([11]) -> ([15]); // 125 -store_temp>([18]) -> ([16]); // 126 -enum_match>([16]) { fallthrough([19]) 245([20]) }; // 127 -branch_align() -> (); // 128 -contract_address_try_from_felt252([4], [19]) { fallthrough([21], [22]) 241([23]) }; // 129 -branch_align() -> (); // 130 -store_temp([21]) -> ([21]); // 131 -array_snapshot_pop_front([15]) { fallthrough([24], [25]) 150([26]) }; // 132 -branch_align() -> (); // 133 -disable_ap_tracking() -> (); // 134 -drop>>([24]) -> (); // 135 -drop>([25]) -> (); // 136 -drop([22]) -> (); // 137 -array_new() -> ([27]); // 138 -const_as_immediate>() -> ([28]); // 139 -store_temp([28]) -> ([28]); // 140 -array_append([27], [28]) -> ([29]); // 141 -struct_construct() -> ([30]); // 142 -struct_construct>>([30], [29]) -> ([31]); // 143 -enum_init,)>, 1>([31]) -> ([32]); // 144 -store_temp([21]) -> ([21]); // 145 -store_temp([5]) -> ([5]); // 146 -store_temp([2]) -> ([2]); // 147 -store_temp,)>>([32]) -> ([32]); // 148 -return([21], [5], [2], [32]); // 149 -branch_align() -> (); // 150 -disable_ap_tracking() -> (); // 151 -drop>>([26]) -> (); // 152 -get_builtin_costs() -> ([33]); // 153 -store_temp([33]) -> ([33]); // 154 -withdraw_gas_all([21], [5], [33]) { fallthrough([34], [35]) 227([36], [37]) }; // 155 -branch_align() -> (); // 156 -dup([22]) -> ([22], [38]); // 157 -contract_address_to_felt252([38]) -> ([39]); // 158 -store_temp([34]) -> ([34]); // 159 -felt252_is_zero([39]) { fallthrough() 172([40]) }; // 160 -branch_align() -> (); // 161 -drop([22]) -> (); // 162 -array_new() -> ([41]); // 163 -const_as_immediate>() -> ([42]); // 164 -store_temp([42]) -> ([42]); // 165 -array_append([41], [42]) -> ([43]); // 166 -store_temp([34]) -> ([44]); // 167 -store_temp([35]) -> ([45]); // 168 -store_temp([2]) -> ([46]); // 169 -store_temp>([43]) -> ([47]); // 170 -jump() { 219() }; // 171 -branch_align() -> (); // 172 -drop>([40]) -> (); // 173 -struct_construct>() -> ([48]); // 174 -snapshot_take>([48]) -> ([49], [50]); // 175 -store_temp([34]) -> ([34]); // 176 -store_temp([35]) -> ([35]); // 177 -store_temp([2]) -> ([2]); // 178 -function_call::assert_only_owner>([34], [35], [2], [50]) -> ([51], [52], [53], [54]); // 179 -enum_match>([54]) { fallthrough([55]) 210([56]) }; // 180 -branch_align() -> (); // 181 -drop>([55]) -> (); // 182 -store_temp([51]) -> ([51]); // 183 -store_temp([52]) -> ([52]); // 184 -store_temp([53]) -> ([53]); // 185 -store_temp([22]) -> ([22]); // 186 -function_call::_transfer_ownership>([51], [52], [53], [49], [22]) -> ([57], [58], [59], [60]); // 187 -enum_match, ())>>([60]) { fallthrough([61]) 202([62]) }; // 188 -branch_align() -> (); // 189 -drop, Unit>>([61]) -> (); // 190 -array_new() -> ([63]); // 191 -snapshot_take>([63]) -> ([64], [65]); // 192 -drop>([64]) -> (); // 193 -struct_construct>([65]) -> ([66]); // 194 -struct_construct>>([66]) -> ([67]); // 195 -enum_init,)>, 0>([67]) -> ([68]); // 196 -store_temp([57]) -> ([57]); // 197 -store_temp([58]) -> ([58]); // 198 -store_temp([59]) -> ([59]); // 199 -store_temp,)>>([68]) -> ([68]); // 200 -return([57], [58], [59], [68]); // 201 -branch_align() -> (); // 202 -struct_deconstruct>>([62]) -> ([69], [70]); // 203 -drop([69]) -> (); // 204 -store_temp([57]) -> ([44]); // 205 -store_temp([58]) -> ([45]); // 206 -store_temp([59]) -> ([46]); // 207 -store_temp>([70]) -> ([47]); // 208 -jump() { 219() }; // 209 -branch_align() -> (); // 210 -drop([22]) -> (); // 211 -drop>([49]) -> (); // 212 -struct_deconstruct>>([56]) -> ([71], [72]); // 213 -drop([71]) -> (); // 214 -store_temp([51]) -> ([44]); // 215 -store_temp([52]) -> ([45]); // 216 -store_temp([53]) -> ([46]); // 217 -store_temp>([72]) -> ([47]); // 218 -struct_construct() -> ([73]); // 219 -struct_construct>>([73], [47]) -> ([74]); // 220 -enum_init,)>, 1>([74]) -> ([75]); // 221 -store_temp([44]) -> ([44]); // 222 -store_temp([45]) -> ([45]); // 223 -store_temp([46]) -> ([46]); // 224 -store_temp,)>>([75]) -> ([75]); // 225 -return([44], [45], [46], [75]); // 226 -branch_align() -> (); // 227 -drop([22]) -> (); // 228 -array_new() -> ([76]); // 229 -const_as_immediate>() -> ([77]); // 230 -store_temp([77]) -> ([77]); // 231 -array_append([76], [77]) -> ([78]); // 232 -struct_construct() -> ([79]); // 233 -struct_construct>>([79], [78]) -> ([80]); // 234 -enum_init,)>, 1>([80]) -> ([81]); // 235 -store_temp([36]) -> ([36]); // 236 -store_temp([37]) -> ([37]); // 237 -store_temp([2]) -> ([2]); // 238 -store_temp,)>>([81]) -> ([81]); // 239 -return([36], [37], [2], [81]); // 240 -branch_align() -> (); // 241 -drop>>([15]) -> (); // 242 -store_temp([23]) -> ([82]); // 243 -jump() { 249() }; // 244 -branch_align() -> (); // 245 -drop([20]) -> (); // 246 -drop>>([15]) -> (); // 247 -store_temp([4]) -> ([82]); // 248 -disable_ap_tracking() -> (); // 249 -array_new() -> ([83]); // 250 -const_as_immediate>() -> ([84]); // 251 -store_temp([84]) -> ([84]); // 252 -array_append([83], [84]) -> ([85]); // 253 -struct_construct() -> ([86]); // 254 -struct_construct>>([86], [85]) -> ([87]); // 255 -enum_init,)>, 1>([87]) -> ([88]); // 256 -store_temp([82]) -> ([82]); // 257 -store_temp([5]) -> ([5]); // 258 -store_temp([2]) -> ([2]); // 259 -store_temp,)>>([88]) -> ([88]); // 260 -return([82], [5], [2], [88]); // 261 -branch_align() -> (); // 262 -drop>([3]) -> (); // 263 -array_new() -> ([89]); // 264 -const_as_immediate>() -> ([90]); // 265 -store_temp([90]) -> ([90]); // 266 -array_append([89], [90]) -> ([91]); // 267 -struct_construct() -> ([92]); // 268 -struct_construct>>([92], [91]) -> ([93]); // 269 -enum_init,)>, 1>([93]) -> ([94]); // 270 -store_temp([6]) -> ([6]); // 271 -store_temp([7]) -> ([7]); // 272 -store_temp([2]) -> ([2]); // 273 -store_temp,)>>([94]) -> ([94]); // 274 -return([6], [7], [2], [94]); // 275 -revoke_ap_tracking() -> (); // 276 -withdraw_gas([0], [1]) { fallthrough([4], [5]) 363([6], [7]) }; // 277 -branch_align() -> (); // 278 -struct_deconstruct>([3]) -> ([8]); // 279 -store_temp([4]) -> ([4]); // 280 -array_snapshot_pop_front([8]) { fallthrough([9], [10]) 297([11]) }; // 281 -branch_align() -> (); // 282 -drop>>([9]) -> (); // 283 -drop>([10]) -> (); // 284 -array_new() -> ([12]); // 285 -const_as_immediate>() -> ([13]); // 286 -store_temp([13]) -> ([13]); // 287 -array_append([12], [13]) -> ([14]); // 288 -struct_construct() -> ([15]); // 289 -struct_construct>>([15], [14]) -> ([16]); // 290 -enum_init,)>, 1>([16]) -> ([17]); // 291 -store_temp([4]) -> ([4]); // 292 -store_temp([5]) -> ([5]); // 293 -store_temp([2]) -> ([2]); // 294 -store_temp,)>>([17]) -> ([17]); // 295 -return([4], [5], [2], [17]); // 296 -branch_align() -> (); // 297 -drop>>([11]) -> (); // 298 -get_builtin_costs() -> ([18]); // 299 -store_temp([18]) -> ([18]); // 300 -withdraw_gas_all([4], [5], [18]) { fallthrough([19], [20]) 350([21], [22]) }; // 301 -branch_align() -> (); // 302 -struct_construct>() -> ([23]); // 303 -snapshot_take>([23]) -> ([24], [25]); // 304 -store_temp([19]) -> ([19]); // 305 -store_temp([20]) -> ([20]); // 306 -store_temp([2]) -> ([2]); // 307 -function_call::assert_only_owner>([19], [20], [2], [25]) -> ([26], [27], [28], [29]); // 308 -enum_match>([29]) { fallthrough([30]) 338([31]) }; // 309 -branch_align() -> (); // 310 -drop>([30]) -> (); // 311 -contract_address_const<0>() -> ([32]); // 312 -store_temp([26]) -> ([26]); // 313 -store_temp([27]) -> ([27]); // 314 -store_temp([28]) -> ([28]); // 315 -store_temp([32]) -> ([32]); // 316 -function_call::_transfer_ownership>([26], [27], [28], [24], [32]) -> ([33], [34], [35], [36]); // 317 -enum_match, ())>>([36]) { fallthrough([37]) 332([38]) }; // 318 -branch_align() -> (); // 319 -drop, Unit>>([37]) -> (); // 320 -array_new() -> ([39]); // 321 -snapshot_take>([39]) -> ([40], [41]); // 322 -drop>([40]) -> (); // 323 -struct_construct>([41]) -> ([42]); // 324 -struct_construct>>([42]) -> ([43]); // 325 -enum_init,)>, 0>([43]) -> ([44]); // 326 -store_temp([33]) -> ([33]); // 327 -store_temp([34]) -> ([34]); // 328 -store_temp([35]) -> ([35]); // 329 -store_temp,)>>([44]) -> ([44]); // 330 -return([33], [34], [35], [44]); // 331 -branch_align() -> (); // 332 -store_temp([33]) -> ([45]); // 333 -store_temp([34]) -> ([46]); // 334 -store_temp([35]) -> ([47]); // 335 -store_temp>>([38]) -> ([48]); // 336 -jump() { 344() }; // 337 -branch_align() -> (); // 338 -drop>([24]) -> (); // 339 -store_temp([26]) -> ([45]); // 340 -store_temp([27]) -> ([46]); // 341 -store_temp([28]) -> ([47]); // 342 -store_temp>>([31]) -> ([48]); // 343 -enum_init,)>, 1>([48]) -> ([49]); // 344 -store_temp([45]) -> ([45]); // 345 -store_temp([46]) -> ([46]); // 346 -store_temp([47]) -> ([47]); // 347 -store_temp,)>>([49]) -> ([49]); // 348 -return([45], [46], [47], [49]); // 349 -branch_align() -> (); // 350 -array_new() -> ([50]); // 351 -const_as_immediate>() -> ([51]); // 352 -store_temp([51]) -> ([51]); // 353 -array_append([50], [51]) -> ([52]); // 354 -struct_construct() -> ([53]); // 355 -struct_construct>>([53], [52]) -> ([54]); // 356 -enum_init,)>, 1>([54]) -> ([55]); // 357 -store_temp([21]) -> ([21]); // 358 -store_temp([22]) -> ([22]); // 359 -store_temp([2]) -> ([2]); // 360 -store_temp,)>>([55]) -> ([55]); // 361 -return([21], [22], [2], [55]); // 362 -branch_align() -> (); // 363 -drop>([3]) -> (); // 364 -array_new() -> ([56]); // 365 -const_as_immediate>() -> ([57]); // 366 -store_temp([57]) -> ([57]); // 367 -array_append([56], [57]) -> ([58]); // 368 -struct_construct() -> ([59]); // 369 -struct_construct>>([59], [58]) -> ([60]); // 370 -enum_init,)>, 1>([60]) -> ([61]); // 371 -store_temp([6]) -> ([6]); // 372 -store_temp([7]) -> ([7]); // 373 -store_temp([2]) -> ([2]); // 374 -store_temp,)>>([61]) -> ([61]); // 375 -return([6], [7], [2], [61]); // 376 -revoke_ap_tracking() -> (); // 377 -withdraw_gas([0], [1]) { fallthrough([4], [5]) 514([6], [7]) }; // 378 -branch_align() -> (); // 379 -struct_deconstruct>([3]) -> ([8]); // 380 -enable_ap_tracking() -> (); // 381 -store_temp([4]) -> ([4]); // 382 -array_snapshot_pop_front([8]) { fallthrough([9], [10]) 389([11]) }; // 383 -branch_align() -> (); // 384 -enum_init>, 0>([10]) -> ([12]); // 385 -store_temp>>([9]) -> ([13]); // 386 -store_temp>>([12]) -> ([14]); // 387 -jump() { 394() }; // 388 -branch_align() -> (); // 389 -struct_construct() -> ([15]); // 390 -enum_init>, 1>([15]) -> ([16]); // 391 -store_temp>>([11]) -> ([13]); // 392 -store_temp>>([16]) -> ([14]); // 393 -enum_match>>([14]) { fallthrough([17]) 423([18]) }; // 394 -branch_align() -> (); // 395 -disable_ap_tracking() -> (); // 396 -unbox([17]) -> ([19]); // 397 -array_new() -> ([20]); // 398 -struct_construct>([13]) -> ([21]); // 399 -rename([19]) -> ([22]); // 400 -store_temp([4]) -> ([4]); // 401 -store_temp([5]) -> ([5]); // 402 -store_temp>([21]) -> ([21]); // 403 -store_temp>([20]) -> ([20]); // 404 -store_temp([22]) -> ([22]); // 405 -function_call>([4], [5], [21], [20], [22]) -> ([23], [24], [25]); // 406 -enum_match, core::option::Option::>)>>([25]) { fallthrough([26]) 416([27]) }; // 407 -branch_align() -> (); // 408 -struct_deconstruct, core::option::Option::>>>([26]) -> ([28], [29]); // 409 -struct_deconstruct>([28]) -> ([30]); // 410 -store_temp([23]) -> ([31]); // 411 -store_temp([24]) -> ([32]); // 412 -store_temp>>([30]) -> ([33]); // 413 -store_temp>>([29]) -> ([34]); // 414 -jump() { 432() }; // 415 -branch_align() -> (); // 416 -enum_init,)>, 1>([27]) -> ([35]); // 417 -store_temp([23]) -> ([23]); // 418 -store_temp([24]) -> ([24]); // 419 -store_temp([2]) -> ([2]); // 420 -store_temp,)>>([35]) -> ([35]); // 421 -return([23], [24], [2], [35]); // 422 -branch_align() -> (); // 423 -disable_ap_tracking() -> (); // 424 -drop([18]) -> (); // 425 -struct_construct() -> ([36]); // 426 -enum_init>, 1>([36]) -> ([37]); // 427 -store_temp([4]) -> ([31]); // 428 -store_temp([5]) -> ([32]); // 429 -store_temp>>([13]) -> ([33]); // 430 -store_temp>>([37]) -> ([34]); // 431 -enum_match>>([34]) { fallthrough([38]) 499([39]) }; // 432 -branch_align() -> (); // 433 -array_snapshot_pop_front([33]) { fallthrough([40], [41]) 451([42]) }; // 434 -branch_align() -> (); // 435 -drop>>([40]) -> (); // 436 -drop>([41]) -> (); // 437 -drop>([38]) -> (); // 438 -array_new() -> ([43]); // 439 -const_as_immediate>() -> ([44]); // 440 -store_temp([44]) -> ([44]); // 441 -array_append([43], [44]) -> ([45]); // 442 -struct_construct() -> ([46]); // 443 -struct_construct>>([46], [45]) -> ([47]); // 444 -enum_init,)>, 1>([47]) -> ([48]); // 445 -store_temp([31]) -> ([31]); // 446 -store_temp([32]) -> ([32]); // 447 -store_temp([2]) -> ([2]); // 448 -store_temp,)>>([48]) -> ([48]); // 449 -return([31], [32], [2], [48]); // 450 -branch_align() -> (); // 451 -drop>>([42]) -> (); // 452 -get_builtin_costs() -> ([49]); // 453 -store_temp([49]) -> ([49]); // 454 -withdraw_gas_all([31], [32], [49]) { fallthrough([50], [51]) 485([52], [53]) }; // 455 -branch_align() -> (); // 456 -struct_construct>() -> ([54]); // 457 -struct_construct([54]) -> ([55]); // 458 -store_temp([50]) -> ([50]); // 459 -store_temp([51]) -> ([51]); // 460 -store_temp([2]) -> ([2]); // 461 -store_temp>([38]) -> ([38]); // 462 -function_call([50], [51], [2], [55], [38]) -> ([56], [57], [58], [59]); // 463 -enum_match>([59]) { fallthrough([60]) 478([61]) }; // 464 -branch_align() -> (); // 465 -drop>([60]) -> (); // 466 -array_new() -> ([62]); // 467 -snapshot_take>([62]) -> ([63], [64]); // 468 -drop>([63]) -> (); // 469 -struct_construct>([64]) -> ([65]); // 470 -struct_construct>>([65]) -> ([66]); // 471 -enum_init,)>, 0>([66]) -> ([67]); // 472 -store_temp([56]) -> ([56]); // 473 -store_temp([57]) -> ([57]); // 474 -store_temp([58]) -> ([58]); // 475 -store_temp,)>>([67]) -> ([67]); // 476 -return([56], [57], [58], [67]); // 477 -branch_align() -> (); // 478 -enum_init,)>, 1>([61]) -> ([68]); // 479 -store_temp([56]) -> ([56]); // 480 -store_temp([57]) -> ([57]); // 481 -store_temp([58]) -> ([58]); // 482 -store_temp,)>>([68]) -> ([68]); // 483 -return([56], [57], [58], [68]); // 484 -branch_align() -> (); // 485 -drop>([38]) -> (); // 486 -array_new() -> ([69]); // 487 -const_as_immediate>() -> ([70]); // 488 -store_temp([70]) -> ([70]); // 489 -array_append([69], [70]) -> ([71]); // 490 -struct_construct() -> ([72]); // 491 -struct_construct>>([72], [71]) -> ([73]); // 492 -enum_init,)>, 1>([73]) -> ([74]); // 493 -store_temp([52]) -> ([52]); // 494 -store_temp([53]) -> ([53]); // 495 -store_temp([2]) -> ([2]); // 496 -store_temp,)>>([74]) -> ([74]); // 497 -return([52], [53], [2], [74]); // 498 -branch_align() -> (); // 499 -drop([39]) -> (); // 500 -drop>>([33]) -> (); // 501 -array_new() -> ([75]); // 502 -const_as_immediate>() -> ([76]); // 503 -store_temp([76]) -> ([76]); // 504 -array_append([75], [76]) -> ([77]); // 505 -struct_construct() -> ([78]); // 506 -struct_construct>>([78], [77]) -> ([79]); // 507 -enum_init,)>, 1>([79]) -> ([80]); // 508 -store_temp([31]) -> ([31]); // 509 -store_temp([32]) -> ([32]); // 510 -store_temp([2]) -> ([2]); // 511 -store_temp,)>>([80]) -> ([80]); // 512 -return([31], [32], [2], [80]); // 513 -branch_align() -> (); // 514 -drop>([3]) -> (); // 515 -array_new() -> ([81]); // 516 -const_as_immediate>() -> ([82]); // 517 -store_temp([82]) -> ([82]); // 518 -array_append([81], [82]) -> ([83]); // 519 -struct_construct() -> ([84]); // 520 -struct_construct>>([84], [83]) -> ([85]); // 521 -enum_init,)>, 1>([85]) -> ([86]); // 522 -store_temp([6]) -> ([6]); // 523 -store_temp([7]) -> ([7]); // 524 -store_temp([2]) -> ([2]); // 525 -store_temp,)>>([86]) -> ([86]); // 526 -return([6], [7], [2], [86]); // 527 -drop>([3]) -> (); // 528 -storage_base_address_const<1239149872729906871793169171313897310809028090219849129902089947133222824240>() -> ([4]); // 529 -struct_construct>([4]) -> ([5]); // 530 -snapshot_take>([5]) -> ([6], [7]); // 531 -drop>([6]) -> (); // 532 -struct_deconstruct>([7]) -> ([8]); // 533 -rename([8]) -> ([9]); // 534 -storage_address_from_base([9]) -> ([10]); // 535 -const_as_immediate>() -> ([11]); // 536 -store_temp([11]) -> ([11]); // 537 -store_temp([10]) -> ([10]); // 538 -storage_read_syscall([1], [2], [11], [10]) { fallthrough([12], [13], [14]) 627([15], [16], [17]) }; // 539 -branch_align() -> (); // 540 -store_temp([14]) -> ([14]); // 541 -store_temp([12]) -> ([12]); // 542 -store_temp([13]) -> ([13]); // 543 -contract_address_try_from_felt252([0], [14]) { fallthrough([18], [19]) 617([20]) }; // 544 -branch_align() -> (); // 545 -store_temp([18]) -> ([18]); // 546 -get_execution_info_v2_syscall([12], [13]) { fallthrough([21], [22], [23]) 607([24], [25], [26]) }; // 547 -branch_align() -> (); // 548 -store_temp>([23]) -> ([23]); // 549 -unbox([23]) -> ([27]); // 550 -struct_deconstruct([27]) -> ([28], [29], [30], [31], [32]); // 551 -drop>([28]) -> (); // 552 -drop>([29]) -> (); // 553 -drop([31]) -> (); // 554 -drop([32]) -> (); // 555 -store_temp([30]) -> ([30]); // 556 -dup([30]) -> ([30], [33]); // 557 -contract_address_to_felt252([33]) -> ([34]); // 558 -store_temp([21]) -> ([21]); // 559 -store_temp([22]) -> ([22]); // 560 -felt252_is_zero([34]) { fallthrough() 577([35]) }; // 561 -branch_align() -> (); // 562 -drop([19]) -> (); // 563 -drop([30]) -> (); // 564 -array_new() -> ([36]); // 565 -const_as_immediate>() -> ([37]); // 566 -store_temp([37]) -> ([37]); // 567 -array_append([36], [37]) -> ([38]); // 568 -struct_construct() -> ([39]); // 569 -struct_construct>>([39], [38]) -> ([40]); // 570 -enum_init, 1>([40]) -> ([41]); // 571 -store_temp([18]) -> ([18]); // 572 -store_temp([21]) -> ([21]); // 573 -store_temp([22]) -> ([22]); // 574 -store_temp>([41]) -> ([41]); // 575 -return([18], [21], [22], [41]); // 576 -branch_align() -> (); // 577 -drop>([35]) -> (); // 578 -contract_address_to_felt252([30]) -> ([42]); // 579 -contract_address_to_felt252([19]) -> ([43]); // 580 -felt252_sub([42], [43]) -> ([44]); // 581 -store_temp([44]) -> ([44]); // 582 -felt252_is_zero([44]) { fallthrough() 593([45]) }; // 583 -branch_align() -> (); // 584 -struct_construct() -> ([46]); // 585 -struct_construct>([46]) -> ([47]); // 586 -enum_init, 0>([47]) -> ([48]); // 587 -store_temp([18]) -> ([18]); // 588 -store_temp([21]) -> ([21]); // 589 -store_temp([22]) -> ([22]); // 590 -store_temp>([48]) -> ([48]); // 591 -return([18], [21], [22], [48]); // 592 -branch_align() -> (); // 593 -drop>([45]) -> (); // 594 -array_new() -> ([49]); // 595 -const_as_immediate>() -> ([50]); // 596 -store_temp([50]) -> ([50]); // 597 -array_append([49], [50]) -> ([51]); // 598 -struct_construct() -> ([52]); // 599 -struct_construct>>([52], [51]) -> ([53]); // 600 -enum_init, 1>([53]) -> ([54]); // 601 -store_temp([18]) -> ([18]); // 602 -store_temp([21]) -> ([21]); // 603 -store_temp([22]) -> ([22]); // 604 -store_temp>([54]) -> ([54]); // 605 -return([18], [21], [22], [54]); // 606 -branch_align() -> (); // 607 -drop([19]) -> (); // 608 -struct_construct() -> ([55]); // 609 -struct_construct>>([55], [26]) -> ([56]); // 610 -enum_init, 1>([56]) -> ([57]); // 611 -store_temp([18]) -> ([18]); // 612 -store_temp([24]) -> ([24]); // 613 -store_temp([25]) -> ([25]); // 614 -store_temp>([57]) -> ([57]); // 615 -return([18], [24], [25], [57]); // 616 -branch_align() -> (); // 617 -array_new() -> ([58]); // 618 -const_as_immediate>() -> ([59]); // 619 -store_temp([59]) -> ([59]); // 620 -array_append([58], [59]) -> ([60]); // 621 -store_temp([20]) -> ([61]); // 622 -store_temp([12]) -> ([62]); // 623 -store_temp([13]) -> ([63]); // 624 -store_temp>([60]) -> ([64]); // 625 -jump() { 632() }; // 626 -branch_align() -> (); // 627 -store_temp([0]) -> ([61]); // 628 -store_temp([15]) -> ([62]); // 629 -store_temp([16]) -> ([63]); // 630 -store_temp>([17]) -> ([64]); // 631 -struct_construct() -> ([65]); // 632 -struct_construct>>([65], [64]) -> ([66]); // 633 -enum_init, 1>([66]) -> ([67]); // 634 -store_temp([61]) -> ([61]); // 635 -store_temp([62]) -> ([62]); // 636 -store_temp([63]) -> ([63]); // 637 -store_temp>([67]) -> ([67]); // 638 -return([61], [62], [63], [67]); // 639 -storage_base_address_const<1239149872729906871793169171313897310809028090219849129902089947133222824240>() -> ([5]); // 640 -struct_construct>>([5]) -> ([6]); // 641 -snapshot_take>>([6]) -> ([7], [8]); // 642 -drop>>([7]) -> (); // 643 -struct_deconstruct>>([8]) -> ([9]); // 644 -rename([9]) -> ([10]); // 645 -storage_address_from_base([10]) -> ([11]); // 646 -const_as_immediate>() -> ([12]); // 647 -store_temp([12]) -> ([12]); // 648 -store_temp([11]) -> ([11]); // 649 -storage_read_syscall([1], [2], [12], [11]) { fallthrough([13], [14], [15]) 719([16], [17], [18]) }; // 650 -branch_align() -> (); // 651 -store_temp([15]) -> ([15]); // 652 -store_temp([13]) -> ([13]); // 653 -store_temp([14]) -> ([14]); // 654 -contract_address_try_from_felt252([0], [15]) { fallthrough([19], [20]) 707([21]) }; // 655 -branch_align() -> (); // 656 -storage_base_address_const<1239149872729906871793169171313897310809028090219849129902089947133222824240>() -> ([22]); // 657 -dup([4]) -> ([4], [23]); // 658 -contract_address_to_felt252([23]) -> ([24]); // 659 -storage_address_from_base([22]) -> ([25]); // 660 -const_as_immediate>() -> ([26]); // 661 -store_temp([26]) -> ([26]); // 662 -store_temp([25]) -> ([25]); // 663 -store_temp([19]) -> ([19]); // 664 -storage_write_syscall([13], [14], [26], [25], [24]) { fallthrough([27], [28]) 695([29], [30], [31]) }; // 665 -branch_align() -> (); // 666 -struct_construct([20], [4]) -> ([32]); // 667 -enum_init([32]) -> ([33]); // 668 -enum_init([33]) -> ([34]); // 669 -struct_construct>() -> ([35]); // 670 -struct_construct([35]) -> ([36]); // 671 -store_temp([27]) -> ([27]); // 672 -store_temp([28]) -> ([28]); // 673 -store_temp([34]) -> ([34]); // 674 -function_call>>([27], [28], [36], [34]) -> ([37], [38], [39]); // 675 -enum_match>([39]) { fallthrough([40]) 687([41]) }; // 676 -branch_align() -> (); // 677 -drop>([40]) -> (); // 678 -struct_construct() -> ([42]); // 679 -struct_construct, Unit>>([3], [42]) -> ([43]); // 680 -enum_init, ())>, 0>([43]) -> ([44]); // 681 -store_temp([19]) -> ([19]); // 682 -store_temp([37]) -> ([37]); // 683 -store_temp([38]) -> ([38]); // 684 -store_temp, ())>>([44]) -> ([44]); // 685 -return([19], [37], [38], [44]); // 686 -branch_align() -> (); // 687 -drop>([3]) -> (); // 688 -enum_init, ())>, 1>([41]) -> ([45]); // 689 -store_temp([19]) -> ([19]); // 690 -store_temp([37]) -> ([37]); // 691 -store_temp([38]) -> ([38]); // 692 -store_temp, ())>>([45]) -> ([45]); // 693 -return([19], [37], [38], [45]); // 694 -branch_align() -> (); // 695 -drop>([3]) -> (); // 696 -drop([4]) -> (); // 697 -drop([20]) -> (); // 698 -struct_construct() -> ([46]); // 699 -struct_construct>>([46], [31]) -> ([47]); // 700 -enum_init, ())>, 1>([47]) -> ([48]); // 701 -store_temp([19]) -> ([19]); // 702 -store_temp([29]) -> ([29]); // 703 -store_temp([30]) -> ([30]); // 704 -store_temp, ())>>([48]) -> ([48]); // 705 -return([19], [29], [30], [48]); // 706 -branch_align() -> (); // 707 -drop>([3]) -> (); // 708 -drop([4]) -> (); // 709 -array_new() -> ([49]); // 710 -const_as_immediate>() -> ([50]); // 711 -store_temp([50]) -> ([50]); // 712 -array_append([49], [50]) -> ([51]); // 713 -store_temp([21]) -> ([52]); // 714 -store_temp([13]) -> ([53]); // 715 -store_temp([14]) -> ([54]); // 716 -store_temp>([51]) -> ([55]); // 717 -jump() { 726() }; // 718 -branch_align() -> (); // 719 -drop>([3]) -> (); // 720 -drop([4]) -> (); // 721 -store_temp([0]) -> ([52]); // 722 -store_temp([16]) -> ([53]); // 723 -store_temp([17]) -> ([54]); // 724 -store_temp>([18]) -> ([55]); // 725 -struct_construct() -> ([56]); // 726 -struct_construct>>([56], [55]) -> ([57]); // 727 -enum_init, ())>, 1>([57]) -> ([58]); // 728 -store_temp([52]) -> ([52]); // 729 -store_temp([53]) -> ([53]); // 730 -store_temp([54]) -> ([54]); // 731 -store_temp, ())>>([58]) -> ([58]); // 732 -return([52], [53], [54], [58]); // 733 -disable_ap_tracking() -> (); // 734 -withdraw_gas([0], [1]) { fallthrough([5], [6]) 791([7], [8]) }; // 735 -branch_align() -> (); // 736 -dup([4]) -> ([4], [9]); // 737 -store_temp([5]) -> ([5]); // 738 -felt252_is_zero([9]) { fallthrough() 749([10]) }; // 739 -branch_align() -> (); // 740 -drop([4]) -> (); // 741 -enum_init>, 0>([3]) -> ([11]); // 742 -struct_construct, core::option::Option::>>>([2], [11]) -> ([12]); // 743 -enum_init, core::option::Option::>)>, 0>([12]) -> ([13]); // 744 -store_temp([5]) -> ([5]); // 745 -store_temp([6]) -> ([6]); // 746 -store_temp, core::option::Option::>)>>([13]) -> ([13]); // 747 -return([5], [6], [13]); // 748 -branch_align() -> (); // 749 -drop>([10]) -> (); // 750 -struct_deconstruct>([2]) -> ([14]); // 751 -enable_ap_tracking() -> (); // 752 -array_snapshot_pop_front([14]) { fallthrough([15], [16]) 761([17]) }; // 753 -branch_align() -> (); // 754 -unbox([16]) -> ([18]); // 755 -rename([18]) -> ([19]); // 756 -enum_init, 0>([19]) -> ([20]); // 757 -store_temp>>([15]) -> ([21]); // 758 -store_temp>([20]) -> ([22]); // 759 -jump() { 766() }; // 760 -branch_align() -> (); // 761 -struct_construct() -> ([23]); // 762 -enum_init, 1>([23]) -> ([24]); // 763 -store_temp>>([17]) -> ([21]); // 764 -store_temp>([24]) -> ([22]); // 765 -struct_construct>([21]) -> ([25]); // 766 -enum_match>([22]) { fallthrough([26]) 780([27]) }; // 767 -branch_align() -> (); // 768 -disable_ap_tracking() -> (); // 769 -array_append([3], [26]) -> ([28]); // 770 -const_as_immediate>() -> ([29]); // 771 -felt252_sub([4], [29]) -> ([30]); // 772 -store_temp([5]) -> ([5]); // 773 -store_temp([6]) -> ([6]); // 774 -store_temp>([25]) -> ([25]); // 775 -store_temp>([28]) -> ([28]); // 776 -store_temp([30]) -> ([30]); // 777 -function_call>([5], [6], [25], [28], [30]) -> ([31], [32], [33]); // 778 -return([31], [32], [33]); // 779 -branch_align() -> (); // 780 -disable_ap_tracking() -> (); // 781 -drop([4]) -> (); // 782 -drop>([3]) -> (); // 783 -enum_init>, 1>([27]) -> ([34]); // 784 -struct_construct, core::option::Option::>>>([25], [34]) -> ([35]); // 785 -enum_init, core::option::Option::>)>, 0>([35]) -> ([36]); // 786 -store_temp([5]) -> ([5]); // 787 -store_temp([6]) -> ([6]); // 788 -store_temp, core::option::Option::>)>>([36]) -> ([36]); // 789 -return([5], [6], [36]); // 790 -branch_align() -> (); // 791 -drop([4]) -> (); // 792 -drop>([3]) -> (); // 793 -drop>([2]) -> (); // 794 -array_new() -> ([37]); // 795 -const_as_immediate>() -> ([38]); // 796 -store_temp([38]) -> ([38]); // 797 -array_append([37], [38]) -> ([39]); // 798 -struct_construct() -> ([40]); // 799 -struct_construct>>([40], [39]) -> ([41]); // 800 -enum_init, core::option::Option::>)>, 1>([41]) -> ([42]); // 801 -store_temp([7]) -> ([7]); // 802 -store_temp([8]) -> ([8]); // 803 -store_temp, core::option::Option::>)>>([42]) -> ([42]); // 804 -return([7], [8], [42]); // 805 -get_execution_info_v2_syscall([1], [2]) { fallthrough([5], [6], [7]) 936([8], [9], [10]) }; // 806 -branch_align() -> (); // 807 -store_temp>([7]) -> ([7]); // 808 -unbox([7]) -> ([11]); // 809 -struct_deconstruct([11]) -> ([12], [13], [14], [15], [16]); // 810 -drop>([12]) -> (); // 811 -drop>([13]) -> (); // 812 -drop([15]) -> (); // 813 -drop([16]) -> (); // 814 -struct_deconstruct([3]) -> ([17]); // 815 -store_temp([0]) -> ([0]); // 816 -store_temp([5]) -> ([5]); // 817 -store_temp([6]) -> ([6]); // 818 -store_temp([14]) -> ([18]); // 819 -dup([18]) -> ([18], [14]); // 820 -function_call::_transfer_ownership>([0], [5], [6], [17], [18]) -> ([19], [20], [21], [22]); // 821 -enum_match, ())>>([22]) { fallthrough([23]) 927([24]) }; // 822 -branch_align() -> (); // 823 -array_new() -> ([25]); // 824 -const_as_immediate>() -> ([26]); // 825 -snapshot_take>([25]) -> ([27], [28]); // 826 -drop>([27]) -> (); // 827 -struct_construct>([28]) -> ([29]); // 828 -store_temp([26]) -> ([26]); // 829 -call_contract_syscall([20], [21], [14], [26], [29]) { fallthrough([30], [31], [32]) 912([33], [34], [35]) }; // 830 -branch_align() -> (); // 831 -struct_deconstruct>([32]) -> ([36]); // 832 -store_temp>>([36]) -> ([36]); // 833 -store_temp([30]) -> ([30]); // 834 -store_temp([31]) -> ([31]); // 835 -array_snapshot_pop_front([36]) { fallthrough([37], [38]) 898([39]) }; // 836 -branch_align() -> (); // 837 -drop>>([37]) -> (); // 838 -unbox([38]) -> ([40]); // 839 -rename([40]) -> ([41]); // 840 -store_temp([41]) -> ([41]); // 841 -class_hash_try_from_felt252([19], [41]) { fallthrough([42], [43]) 893([44]) }; // 842 -branch_align() -> (); // 843 -dup([43]) -> ([43], [45]); // 844 -class_hash_to_felt252([45]) -> ([46]); // 845 -array_append([4], [46]) -> ([47]); // 846 -const_as_immediate>() -> ([48]); // 847 -snapshot_take>([47]) -> ([49], [50]); // 848 -drop>([49]) -> (); // 849 -struct_construct>([50]) -> ([51]); // 850 -dup([43]) -> ([43], [52]); // 851 -store_temp([48]) -> ([48]); // 852 -store_temp>([51]) -> ([51]); // 853 -store_temp([42]) -> ([42]); // 854 -library_call_syscall([30], [31], [52], [48], [51]) { fallthrough([53], [54], [55]) 882([56], [57], [58]) }; // 855 -branch_align() -> (); // 856 -drop>([55]) -> (); // 857 -store_temp([53]) -> ([53]); // 858 -replace_class_syscall([53], [54], [43]) { fallthrough([59], [60]) 872([61], [62], [63]) }; // 859 -branch_align() -> (); // 860 -struct_deconstruct, Unit>>([23]) -> ([64], [65]); // 861 -drop([65]) -> (); // 862 -struct_construct([64]) -> ([66]); // 863 -struct_construct() -> ([67]); // 864 -struct_construct>([66], [67]) -> ([68]); // 865 -enum_init, 0>([68]) -> ([69]); // 866 -store_temp([42]) -> ([42]); // 867 -store_temp([59]) -> ([59]); // 868 -store_temp([60]) -> ([60]); // 869 -store_temp>([69]) -> ([69]); // 870 -return([42], [59], [60], [69]); // 871 -branch_align() -> (); // 872 -drop, Unit>>([23]) -> (); // 873 -struct_construct() -> ([70]); // 874 -struct_construct>>([70], [63]) -> ([71]); // 875 -enum_init, 1>([71]) -> ([72]); // 876 -store_temp([42]) -> ([42]); // 877 -store_temp([61]) -> ([61]); // 878 -store_temp([62]) -> ([62]); // 879 -store_temp>([72]) -> ([72]); // 880 -return([42], [61], [62], [72]); // 881 -branch_align() -> (); // 882 -drop, Unit>>([23]) -> (); // 883 -drop([43]) -> (); // 884 -struct_construct() -> ([73]); // 885 -struct_construct>>([73], [58]) -> ([74]); // 886 -enum_init, 1>([74]) -> ([75]); // 887 -store_temp([42]) -> ([42]); // 888 -store_temp([56]) -> ([56]); // 889 -store_temp([57]) -> ([57]); // 890 -store_temp>([75]) -> ([75]); // 891 -return([42], [56], [57], [75]); // 892 -branch_align() -> (); // 893 -drop>([4]) -> (); // 894 -drop, Unit>>([23]) -> (); // 895 -store_temp([44]) -> ([76]); // 896 -jump() { 903() }; // 897 -branch_align() -> (); // 898 -drop>>([39]) -> (); // 899 -drop>([4]) -> (); // 900 -drop, Unit>>([23]) -> (); // 901 -store_temp([19]) -> ([76]); // 902 -array_new() -> ([77]); // 903 -const_as_immediate>() -> ([78]); // 904 -store_temp([78]) -> ([78]); // 905 -array_append([77], [78]) -> ([79]); // 906 -store_temp([76]) -> ([80]); // 907 -store_temp([30]) -> ([81]); // 908 -store_temp([31]) -> ([82]); // 909 -store_temp>([79]) -> ([83]); // 910 -jump() { 919() }; // 911 -branch_align() -> (); // 912 -drop>([4]) -> (); // 913 -drop, Unit>>([23]) -> (); // 914 -store_temp([19]) -> ([80]); // 915 -store_temp([33]) -> ([81]); // 916 -store_temp([34]) -> ([82]); // 917 -store_temp>([35]) -> ([83]); // 918 -struct_construct() -> ([84]); // 919 -struct_construct>>([84], [83]) -> ([85]); // 920 -enum_init, 1>([85]) -> ([86]); // 921 -store_temp([80]) -> ([80]); // 922 -store_temp([81]) -> ([81]); // 923 -store_temp([82]) -> ([82]); // 924 -store_temp>([86]) -> ([86]); // 925 -return([80], [81], [82], [86]); // 926 -branch_align() -> (); // 927 -drop>([4]) -> (); // 928 -drop([14]) -> (); // 929 -enum_init, 1>([24]) -> ([87]); // 930 -store_temp([19]) -> ([19]); // 931 -store_temp([20]) -> ([20]); // 932 -store_temp([21]) -> ([21]); // 933 -store_temp>([87]) -> ([87]); // 934 -return([19], [20], [21], [87]); // 935 -branch_align() -> (); // 936 -drop>([4]) -> (); // 937 -drop([3]) -> (); // 938 -struct_construct() -> ([88]); // 939 -struct_construct>>([88], [10]) -> ([89]); // 940 -enum_init, 1>([89]) -> ([90]); // 941 -store_temp([0]) -> ([0]); // 942 -store_temp([8]) -> ([8]); // 943 -store_temp([9]) -> ([9]); // 944 -store_temp>([90]) -> ([90]); // 945 -return([0], [8], [9], [90]); // 946 -array_new() -> ([4]); // 947 -array_new() -> ([5]); // 948 -snapshot_take([3]) -> ([6], [7]); // 949 -drop([6]) -> (); // 950 -enum_match([7]) -> ([8]); // 951 -branch_align() -> (); // 952 -const_as_immediate>() -> ([9]); // 953 -store_temp([9]) -> ([9]); // 954 -array_append([4], [9]) -> ([10]); // 955 -enum_match([8]) -> ([11]); // 956 -branch_align() -> (); // 957 -const_as_immediate>() -> ([12]); // 958 -store_temp([12]) -> ([12]); // 959 -array_append([10], [12]) -> ([13]); // 960 -dup([11]) -> ([11], [14]); // 961 -struct_deconstruct([14]) -> ([15], [16]); // 962 -drop([16]) -> (); // 963 -rename([15]) -> ([17]); // 964 -contract_address_to_felt252([17]) -> ([18]); // 965 -array_append([5], [18]) -> ([19]); // 966 -struct_deconstruct([11]) -> ([20], [21]); // 967 -drop([20]) -> (); // 968 -rename([21]) -> ([22]); // 969 -contract_address_to_felt252([22]) -> ([23]); // 970 -array_append([19], [23]) -> ([24]); // 971 -snapshot_take>([13]) -> ([25], [26]); // 972 -drop>([25]) -> (); // 973 -snapshot_take>([24]) -> ([27], [28]); // 974 -drop>([27]) -> (); // 975 -struct_construct>([26]) -> ([29]); // 976 -struct_construct>([28]) -> ([30]); // 977 -store_temp>([29]) -> ([29]); // 978 -store_temp>([30]) -> ([30]); // 979 -emit_event_syscall([0], [1], [29], [30]) { fallthrough([31], [32]) 989([33], [34], [35]) }; // 980 -branch_align() -> (); // 981 -struct_construct() -> ([36]); // 982 -struct_construct>([2], [36]) -> ([37]); // 983 -enum_init, 0>([37]) -> ([38]); // 984 -store_temp([31]) -> ([31]); // 985 -store_temp([32]) -> ([32]); // 986 -store_temp>([38]) -> ([38]); // 987 -return([31], [32], [38]); // 988 -branch_align() -> (); // 989 -drop([2]) -> (); // 990 -struct_construct() -> ([39]); // 991 -struct_construct>>([39], [35]) -> ([40]); // 992 -enum_init, 1>([40]) -> ([41]); // 993 -store_temp([33]) -> ([33]); // 994 -store_temp([34]) -> ([34]); // 995 -store_temp>([41]) -> ([41]); // 996 -return([33], [34], [41]); // 997 - -contracts::components::ownable::ownable_component::__wrapper__Ownable__owner::@0([0]: RangeCheck, [1]: GasBuiltin, [2]: System, [3]: core::array::Span::) -> (RangeCheck, GasBuiltin, System, core::panics::PanicResult::<(core::array::Span::,)>); -contracts::components::ownable::ownable_component::__wrapper__Ownable__transfer_ownership::@108([0]: RangeCheck, [1]: GasBuiltin, [2]: System, [3]: core::array::Span::) -> (RangeCheck, GasBuiltin, System, core::panics::PanicResult::<(core::array::Span::,)>); -contracts::components::ownable::ownable_component::__wrapper__Ownable__renounce_ownership::@276([0]: RangeCheck, [1]: GasBuiltin, [2]: System, [3]: core::array::Span::) -> (RangeCheck, GasBuiltin, System, core::panics::PanicResult::<(core::array::Span::,)>); -contracts::uninitialized_account::UninitializedAccount::__wrapper__constructor@377([0]: RangeCheck, [1]: GasBuiltin, [2]: System, [3]: core::array::Span::) -> (RangeCheck, GasBuiltin, System, core::panics::PanicResult::<(core::array::Span::,)>); -contracts::components::ownable::ownable_component::InternalImpl::::assert_only_owner@528([0]: RangeCheck, [1]: GasBuiltin, [2]: System, [3]: contracts::components::ownable::ownable_component::ComponentState::) -> (RangeCheck, GasBuiltin, System, core::panics::PanicResult::<((),)>); -contracts::components::ownable::ownable_component::InternalImpl::::_transfer_ownership@640([0]: RangeCheck, [1]: GasBuiltin, [2]: System, [3]: contracts::components::ownable::ownable_component::ComponentState::, [4]: ContractAddress) -> (RangeCheck, GasBuiltin, System, core::panics::PanicResult::<(contracts::components::ownable::ownable_component::ComponentState::, ())>); -core::array::deserialize_array_helper::@734([0]: RangeCheck, [1]: GasBuiltin, [2]: core::array::Span::, [3]: Array, [4]: felt252) -> (RangeCheck, GasBuiltin, core::panics::PanicResult::<(core::array::Span::, core::option::Option::>)>); -contracts::uninitialized_account::UninitializedAccount::constructor@806([0]: RangeCheck, [1]: GasBuiltin, [2]: System, [3]: contracts::uninitialized_account::UninitializedAccount::ContractState, [4]: Array) -> (RangeCheck, GasBuiltin, System, core::panics::PanicResult::<(contracts::uninitialized_account::UninitializedAccount::ContractState, ())>); -contracts::uninitialized_account::UninitializedAccount::ContractStateEventEmitter::emit::>@947([0]: GasBuiltin, [1]: System, [2]: contracts::uninitialized_account::UninitializedAccount::ContractState, [3]: contracts::uninitialized_account::UninitializedAccount::Event) -> (GasBuiltin, System, core::panics::PanicResult::<(contracts::uninitialized_account::UninitializedAccount::ContractState, ())>); diff --git a/crates/ef-testing/src/evm_sequencer/account/mod.rs b/crates/ef-testing/src/evm_sequencer/account/mod.rs index 52691a9c..d65da3a2 100644 --- a/crates/ef-testing/src/evm_sequencer/account/mod.rs +++ b/crates/ef-testing/src/evm_sequencer/account/mod.rs @@ -7,7 +7,7 @@ use crate::starknet_storage; use alloy_consensus::constants::KECCAK_EMPTY; use alloy_primitives::keccak256; use alloy_primitives::{Address, U256}; -use blockifier::abi::{abi_utils::get_storage_var_address, sierra_types::next_storage_key}; +use starknet_api::abi::abi_utils::get_storage_var_address; use ef_tests::models::Account; use revm_interpreter::analysis::to_analysed; use revm_primitives::Bytecode; @@ -105,7 +105,7 @@ impl KakarotAccount { let code_hash_values = split_u256(code_hash); let code_hash_low_key = get_storage_var_address(ACCOUNT_CODE_HASH, &[]); - let code_hash_high_key = next_storage_key(&code_hash_low_key)?; + let code_hash_high_key = code_hash_low_key.next_storage_key()?; storage.extend([ (code_hash_low_key, Felt::from(code_hash_values[0])), (code_hash_high_key, Felt::from(code_hash_values[1])), @@ -143,7 +143,7 @@ impl KakarotAccount { let keys = split_u256(*k).map(Into::into); let values = split_u256(*v).map(Into::::into); let low_key = get_storage_var_address(ACCOUNT_STORAGE, &keys); - let high_key = next_storage_key(&low_key).unwrap(); // can fail only if low is the max key + let high_key = low_key.next_storage_key().unwrap(); // can fail only if low is the max key vec![(low_key, values[0]), (high_key, values[1])] }) .collect(); diff --git a/crates/ef-testing/src/evm_sequencer/constants.rs b/crates/ef-testing/src/evm_sequencer/constants.rs index 057c7acd..69c14387 100644 --- a/crates/ef-testing/src/evm_sequencer/constants.rs +++ b/crates/ef-testing/src/evm_sequencer/constants.rs @@ -7,11 +7,9 @@ use serde::de::DeserializeOwned; use starknet::core::types::contract::CompiledClass; use starknet::signers::VerifyingKey; use starknet::{core::types::contract::legacy::LegacyContractClass, signers::SigningKey}; -use starknet_api::felt; use starknet_api::{ contract_address, - core::{ClassHash, ContractAddress, PatriciaKey}, - patricia_key, + core::{ClassHash, ContractAddress}, }; use starknet_crypto::Felt; diff --git a/crates/ef-testing/src/evm_sequencer/evm_state/mod.rs b/crates/ef-testing/src/evm_sequencer/evm_state/mod.rs index 567dd669..e1c670ba 100644 --- a/crates/ef-testing/src/evm_sequencer/evm_state/mod.rs +++ b/crates/ef-testing/src/evm_sequencer/evm_state/mod.rs @@ -20,11 +20,8 @@ use crate::{ use alloy_primitives::Address; use alloy_primitives::Bytes; use alloy_primitives::U256; +use starknet_api::abi::abi_utils::{get_fee_token_var_address, get_storage_var_address}; use blockifier::{ - abi::{ - abi_utils::{get_fee_token_var_address, get_storage_var_address}, - sierra_types::next_storage_key, - }, execution::errors::EntryPointExecutionError, state::state_api::{State as _, StateReader as _, StateResult}, transaction::{ @@ -112,7 +109,7 @@ impl Evm for KakarotSequencer { .set_storage_at(kakarot_address, basefee_address, low_fee.into())?; self.state_mut().set_storage_at( kakarot_address, - next_storage_key(&basefee_address)?, + basefee_address.next_storage_key()?, high_fee.into(), )?; @@ -126,7 +123,7 @@ impl Evm for KakarotSequencer { )?; self.state_mut().set_storage_at( kakarot_address, - next_storage_key(&prev_randao_address)?, + prev_randao_address.next_storage_key()?, high_prev_randao.into(), )?; @@ -187,7 +184,7 @@ impl Evm for KakarotSequencer { // Initialize the balance storage var. let balance_key_low = get_fee_token_var_address(starknet_address); - let balance_key_high = next_storage_key(&balance_key_low)?; + let balance_key_high = balance_key_low.next_storage_key()?; storage.append(&mut vec![ (balance_key_low, balance_values[0].into()), (balance_key_high, balance_values[1].into()), @@ -198,7 +195,7 @@ impl Evm for KakarotSequencer { "ERC20_allowances", &[*starknet_address.0.key(), *KAKAROT_ADDRESS.0.key()], ); - let allowance_key_high = next_storage_key(&allowance_key_low)?; + let allowance_key_high = allowance_key_low.next_storage_key()?; storage.append(&mut vec![ (allowance_key_low, u128::MAX.into()), (allowance_key_high, u128::MAX.into()), @@ -216,7 +213,7 @@ impl Evm for KakarotSequencer { fn storage_at(&mut self, evm_address: &Address, key: U256) -> StateResult { let keys = split_u256(key).map(Into::into); let key_low = get_storage_var_address(ACCOUNT_STORAGE, &keys); - let key_high = next_storage_key(&key_low)?; + let key_high = key_low.next_storage_key()?; let starknet_address = self.compute_starknet_address(evm_address)?; diff --git a/crates/ef-testing/src/evm_sequencer/sequencer/mod.rs b/crates/ef-testing/src/evm_sequencer/sequencer/mod.rs index 45c7c6cc..a78085af 100644 --- a/crates/ef-testing/src/evm_sequencer/sequencer/mod.rs +++ b/crates/ef-testing/src/evm_sequencer/sequencer/mod.rs @@ -8,36 +8,31 @@ use crate::evm_sequencer::{ ACCOUNT_PUBLIC_KEY, ERC20_BALANCES, KAKAROT_ACCOUNT_CONTRACT_CLASS_HASH, KAKAROT_BLOCK_GAS_LIMIT, KAKAROT_CHAIN_ID, KAKAROT_NATIVE_TOKEN_ADDRESS, KAKAROT_UNINITIALIZED_ACCOUNT_CLASS_HASH, OWNABLE_OWNER, - }, - ACCOUNT_CONTRACT_CLASS, ACCOUNT_CONTRACT_CLASS_HASH, BLOCK_GAS_LIMIT, CHAIN_ID, - ETH_FEE_TOKEN_ADDRESS, FEE_TOKEN_CLASS, FEE_TOKEN_CLASS_HASH, KAKAROT_ADDRESS, - KAKAROT_CLASS, KAKAROT_CLASS_HASH, KAKAROT_OWNER_ADDRESS, OPENZEPPELIN_ACCOUNT_CLASS, + }, ACCOUNT_CONTRACT_CLASS_HASH, BLOCK_GAS_LIMIT, CHAIN_ID, + ETH_FEE_TOKEN_ADDRESS, FEE_TOKEN_CLASS, FEE_TOKEN_CLASS_HASH, KAKAROT_ADDRESS, KAKAROT_CLASS_HASH, KAKAROT_OWNER_ADDRESS, OPENZEPPELIN_ACCOUNT_CLASS, OPENZEPPELIN_ACCOUNT_CLASS_HASH, RELAYER_ADDRESS, RELAYER_BALANCE, RELAYER_VERIFYING_KEY, - STRK_FEE_TOKEN_ADDRESS, UNINITIALIZED_ACCOUNT_CLASS, UNINITIALIZED_ACCOUNT_CLASS_HASH, + STRK_FEE_TOKEN_ADDRESS, UNINITIALIZED_ACCOUNT_CLASS_HASH, }, types::contract_class::CasmContractClassWrapper, utils::compute_starknet_address, }; -use alloy_primitives::Address; -use blockifier::blockifier::block::BlockInfo; -use starknet_api::block::{GasPrices, GasPriceVector}; +use starknet_api::block::{BlockInfo, GasPrices, GasPriceVector}; use blockifier::context::ChainInfo; use blockifier::context::{BlockContext, FeeTokenAddresses}; use blockifier::versioned_constants::VersionedConstants; use blockifier::{ - execution::contract_class::{ContractClass, ContractClassV0, ContractClassV1}, + execution::contract_class::{RunnableCompiledClass, CompiledClassV0, CompiledClassV1}, state::state_api::StateResult, }; use cairo_lang_starknet_classes::casm_contract_class::CasmContractClass; use cairo_vm::types::errors::program_errors::ProgramError; -use reth_primitives::Address; -use sequencer::{native::class_from_json_str, sequencer::Sequencer, state::State}; +use alloy_primitives::Address; +use sequencer::{sequencer::Sequencer, state::State}; use starknet::core::types::contract::{legacy::LegacyContractClass, CompiledClass}; use starknet_api::{ block::{BlockNumber, BlockTimestamp}, core::{ChainId, ClassHash, ContractAddress}, }; -use std::num::NonZeroU128; #[cfg(feature = "v0")] use crate::evm_sequencer::constants::{ @@ -187,18 +182,18 @@ impl DerefMut for KakarotSequencer { pub fn convert_contract_class_v0( class: &LegacyContractClass, -) -> Result { - Result::::Ok(ContractClass::V0( - ContractClassV0::try_from_json_string( +) -> Result { + Result::::Ok(RunnableCompiledClass::V0( + CompiledClassV0::try_from_json_string( &serde_json::to_string(class).map_err(ProgramError::Parse)?, )?, )) } -pub fn convert_contract_class_v1(class: &CompiledClass) -> Result { +pub fn convert_contract_class_v1(class: &CompiledClass) -> Result { let casm_contract_class = CasmContractClassWrapper::try_from(class)?; let casm_contract_class: CasmContractClass = casm_contract_class.into(); - Ok(ContractClass::V1(ContractClassV1::try_from( + Ok(RunnableCompiledClass::V1(CompiledClassV1::try_from( casm_contract_class, )?)) } diff --git a/crates/ef-testing/src/models/result.rs b/crates/ef-testing/src/models/result.rs index 391de0c3..52c280e0 100644 --- a/crates/ef-testing/src/models/result.rs +++ b/crates/ef-testing/src/models/result.rs @@ -81,7 +81,7 @@ impl TryFrom<&EventData> for EVMOutput { #[cfg(target_os = "macos")] mod debug_ram { use std::mem; - use std::ptr; + #[link(name = "c")] extern "C" { @@ -146,7 +146,7 @@ pub(crate) fn extract_output_and_log_execution_result( TransactionExecutionResult::Ok(info) => { /* trunk-ignore(clippy/option_if_let_else) */ if let Some(err) = info.revert_error.as_ref() { - warn!("{} reverted:\n{}", case, err.replace("\\n", "\n")); + warn!("{} reverted:\n{}", case, err.to_string()); return None; } diff --git a/crates/ef-testing/src/test_utils/mod.rs b/crates/ef-testing/src/test_utils/mod.rs index e0231cdf..3b013066 100644 --- a/crates/ef-testing/src/test_utils/mod.rs +++ b/crates/ef-testing/src/test_utils/mod.rs @@ -23,14 +23,12 @@ pub fn setup() { pub struct TestMonitor { thresholds: Vec, // thresholds in seconds - last_threshold: u64, // last reported threshold } impl TestMonitor { pub fn new(thresholds: Vec) -> Self { TestMonitor { - thresholds: thresholds, - last_threshold: 0, + thresholds, } }