lockCapital function
Bootstrap the pool exactly once: permanently lock payment USDC of minimum
liquidity. Mints matching PLP (1:1) into the book's locked balance — never
withdrawable, so the caller receives no shares — and joins the USDC into idle.
This keeps total_supply > 0 while the vault exists and gives rounding dust a
non-withdrawable PLP holder. Requires root authority and zero existing supply.
Supply, withdrawal, and flush flows remain disabled until the locked liquidity
has been created.
Implementation
MoveCallBuilder lockCapital(
{dynamic arguments, String? package, Map<String, dynamic>? config}) {
final packageAddress = package ??
(config?['predictPackageId'] as String?) ??
'@local-pkg/deepbook_predict';
return (tx) => tx.moveCall(
'$packageAddress::plp::lock_capital',
arguments: normalizeMoveArguments(
tx,
withConfigDefaults(arguments, config,
const {'vault': 'poolVault', 'config': 'protocolConfig'}),
[null, null, null, null],
['vault', 'config', 'AdminCap', 'payment']),
);
}