TokenLendingProgram.initLendingMarket constructor
TokenLendingProgram.initLendingMarket({
- required SolAddress lendingMarket,
- required TokenLendingInitLendingMarketLayout layout,
Initializes a new lending market.
Implementation
factory TokenLendingProgram.initLendingMarket(
{
/// Lending market account
required SolAddress lendingMarket,
required TokenLendingInitLendingMarketLayout layout}) {
return TokenLendingProgram(keys: [
lendingMarket.toWritable(),
SystemProgramConst.sysvarRentPubkey.toReadOnly(),
SPLTokenProgramConst.tokenProgramId.toReadOnly(),
TokenLendingProgramConst.oracleProgramId.toReadOnly(),
], programId: TokenLendingProgramConst.lendingProgramId, layout: layout);
}