From ffa295d07b822b1e138df99f73c1ff444c9600b0 Mon Sep 17 00:00:00 2001 From: emidev98 Date: Mon, 19 Feb 2024 08:22:33 +0200 Subject: [PATCH 1/2] feat: add AMPWHALE to coingecko --- config/default_config.go | 1 + .../parser/internal/coingecko/coingecko.go | 45 ++++++++++--------- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/config/default_config.go b/config/default_config.go index d34ad8d..f5c2dfd 100644 --- a/config/default_config.go +++ b/config/default_config.go @@ -1213,6 +1213,7 @@ var DefaultPriceServerConfig = Config{ "stargaze", "akash-network", "white-whale", + "eris-amplified-whale", "switcheo", "stride-staked-luna", }, diff --git a/internal/parser/internal/coingecko/coingecko.go b/internal/parser/internal/coingecko/coingecko.go index af6f1f3..2aba2a2 100644 --- a/internal/parser/internal/coingecko/coingecko.go +++ b/internal/parser/internal/coingecko/coingecko.go @@ -7,28 +7,29 @@ import ( // symbol to base coin mapping var COIN_GECKO_MAPPING = map[string]string{ - "bitcoin": "BTC", - "ethereum": "ETH", - "binancecoin": "BNB", - "tether": "USDT", - "usd-coin": "USDC", - "binance-usd": "BUSD", - "dai": "DAI", - "okb": "OKB", - "solana": "SOL", - "cosmos": "ATOM", - "terra-luna-2": "LUNA", - "terra-luna": "LUNC", - "terrausd": "USTC", - "injective-protocol": "INJ", - "secret": "SCRT", - "juno-network": "JUNO", - "stargaze": "STARS", - "akash-network": "AKT", - "white-whale": "WHALE", // White Whale chain - "switcheo": "SWTH", // Carbon chain - "stride-staked-luna": "STLUNA", // Stride chain - "osmosis": "OSMO", + "bitcoin": "BTC", + "ethereum": "ETH", + "binancecoin": "BNB", + "tether": "USDT", + "usd-coin": "USDC", + "binance-usd": "BUSD", + "dai": "DAI", + "okb": "OKB", + "solana": "SOL", + "cosmos": "ATOM", + "terra-luna-2": "LUNA", + "terra-luna": "LUNC", + "terrausd": "USTC", + "injective-protocol": "INJ", + "eris-amplified-whale": "AMPWHALE", + "secret": "SCRT", + "juno-network": "JUNO", + "stargaze": "STARS", + "akash-network": "AKT", + "white-whale": "WHALE", // White Whale chain + "switcheo": "SWTH", // Carbon chain + "stride-staked-luna": "STLUNA", // Stride chain + "osmosis": "OSMO", } func ParseSymbol(symbol string) (string, string, error) { From ea3bc86324459526d136f7a50dbf8a75a19d885d Mon Sep 17 00:00:00 2001 From: emidev98 Date: Wed, 28 Feb 2024 10:47:52 +0200 Subject: [PATCH 2/2] feat: implement price request for bWhale --- config/default_config.go | 1 + .../parser/internal/coingecko/coingecko.go | 49 ++++++++++--------- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/config/default_config.go b/config/default_config.go index d4d69ae..2fa8b1d 100644 --- a/config/default_config.go +++ b/config/default_config.go @@ -1216,6 +1216,7 @@ var DefaultPriceServerConfig = Config{ "switcheo", "stafi-staked-swth", "stride-staked-luna", + "backbone-labs-staked-whale", }, }, "osmosis": { diff --git a/internal/parser/internal/coingecko/coingecko.go b/internal/parser/internal/coingecko/coingecko.go index 50e136a..31ee326 100644 --- a/internal/parser/internal/coingecko/coingecko.go +++ b/internal/parser/internal/coingecko/coingecko.go @@ -7,30 +7,31 @@ import ( // symbol to base coin mapping var COIN_GECKO_MAPPING = map[string]string{ - "bitcoin": "BTC", - "ethereum": "ETH", - "binancecoin": "BNB", - "tether": "USDT", - "usd-coin": "USDC", - "binance-usd": "BUSD", - "dai": "DAI", - "okb": "OKB", - "solana": "SOL", - "cosmos": "ATOM", - "terra-luna-2": "LUNA", - "terra-luna": "LUNC", - "terrausd": "USTC", - "injective-protocol": "INJ", - "eris-amplified-whale": "AMPWHALE", - "secret": "SCRT", - "juno-network": "JUNO", - "stargaze": "STARS", - "akash-network": "AKT", - "white-whale": "WHALE", // White Whale chain - "switcheo": "SWTH", // Carbon chain - "stride-staked-luna": "STLUNA", // Stride chain - "stafi-staked-swth": "rSWTH", // stafi-staked-swth - "osmosis": "OSMO", + "bitcoin": "BTC", + "ethereum": "ETH", + "binancecoin": "BNB", + "tether": "USDT", + "usd-coin": "USDC", + "binance-usd": "BUSD", + "dai": "DAI", + "okb": "OKB", + "solana": "SOL", + "cosmos": "ATOM", + "terra-luna-2": "LUNA", + "terra-luna": "LUNC", + "terrausd": "USTC", + "injective-protocol": "INJ", + "eris-amplified-whale": "AMPWHALE", + "backbone-labs-staked-whale": "BWHALE", + "secret": "SCRT", + "juno-network": "JUNO", + "stargaze": "STARS", + "akash-network": "AKT", + "white-whale": "WHALE", // White Whale chain + "switcheo": "SWTH", // Carbon chain + "stride-staked-luna": "STLUNA", // Stride chain + "stafi-staked-swth": "rSWTH", // stafi-staked-swth + "osmosis": "OSMO", } func ParseSymbol(symbol string) (string, string, error) {