Last active
November 26, 2021 03:18
-
-
Save Toktar/20ebfaf0fac1e822563a4c8309750dd0 to your computer and use it in GitHub Desktop.
suggest-chain.md for Keplr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
await window.keplr.experimentalSuggestChain({ | |
chainId: "cheqd-mainnet-1", | |
chainName: "cheqd", | |
rpc: "https://rpc.cheqd.net", | |
rest: "https://api.cheqd.net", | |
bip44: { | |
coinType: 118, | |
}, | |
bech32Config: { | |
bech32PrefixAccAddr: "cheqd", | |
bech32PrefixAccPub: "cheqd" + "pub", | |
bech32PrefixValAddr: "cheqd" + "valoper", | |
bech32PrefixValPub: "cheqd" + "valoperpub", | |
bech32PrefixConsAddr: "cheqd" + "valcons", | |
bech32PrefixConsPub: "cheqd" + "valconspub", | |
}, | |
currencies: [ | |
{ | |
coinDenom: "CHEQ", | |
coinMinimalDenom: "ncheq", | |
coinDecimals: 9, | |
coinGeckoId: "cheqd", | |
}, | |
], | |
feeCurrencies: [ | |
{ | |
coinDenom: "CHEQ", | |
coinMinimalDenom: "ncheq", | |
coinDecimals: 9, | |
coinGeckoId: "cheqd", | |
}, | |
], | |
stakeCurrency: { | |
coinDenom: "CHEQ", | |
coinMinimalDenom: "ncheq", | |
coinDecimals: 9, | |
coinGeckoId: "cheqd", | |
}, | |
coinType: 118, | |
gasPriceStep: { | |
low: 25, | |
average: 50, | |
high: 100, | |
}, | |
}); |
100000 uscrt is not too high btw as gas, I would expect that tbh.
just spoke to Alex and we can express as 25ncheq, 50ncheq, 100ncheq as the gasPriceSteps
Updated gasPriceStep
after discussion with Alex
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I suggest the following value for
gasPriceStep
for1gas = 25ncheq
:https://gist.github.com/Toktar/20ebfaf0fac1e822563a4c8309750dd0#file-suggest-chain-js-L40-L44
Because of this piece of Keplr codebase:
https://github.com/chainapsis/keplr-extension/blob/2229367b58076fc6426bf956bd1215d6ab0deb3c/packages/hooks/src/tx/fee.ts#L155-L167
But a bit confused because of usual configs, for example, for Secret Network (SCRT) :
https://github.com/chainapsis/keplr-extension/blob/98942684ba47e5a7a411ae12fbc0f15f746c62af/packages/mobile/src/config.ts#L156-L160
That means
1gas = 100 000 uscrt
and looks too much