[][src]Function sp_io::misc::runtime_version

pub fn runtime_version(wasm: &[u8]) -> Option<Vec<u8>>

Extract the runtime version of the given wasm blob by calling Core_version.

Returns the SCALE encoded runtime version and None if the call failed.

Performance

Calling this function is very expensive and should only be done very occasionally. For getting the runtime version, it requires instantiating the wasm blob and calling a function in this blob.