setReferenceTick function
MoveCallBuilder
setReferenceTick({})
Set this expiry's reference fine-grid tick from the exact previous-window
Propbook Pyth observation. The source observation must be inserted into the feed
at reference_tick_source_timestamp_ms before this call, and the normalized
spot is floored to the market's tick_size. Not gated on the valuation lock:
the reference tick shapes mint admission only, and a mint it admits mid-flush is
invisible to the captured snapshot like any other.
Implementation
MoveCallBuilder setReferenceTick(
{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::set_reference_tick',
arguments: normalizeMoveArguments(
tx,
withConfigDefaults(arguments, config, const {
'config': 'protocolConfig',
'propbookRegistry': 'oracleRegistry'
}),
[null, null, null, null, '0x2::clock::Clock'],
['market', 'config', 'propbookRegistry', 'pyth']),
);
}