Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions token-lending/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ test-bpf = []
bytemuck = "1.5.1"
# pyth-sdk-solana = "0.8.0"
# pyth-solana-receiver-sdk = "0.3.0"
solana-program = "=1.16.20"
solana-program = "=1.16.20,<2"
solend-sdk = { path = "../sdk" }
oracles = { path = "../oracles" }
spl-token = { version = "3.3.0", features=["no-entrypoint"] }
spl-token = { version = "^3.3.0", features=["no-entrypoint"] }
static_assertions = "1.1.0"

[dev-dependencies]
Expand Down
8 changes: 4 additions & 4 deletions token-lending/sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ edition = "2018"
arrayref = "0.3.6"
borsh = "0.10.3"
bytemuck = "1.5.1"
num-derive = "0.3"
num-traits = "0.2"
solana-program = ">=1.9"
spl-token = { version = "3.2.0", features=["no-entrypoint"] }
num-derive = "=0.4"
num-traits = "=0.2"
solana-program = ">=1.9,<2"
spl-token = { version = "^3.2.0,<4", features=["no-entrypoint"] }
static_assertions = "1.1.0"
thiserror = "1.0"
uint = "=0.9.1"
Expand Down
4 changes: 2 additions & 2 deletions token-lending/sdk/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
//! Error types

use num_derive::FromPrimitive;
// use num_derive::FromPrimitive;
use num_traits::FromPrimitive;
use solana_program::{decode_error::DecodeError, program_error::ProgramError};
use solana_program::{msg, program_error::PrintProgramError};
use thiserror::Error;

/// Errors that may be returned by the TokenLending program.
#[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)]
#[derive(Clone, Debug, Eq, Error, PartialEq)]
pub enum LendingError {
// 0
/// Invalid instruction data passed in.
Expand Down
8 changes: 4 additions & 4 deletions token-lending/sdk/src/state/reserve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ use crate::{
math::{Decimal, Rate, TryAdd, TryDiv, TryMul, TrySub},
};
use arrayref::{array_mut_ref, array_ref, array_refs, mut_array_refs};
use num_derive::FromPrimitive;
use num_traits::FromPrimitive;
use num_traits::FromPrimitive as _;
use solana_program::{
clock::Slot,
entrypoint::ProgramResult,
Expand Down Expand Up @@ -971,7 +970,7 @@ pub struct ReserveConfig {
pub fee_receiver: Pubkey,
/// Cut of the liquidation bonus that the protocol receives, in deca bps
pub protocol_liquidation_fee: u8,
/// Protocol take rate is the amount borrowed interest protocol recieves, as a percentage
/// Protocol take rate is the amount borrowed interest protocol recieves, as a percentage
pub protocol_take_rate: u8,
/// Added borrow weight in basis points. THIS FIELD SHOULD NEVER BE USED DIRECTLY. Always use
/// borrow_weight()
Expand Down Expand Up @@ -1094,7 +1093,8 @@ pub fn validate_reserve_config(config: ReserveConfig) -> ProgramResult {
Ok(())
}

#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, FromPrimitive)]
#[allow(non_local_definitions)]
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, num_derive::FromPrimitive)]
/// Asset Type of the reserve
pub enum ReserveType {
#[default]
Expand Down