pub fn exec_standard_payment<R>(
        &self,
        system_module: Module,
        payment_args: RuntimeArgs,
        payment_base_key: Key,
        account: &Account,
        payment_named_keys: &mut NamedKeys,
        authorization_keys: BTreeSet<AccountHash>,
        blocktime: BlockTime,
        deploy_hash: DeployHash,
        payment_gas_limit: Gas,
        protocol_version: ProtocolVersion,
        correlation_id: CorrelationId,
        tracking_copy: Rc<RefCell<TrackingCopy<R>>>,
        phase: Phase,
        stack: RuntimeStack,
    ) -> ExecutionResult
    where
        R: StateReader<Key, StoredValue>,
        R::Error: Into<Error>,
    {
        // use host side standard payment
        let address_generator = {
            let generator = AddressGenerator::new(deploy_hash.as_bytes(), phase);
            Rc::new(RefCell::new(generator))
        };

        let mut runtime = match self.create_runtime(
            system_module,
            EntryPointType::Session,
            payment_args,
            payment_named_keys,
            Default::default(),
            payment_base_key,
            account,
            authorization_keys,
            blocktime,
            deploy_hash,
            payment_gas_limit,
            address_generator,
            protocol_version,
            correlation_id,
            Rc::clone(&tracking_copy),
            phase,
            stack,
        ) {
            Ok((_instance, runtime)) => runtime,
            Err(error) => {
                return ExecutionResult::Failure {
                    error: error.into(),
                    execution_journal: Default::default(),
                    transfers: Vec::default(),
                    cost: Gas::default(),
                };
            }
        };

        let execution_journal = tracking_copy.borrow().execution_journal();

        match runtime.call_host_standard_payment() {
            Ok(()) => ExecutionResult::Success {
                execution_journal: runtime.context().execution_journal(),
                transfers: runtime.context().transfers().to_owned(),
                cost: runtime.context().gas_counter(),
            },
            Err(error) => ExecutionResult::Failure {
                execution_journal,
                error: error.into(),
                transfers: runtime.context().transfers().to_owned(),
                cost: runtime.context().gas_counter(),
            },
        }
    }
/// Executes a standard payment code natively.
Executes a standard payment code natively.
Executes a standard payment code natively .
pub fn exec_standard_payment<R>(
        &self,
        system_module: Module,
        payment_args: RuntimeArgs,
        payment_base_key: Key,
        account: &Account,
        payment_named_keys: &mut NamedKeys,
        authorization_keys: BTreeSet<AccountHash>,
        blocktime: BlockTime,
        deploy_hash: DeployHash,
        payment_gas_limit: Gas,
        protocol_version: ProtocolVersion,
        correlation_id: CorrelationId,
        tracking_copy: Rc<RefCell<TrackingCopy<R>>>,
        phase: Phase,
        stack: RuntimeStack,
    ) -> ExecutionResult
    where
        R: StateReader<Key, StoredValue>,
        R::Error: Into<Error>,
    {
        // use host side standard payment
        let address_generator = {
            let generator = AddressGenerator::new(deploy_hash.as_bytes(), phase);
            Rc::new(RefCell::new(generator))
        };
        let mut runtime = match self.create_runtime(
            system_module,
            EntryPointType::Session,
            payment_args,
            payment_named_keys,
            Default::default(),
            payment_base_key,
            account,
            authorization_keys,
            blocktime,
            deploy_hash,
            payment_gas_limit,
            address_generator,
            protocol_version,
            correlation_id,
            Rc::clone(&tracking_copy),
            phase,
            stack,
        ) {
            Ok((_instance, runtime)) => runtime,
            Err(error) => {
                return ExecutionResult::Failure {
                    error: error.into(),
                    execution_journal: Default::default(),
                    transfers: Vec::default(),
                    cost: Gas::default(),
                };
            }
        };
        let execution_journal = tracking_copy.borrow().execution_journal();
        match runtime.call_host_standard_payment() {
            Ok(()) => ExecutionResult::Success {
                execution_journal: runtime.context().execution_journal(),
                transfers: runtime.context().transfers().to_owned(),
                cost: runtime.context().gas_counter(),
            },
            Err(error) => ExecutionResult::Failure {
                execution_journal,
                error: error.into(),
                transfers: runtime.context().transfers().to_owned(),
                cost: runtime.context().gas_counter(),
            },
        }
    }
pub fn exec_standard_payment < R > ( & self , system_module : Module , payment_args : RuntimeArgs , payment_base_key : Key , account : & Account , payment_named_keys : & mut NamedKeys , authorization_keys : BTreeSet < AccountHash > , blocktime : BlockTime , deploy_hash : DeployHash , payment_gas_limit : Gas , protocol_version : ProtocolVersion , correlation_id : CorrelationId , tracking_copy : Rc < RefCell < TrackingCopy < R > > > , phase : Phase , stack : RuntimeStack , ) -> ExecutionResult where R : StateReader < Key , StoredValue > , R :: Error : Into < Error > , { // use host side standard payment let address_generator = { let generator = AddressGenerator :: new ( deploy_hash . as_bytes ( ) , phase ) ; Rc :: new ( RefCell :: new ( generator ) ) } ; let mut runtime = match self . create_runtime ( system_module , EntryPointType :: Session , payment_args , payment_named_keys , Default :: default ( ) , payment_base_key , account , authorization_keys , blocktime , deploy_hash , payment_gas_limit , address_generator , protocol_version , correlation_id , Rc :: clone ( & tracking_copy ) , phase , stack , ) { Ok ( ( _instance , runtime ) ) => runtime , Err ( error ) => { return ExecutionResult :: Failure { error : error . into ( ) , execution_journal : Default :: default ( ) , transfers : Vec :: default ( ) , cost : Gas :: default ( ) , } ; } } ; let execution_journal = tracking_copy . borrow ( ) . execution_journal ( ) ; match runtime . call_host_standard_payment ( ) { Ok ( ( ) ) => ExecutionResult :: Success { execution_journal : runtime . context ( ) . execution_journal ( ) , transfers : runtime . context ( ) . transfers ( ) . to_owned ( ) , cost : runtime . context ( ) . gas_counter ( ) , } , Err ( error ) => ExecutionResult :: Failure { execution_journal , error : error . into ( ) , transfers : runtime . context ( ) . transfers ( ) . to_owned ( ) , cost : runtime . context ( ) . gas_counter ( ) , } , } }
Executes a standard payment code natively.
Executes a standard payment code natively .
&self
system_module
Module
payment_args
RuntimeArgs
payment_base_key
Key
account
&Account
payment_named_keys
&mut NamedKeys
authorization_keys
BTreeSet<AccountHash>
blocktime
BlockTime
deploy_hash
DeployHash
payment_gas_limit
Gas
protocol_version
ProtocolVersion
correlation_id
CorrelationId
tracking_copy
Rc<RefCell<TrackingCopy<R>>>
phase
Phase
stack
RuntimeStack
&self
system_module
Module
payment_args
RuntimeArgs
payment_base_key
Key
account
&Account
payment_named_keys
&mut NamedKeys
authorization_keys
BTreeSet<AccountHash>
blocktime
BlockTime
deploy_hash
DeployHash
payment_gas_limit
Gas
protocol_version
ProtocolVersion
correlation_id
CorrelationId
tracking_copy
Rc<RefCell<TrackingCopy<R>>>
phase
Phase
stack
RuntimeStack