[][src]Function casperlabs_contract::ext_ffi::add_contract_version

pub unsafe extern "C" fn add_contract_version(
    contract_package_hash_ptr: *const u8,
    contract_package_hash_size: usize,
    version_ptr: *const u32,
    entry_points_ptr: *const u8,
    entry_points_size: usize,
    named_keys_ptr: *const u8,
    named_keys_size: usize,
    output_ptr: *mut u8,
    output_size: usize,
    bytes_written_ptr: *mut usize
) -> i32

Adds new contract version to a contract package.

Arguments

  • contract_package_hash_ptr - pointer to serialized contract package hash.
  • contract_package_hash_size - size of contract package hash in serialized form.
  • version_ptr - output parameter where new version assigned by host is set
  • entry_points_ptr - pointer to serialized casperlabs_types::EntryPoints
  • entry_points_size - size of serialized casperlabs_types::EntryPoints
  • named_keys_ptr - pointer to serialized casperlabs_types::contracts::NamedKeys
  • named_keys_size - size of serialized casperlabs_types::contracts::NamedKeys
  • output_ptr - pointer to a memory where host assigned contract hash is set to
  • output_size - size of memory area that host can write to
  • bytes_written_ptr - pointer to a value where host will set a number of bytes written to the output_size pointer