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

Ability to use custom SubstrateChain objects #71

Open
wottpal opened this issue May 1, 2024 · 1 comment
Open

Ability to use custom SubstrateChain objects #71

wottpal opened this issue May 1, 2024 · 1 comment

Comments

@wottpal
Copy link
Member

wottpal commented May 1, 2024

No description provided.

@niklasp
Copy link
Contributor

niklasp commented Jun 13, 2024

what exactly does this issue include?

I have the usecase 1 to include e.g. Polkadot relay as well as adding some data to the SubstrateChain as seen in example below e.g. tokenSymbol

interface SubstrateChainExtended extends SubstrateChain {
  tokenSymbol: string
  tokenDecimals?: number
}

export const polkadotRelay: SubstrateChainExtended = {
  network: "Polkadot",
  name: "Polkadot Relay Chain",
  rpcUrls: ["wss://rpc.polkadot.io"],
  ss58Prefix: 0,
  testnet: false,
  tokenSymbol: "DOT",
  tokenDecimals: 10,
  explorerUrls: { [SubstrateExplorer.Subscan]: "https://polkadot.subscan.io" },
}

export const kusamaRelay: SubstrateChainExtended = {
  network: "Kusama",
  name: "Kusama Relay Chain",
  rpcUrls: ["wss://kusama-rpc.polkadot.io"],
  ss58Prefix: 2,
  testnet: false,
  tokenSymbol: "KSM",
  tokenDecimals: 12,
  explorerUrls: { [SubstrateExplorer.Subscan]: "https://kusama.subscan.io" },
}

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

No branches or pull requests

2 participants