From 73dedbeb9ca6a86abcd71d933de41806ec564992 Mon Sep 17 00:00:00 2001 From: Echelon Foundation <102999403+echelonfoundation@users.noreply.github.com> Date: Sat, 14 May 2022 16:25:30 -0600 Subject: [PATCH 1/2] Update echelon.json Add CoinGecko for Echelon --- src/chains/mainnet/echelon.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chains/mainnet/echelon.json b/src/chains/mainnet/echelon.json index a6612c36..37f64bc8 100644 --- a/src/chains/mainnet/echelon.json +++ b/src/chains/mainnet/echelon.json @@ -1,6 +1,6 @@ { "chain_name": "echelon", - "coingecko": "", + "coingecko": "echelon", "api": "https://api.ech.network", "rpc": ["https://tendermint.ech.network"], "snapshot_provider": "", @@ -13,7 +13,7 @@ "base": "aechelon", "symbol": "ECH", "exponent": "18", - "coingecko_id": "", + "coingecko_id": "echelon", "logo": "/logos/echelon.gif" }] } From 8c94488a2aef993a2a823d4a3b0749d90e4d66ea Mon Sep 17 00:00:00 2001 From: Echelon Foundation <102999403+echelonfoundation@users.noreply.github.com> Date: Sat, 14 May 2022 16:43:34 -0600 Subject: [PATCH 2/2] Update Inflation and Minting for Echelon Updated Inflation and Minting Parameters for Echelon --- src/libs/fetch.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/libs/fetch.js b/src/libs/fetch.js index 4db1e1f6..31d38a16 100644 --- a/src/libs/fetch.js +++ b/src/libs/fetch.js @@ -135,6 +135,9 @@ export default class ChainFetch { if (this.config.chain_name === 'evmos') { return this.get('/evmos/inflation/v1/inflation_rate').then(data => Number(data.inflation_rate / 100 || 0)) } + if (this.config.chain_name === 'echelon') { + return this.get('/echelon/inflation/v1/inflation_rate').then(data => Number(data.inflation_rate / 100 || 0)) + } if (this.isModuleLoaded('minting')) { return this.get('/minting/inflation').then(data => Number(commonProcess(data))) } @@ -206,6 +209,24 @@ export default class ChainFetch { }) return result } + if (this.config.chain_name === 'echelon') { + const result = await this.get('/echelon/inflation/v1/params').then(data => data.params) + await this.get('/echelon/inflation/v1/period').then(data => { + Object.entries(data).forEach(x => { + const k = x[0] + const v = x[1] + result[k] = v + }) + }) + await this.get('/echelon/inflation/v1/total_supply').then(data => { + Object.entries(data).forEach(x => { + const k = x[0] + const v = x[1] + result[k] = v + }) + }) + return result + } if (this.isModuleLoaded('minting')) { return this.get('/minting/parameters').then(data => commonProcess(data)) }