lea-vm-exec Command-Line UsageThis guide provides detailed instructions for using the lea-vm-exec command-line tool to execute smart contracts in the Lea-chain VM shim.
For one-off commands, you can use npx without any installation:
Alternatively, you can install it globally to use the lea-vm-exec command directly:
The lea-vm-exec tool executes a WebAssembly smart contract by specifying the module path and an entry point function.
execExecutes a function within a WebAssembly module, passing arguments as specified by the flags.
<path/to/module.wasm>: The path to the WebAssembly module to execute.<entry_point>: The name of the exported function to call.--string <value>: Pass a string to the entry point. The string is encoded and written into the Wasm memory.--number <value>: Pass a number to the entry point.--file <path>: Pass the contents of a file to the entry point. The file content is read as bytes and written into the Wasm memory.1. Execute with a string argument
Command:
Output:
2. Execute with a file as an argument
Command:
Output:
This project is licensed under the MIT License. See the LICENSE file for details.