Function unc_vm_runner::run
source ยท pub fn run(
code: &ContractCode,
method_name: &str,
ext: &mut dyn External,
context: VMContext,
wasm_config: &Config,
fees_config: &RuntimeFeesConfig,
promise_results: &[PromiseResult],
cache: Option<&dyn CompiledContractCache>
) -> Result<VMOutcome, VMRunnerError>
Expand description
Validate and run the specified contract.
This is the entry point for executing a UNC protocol contract. Before the
entry point (as specified by the method_name
argument) of the contract
code is executed, the contract will be validated (see
crate::prepare::prepare_contract
), instrumented (e.g. for gas
accounting), and linked with the externs specified via the ext
argument.
VMContext::input
will be passed to the contract entrypoint as an
argument.
The contract will be executed with the default VM implementation for the current protocol version.
The gas cost for contract preparation will be subtracted by the VM implementation.