Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When fetching chain from chain-registry, gas-prices are calculated incorrectly #1507

Closed
freak12techno opened this issue Oct 12, 2024 · 0 comments · Fixed by #1508
Closed

Comments

@freak12techno
Copy link
Contributor

So I initialized a new config and added Sentinel chain by doing this:

rly chains add sentinel

It generated a config with the following gas prices:

            gas-prices: 0.01udvpn

although on Sentinel, the correct minimal-gas-price is 0.1udvpn.

Looking at the code, I see it's being generated here:

gasPrices = fmt.Sprintf("%.2f%s", 0.01, assetList.Assets[0].Base)
, and it has two issues:

  1. it just takes the first denom from the assetlist, which might be incorrect
  2. it assumes that for all chains, the minimal-gas-price is 0.01 of this denom, which also may be wrong.

I think the more correct approach would be to take it from the fee_tokens of the chain itself, like here on Sentinel: https://github.com/cosmos/chain-registry/blob/master/sentinel/chain.json#L17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant