Function checkOrConvertArgument

  • Checks if the provided argument is BCS encoded and converts it if necessary, ensuring type compatibility with the ABI. This function helps in validating and converting arguments for entry functions based on their expected types.

    Parameters

    • arg: SimpleEntryFunctionArgumentTypes | EntryFunctionArgumentTypes

      The argument to check or convert, which can be either a simple or entry function argument type.

    • param: TypeTag

      The expected type tag for the argument.

    • position: number

      The position of the argument in the function call.

    • genericTypeParams: TypeTag[]

      An array of generic type parameters that may be used for conversion.

    • OptionalmoduleAbi: MoveModule
    • Optionaloptions: {
          allowUnknownStructs?: boolean;
      }
      • OptionalallowUnknownStructs?: boolean

    Returns EntryFunctionArgumentTypes