diff --git a/.github/workflows/libvmexeccapi-build.yml b/.github/workflows/libvmexeccapi-build.yml index 16d1068..e177f93 100644 --- a/.github/workflows/libvmexeccapi-build.yml +++ b/.github/workflows/libvmexeccapi-build.yml @@ -21,11 +21,11 @@ jobs: platform: amd64 artifact_name: libvmexeccapi.so make_target: capi-linux-amd64 - - os: macos-11 + - os: macos-14 platform: amd64 artifact_name: libvmexeccapi.dylib make_target: capi-osx-amd64 - - os: macos-11 + - os: macos-14 platform: arm artifact_name: libvmexeccapi_arm.dylib make_target: capi-osx-arm diff --git a/c-api/libvmexeccapi.h b/c-api/libvmexeccapi.h index 9b76e06..84d60bb 100644 --- a/c-api/libvmexeccapi.h +++ b/c-api/libvmexeccapi.h @@ -106,7 +106,6 @@ typedef struct { void (*delete_from_return_data_func_ptr)(void *context, int32_t result_id); void (*get_original_tx_hash_func_ptr)(void *context, int32_t data_offset); void (*get_current_tx_hash_func_ptr)(void *context, int32_t data_offset); - void (*get_prev_tx_hash_func_ptr)(void *context, int32_t data_offset); void (*managed_sc_address_func_ptr)(void *context, int32_t destination_handle); void (*managed_owner_address_func_ptr)(void *context, int32_t destination_handle); void (*managed_caller_func_ptr)(void *context, int32_t destination_handle); diff --git a/c-api/src/capi_vm_hook_pointers.rs b/c-api/src/capi_vm_hook_pointers.rs index 61aa5c1..be0312c 100644 --- a/c-api/src/capi_vm_hook_pointers.rs +++ b/c-api/src/capi_vm_hook_pointers.rs @@ -78,7 +78,6 @@ pub struct vm_exec_vm_hook_c_func_pointers { pub delete_from_return_data_func_ptr: extern "C" fn(context: *mut c_void, result_id: i32), pub get_original_tx_hash_func_ptr: extern "C" fn(context: *mut c_void, data_offset: i32), pub get_current_tx_hash_func_ptr: extern "C" fn(context: *mut c_void, data_offset: i32), - pub get_prev_tx_hash_func_ptr: extern "C" fn(context: *mut c_void, data_offset: i32), pub managed_sc_address_func_ptr: extern "C" fn(context: *mut c_void, destination_handle: i32), pub managed_owner_address_func_ptr: extern "C" fn(context: *mut c_void, destination_handle: i32), pub managed_caller_func_ptr: extern "C" fn(context: *mut c_void, destination_handle: i32), diff --git a/c-api/src/capi_vm_hooks.rs b/c-api/src/capi_vm_hooks.rs index 4ab9d32..9e93ae9 100644 --- a/c-api/src/capi_vm_hooks.rs +++ b/c-api/src/capi_vm_hooks.rs @@ -311,10 +311,6 @@ impl klever_chain_vm_executor::VMHooks for CapiVMHooks { (self.c_func_pointers_ptr.get_current_tx_hash_func_ptr)(self.vm_hooks_ptr, self.convert_mem_ptr(data_offset)) } - fn get_prev_tx_hash(&self, data_offset: MemPtr) { - (self.c_func_pointers_ptr.get_prev_tx_hash_func_ptr)(self.vm_hooks_ptr, self.convert_mem_ptr(data_offset)) - } - fn managed_sc_address(&self, destination_handle: i32) { (self.c_func_pointers_ptr.managed_sc_address_func_ptr)(self.vm_hooks_ptr, destination_handle) } diff --git a/vm-executor-wasmer/Cargo.toml b/vm-executor-wasmer/Cargo.toml index 79ebc5b..32b48e0 100644 --- a/vm-executor-wasmer/Cargo.toml +++ b/vm-executor-wasmer/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "klever-chain-vm-executor-wasmer" -version = "0.2.1" +version = "0.2.2" edition = "2021" publish = false # will also be published, but it is not yet ready for that [lib] [dependencies.klever-chain-vm-executor] -version = "0.2.1" +version = "0.2.2" path = "../vm-executor" [dependencies] diff --git a/vm-executor-wasmer/src/wasmer_imports.rs b/vm-executor-wasmer/src/wasmer_imports.rs index b1edb4a..a297fd5 100644 --- a/vm-executor-wasmer/src/wasmer_imports.rs +++ b/vm-executor-wasmer/src/wasmer_imports.rs @@ -350,11 +350,6 @@ fn wasmer_import_get_current_tx_hash(env: &VMHooksWrapper, data_offset: i32) { env.vm_hooks.get_current_tx_hash(env.convert_mem_ptr(data_offset)) } -#[rustfmt::skip] -fn wasmer_import_get_prev_tx_hash(env: &VMHooksWrapper, data_offset: i32) { - env.vm_hooks.get_prev_tx_hash(env.convert_mem_ptr(data_offset)) -} - #[rustfmt::skip] fn wasmer_import_managed_sc_address(env: &VMHooksWrapper, destination_handle: i32) { env.vm_hooks.managed_sc_address(destination_handle) @@ -1286,7 +1281,6 @@ pub fn generate_import_object(store: &Store, env: &VMHooksWrapper) -> ImportObje "deleteFromReturnData" => Function::new_native_with_env(store, env.clone(), wasmer_import_delete_from_return_data), "getOriginalTxHash" => Function::new_native_with_env(store, env.clone(), wasmer_import_get_original_tx_hash), "getCurrentTxHash" => Function::new_native_with_env(store, env.clone(), wasmer_import_get_current_tx_hash), - "getPrevTxHash" => Function::new_native_with_env(store, env.clone(), wasmer_import_get_prev_tx_hash), "managedSCAddress" => Function::new_native_with_env(store, env.clone(), wasmer_import_managed_sc_address), "managedOwnerAddress" => Function::new_native_with_env(store, env.clone(), wasmer_import_managed_owner_address), "managedCaller" => Function::new_native_with_env(store, env.clone(), wasmer_import_managed_caller), diff --git a/vm-executor/src/vm_hooks.rs b/vm-executor/src/vm_hooks.rs index c4f5614..c87ffeb 100644 --- a/vm-executor/src/vm_hooks.rs +++ b/vm-executor/src/vm_hooks.rs @@ -81,7 +81,6 @@ pub trait VMHooks: core::fmt::Debug + 'static { fn delete_from_return_data(&self, result_id: i32); fn get_original_tx_hash(&self, data_offset: MemPtr); fn get_current_tx_hash(&self, data_offset: MemPtr); - fn get_prev_tx_hash(&self, data_offset: MemPtr); fn managed_sc_address(&self, destination_handle: i32); fn managed_owner_address(&self, destination_handle: i32); fn managed_caller(&self, destination_handle: i32); @@ -587,10 +586,6 @@ impl VMHooks for VMHooksDefault { println!("Called: get_current_tx_hash"); } - fn get_prev_tx_hash(&self, data_offset: MemPtr) { - println!("Called: get_prev_tx_hash"); - } - fn managed_sc_address(&self, destination_handle: i32) { println!("Called: managed_sc_address"); }