Skip to content

Commit

Permalink
bump
Browse files Browse the repository at this point in the history
  • Loading branch information
schwartz-concordium committed Jan 26, 2024
1 parent 7be92ca commit b8ad709
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 23 deletions.
40 changes: 22 additions & 18 deletions rust-bindings/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 rust-bindings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ thiserror = "1.0"
anyhow="1.0"
serde_json = "1.0"
serde = { version = "1.0" }
concordium-contracts-common = { version = "8.1.1", features = ["derive-serde"], path = "../concordium-base/smart-contracts/contracts-common/concordium-contracts-common" }
concordium-contracts-common = { version = "9.0.0", features = ["derive-serde"], path = "../concordium-base/smart-contracts/contracts-common/concordium-contracts-common" }

[dev-dependencies]
hex = "0.4"
Expand Down
8 changes: 4 additions & 4 deletions rust-bindings/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub unsafe extern "C" fn schema_display(
schema_size: i32,
schema_version: FFIByteOption,
callback: ResultCallback,
) -> u32 {
) -> u8 {
let schema = std::slice::from_raw_parts(schema_ptr, schema_size as usize);
assign_result(callback, || {
schema_display_aux(schema, schema_version.into_option())
Expand Down Expand Up @@ -88,7 +88,7 @@ pub unsafe extern "C" fn get_receive_contract_parameter(
value_ptr: *const u8,
value_size: i32,
callback: ResultCallback,
) -> u32 {
) -> u8 {
assign_result(callback, || {
let schema = std::slice::from_raw_parts(schema_ptr, schema_size as usize);
let contract_name_str = get_str_from_pointer(contract_name)?;
Expand Down Expand Up @@ -132,7 +132,7 @@ pub unsafe extern "C" fn get_event_contract(
value_ptr: *const u8,
value_size: i32,
callback: ResultCallback,
) -> u32 {
) -> u8 {
assign_result(callback, || {
let schema = std::slice::from_raw_parts(schema_ptr, schema_size as usize);
let contract_name_str = get_str_from_pointer(contract_name)?;
Expand All @@ -158,7 +158,7 @@ pub unsafe extern "C" fn get_event_contract(
/// # Returns
///
/// A boolean, that indicates whether the computation was successful or not.
fn assign_result<F: FnOnce() -> Result<Vec<u8>, FFIError>>(callback: ResultCallback, f: F) -> u32 {
fn assign_result<F: FnOnce() -> Result<Vec<u8>, FFIError>>(callback: ResultCallback, f: F) -> u8 {
match f() {
Ok(output) => {
let out_lenght = output.len() as i32;
Expand Down

0 comments on commit b8ad709

Please sign in to comment.