-
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.
- Loading branch information
Showing
6 changed files
with
42 additions
and
10 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
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 |
7 changes: 7 additions & 0 deletions
7
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,7 @@ | ||
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 |
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,19 @@ | ||
import boa | ||
|
||
|
||
def test_default_behavior(rewards_handler, rate_manager): | ||
new_lens = boa.env.generate_address() | ||
rewards_handler.set_stablecoin_lens(new_lens, sender=rate_manager) | ||
events = rewards_handler.get_logs() | ||
|
||
# Verify event emission | ||
assert f"StablecoinLensUpdated(new_stablecoin_lens={new_lens}" in repr(events) | ||
|
||
assert rewards_handler.stablecoin_lens() == new_lens | ||
|
||
|
||
def test_role_access(rewards_handler): | ||
with boa.reverts("access_control: account is missing role"): | ||
rewards_handler.set_stablecoin_lens( | ||
boa.env.generate_address(), sender=boa.env.generate_address() | ||
) |