TokenLendingProgram.depositObligationCollateral constructor
TokenLendingProgram.depositObligationCollateral({
- required SolAddress sourceCollateral,
- required SolAddress destinationCollateral,
- required SolAddress depositReserve,
- required SolAddress obligation,
- required SolAddress lendingMarket,
- required SolAddress obligationOwner,
- required SolAddress transferAuthority,
- required TokenLendingDepositObligationCollateralLayout layout,
Deposit collateral to an obligation. Requires a refreshed reserve.
Implementation
factory TokenLendingProgram.depositObligationCollateral({
/// Source collateral token account
required SolAddress sourceCollateral,
/// Destination deposit reserve collateral supply SPL Token account.
required SolAddress destinationCollateral,
/// Deposit reserve account
required SolAddress depositReserve,
/// Obligation account.
required SolAddress obligation,
/// Lending market account.
required SolAddress lendingMarket,
/// Obligation owner.
required SolAddress obligationOwner,
/// User transfer authority
required SolAddress transferAuthority,
required TokenLendingDepositObligationCollateralLayout layout,
}) {
return TokenLendingProgram(keys: [
sourceCollateral.toWritable(),
destinationCollateral.toWritable(),
depositReserve.toReadOnly(),
obligation.toWritable(),
lendingMarket.toReadOnly(),
obligationOwner.toSigner(),
transferAuthority.toSigner(),
SystemProgramConst.sysvarClockPubkey.toReadOnly(),
SPLTokenProgramConst.tokenProgramId.toReadOnly(),
], programId: TokenLendingProgramConst.lendingProgramId, layout: layout);
}