Skip to content

Latest commit

 

History

History
131 lines (54 loc) · 3.82 KB

wasm.md

File metadata and controls

131 lines (54 loc) · 3.82 KB

Module 0x2::wasm

Struct WASMInstance

struct WASMInstance

Function get_instance_id

public fun get_instance_id(instance: &wasm::WASMInstance): u64

Function create_wasm_instance

public fun create_wasm_instance(bytecode: vector<u8>): wasm::WASMInstance

Function create_cbor_values

public fun create_cbor_values(value: vector<vector<u8>>): vector<u8>

Function add_length_with_data

public fun add_length_with_data(value: vector<u8>): vector<u8>

Function create_memory_wasm_args

public fun create_memory_wasm_args(instance: &mut wasm::WASMInstance, func_name: vector<u8>, args: vector<vector<u8>>): vector<u64>

Function execute_wasm_function

public fun execute_wasm_function(instance: &mut wasm::WASMInstance, func_name: vector<u8>, args: vector<u64>): u64

Function read_data_length

public fun read_data_length(instance: &wasm::WASMInstance, data_ptr: u64): u32

Function read_data_from_heap

public fun read_data_from_heap(instance: &wasm::WASMInstance, data_ptr: u32, data_length: u32): vector<u8>

Function release_wasm_instance

public fun release_wasm_instance(instance: wasm::WASMInstance): bool