loadLivePricer function

TransactionResult Function(Transaction) loadLivePricer(
  1. GeneratedConfig config, {
  2. required String expiryMarketId,
  3. required MarketFeeds feeds,
})

Load a fresh Pricer from the live oracle feeds. Every live-flow trade call (mint_*, redeem_live) borrows this &Pricer and it must be loaded first in the PTB. Deployed sig load_live_pricer (expiry_market.move): market, config, propbook_registry (&OracleRegistry), pyth, bs_values, bs_svi, clock (auto-injected). config and propbook_registry are supplied by the config slice, not named here.

The /sessions Predict wrappers take pricer as a PTB result of this call, so it is part of the published surface.

Implementation

TransactionResult Function(Transaction) loadLivePricer(
  GeneratedConfig config, {
  required String expiryMarketId,
  required MarketFeeds feeds,
}) {
  return (tx) => expiry_market.loadLivePricer(
        config: config,
        arguments: {
          'market': expiryMarketId,
          'pyth': feeds.pythFeed,
          'bsValues': feeds.blockScholesValueStore,
          'bsSvi': feeds.blockScholesSviStore,
        },
      )(tx);
}