diff --git a/example/smart-contract/src/lib.rs b/example/smart-contract/src/lib.rs index 113686080..2f0221a0e 100644 --- a/example/smart-contract/src/lib.rs +++ b/example/smart-contract/src/lib.rs @@ -65,3 +65,4 @@ fn process_instruction(ix: &[u8]) -> ContractResult { Ok(()) } + diff --git a/example/smart-contract/tests/runtime.rs b/example/smart-contract/tests/runtime.rs index 1c7d28d17..337f951c6 100644 --- a/example/smart-contract/tests/runtime.rs +++ b/example/smart-contract/tests/runtime.rs @@ -36,7 +36,6 @@ fn run_contract() -> Result<()> { simplelog::TerminalMode::Mixed, simplelog::ColorChoice::Auto, )?; - // ============================================================= // Build a ledger state so the runtime has something to work on // ============================================================= diff --git a/src/runtime/vm_runtime.rs b/src/runtime/vm_runtime.rs index 431c2c8c1..7010e2a48 100644 --- a/src/runtime/vm_runtime.rs +++ b/src/runtime/vm_runtime.rs @@ -165,6 +165,7 @@ impl Runtime { let entrypoint = self.instance.exports.get_function(ENTRYPOINT)?; debug!(target: "wasm_runtime::run", "Executing wasm"); + // We pass 0 to entrypoint() which is the location of the payload data in the memory let ret = match entrypoint.call(&mut self.store, &[Value::I32(0 as i32)]) { Ok(retvals) => { self.print_logs();