registerUnderlying function

MoveCallBuilder registerUnderlying({
  1. dynamic arguments,
  2. String? package,
  3. Map<String, dynamic>? config,
})

Record admin approval of one Propbook underlying. Source IDs and canonical oracle object IDs remain owned by Propbook; this row only gates which underlyings Predict will build markets on and stores deployment watermarks.

Implementation

MoveCallBuilder registerUnderlying(
    {dynamic arguments, String? package, Map<String, dynamic>? config}) {
  final packageAddress = package ??
      (config?['predictPackageId'] as String?) ??
      '@local-pkg/deepbook_predict';
  return (tx) => tx.moveCall(
        '$packageAddress::registry::register_underlying',
        arguments: normalizeMoveArguments(
            tx,
            withConfigDefaults(arguments, config,
                const {'registry': 'registry', 'config': 'protocolConfig'}),
            [null, null, null, 'u32'],
            ['registry', 'config', 'AdminCap', 'propbookUnderlyingId']),
      );
}