Expand description

Native Function Support

All Move native functions have the following signature:

pub fn native_function( context: &mut impl NativeContext, ty_args: Vec<Type>, mut arguments: VecDeque<Value>, ) -> PartialVMResult<NativeResult>;

arguments are passed with first argument at position 0 and so forth. Popping values from arguments gives the aguments in reverse order (last first). This module contains the declarations and utilities to implement a native function.

Structs

Enums

  • We don’t derive Arbitrary on this enum because it is too large and breaks proptest. It is written for a subset of these in proptest_types. We test conversion between this and protobuf with a hand-written test.

Functions

  • Return the native gas entry in CostTable for the given key. The key is the specific native function index known to CostTable.

Type Definitions