[−][src]Function near_vm_runner::run
pub fn run<'a>(
code_hash: Vec<u8>,
code: &[u8],
method_name: &[u8],
ext: &mut dyn External,
context: VMContext,
wasm_config: &'a VMConfig,
fees_config: &'a RuntimeFeesConfig,
promise_results: &'a [PromiseResult]
) -> (Option<VMOutcome>, Option<VMError>)
run
does the following:
- deserializes and validate the
code
binary (seeprepare::prepare_contract
) - injects gas counting into
- instantiates (links)
VMLogic
externs with the imports of the binary - calls the
method_name
withcontext.input
- updates
ext
with new receipts, created during the execution - counts burnt and used gas
- counts how accounts storage usage increased by the call
- collects logs
- sets the return data
returns result as
VMOutcome
- updates