bumpVersionWatermark function

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

Advance the version floor to this package's compiled-in current_version!().

The floor cannot be set above the executing package's version. This function is ungated so an upgraded package can retire older versions; it aborts unless the executing version is strictly greater than the existing floor.

Implementation

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