TokenLendingProgram.refreshReserve constructor

TokenLendingProgram.refreshReserve({
  1. required SolAddress reserve,
  2. required SolAddress oracle,
})

Accrue interest and update market price of liquidity on a reserve.

Implementation

factory TokenLendingProgram.refreshReserve({
  /// Reserve account.
  required SolAddress reserve,

  //// Reserve liquidity oracle account. Must be the Pyth price
  ///  account specified at InitReserve.
  required SolAddress oracle,
}) {
  return TokenLendingProgram(
      keys: [
        reserve.toWritable(),
        oracle.toReadOnly(),
        SystemProgramConst.sysvarClockPubkey.toReadOnly(),
      ],
      programId: TokenLendingProgramConst.lendingProgramId,
      layout: const TokenLendingRefreshReserveLayout());
}