From f37489bbc849f69ad08e5a69db0d8966bb69b43d Mon Sep 17 00:00:00 2001 From: kunlun Date: Thu, 15 Jun 2023 15:40:45 +0800 Subject: [PATCH] add has_dex_price to network --- HISTORY.rst | 1 + credmark/cmf/types/network.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index 453dd85..b1328fb 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,7 @@ History ------- 0.8.116 [2023-06-11] * feat: support polygon ledger +* feat: add .has_dex_price() to network 0.8.115 [2023-06-03] * fix: disable BSC ledger diff --git a/credmark/cmf/types/network.py b/credmark/cmf/types/network.py index 140e400..5bb4793 100644 --- a/credmark/cmf/types/network.py +++ b/credmark/cmf/types/network.py @@ -30,6 +30,10 @@ def chain_id(self): def has_ledger(self): return self in [Network.Mainnet] + @property + def has_dex_price(self): + return self in [Network.Mainnet, Network.BSC, Network.Polygon] + @property def has_node(self): return self in [Network.Mainnet,