Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
439 commits
Select commit Hold shift + click to select a range
684b340
Merge branch 'lending-controller' into tests-refactoring
AlbertoCentonze Sep 2, 2025
79cdbe0
test: fix absolute off by one
AlbertoCentonze Sep 2, 2025
582bf72
chore: remove unstable tests from ci
AlbertoCentonze Sep 2, 2025
f56c4ca
chore: update .gitignore
AlbertoCentonze Sep 2, 2025
b91ca37
ci: run all tests
AlbertoCentonze Sep 3, 2025
377c0a7
test: fix fixture scope
AlbertoCentonze Sep 3, 2025
9a5bd70
test: remove out of scope tests
AlbertoCentonze Sep 3, 2025
de867b6
test: add unit tests for max_borrowable
AlbertoCentonze Sep 3, 2025
569542e
test: add vault and fix some conftest
AlbertoCentonze Sep 3, 2025
260ebbc
ci: fuzzing fails faster
AlbertoCentonze Sep 3, 2025
2beb66a
chore: add TODO
AlbertoCentonze Sep 3, 2025
ad9587c
test: add set borrow cap tests
AlbertoCentonze Sep 3, 2025
f2aa88a
test: fix broken zaps tests
AlbertoCentonze Sep 3, 2025
ea9322c
test: use correct fixture name
AlbertoCentonze Sep 3, 2025
4f1c0c0
ci: split stabilize from stableborrow
AlbertoCentonze Sep 3, 2025
3f3acb8
chore: bump testing contracts to vyper 0.4.3
AlbertoCentonze Sep 3, 2025
38916db
test: fix incorrectly ported vyper contract
AlbertoCentonze Sep 3, 2025
5f11356
test: use boa version with bugfix
AlbertoCentonze Sep 4, 2025
6973c32
test: fix porting errors in mock
AlbertoCentonze Sep 4, 2025
4e5a58a
test: port stableswap to 0.4 to enable evals
AlbertoCentonze Sep 4, 2025
04f7f93
test: enable eval for vvm
AlbertoCentonze Sep 4, 2025
0fc4c2e
test: fix eval
AlbertoCentonze Sep 4, 2025
aa4cce6
test: more eval fixes
AlbertoCentonze Sep 4, 2025
4702eb9
test: use eval version with return_type
AlbertoCentonze Sep 4, 2025
8707c8d
test: fix test missing return type
AlbertoCentonze Sep 4, 2025
10266b8
test: fix incorrect constructor
AlbertoCentonze Sep 5, 2025
b638de3
test: fix broken tests because of vvm diff
AlbertoCentonze Sep 5, 2025
a8e9647
test: replace dev reason with string in old contract
AlbertoCentonze Sep 5, 2025
b23ef65
test: fix legacy timestamp usage
AlbertoCentonze Sep 8, 2025
dd47602
test: fix broken abi usage
AlbertoCentonze Sep 8, 2025
418bdaa
refactor: use kwargs in liquidate call
AlbertoCentonze Sep 8, 2025
286daf3
test: disable not effective tests
AlbertoCentonze Sep 8, 2025
b96300b
test: fix collateral reference
AlbertoCentonze Sep 8, 2025
5f28d73
test: fix fixtures names
AlbertoCentonze Sep 8, 2025
2ac0153
chore: add TODO
AlbertoCentonze Sep 8, 2025
d719173
revert: test is actually important
AlbertoCentonze Sep 8, 2025
788da99
chore: add TODOs
AlbertoCentonze Sep 9, 2025
869f620
test: fix attack sim test
AlbertoCentonze Sep 9, 2025
f5fc744
test: fix test_oracle_attack
Macket Sep 9, 2025
0ad04da
test: fix test_flip
Macket Sep 10, 2025
6bdafa8
test: stateful test setup
AlbertoCentonze Sep 10, 2025
3f283f1
test: fix incorrect check
AlbertoCentonze Sep 10, 2025
db9a77d
test: don't hardcode borrow rates in tests
AlbertoCentonze Sep 10, 2025
4b14bcb
test: hypothesis print_blob=True
Macket Sep 10, 2025
e4bf643
test: fix amount for test_exchange_down_up
Macket Sep 10, 2025
9776476
test: fix test_flip_dy
Macket Sep 11, 2025
a74ed33
test: fix test_no_untradable_funds
Macket Sep 11, 2025
b3ad2b1
test: make test_flip_dy more strict
Macket Sep 11, 2025
1245f9c
test: refactor test_amount_for_price
Macket Sep 15, 2025
05e8121
style: bulk formatting
AlbertoCentonze Sep 15, 2025
3e9e749
style: add pre-commit hooks
AlbertoCentonze Sep 15, 2025
c3bd764
test: override seed_liquidity=0 for test_vault
Macket Sep 16, 2025
5eba85d
test: fix repay(0)
Macket Sep 16, 2025
3756c7e
Merge remote-tracking branch 'origin/tests-refactoring' into tests-re…
Macket Sep 16, 2025
a968ff9
test: override seed_liquidity=0 for test_vault (again)
Macket Sep 16, 2025
98babff
fix: wrong arg passed to liq lib
AlbertoCentonze Sep 16, 2025
62b2e95
test: initial stateful tests rewrite (wip)
AlbertoCentonze Sep 16, 2025
1d04fdf
test: improve stateful liquidation logic
AlbertoCentonze Sep 16, 2025
6a7c799
test: legacy stateful test xfail
AlbertoCentonze Sep 16, 2025
dc492d2
refactor: rename stablecoin -> borrowed
Macket Sep 16, 2025
b1a2fea
Merge remote-tracking branch 'origin/tests-refactoring' into tests-re…
Macket Sep 16, 2025
6d49b8d
ci: add qa to workflows
AlbertoCentonze Sep 16, 2025
5fd66ba
Merge branch 'tests-refactoring' of github.com:curvefi/curve-stableco…
AlbertoCentonze Sep 16, 2025
c26e18a
style: lint
AlbertoCentonze Sep 16, 2025
9c57378
style: use camel case for transferFrom
AlbertoCentonze Sep 16, 2025
e682dd7
test: simplify hypothesis profiles
AlbertoCentonze Sep 16, 2025
fb57fed
style: minor vyper adjustments
AlbertoCentonze Sep 16, 2025
8c9d4dd
feat: add unified token interface
AlbertoCentonze Sep 16, 2025
b7b94cd
ci: remove unused lines
AlbertoCentonze Sep 17, 2025
8711c7a
refactor: lending factory overhaul
AlbertoCentonze Sep 17, 2025
ad2c285
refactor: use internal IERC20 in vault
AlbertoCentonze Sep 17, 2025
ca84638
fix: remove pool price oracle from base factory
AlbertoCentonze Sep 17, 2025
45e638b
chore: remove TODOs
AlbertoCentonze Sep 17, 2025
f99f363
fix: add back symbol interface
AlbertoCentonze Sep 17, 2025
1aab1e3
fix: mpolicy not deployed by factory anymore
AlbertoCentonze Sep 17, 2025
0fad006
test: fix deployment script
AlbertoCentonze Sep 17, 2025
eef35f6
chore: tackle TODOs
AlbertoCentonze Sep 17, 2025
62b9cfa
test: fix missing imports
AlbertoCentonze Sep 17, 2025
203fc42
refactor: use unified IERC20 interface
AlbertoCentonze Sep 17, 2025
04ce19c
fix: remove admin fee cap
AlbertoCentonze Sep 17, 2025
3a19b03
chore: remove tackled TODO
AlbertoCentonze Sep 17, 2025
0ed3f84
refactor: reduce logic divergence
AlbertoCentonze Sep 17, 2025
e198e90
chore: revert on illegal value
AlbertoCentonze Sep 17, 2025
7b92f8d
chore: remove dead code
AlbertoCentonze Sep 17, 2025
6f19fe8
fix: make compiler happy
AlbertoCentonze Sep 17, 2025
8fdc351
refactor: use token lib
AlbertoCentonze Sep 17, 2025
c95a645
docs: add comment on bytecode savings
AlbertoCentonze Sep 17, 2025
865f148
test: fix broken test
AlbertoCentonze Sep 17, 2025
af2007c
test: unify DEAD_SHARES constant
AlbertoCentonze Sep 17, 2025
d718b6b
test: use deployers for consistency
AlbertoCentonze Sep 17, 2025
2c0a019
test: offboarding is now in deployers
AlbertoCentonze Sep 17, 2025
d36f76e
chore: move test into ci covered folder
AlbertoCentonze Sep 17, 2025
575d0d6
chore: remove TODO
AlbertoCentonze Sep 17, 2025
fd291a2
chore: remove old testing code
AlbertoCentonze Sep 17, 2025
cfa2415
test: add missing constant
AlbertoCentonze Sep 17, 2025
a7e4e42
test: unify fixture through Llamalend class
AlbertoCentonze Sep 17, 2025
757c7f1
chore: IMintController -> IController
AlbertoCentonze Sep 17, 2025
a037246
chore: tackle TODOs
AlbertoCentonze Sep 17, 2025
1372138
feat: validate monetary policy on market creation
AlbertoCentonze Sep 17, 2025
64091d7
test: more blueprints from llamalend class
AlbertoCentonze Sep 17, 2025
67f0a6f
test: delete ape tests
AlbertoCentonze Sep 17, 2025
88b7e30
Revert "test: delete ape tests"
AlbertoCentonze Sep 17, 2025
5635d74
test: delete ape tests
AlbertoCentonze Sep 17, 2025
0ec1650
fix: correct mpol validation
AlbertoCentonze Sep 17, 2025
60249c6
test: fix incorrect testing range
AlbertoCentonze Sep 17, 2025
4b4ddd2
test: fix rate validation
AlbertoCentonze Sep 17, 2025
48e9a54
refactor: use max approve
AlbertoCentonze Sep 18, 2025
b1d63f4
fix: full repay for max_value(uint256)
Macket Sep 18, 2025
d1cabeb
Merge branch 'tests-refactoring' of github.com:curvefi/curve-stableco…
AlbertoCentonze Sep 18, 2025
db0631e
feat: add sanity check to set_admin_fee
AlbertoCentonze Sep 18, 2025
842f7f8
refactor: use custom IERC4626
AlbertoCentonze Sep 18, 2025
e61c12d
chore: move borrow cap test to new folder layout
AlbertoCentonze Sep 18, 2025
2b761d2
style: more interface types
AlbertoCentonze Sep 18, 2025
ae608f5
test: market_type is stricter
AlbertoCentonze Sep 18, 2025
e411f48
test: test internal borrow caps
AlbertoCentonze Sep 18, 2025
f6e4f40
ci: add unitary tests folder
AlbertoCentonze Sep 18, 2025
d021fcc
test: remove useless assert
AlbertoCentonze Sep 18, 2025
e444528
test: test borrow caps on create loan
AlbertoCentonze Sep 18, 2025
033dd6b
test: add more tests for borrow caps
AlbertoCentonze Sep 18, 2025
bd192cd
test: default value for borrow caps
AlbertoCentonze Sep 19, 2025
6b4d2b5
test: add testing helper
AlbertoCentonze Sep 19, 2025
f176d9a
ci: run e2e tests
AlbertoCentonze Sep 19, 2025
0240f5c
test: add resupply hack simulation
AlbertoCentonze Sep 19, 2025
e220cb5
chore: less warnings
AlbertoCentonze Sep 19, 2025
ed44b82
feat: improve LendController structure
AlbertoCentonze Sep 19, 2025
a3532ef
test: version getter for lend controller
AlbertoCentonze Sep 19, 2025
f7e9f18
test: vault getter for lend controller
AlbertoCentonze Sep 19, 2025
e1e480d
test: strict is implicit
AlbertoCentonze Sep 19, 2025
13e504b
test: set_admin_fee in lend controller
AlbertoCentonze Sep 19, 2025
c4ccfb1
docs: minor consistency corrections
AlbertoCentonze Sep 19, 2025
97e3834
test: lend ctor
AlbertoCentonze Sep 19, 2025
180316c
test: create loan lend behavior
AlbertoCentonze Sep 19, 2025
de87338
test: borrow more lend behavior
AlbertoCentonze Sep 19, 2025
51b8b99
test: collect fees lending
AlbertoCentonze Sep 19, 2025
d35b559
docs: add natspec
AlbertoCentonze Sep 19, 2025
2ad3bc1
test: admin fees preview
AlbertoCentonze Sep 19, 2025
04d2107
Create test_borrowed_balance.py
AlbertoCentonze Sep 19, 2025
16dacf6
chore: renaming LL to Lend
AlbertoCentonze Sep 19, 2025
7d4618a
chore: housekeeping
AlbertoCentonze Sep 19, 2025
210d15c
add partial repay zap callback
amfet42 Sep 22, 2025
cb0748a
Merge branch 'tests-refactoring' of github.com:curvefi/curve-stableco…
amfet42 Sep 22, 2025
49f7db8
fix linter
amfet42 Sep 22, 2025
47bf52b
test: single test for lend controller constructor
Macket Sep 23, 2025
f01a5cb
test: refactor test_borrowed_balance_lc
Macket Sep 23, 2025
b40f9ad
test: refactor test_admin_fees_lc
Macket Sep 23, 2025
a967e8a
test: refactor test_collect_fees_lc
Macket Sep 23, 2025
48c2179
test: vault test_initialize
Macket Sep 23, 2025
1678496
fix: test_ctor_lc
Macket Sep 23, 2025
5686d54
test: test_set_max_supply_v
Macket Sep 24, 2025
bc3f04d
test: vault borrow_apr and lend_apr
Macket Sep 24, 2025
7dd5e7a
test: vault asset(), _total_assets(), totalAssets
Macket Sep 24, 2025
c6b2d9c
test: vault convert_to_shares
Macket Sep 24, 2025
f0a4cb1
test: test exact amount is pulled
AlbertoCentonze Oct 4, 2025
5544d7c
test: add test that needs to be fixed
AlbertoCentonze Oct 4, 2025
2f74645
style: format
AlbertoCentonze Oct 5, 2025
56c381f
chore: add pre-commit
AlbertoCentonze Oct 5, 2025
4e624fd
chore: add pre-commit to dev deps
AlbertoCentonze Oct 5, 2025
fa6c271
feat: repay with position shrink
Macket Oct 5, 2025
c8ea055
fix: transfer borrowed from AMM to Controller when shrink
Macket Oct 5, 2025
e2ed92e
fix: add shrink to interfaces
AlbertoCentonze Oct 5, 2025
3b1659d
test: add rate_mul to test_lend_apr_v
Macket Oct 6, 2025
2bf139f
refactor: vault tests
Macket Oct 6, 2025
1a38b51
test: test_convert_to_assets_v
Macket Oct 6, 2025
911e70b
test: test_price_per_share_v
Macket Oct 6, 2025
2f414a0
test: test_max_deposit_v
Macket Oct 6, 2025
97d6441
test: test_preview_deposit_v
Macket Oct 6, 2025
315e9df
test: test_deposit_v
Macket Oct 6, 2025
27308e1
refactor: split repay
AlbertoCentonze Oct 6, 2025
4a89cc4
test: test repay full
AlbertoCentonze Oct 6, 2025
bd7a103
test: add MAX_INT256 const
AlbertoCentonze Oct 6, 2025
c7b3bf1
test: add fake leverage as a global fixure
AlbertoCentonze Oct 6, 2025
53201a9
test: test_max_mint_v
Macket Oct 6, 2025
4b3e722
refactor: use borrowed_token.decimals() instead of 18
Macket Oct 6, 2025
472a384
test: test_preview_mint_v
Macket Oct 6, 2025
f91d160
test: test_mint_v
Macket Oct 6, 2025
adae8e6
test: refactor test_deposit_need_more_assets_revert
Macket Oct 6, 2025
3d0d4f8
Merge remote-tracking branch 'origin/tests-refactoring' into tests-re…
Macket Oct 6, 2025
c7d471b
perf: remove redundant checks
AlbertoCentonze Oct 6, 2025
89a30a1
Merge branch 'tests-refactoring' of github.com:curvefi/curve-stableco…
AlbertoCentonze Oct 6, 2025
59a63c9
test: repay
AlbertoCentonze Oct 6, 2025
f99b95c
test: remove from list
AlbertoCentonze Oct 6, 2025
a27e44c
test: test_max_withdraw_v
Macket Oct 7, 2025
1815d4f
refactor: make_debt and deposit_into_vault fixtures
Macket Oct 7, 2025
ce844d2
Merge remote-tracking branch 'origin/tests-refactoring' into tests-re…
Macket Oct 7, 2025
f27e2c2
test: test_preview_withdraw_v
Macket Oct 7, 2025
d88c071
test: test_withdraw_v
Macket Oct 7, 2025
234a9ce
chore: format vyper
Macket Oct 7, 2025
de92145
test: maxRedeem, previewRedeem and redeem
Macket Oct 7, 2025
e547e35
test: vault admin
Macket Oct 7, 2025
d22fa86
perf: don't reassign var
AlbertoCentonze Oct 7, 2025
e425aa1
fix zap callback and add tests
amfet42 Oct 7, 2025
6464688
fix: full repay
Macket Oct 7, 2025
3e25848
refactor: make repay more readable
Macket Oct 7, 2025
0311423
ci: tests run regardless of linting
AlbertoCentonze Oct 7, 2025
10c9646
chore: formatting
Macket Oct 8, 2025
16d5c1b
refactor: repay
Macket Oct 8, 2025
82ab845
feat: tokens_to_shrink
Macket Oct 8, 2025
221668a
refactor: vars names without underscore
Macket Oct 8, 2025
fccc825
fix: xy value in repay
Macket Oct 8, 2025
78edb3e
Revert "fix: xy value in repay"
AlbertoCentonze Oct 8, 2025
f2f1f1a
fix typo for callback
amfet42 Oct 8, 2025
561b0f8
fix: repay d_debt
Macket Oct 9, 2025
45428ee
chore: fix interface for tokens_to_shrink
Macket Oct 9, 2025
0d4c033
fix: max N = 4 after shrink
Macket Oct 9, 2025
0159e96
test: test_tokens_to_shrink_fuzz
Macket Oct 9, 2025
b616207
test: A=100 for tests
Macket Oct 9, 2025
568a0ae
Merge branch 'tests-refactoring' into feat/partial_repay_zap_callback
AlbertoCentonze Oct 9, 2025
497522d
Merge pull request #94 from curvefi/feat/partial_repay_zap_callback
AlbertoCentonze Oct 9, 2025
9d0ae2d
fix: CS-CRVUSD-089
Macket Oct 13, 2025
0b28c71
fix: CS-CRVUSD-090
Macket Oct 13, 2025
8f4aefb
fix: CS-CRVUSD-091
Macket Oct 13, 2025
6410d5b
fix: CS-CRVUSD-096
Macket Oct 14, 2025
e7af5fa
fix: CS-CRVUSD-098
Macket Oct 14, 2025
f80dce2
fix: CS-CRVUSD-099
Macket Oct 14, 2025
299b721
fix: CS-CRVUSD-100
Macket Oct 14, 2025
59db5d9
fix: new_collateral bug in _repay_partial
Macket Oct 15, 2025
adfb509
refactor(Vault): merge deposited and withdrawn
AlbertoCentonze Oct 15, 2025
a8c04a5
style: format
AlbertoCentonze Oct 15, 2025
ebae79c
test: fix incorrect balance accounting
AlbertoCentonze Oct 15, 2025
39cd67d
chore: reorg files
AlbertoCentonze Oct 15, 2025
eb2ac62
test: update test_default_behavior_no_callback
Macket Oct 16, 2025
53f7791
test: improve stateful testing
AlbertoCentonze Oct 16, 2025
435c340
Merge branches 'tests-refactoring' and 'tests-refactoring' of github.…
AlbertoCentonze Oct 16, 2025
9bff587
refactor: reduce code duplication
AlbertoCentonze Oct 20, 2025
f5dbc68
chore: remove deprecation warnings
AlbertoCentonze Oct 20, 2025
9c388cb
perf: remove redundant check
AlbertoCentonze Oct 20, 2025
d16203a
chore: remove redundant branching
AlbertoCentonze Oct 20, 2025
fdfaeaa
chore: remove redundant branch
AlbertoCentonze Oct 20, 2025
b59ec7c
test: complete test_internal_repay_full
Macket Oct 20, 2025
a1bf13c
chore: save for later
AlbertoCentonze Oct 20, 2025
d07aaea
refactor: simplify admin fee claim
AlbertoCentonze Oct 20, 2025
c62dc1d
Merge branch 'tests-refactoring' of github.com:curvefi/curve-stableco…
AlbertoCentonze Oct 20, 2025
17121f6
refactor: use token_lib in vault
AlbertoCentonze Oct 20, 2025
7451d08
Revert "perf: remove redundant check"
AlbertoCentonze Oct 20, 2025
6510aef
refactor(Controller): simplify admin fee logic
AlbertoCentonze Oct 21, 2025
7966f17
test: _repay_partial
Macket Oct 22, 2025
54dbe16
Merge remote-tracking branch 'origin/tests-refactoring' into tests-re…
Macket Oct 22, 2025
6c47969
chore: comments for test_internal_repay_full
Macket Oct 22, 2025
3e774f9
chore: change order in test_internal_repay_full
Macket Oct 26, 2025
386b3dd
refactor: move CALLDATA_MAX_SIZE to constants.vy
Macket Oct 26, 2025
7189520
fix: CS-CRVUSD-089 (2)
Macket Oct 26, 2025
4dada42
test: fix callback_collateral assertions
Macket Oct 26, 2025
83715b2
test: DummyCallback for testing
Macket Oct 26, 2025
4b77e8b
refactor: test_internal_repay_partial
Macket Oct 26, 2025
1f565fd
test: complete test_repay
Macket Oct 26, 2025
626fb24
chore: natspec for min_collateral
Macket Oct 27, 2025
0e9b61f
refactor: max_borrowable
Macket Oct 27, 2025
19b62e5
chore: formatting
Macket Oct 27, 2025
39e7003
refactor: markets getter in LendController
Macket Oct 27, 2025
104cd63
chore: formatting
Macket Oct 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[run]
plugins = boa.coverage
2 changes: 1 addition & 1 deletion .env-example
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
WEB3_ALCHEMY_API_KEY=
ETHERSCAN_API_KEY=
ETHERSCAN_API_KEY=
3 changes: 0 additions & 3 deletions .flake8

