replacePythBindingForUnderlying function
Admin-replace the canonical Pyth source feed for a Propbook underlying.
The replacement feed must already be registered in the source catalog. A source key already assigned to another underlying remains ineligible forever; replacement does not create an unbound intermediate state.
Implementation
MoveCallBuilder replacePythBindingForUnderlying(
{required dynamic arguments, String? package}) {
final packageAddress = package ?? '@local-pkg/propbook';
return (tx) => tx.moveCall(
'$packageAddress::registry::replace_pyth_binding_for_underlying',
arguments: normalizeMoveArguments(
tx,
arguments,
[null, null, null, 'u32'],
['registry', 'adminCap', 'feed', 'propbookUnderlyingId']),
);
}