createAndSharePythFeed function

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

Create and share the Propbook Pyth wrapper for pyth_source_id, then record it in the source catalog. Permissionless: a duplicate source aborts before object creation, and a junk source id creates an inert feed whose storage the caller pays for.

Implementation

MoveCallBuilder createAndSharePythFeed(
    {required dynamic arguments, String? package}) {
  final packageAddress = package ?? '@local-pkg/propbook';
  return (tx) => tx.moveCall(
        '$packageAddress::registry::create_and_share_pyth_feed',
        arguments: normalizeMoveArguments(
            tx, arguments, [null, 'u32'], ['registry', 'pythSourceId']),
      );
}