From 8997176dbd85511bb7fdcbcf987e53b07cfa9f53 Mon Sep 17 00:00:00 2001 From: Chan-Ho Suh Date: Mon, 6 Nov 2023 13:07:45 -0500 Subject: [PATCH] Minoir cleanups from feedback --- changelog.d/20231031_152630_chanhosuh_refactor_utils.rst | 2 +- curvesim/constants.py | 2 +- curvesim/pool_data/queries/metadata.py | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/changelog.d/20231031_152630_chanhosuh_refactor_utils.rst b/changelog.d/20231031_152630_chanhosuh_refactor_utils.rst index ae306dfee..854c03f63 100644 --- a/changelog.d/20231031_152630_chanhosuh_refactor_utils.rst +++ b/changelog.d/20231031_152630_chanhosuh_refactor_utils.rst @@ -1,5 +1,5 @@ Added ----- - Created utilities for managing datetime, addresses, and enums. -- Created a constants module to house common constants / enums. +- Created a constants module to house common constants / enums (currently only `Chain` and `Env`). diff --git a/curvesim/constants.py b/curvesim/constants.py index a7471ab95..f02f68439 100644 --- a/curvesim/constants.py +++ b/curvesim/constants.py @@ -18,7 +18,7 @@ def __str__(self): >>> str(Chain.MAINNET) 'Chain.MAINNET' - so we need to explicit use the value. + so we need to explicitly use the value. This behaves like the builtin `StrEnum` (available in 3.11). """ diff --git a/curvesim/pool_data/queries/metadata.py b/curvesim/pool_data/queries/metadata.py index d85068b80..f05c2f4c3 100644 --- a/curvesim/pool_data/queries/metadata.py +++ b/curvesim/pool_data/queries/metadata.py @@ -75,8 +75,9 @@ def get_metadata( chain : str, Chain Chain/layer2 identifier, e.g. “mainnet”, “arbitrum”, “optimism". - end_ts : int - Posix timestamp + end_ts : int, optional + Datetime cutoff, given as Unix timestamp, to pull last snapshot before. + The default value is current datetime, which will pull the most recent snapshot. Returns -------