update function

MoveCallBuilder update({
  1. required dynamic arguments,
  2. String? package,
})

Decode and record a verifier-produced Pyth Lazer update when its generation timestamp advances. A zero, future, duplicate, or stale generation timestamp is ignored without changing latest or emitting an event; a price Pyth carried forward therefore leaves latest untouched, so redelivery cannot renew a consumer's freshness window. The raw observation may be stored even when its positive normalized projection is unavailable.

Implementation

MoveCallBuilder update({required dynamic arguments, String? package}) {
  final packageAddress = package ?? '@local-pkg/propbook';
  return (tx) => tx.moveCall(
        '$packageAddress::pyth_feed::update',
        arguments: normalizeMoveArguments(tx, arguments,
            [null, null, '0x2::clock::Clock'], ['feed', 'update']),
      );
}