Crate pallet_evm_polkavm_uapi

Source
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§

CallFlags
Flags used to change the behaviour of seal_call and seal_delegate_call.
ReturnCode
The raw return code returned by the host side.
ReturnFlags
Flags used by a contract to customize exit behaviour.
StorageFlags
Flags used by a contract to customize storage behaviour.

Enums§

HostFnImpl
Implements HostFn when compiled on supported architectures (RISC-V).
ReturnErrorCode
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 a u64 register.
u256_bytes
Convert a u64 into a [u8; 32].