Skip to content

Commit 0ec1650

Browse files
fix: correct mpol validation
1 parent 5635d74 commit 0ec1650

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
def rate_write() -> uint256:
22
...
3+
4+
@view
5+
def rate() -> uint256:
6+
...

contracts/lending/LendingFactory.vy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def create(
119119
A_ratio: uint256 = 10**18 * _A // (_A - 1)
120120

121121
# Validate price oracle and monetary policy
122-
extcall _monetary_policy.rate_write()
122+
unused: uint256 = staticcall _monetary_policy.rate()
123123
p: uint256 = (staticcall _price_oracle.price())
124124
assert p > 0
125125
assert extcall _price_oracle.price_w() == p

contracts/mpolicies/SemilogMonetaryPolicy.vy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
@author Curve.fi
1111
@license Copyright (c) Curve.Fi, 2020-2024 - all rights reserved
1212
"""
13+
# TODO bump to vyper 0.4.3
1314
from vyper.interfaces import ERC20
1415

1516

0 commit comments

Comments
 (0)