trySettlementPrice function

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

Return the recorded settlement price, or none while the market is live. Non-aborting companion to settlement_price for SDK/devInspect reads.

Implementation

MoveCallBuilder trySettlementPrice(
    {required dynamic arguments,
    String? package,
    Map<String, dynamic>? config}) {
  final packageAddress = package ??
      (config?['predictPackageId'] as String?) ??
      '@local-pkg/deepbook_predict';
  return (tx) => tx.moveCall(
        '$packageAddress::expiry_market::try_settlement_price',
        arguments: normalizeMoveArguments(tx, arguments, [null], ['market']),
      );
}