Skip to content

Instantly share code, notes, and snippets.

@tubackkhoa
Created March 11, 2022 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tubackkhoa/a4814882cd622ecd48db140466c0c3c8 to your computer and use it in GitHub Desktop.
Save tubackkhoa/a4814882cd622ecd48db140466c0c3c8 to your computer and use it in GitHub Desktop.
await window.keplr.experimentalSuggestChain({
// Chain-id of the Cosmos SDK chain.
chainId: "Oraichain",
// The name of the chain to be displayed to the user.
chainName: "Oraichain",
// RPC endpoint of the chain.
rpc: "https://rpc.orai.io",
// REST endpoint of the chain.
rest: "https://lcd.orai.io",
// Staking coin information
stakeCurrency: {
// Coin denomination to be displayed to the user.
coinDenom: "orai",
// Actual denom (i.e. uatom, uscrt) used by the blockchain.
coinMinimalDenom: "orai",
// # of decimal points to convert minimal denomination to user-facing denomination.
coinDecimals: 6,
// (Optional) Keplr can show the fiat value of the coin if a coingecko id is provided.
// You can get id from https://api.coingecko.com/api/v3/coins/list if it is listed.
coinGeckoId: "oraichain-token",
},
// (Optional) If you have a wallet webpage used to stake the coin then provide the url to the website in `walletUrlForStaking`.
// The 'stake' button in Keplr extension will link to the webpage.
// walletUrlForStaking: "",
// The BIP44 path.
bip44: {
// You can only set the coin type of BIP44.
// 'Purpose' is fixed to 44.
coinType: 118,
},
bech32Config: {
bech32PrefixAccAddr: "orai",
bech32PrefixAccPub: "oraipub",
bech32PrefixValAddr: "oraivaloper",
bech32PrefixValPub: "oraivaloperpub",
bech32PrefixConsAddr: "oraivalcons",
bech32PrefixConsPub: "oraivalconspub",
},
// List of all coin/tokens used in this chain.
currencies: [
{
coinDenom: "orai",
coinMinimalDenom: "orai",
coinDecimals: 6,
coinGeckoId: "oraichain-token",
},
],
// List of coin/tokens used as a fee token in this chain.
feeCurrencies: [
{
coinDenom: "orai",
coinMinimalDenom: "orai",
coinDecimals: 6,
coinGeckoId: "oraichain-token",
},
],
gasPriceStep: {
low: 0,
average: 0,
high: 0,
},
features: ["stargate", "ibc-transfer", "cosmwasm"],
});
await window.keplr.enable("Oraichain");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment