Repository: curveresearch/curvesim (language: python)

Issue:
Update pool metadata for crypto sim pool
need to update `PoolMetaData` (in `curvesim.pool_data.metadata.__init__`) to return the proper sim pool type for a crypto pool (see "TODO" note).  There is a corresponding test in `test/unit/test_pool_metadata`.  After this, hopefully `get_sim_pool` will work for crypto pools.


Discussion / hints:

Fix patch:
diff --git a/curvesim/pool_data/metadata/__init__.py b/curvesim/pool_data/metadata/__init__.py
index 2412c1438..4dddcde78 100644
--- a/curvesim/pool_data/metadata/__init__.py
+++ b/curvesim/pool_data/metadata/__init__.py
@@ -4,7 +4,12 @@
 from curvesim.exceptions import CurvesimException
 from curvesim.network.subgraph import has_redemption_prices
 from curvesim.pool.cryptoswap import CurveCryptoPool
-from curvesim.pool.sim_interface import SimCurveMetaPool, SimCurvePool, SimCurveRaiPool
+from curvesim.pool.sim_interface import (
+    SimCurveMetaPool,
+    SimCurvePool,
+    SimCurveRaiPool,
+    SimCurveCryptoPool,
+)
 from curvesim.pool.stableswap import CurveMetaPool, CurvePool, CurveRaiPool
 from curvesim.pool_data.metadata.cryptoswap import CryptoswapMetaData
 
@@ -15,8 +20,7 @@
     CurvePool: SimCurvePool,
     CurveMetaPool: SimCurveMetaPool,
     CurveRaiPool: SimCurveRaiPool,
-    # TODO: create sim pool for crypto pools
-    CurveCryptoPool: None,
+    CurveCryptoPool: SimCurveCryptoPool,
 }
 
 _METADATA_TYPE = {


Test patch:
diff --git a/test/unit/test_pool_metadata.py b/test/unit/test_pool_metadata.py
index 84fb53dee..04c78ec75 100644
--- a/test/unit/test_pool_metadata.py
+++ b/test/unit/test_pool_metadata.py
@@ -1,8 +1,9 @@
 import json
 
-from curvesim.pool.cryptoswap.pool import CurveCryptoPool
+from curvesim.pool.sim_interface.cryptoswap import SimCurveCryptoPool
 from curvesim.pool.sim_interface.metapool import SimCurveMetaPool
 from curvesim.pool.sim_interface.pool import SimCurvePool
+from curvesim.pool.cryptoswap.pool import CurveCryptoPool
 from curvesim.pool.stableswap.metapool import CurveMetaPool
 from curvesim.pool.stableswap.pool import CurvePool
 from curvesim.pool_data.metadata import PoolMetaData
@@ -280,8 +281,7 @@ def test_cryptopool():
     assert metadata.chain == "mainnet"
 
     assert metadata.pool_type == CurveCryptoPool
-    # TODO: create sim pool for crypto pools
-    # assert metadata.sim_pool_type == SimCurveCryptoPool
+    assert metadata.sim_pool_type == SimCurveCryptoPool
 
     assert metadata.coin_names == ["STG", "USDC"]
     assert metadata.coins == [