This file was deleted.

1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
05e812182aa1267beca1b619d5882f4eb917e423
15 changes: 15 additions & 0 deletions .github/workflows/act.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env sh

# Check if the user provided a YAML file as an argument
if [ -z "$1" ]; then
echo "Usage: $0 <path-to-workflow-file.yaml>"
exit 1
fi

WORKFLOW_FILE="$1"

# Run the act command with the provided workflow file
act -W "$WORKFLOW_FILE" \
--container-architecture linux/amd64 \
-P ubuntu-latest=catthehacker/ubuntu:act-latest \
--pull=false \
27 changes: 27 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: pre-commit

on: [push]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
pre-commit:
name: pre-commit
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v5
with:
submodules: recursive

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true

- name: Install Python 3.12.6
run: uv python install 3.12.6

- name: Run pre-commit checks
run: uvx pre-commit run --all-files --show-diff-on-failure
56 changes: 56 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: tests-boa

on: [push]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HYPOTHESIS_PROFILE: no-shrink

jobs:
tests:
name: ${{ matrix.folder }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
folder:
- "tests/unitary"
- "tests/e2e"
# - "tests/stateful" not ready yet
# Old tests to be migrated
- "tests/flashloan"
- "tests/lm_callback"
- "tests/controller"
- "tests/price_oracles"
- "tests/zaps"
- "tests/amm"
- "tests/lending"
- "tests/stableborrow --ignore=tests/stableborrow/stabilize"
- "tests/stableborrow/stabilize"
steps:
- name: Checkout repo
uses: actions/checkout@v5
with:
submodules: recursive

- name: Install uv
uses: astral-sh/[email protected]
with:
enable-cache: true # Enables built-in caching for uv

- name: Cache Compiler Installations
uses: actions/cache@v3
with:
path: |
~/.vvm
key: compiler-cache-${{ hashFiles('**/uv.lock') }}

- name: Set up Python 3.12.6
run: uv python install 3.12.6

- name: Install Requirements
run: uv sync

- name: Run tests
run: |
uv run pytest ${{ matrix.folder }} -n auto
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@
venv
/hardhat.config.js
.idea
.python-version
.env
/.env-*
/.py312
/scripts/networks.py
/brownie-deploy-emas/build
.coverage
.claude
.vscode
.venv
prof
.prof
.pytest_cache
AGENTS.md
.ruff_cache
35 changes: 35 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-toml
- id: check-yaml
- id: check-ast
- id: detect-private-key

- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
hooks:
- id: nbstripout

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.13.0
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format

# - repo: https://github.com/AlbertoCentonze/natrix
# rev: v0.1.9 # Use the latest version
# hooks:
# - id: natrix
# args: [lint, contracts/lending/LendingFactory.vy] # TODO slowly increase natrix coverage

- repo: https://github.com/benber86/mamushi
rev: main
hooks:
- id: mamushi
args: [--line-length=100]
files: ^(contracts/lending/LendingFactory\.vy|contracts/zaps/CreateFromPool\.vy)$ # TODO slowly increase natrix coverage
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.10
33 changes: 0 additions & 33 deletions ape-config.yaml

This file was deleted.

27 changes: 0 additions & 27 deletions ape-run.sh

This file was deleted.

5 changes: 0 additions & 5 deletions brownie-config.yaml

This file was deleted.

38 changes: 20 additions & 18 deletions brownie-deploy-emas/scripts/deploy_emas.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,32 @@
INTERVAL = 30

FEEDS = {
'optimism-main': [
('ETH', '0x13e3Ee699D1909E989722E753853AE30b17e08c5'),
('wstETH', '0x698B585CbC4407e2D54aa898B2600B53C68958f7'),
('WBTC', '0x718A5788b89454aAE3A028AE9c111A29Be6c2a6F'),
('OP', '0x0D276FC14719f9292D5C1eA2198673d1f4269246'),
('CRV', '0xbD92C6c284271c227a1e0bF1786F468b539f51D9'),
('VELO', '0x0f2Ed59657e391746C1a097BDa98F2aBb94b1120'),
"optimism-main": [
("ETH", "0x13e3Ee699D1909E989722E753853AE30b17e08c5"),
("wstETH", "0x698B585CbC4407e2D54aa898B2600B53C68958f7"),
("WBTC", "0x718A5788b89454aAE3A028AE9c111A29Be6c2a6F"),
("OP", "0x0D276FC14719f9292D5C1eA2198673d1f4269246"),
("CRV", "0xbD92C6c284271c227a1e0bF1786F468b539f51D9"),
("VELO", "0x0f2Ed59657e391746C1a097BDa98F2aBb94b1120"),
],
"fraxtal-main": [
("ETH", "0x89e60b56efD70a1D4FBBaE947bC33cae41e37A72"),
("FRAX", "0xa41107f9259bB835275eaCaAd8048307B80D7c00"),
("FXS", "0xbf228a9131AB3BB8ca8C7a4Ad574932253D99Cd1"),
("CRV", "0x6C5090e85a65038ca6AB207CDb9e7a897cb33e4d"),
],
'fraxtal-main': [
('ETH', '0x89e60b56efD70a1D4FBBaE947bC33cae41e37A72'),
('FRAX', '0xa41107f9259bB835275eaCaAd8048307B80D7c00'),
('FXS', '0xbf228a9131AB3BB8ca8C7a4Ad574932253D99Cd1'),
('CRV', '0x6C5090e85a65038ca6AB207CDb9e7a897cb33e4d'),
]
}


def main():
babe = accounts.load('babe')
babe = accounts.load("babe")
current_network = network.show_active()
feed_list = FEEDS[current_network]
args = {'from': babe, 'priority_fee': 'auto', 'required_confs': 5}
print(f'Deploying on {current_network}')
args = {"from": babe, "priority_fee": "auto", "required_confs": 5}
print(f"Deploying on {current_network}")

for name, feed in feed_list:
oracle = ChainlinkEMA.deploy(feed, OBSERVATIONS, INTERVAL, args, publish_source=False)
print(f'{name}: {oracle.address} - {oracle.price() / 1e18}')
oracle = ChainlinkEMA.deploy(
feed, OBSERVATIONS, INTERVAL, args, publish_source=False
)
print(f"{name}: {oracle.address} - {oracle.price() / 1e18}")
Loading
Loading