File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -164,6 +164,11 @@ def __init__(
164
164
borrowed_decimals: uint256 = convert (staticcall BORROWED_TOKEN.decimals (), uint256 )
165
165
BORROWED_PRECISION = pow_mod256 (10 , 18 - borrowed_decimals)
166
166
167
+ # This is useless for lending markets, but leaving it doesn't create any harm
168
+ assert extcall BORROWED_TOKEN.approve (
169
+ FACTORY.address , max_value (uint256 ), default_return_value= True
170
+ )
171
+
167
172
self ._monetary_policy = monetary_policy
168
173
self .liquidation_discount = liquidation_discount
169
174
self .loan_discount = loan_discount
Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ initializes: core
16
16
17
17
# Usually a bad practice to expose through
18
18
# `__interface__` but this contract is just
19
- # an adapter for the constructor of the Controller
19
+ # an adapter to make the construct of Controller
20
+ # compatible with the old mint factory.
20
21
exports: core.__interface__
21
22
22
23
@@ -37,8 +38,3 @@ def __init__(
37
38
amm,
38
39
empty (address ), # to replace at deployment with view blueprint
39
40
)
40
-
41
- # TODO do this differently
42
- assert extcall core.BORROWED_TOKEN.approve (
43
- core.FACTORY.address , max_value (uint256 ), default_return_value= True
44
- )
Original file line number Diff line number Diff line change @@ -4,6 +4,5 @@ MIN_TICKS_UINT: constant(uint256) = 4
4
4
MAX_TICKS: constant (int256 ) = 50
5
5
6
6
DEAD_SHARES: constant (uint256 ) = 1000
7
- # TODO make sure this is used everywhere
8
7
WAD: constant (uint256 ) = 10 ** 18
9
8
SWAD: constant (int256 ) = 10 ** 18
You can’t perform that action at this time.
0 commit comments