update to the latest CASPER deployment
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
parent
57704e9604
commit
eff6e61a39
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ghost-wallet",
|
||||
"version": "0.0.27",
|
||||
"version": "0.1.0",
|
||||
"description": "Browser extension to manage ghost blockchain light clients.",
|
||||
"main": "dist/src/index.js",
|
||||
"author": "Uncle f4ts0 <f4ts0@ghostchain.io>",
|
||||
|
@ -1,17 +1,45 @@
|
||||
export const wellKnownGenesisHashByChainId: Record<string, string> = {
|
||||
casper_staging_testnet: "0x07074eb5f47a6f4dd70430674e5174d5414bc055292b90392fb6f0a28c7524d1",
|
||||
type Network = {
|
||||
chainId: string
|
||||
label: string
|
||||
value: string
|
||||
logo: string
|
||||
prefix: number
|
||||
decimals: number
|
||||
}
|
||||
|
||||
export const wellKnownChainIdByGenesisHash: Record<string, string> = {
|
||||
"0x07074eb5f47a6f4dd70430674e5174d5414bc055292b90392fb6f0a28c7524d1": "casper_staging_testnet",
|
||||
export const networks: Network[] = [
|
||||
{
|
||||
chainId: "0xa217f4ee58a944470e9633ca5bd6d28a428ed64cd9b6f3e413565f359f89af90",
|
||||
value: "casper_staging_testnet",
|
||||
label: "CASPER",
|
||||
logo: "https://cryptologos.cc/logos/ghostchain-logo.svg",
|
||||
prefix: 1996,
|
||||
decimals: 18,
|
||||
}
|
||||
]
|
||||
|
||||
export const wellKnownPrefixByGenesisHash: Record<string, number> = {
|
||||
"0x07074eb5f47a6f4dd70430674e5174d5414bc055292b90392fb6f0a28c7524d1": 1996,
|
||||
}
|
||||
export const wellKnownGenesisHashByChainId: Record<string, string> =
|
||||
networks.reduce((wellKnownChainIds, { chainId, value }) => {
|
||||
wellKnownChainIds[value] = chainId
|
||||
return wellKnownChainIds
|
||||
})
|
||||
|
||||
export const wellKnownDecimalsByGenesisHash: Record<string, number> = {
|
||||
"0x07074eb5f47a6f4dd70430674e5174d5414bc055292b90392fb6f0a28c7524d1": 18,
|
||||
}
|
||||
export const wellKnownChainIdByGenesisHash: Record<string, string> =
|
||||
networks.reduce((wellKnownChainName, { chainId, value }) => {
|
||||
wellKnownChainName[chainId] = value
|
||||
return wellKnownChainName
|
||||
})
|
||||
|
||||
export const wellKnownPrefixByGenesisHash: Record<string, number> =
|
||||
networks.reduce((wellKnownPrefixes, { chainId, prefix }) => {
|
||||
wellKnownPrefixes[chainId] = prefix
|
||||
return wellKnownPrefixes
|
||||
})
|
||||
|
||||
export const wellKnownDecimalsByGenesisHash: Record<string, number> =
|
||||
networks.reduce((wellKnownDecimals, { decimals, chainId }) => {
|
||||
wellKnownDecimals[chainId] = decimals
|
||||
return wellKnownDecimals
|
||||
})
|
||||
|
||||
export const CHANNEL_ID = "ghost-extension"
|
||||
|
@ -1,3 +1,5 @@
|
||||
import { networks } from "@/constants"
|
||||
|
||||
export type StorageEntry = { type: "braveSetting" }
|
||||
|
||||
export type StorageEntryType<E extends StorageEntry> =
|
||||
@ -7,7 +9,7 @@ export async function getDefaultBootnodes(
|
||||
chain: string,
|
||||
): Promise<string[] | undefined> {
|
||||
if (
|
||||
["casper_staging_testnet"].includes(chain)
|
||||
networks.some(network => network.value.includes(chain))
|
||||
) {
|
||||
const bootNodes = (
|
||||
await (
|
||||
|
Loading…
Reference in New Issue
Block a user