pub(crate) fn create_runtime<'a, R>(
        &self,
        module: Module,
        entry_point_type: EntryPointType,
        runtime_args: RuntimeArgs,
        named_keys: &'a mut NamedKeys,
        extra_keys: &[Key],
        base_key: Key,
        account: &'a Account,
        authorization_keys: BTreeSet<AccountHash>,
        blocktime: BlockTime,
        deploy_hash: DeployHash,
        gas_limit: Gas,
        address_generator: Rc<RefCell<AddressGenerator>>,
        protocol_version: ProtocolVersion,
        correlation_id: CorrelationId,
        tracking_copy: Rc<RefCell<TrackingCopy<R>>>,
        phase: Phase,
        stack: RuntimeStack,
    ) -> Result<(ModuleRef, Runtime<'a, R>), Error>
    where
        R: StateReader<Key, StoredValue>,
        R::Error: Into<Error>,
    {
        let access_rights = {
            let mut keys: Vec<Key> = named_keys.values().cloned().collect();
            keys.extend(extra_keys);
            extract_access_rights_from_keys(keys)
        };

        let gas_counter = Gas::default();
        let transfers = Vec::default();

        let runtime_context = RuntimeContext::new(
            tracking_copy,
            entry_point_type,
            named_keys,
            access_rights,
            runtime_args,
            authorization_keys,
            account,
            base_key,
            blocktime,
            deploy_hash,
            gas_limit,
            gas_counter,
            address_generator,
            protocol_version,
            correlation_id,
            phase,
            self.config,
            transfers,
        );

        let (instance, memory) =
            instance_and_memory(module.clone(), protocol_version, self.config.wasm_config())?;

        let runtime = Runtime::new(self.config, memory, module, runtime_context, stack);

        Ok((instance, runtime))
    }
/// Creates new runtime object.
///
/// This method also deals with proper initialiation of a WASM module by pre-allocating a memory
/// instance, and attaching a host function resolver.
///
/// Returns a module and an instance of [`Runtime`] which is ready to execute the WASM modules.
Creates new runtime object.
This method also deals with proper initialiation of a WASM module by pre-allocating a memory
instance, and attaching a host function resolver.

Returns a module and an instance of [`Runtime`] which is ready to execute the WASM modules.
Creates new runtime object . This method also deals with proper initialiation of a WASM module by pre - allocating a memory instance and attaching a host function resolver . Returns a module and an instance of [ ` Runtime ` ] which is ready to execute the WASM modules .
pub(crate) fn create_runtime<'a, R>(
        &self,
        module: Module,
        entry_point_type: EntryPointType,
        runtime_args: RuntimeArgs,
        named_keys: &'a mut NamedKeys,
        extra_keys: &[Key],
        base_key: Key,
        account: &'a Account,
        authorization_keys: BTreeSet<AccountHash>,
        blocktime: BlockTime,
        deploy_hash: DeployHash,
        gas_limit: Gas,
        address_generator: Rc<RefCell<AddressGenerator>>,
        protocol_version: ProtocolVersion,
        correlation_id: CorrelationId,
        tracking_copy: Rc<RefCell<TrackingCopy<R>>>,
        phase: Phase,
        stack: RuntimeStack,
    ) -> Result<(ModuleRef, Runtime<'a, R>), Error>
    where
        R: StateReader<Key, StoredValue>,
        R::Error: Into<Error>,
    {
        let access_rights = {
            let mut keys: Vec<Key> = named_keys.values().cloned().collect();
            keys.extend(extra_keys);
            extract_access_rights_from_keys(keys)
        };
        let gas_counter = Gas::default();
        let transfers = Vec::default();
        let runtime_context = RuntimeContext::new(
            tracking_copy,
            entry_point_type,
            named_keys,
            access_rights,
            runtime_args,
            authorization_keys,
            account,
            base_key,
            blocktime,
            deploy_hash,
            gas_limit,
            gas_counter,
            address_generator,
            protocol_version,
            correlation_id,
            phase,
            self.config,
            transfers,
        );
        let (instance, memory) =
            instance_and_memory(module.clone(), protocol_version, self.config.wasm_config())?;
        let runtime = Runtime::new(self.config, memory, module, runtime_context, stack);
        Ok((instance, runtime))
    }
pub ( crate ) fn create_runtime < ' a , R > ( & self , module : Module , entry_point_type : EntryPointType , runtime_args : RuntimeArgs , named_keys : & ' a mut NamedKeys , extra_keys : & [ Key ] , base_key : Key , account : & ' a Account , authorization_keys : BTreeSet < AccountHash > , blocktime : BlockTime , deploy_hash : DeployHash , gas_limit : Gas , address_generator : Rc < RefCell < AddressGenerator > > , protocol_version : ProtocolVersion , correlation_id : CorrelationId , tracking_copy : Rc < RefCell < TrackingCopy < R > > > , phase : Phase , stack : RuntimeStack , ) -> Result < ( ModuleRef , Runtime < ' a , R > ) , Error > where R : StateReader < Key , StoredValue > , R :: Error : Into < Error > , { let access_rights = { let mut keys : Vec < Key > = named_keys . values ( ) . cloned ( ) . collect ( ) ; keys . extend ( extra_keys ) ; extract_access_rights_from_keys ( keys ) } ; let gas_counter = Gas :: default ( ) ; let transfers = Vec :: default ( ) ; let runtime_context = RuntimeContext :: new ( tracking_copy , entry_point_type , named_keys , access_rights , runtime_args , authorization_keys , account , base_key , blocktime , deploy_hash , gas_limit , gas_counter , address_generator , protocol_version , correlation_id , phase , self . config , transfers , ) ; let ( instance , memory ) = instance_and_memory ( module . clone ( ) , protocol_version , self . config . wasm_config ( ) ) ? ; let runtime = Runtime :: new ( self . config , memory , module , runtime_context , stack ) ; Ok ( ( instance , runtime ) ) }
Creates new runtime object.
Creates new runtime object .
&self
module
Module
entry_point_type
EntryPointType
runtime_args
RuntimeArgs
named_keys
&'a mut NamedKeys
extra_keys
&[Key]
base_key
Key
account
&'a Account
authorization_keys
BTreeSet<AccountHash>
blocktime
BlockTime
deploy_hash
DeployHash
gas_limit
Gas
address_generator
Rc<RefCell<AddressGenerator>>
protocol_version
ProtocolVersion
correlation_id
CorrelationId
tracking_copy
Rc<RefCell<TrackingCopy<R>>>
phase
Phase
stack
RuntimeStack
&self
module
Module
entry_point_type
EntryPointType
runtime_args
RuntimeArgs
named_keys
&'a mut NamedKeys
extra_keys
&[Key]
base_key
Key
account
&'a Account
authorization_keys
BTreeSet<AccountHash>
blocktime
BlockTime
deploy_hash
DeployHash
gas_limit
Gas
address_generator
Rc<RefCell<AddressGenerator>>
protocol_version
ProtocolVersion
correlation_id
CorrelationId
tracking_copy
Rc<RefCell<TrackingCopy<R>>>
phase
Phase
stack
RuntimeStack