Skip to content

Commit

Permalink
chore: mamushi formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
heswithme committed Oct 16, 2024
1 parent fc86970 commit a1acc63
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions contracts/RewardsHandler.vy
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ from interfaces import IVault
# to adjust the rate while only the dao (which has the `DEFAULT_ADMIN_ROLE`)
# can appoint `RATE_MANAGER`s
from snekmate.auth import access_control

initializes: access_control
exports: (
# we don't expose `supportsInterface` from access control
Expand Down Expand Up @@ -213,9 +214,7 @@ def process_rewards():

# prevent the rewards from being distributed untill the distribution rate
# has been set
assert (
staticcall vault.profitMaxUnlockTime() != 0
), "rewards should be distributed over time"
assert (staticcall vault.profitMaxUnlockTime() != 0), "rewards should be distributed over time"

# any crvUSD sent to this contract (usually through the fee splitter, but
# could also come from other sources) will be used as a reward for scrvUSD
Expand Down Expand Up @@ -374,11 +373,12 @@ def set_stablecoin_lens(_lens: address):

@internal
def _set_stablecoin_lens(_lens: IStablecoinLens):
assert _lens != empty(IStablecoinLens), "no lens"
assert _lens.address != empty(address), "no lens"
self.stablecoin_lens = _lens

log StablecoinLensUpdated(_lens)


@external
def recover_erc20(token: IERC20, receiver: address):
"""
Expand All @@ -395,6 +395,4 @@ def recover_erc20(token: IERC20, receiver: address):
# when funds are recovered the whole balanced is sent to a trusted address.
balance_to_recover: uint256 = staticcall token.balanceOf(self)
assert extcall token.transfer(
receiver, balance_to_recover, default_return_value=True
)
assert extcall token.transfer(receiver, balance_to_recover, default_return_value=True)

0 comments on commit a1acc63

Please sign in to comment.