From 135334ac487271280d77779652022ba08acf3d72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Mon, 9 Sep 2024 13:03:45 -0300 Subject: [PATCH 1/2] Impl const Uint64 --- src/vm/const.rs | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/src/vm/const.rs b/src/vm/const.rs index 77e3f20..9ef715c 100644 --- a/src/vm/const.rs +++ b/src/vm/const.rs @@ -64,6 +64,10 @@ pub fn eval_as_immediate( [GenericArg::Value(value)] => Value::U32(value.try_into().unwrap()), _ => unreachable!(), }, + CoreTypeConcrete::Uint64(_) => match inner_data { + [GenericArg::Value(value)] => Value::U64(value.try_into().unwrap()), + _ => unreachable!(), + }, CoreTypeConcrete::Uint8(_) => match inner_data { [GenericArg::Value(value)] => Value::U8(value.try_into().unwrap()), _ => unreachable!(), @@ -95,7 +99,39 @@ pub fn eval_as_immediate( Value::Struct(fields) } - _ => todo!("{:?}", type_id), + CoreTypeConcrete::Array(_) => todo!(), + CoreTypeConcrete::Coupon(_) => todo!(), + CoreTypeConcrete::Bitwise(_) => todo!(), + CoreTypeConcrete::Box(_) => todo!(), + CoreTypeConcrete::Circuit(_) => todo!(), + CoreTypeConcrete::Const(_) => todo!(), + CoreTypeConcrete::EcOp(_) => todo!(), + CoreTypeConcrete::EcPoint(_) => todo!(), + CoreTypeConcrete::EcState(_) => todo!(), + CoreTypeConcrete::GasBuiltin(_) => todo!(), + CoreTypeConcrete::BuiltinCosts(_) => todo!(), + CoreTypeConcrete::Uint16(_) => todo!(), + CoreTypeConcrete::Uint128MulGuarantee(_) => todo!(), + CoreTypeConcrete::Sint16(_) => todo!(), + CoreTypeConcrete::Sint32(_) => todo!(), + CoreTypeConcrete::Sint64(_) => todo!(), + CoreTypeConcrete::Sint128(_) => todo!(), + CoreTypeConcrete::Nullable(_) => todo!(), + CoreTypeConcrete::RangeCheck(_) => todo!(), + CoreTypeConcrete::RangeCheck96(_) => todo!(), + CoreTypeConcrete::Uninitialized(_) => todo!(), + CoreTypeConcrete::Enum(_) => todo!(), + CoreTypeConcrete::Felt252Dict(_) => todo!(), + CoreTypeConcrete::Felt252DictEntry(_) => todo!(), + CoreTypeConcrete::SquashedFelt252Dict(_) => todo!(), + CoreTypeConcrete::Pedersen(_) => todo!(), + CoreTypeConcrete::Poseidon(_) => todo!(), + CoreTypeConcrete::Span(_) => todo!(), + CoreTypeConcrete::StarkNet(_) => todo!(), + CoreTypeConcrete::SegmentArena(_) => todo!(), + CoreTypeConcrete::Snapshot(_) => todo!(), + CoreTypeConcrete::Bytes31(_) => todo!(), + // _ => todo!("{:?}", type_id), } } From a366368481fc6c868416299f5eeff5c5cb34263c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Mon, 9 Sep 2024 13:03:51 -0300 Subject: [PATCH 2/2] Update serde dep --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2b4d952..b1ca5b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,8 +16,8 @@ num-traits = "0.2.19" p256 = "0.13.2" rand = "0.8.5" sec1 = { version = "0.7.3", features = ["std"] } -serde = { version = "1.0.209", features = ["derive"] } -serde_json = "1.0.127" +serde = { version = "1.0.208", features = ["derive"] } +serde_json = "1.0.125" sha2 = { version = "0.10.8", features = ["compress"] } smallvec = "1.13.2" starknet-crypto = "0.7.1"