Function casper_contract::contract_api::runtime::call_versioned_contract [−][src]
pub fn call_versioned_contract<T: CLTyped + FromBytes>(
contract_package_hash: ContractPackageHash,
contract_version: Option<ContractVersion>,
entry_point_name: &str,
runtime_args: RuntimeArgs
) -> T
Expand description
Invokes the specified entry_point_name
of stored logic at a specific contract_package_hash
address, for the most current version of a contract package by default or a specific
contract_version
if one is provided, and passing the provided runtime_args
to it
If the stored contract calls ret
, then that value is returned from
call_versioned_contract
. If the stored contract calls revert
, then execution stops and
call_versioned_contract
doesn’t return. Otherwise call_versioned_contract
returns ()
.