TokenLendingProgram.refreshReserve constructor
TokenLendingProgram.refreshReserve({
- required SolAddress reserve,
- 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());
}