-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: separate supply lens contract (#37)
* feat: stablecoin lens as separate contract * test: testing stablecoin lens * feat: adjust deployment notebook * feat: zero lens check * chore: mamushi formatter * test: adjusted lens manager
- Loading branch information
Showing
14 changed files
with
158 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@view | ||
@external | ||
def circulating_supply() -> uint256: | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FORK_BLOCK_SUPPLY = 62182303636759107878108289 | ||
|
||
|
||
def test_circulating_supply(stablecoin_lens): | ||
# circ supply for block of fork | ||
assert stablecoin_lens.circulating_supply() == FORK_BLOCK_SUPPLY |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
tests/unitary/rewards_handler/test_internal_set_stablecoin_lens.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import boa | ||
|
||
|
||
def test_default_behavior(rewards_handler): | ||
new_lens = boa.env.generate_address() | ||
rewards_handler.internal._set_stablecoin_lens(new_lens) | ||
assert rewards_handler.stablecoin_lens() == new_lens | ||
|
||
|
||
def test_zero_address(rewards_handler): | ||
with boa.reverts("no lens"): | ||
rewards_handler.internal._set_stablecoin_lens("0x0000000000000000000000000000000000000000") |
Oops, something went wrong.