[][src]Function casperlabs_contract::ext_ffi::call_versioned_contract

pub unsafe extern "C" fn call_versioned_contract(
    contract_package_hash_ptr: *const u8,
    contract_package_hash_size: usize,
    contract_version_ptr: *const u8,
    contract_version_size: usize,
    entry_point_name_ptr: *const u8,
    entry_point_name_size: usize,
    runtime_args_ptr: *const u8,
    runtime_args_size: usize,
    result_size: *mut usize
) -> i32

Calls a contract by its package hash. Optionally accepts a serialized Option<u32> as a version that for None case would call most recent version for given protocol version, otherwise it selects a specific contract version. Requires an entry point name registered in a given version of contract. Returns a standard error code in case of failure, otherwise a successful execution returns zero. Bytes returned from contract execution are set to result_size pointer

Arguments

  • contract_package_hash_ptr - pointer to serialized contract package hash.
  • contract_package_hash_size - size of contract package hash in serialized form.
  • contract_version_ptr - Contract package hash in a serialized form
  • contract_version_size -
  • entry_point_name_ptr -
  • entry_point_name_size -
  • runtime_args_ptr -
  • runtime_args_size -
  • result_size -