Skip to content

Commit

Permalink
upd starknet types core to 0.5.0 and also update it on the runtime cr…
Browse files Browse the repository at this point in the history
…ate (#408)
  • Loading branch information
edg-l authored Dec 22, 2023
1 parent f395fea commit 0c7810d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 30 deletions.
22 changes: 4 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ melior = { version = "0.14.1", features = ["ods-dialects"] }
mlir-sys = "0.2.1"
num-bigint = "0.4.4"
num-traits = "0.2"
starknet-types-core = { version = "0.0.4", default-features = false, features = ["serde"] }
starknet-types-core = { version = "0.0.5", default-features = false, features = ["serde"] }
tempfile = "3.6"
thiserror = "1.0"
tracing = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"
crate-type = ["rlib", "cdylib", "staticlib"]

[dependencies]
starknet-types-core = { git = "https://github.com/starknet-io/types-rs.git", rev = "4bc8a5db3c86f017e8be7dc43531a2cb6db011c0", default-features = false, features = ["serde"] }
starknet-types-core = { version = "0.0.5", default-features = false, features = ["serde"] }
cairo-lang-runner = "=2.3"
libc = "0.2"
starknet-crypto = "0.6"
Expand Down
13 changes: 3 additions & 10 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use lazy_static::lazy_static;
use starknet_crypto::FieldElement;
use starknet_curve::AffinePoint;
use starknet_types_core::felt::{felt_to_bigint, Felt};
use starknet_types_core::felt::Felt;
use std::{collections::HashMap, fs::File, io::Write, os::fd::FromRawFd, ptr::NonNull, slice};

lazy_static! {
Expand Down Expand Up @@ -52,20 +52,13 @@ pub unsafe extern "C" fn cairo_native__libfunc__debug__print(
if writeln!(
target,
"[DEBUG]\t{shortstring: <31}\t(raw: {})",
felt_to_bigint(value)
value.to_bigint()
)
.is_err()
{
return 1;
};
} else if writeln!(
target,
"[DEBUG]\t{:<31}\t(raw: {})",
' ',
felt_to_bigint(value)
)
.is_err()
{
} else if writeln!(target, "[DEBUG]\t{:<31}\t(raw: {})", ' ', value.to_bigint()).is_err() {
return 1;
}
}
Expand Down

0 comments on commit 0c7810d

Please sign in to comment.