Trait pallet_contracts::api_doc::Version2
source · pub trait Version2 {
// Required methods
fn set_storage(
key_ptr: u32,
key_len: u32,
value_ptr: u32,
value_len: u32,
) -> Result<u32, TrapReason>;
fn call(
flags: u32,
callee_ptr: u32,
ref_time_limit: u64,
proof_size_limit: u64,
deposit_ptr: u32,
value_ptr: u32,
input_data_ptr: u32,
input_data_len: u32,
output_ptr: u32,
output_len_ptr: u32,
) -> Result<ReturnErrorCode, TrapReason>;
fn instantiate(
code_hash_ptr: u32,
ref_time_limit: u64,
proof_size_limit: u64,
deposit_ptr: u32,
value_ptr: u32,
input_data_ptr: u32,
input_data_len: u32,
address_ptr: u32,
address_len_ptr: u32,
output_ptr: u32,
output_len_ptr: u32,
salt_ptr: u32,
salt_len: u32,
) -> Result<ReturnErrorCode, TrapReason>;
fn seal_set_storage(
key_ptr: u32,
key_len: u32,
value_ptr: u32,
value_len: u32,
) -> Result<u32, TrapReason>;
}
Expand description
All functions available in the seal2 module
Required Methods§
sourcefn set_storage(
key_ptr: u32,
key_len: u32,
value_ptr: u32,
value_len: u32,
) -> Result<u32, TrapReason>
fn set_storage( key_ptr: u32, key_len: u32, value_ptr: u32, value_len: u32, ) -> Result<u32, TrapReason>
Set the value at the given key in the contract storage.
See [pallet_contracts_uapi::HostFn::set_storage_v2
]
§Wasm Import Statement
(import "seal2" "set_storage" (func ...))
sourcefn call(
flags: u32,
callee_ptr: u32,
ref_time_limit: u64,
proof_size_limit: u64,
deposit_ptr: u32,
value_ptr: u32,
input_data_ptr: u32,
input_data_len: u32,
output_ptr: u32,
output_len_ptr: u32,
) -> Result<ReturnErrorCode, TrapReason>
fn call( flags: u32, callee_ptr: u32, ref_time_limit: u64, proof_size_limit: u64, deposit_ptr: u32, value_ptr: u32, input_data_ptr: u32, input_data_len: u32, output_ptr: u32, output_len_ptr: u32, ) -> Result<ReturnErrorCode, TrapReason>
Make a call to another contract.
See [pallet_contracts_uapi::HostFn::call_v2
].
§Wasm Import Statement
(import "seal2" "call" (func ...))
sourcefn instantiate(
code_hash_ptr: u32,
ref_time_limit: u64,
proof_size_limit: u64,
deposit_ptr: u32,
value_ptr: u32,
input_data_ptr: u32,
input_data_len: u32,
address_ptr: u32,
address_len_ptr: u32,
output_ptr: u32,
output_len_ptr: u32,
salt_ptr: u32,
salt_len: u32,
) -> Result<ReturnErrorCode, TrapReason>
fn instantiate( code_hash_ptr: u32, ref_time_limit: u64, proof_size_limit: u64, deposit_ptr: u32, value_ptr: u32, input_data_ptr: u32, input_data_len: u32, address_ptr: u32, address_len_ptr: u32, output_ptr: u32, output_len_ptr: u32, salt_ptr: u32, salt_len: u32, ) -> Result<ReturnErrorCode, TrapReason>
Instantiate a contract with the specified code hash.
See [pallet_contracts_uapi::HostFn::instantiate_v2
].
§Wasm Import Statement
(import "seal2" "instantiate" (func ...))
sourcefn seal_set_storage(
key_ptr: u32,
key_len: u32,
value_ptr: u32,
value_len: u32,
) -> Result<u32, TrapReason>
fn seal_set_storage( key_ptr: u32, key_len: u32, value_ptr: u32, value_len: u32, ) -> Result<u32, TrapReason>
This is just an alias function to set_storage()
with backwards-compatible prefixed identifier.
§Wasm Import Statement
(import "seal2" "seal_set_storage" (func ...))
Object Safety§
This trait is not object safe.