Skip to content
Open
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
9e76b26
Removing libssl1.1 dependency as it can no longer be installed on CI …
vanitymnm Mar 7, 2025
5fc80c2
[Liquidity Mining] Creating data structures (1) (#197)
vanitymnm Mar 14, 2025
beb136f
[Liquidity Mining] Adding admin ixs for reward management (2) (#198)
vanitymnm Mar 14, 2025
2587270
[Liquidity Mining] Math for reward accrual (3) (#200)
vanitymnm Mar 14, 2025
389a7d8
[Liquidity Mining] Reserve packing & unpacking (4) (#202)
vanitymnm Mar 14, 2025
ea05dd3
[Liquidity Mining] Obligation packing & unpacking (5) (#204)
vanitymnm Mar 21, 2025
17ac784
[Liquidity Mining] Adding claim ix & connecting all ixs to account lo…
vanitymnm Mar 27, 2025
590c58c
Adding logic for adding pool reward ix (#206)
vanitymnm Mar 28, 2025
4e58ca7
[Liquidity Mining] Obligation realloc (8) (#207)
vanitymnm Apr 6, 2025
ab5568c
[Liquidity Mining] Code reorg (9) (#208)
vanitymnm Apr 7, 2025
8037676
[Liquidity Mining] BPF tests for closing and canceling rewards (10) …
vanitymnm Apr 10, 2025
d361638
[Liquidity Mining] BPF tests for claiming reward (11) (#210)
vanitymnm Apr 10, 2025
0a04ecf
Improving code coverage of account checks
vanitymnm Apr 13, 2025
9c615e0
Documenting liquidity mining
vanitymnm Apr 15, 2025
9e071d8
[Liquidity Mining] Edit pool reward (12) (#213)
vanitymnm May 2, 2025
51a45d3
Merge branch 'upcoming' into feat/liquidity-mining
vanitymnm May 2, 2025
97ed9df
[Liquidity Mining] Use reward vault key as part of the seed (13) (#…
vanitymnm May 4, 2025
4137879
Merge branch 'upcoming' into feat/liquidity-mining
vanitymnm May 19, 2025
81cafd5
Liquidity Mining: Addressing audit review (#219)
vanitymnm Jul 1, 2025
c163f11
Feature: Liquidity Mining CLI (#218)
vanitymnm Jul 1, 2025
57e982a
Fixing merge issue with CLI changes
vanitymnm Jul 1, 2025
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
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.ts]
indent_size = 2
8 changes: 4 additions & 4 deletions .github/workflows/pull-request-token-lending.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ name: Token Lending Pull Request
on:
pull_request:
paths:
- 'token-lending/**'
- 'token/**'
- "token-lending/**"
- "token/**"
push:
branches: [master]
paths:
- 'token-lending/**'
- 'token/**'
- "token-lending/**"
- "token/**"

jobs:
cargo-test-bpf:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Pull Request
on:
pull_request:
paths-ignore:
- 'docs/**'
- "docs/**"
push:
branches: [master, upcoming]
paths-ignore:
- 'docs/**'
- "docs/**"

jobs:
all_github_action_checks:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ hfuzz_workspace
**/*.so
**/.DS_Store
test-ledger
cargo-test-*.profraw
1 change: 1 addition & 0 deletions .mocharc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bail: true
27 changes: 22 additions & 5 deletions Anchor.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
anchor_version = "0.13.2"
[toolchain]
package_manager = "yarn"
anchor_version = "0.28.0"

[features]
resolution = true
skip-lint = false

[workspace]
members = [
"token-lending/program",
"token-lending/brick",
]
members = ["token-lending/program", "token-lending/brick"]

[provider]
cluster = "mainnet"
wallet = "~/.config/solana/id.json"

[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 token-lending/tests/**/*.ts"

[programs.mainnet]
spl_token_lending = "So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo"

[programs.localnet]
solend_program = "So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo"

[test.validator]
# we use some mainnet accounts for tests
url = "https://api.mainnet-beta.solana.com"

[[test.validator.clone]]
# Solend Main Pool - (USDC) Reserve State
address = "BgxfHJDzm44T7XG68MYKx7YisTjZu73tVovyZSjJMpmw"
52 changes: 35 additions & 17 deletions Cargo.lock

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

9 changes: 7 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
[workspace]
resolver = "2"
members = [
"token-lending/cli",
"token-lending/program",
"token-lending/sdk",
"token-lending/brick"
, "token-lending/oracles"]
"token-lending/brick",
"token-lending/oracles",
]

[workspace.package]
version = "2.1.0"

[profile.dev]
split-debuginfo = "unpacked"
Expand Down
6 changes: 3 additions & 3 deletions ci/cargo-test-bpf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ source ./ci/solana-version.sh

export RUSTFLAGS="-D warnings"
export RUSTBACKTRACE=1

export RUST_LOG="warn,tarpc=error,solana_runtime::message_processor=debug"

usage() {
exitcode=0
Expand All @@ -33,11 +33,11 @@ run_dir=$(pwd)
if [[ -d $run_dir/program ]]; then
# Build/test just one BPF program
cd $run_dir/program
RUST_LOG="error" cargo +"$rust_stable" test-bpf --features test-bpf -j 1 -- --nocapture
cargo +"$rust_stable" test-bpf --features test-bpf -j 1 -- --nocapture
else
# Build/test all BPF programs
for directory in $(ls -d $run_dir/*/); do
cd $directory
RUST_LOG="error" cargo +"$rust_stable" test-bpf --features test-bpf -j 1 -- --nocapture
cargo +"$rust_stable" test-bpf --features test-bpf -j 1 -- --nocapture
done
fi
5 changes: 3 additions & 2 deletions coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ RUST_LOG="error" CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROF
# generate report
mkdir -p target/coverage/html

grcov . --binary-path ./target/debug/deps/ -s . -t html --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage/html
grcov . --branch --binary-path ./target/debug/deps/ -s . -t html --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage/html

grcov . --binary-path ./target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage/tests.lcov
grcov . --branch --binary-path ./target/debug/deps/ -s . -t lcov --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage/tests.lcov

# cleanup
rm *.profraw || true
rm **/**/*.profraw || true

20 changes: 20 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"license": "ISC",
"scripts": {
"lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w",
"lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check"
},
"dependencies": {
"@coral-xyz/anchor": "^0.28.0"
},
"devDependencies": {
"chai": "^4.3.4",
"mocha": "^9.0.3",
"ts-mocha": "^10.0.0",
"@types/bn.js": "^5.1.0",
"@types/chai": "^4.3.0",
"@types/mocha": "^9.0.0",
"typescript": "^5.7.3",
"prettier": "^2.6.2"
}
}
Loading
Loading