Skip to content

Commit

Permalink
Adding docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
slundqui committed Oct 29, 2024
1 parent d1cadd6 commit 3c4eaed
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
13 changes: 12 additions & 1 deletion src/agent0/hyperfuzz/fork_fuzz/accrue_interest_ezeth.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,18 @@
DEPOSIT_QUEUE_ADDR = "0xf2F305D14DCD8aaef887E0428B3c9534795D0d60"


def accrue_interest_ezeth(interface: HyperdriveReadWriteInterface, variable_rate: FixedPoint):
def accrue_interest_ezeth(interface: HyperdriveReadWriteInterface, variable_rate: FixedPoint) -> None:
"""
Function to accrue interest in the ezeth pool when fork fuzzing.
Arguments
---------
interface: HyperdriveReadWriteInterface
The interface to the Hyperdrive pool.
variable_rate: FixedPoint
The variable rate of the pool.
"""

assert variable_rate > FixedPoint(0)

# TODO we may want to build these objects once and store them
Expand Down
14 changes: 13 additions & 1 deletion src/agent0/hyperfuzz/fork_fuzz/accrue_interest_fork.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@
from .accrue_interest_ezeth import accrue_interest_ezeth


def accrue_interest_fork(interface: HyperdriveReadWriteInterface, variable_rate: FixedPoint):
def accrue_interest_fork(interface: HyperdriveReadWriteInterface, variable_rate: FixedPoint) -> None:
"""Function to accrue interest in underlying yields when fork fuzzing.
This function looks at the kind of pool defined in the interface, and
matches the correct accrual function to call.
Arguments
---------
interface: HyperdriveReadWriteInterface
The interface to the Hyperdrive pool.
variable_rate: FixedPoint
The variable rate of the pool.
"""

# Switch case for pool types for interest accrual
# TODO do we need to switch chain?
hyperdrive_kind = interface.hyperdrive_kind
Expand Down

0 comments on commit 3c4eaed

Please sign in to comment.