1
0
mirror of https://github.com/fluencelabs/aquavm synced 2025-06-23 03:31:32 +00:00

Call evidence ()

This commit is contained in:
vms
2020-10-15 17:31:56 +03:00
committed by GitHub
parent bdc10fc4e6
commit 4038d098e0
20 changed files with 1259 additions and 244 deletions

@ -35,7 +35,10 @@ use aquamarine_vm::IValue;
use std::path::PathBuf;
pub fn create_aqua_vm(call_service: HostExportedFunc) -> AquamarineVM {
pub fn create_aqua_vm(
call_service: HostExportedFunc,
current_peer_id: impl Into<String>,
) -> AquamarineVM {
let call_service_descriptor = HostImportDescriptor {
host_exported_func: call_service,
argument_types: vec![IType::String, IType::String, IType::String],
@ -46,7 +49,7 @@ pub fn create_aqua_vm(call_service: HostExportedFunc) -> AquamarineVM {
let config = AquamarineVMConfig {
aquamarine_wasm_path: PathBuf::from("../target/wasm32-wasi/debug/aquamarine.wasm"),
call_service: call_service_descriptor,
current_peer_id: String::from("test_peer_id"),
current_peer_id: current_peer_id.into(),
};
AquamarineVM::new(config).expect("vm should be created")