Expand description
External C API to communicate with substrate contracts runtime module.
Refer to substrate FRAME contract module for more documentation.
Macros§
- input
- Utility macro to read input passed to a contract.
- output
- Utility macro to invoke a host function that expect a
output: &mut &mut [u8]
as last argument. - u64_
output - Call the host function and convert the [u8; 32] output to u64.
- unwrap_
output - Similar to
output!
but unwraps the result.
Structs§
- Call
Flags - Flags used to change the behaviour of
seal_call
andseal_delegate_call
. - Return
Code - The raw return code returned by the host side.
- Return
Flags - Flags used by a contract to customize exit behaviour.
- Storage
Flags - Flags used by a contract to customize storage behaviour.
Enums§
- Host
FnImpl - Implements
HostFn
when compiled on supported architectures (RISC-V). - Return
Error Code - Every error that can be returned to a contract when it calls any of the host functions.
Traits§
- HostFn
- Defines all the host apis available to contracts.
Functions§
- pack_
hi_ lo - Helper to pack two
u32
values into au64
register. - u256_
bytes - Convert a u64 into a [u8; 32].